From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19010 invoked by alias); 4 Nov 2012 20:28:27 -0000 Received: (qmail 19002 invoked by uid 22791); 4 Nov 2012 20:28:27 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_AV,TW_VZ,TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-oa0-f47.google.com (HELO mail-oa0-f47.google.com) (209.85.219.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 04 Nov 2012 20:28:22 +0000 Received: by mail-oa0-f47.google.com with SMTP id h1so5294676oag.20 for ; Sun, 04 Nov 2012 12:28:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.146.46 with SMTP id sz14mr6174668obb.76.1352060902024; Sun, 04 Nov 2012 12:28:22 -0800 (PST) Received: by 10.76.90.68 with HTTP; Sun, 4 Nov 2012 12:28:21 -0800 (PST) In-Reply-To: References: Date: Sun, 04 Nov 2012 20:28:00 -0000 Message-ID: Subject: Re: [PATCH] Vzeroupper placement/47440 From: Vladimir Yakovlev To: gcc-patches@gcc.gnu.org Content-Type: multipart/mixed; boundary=f46d0444e92bc7a60d04cdb13590 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00322.txt.bz2 --f46d0444e92bc7a60d04cdb13590 Content-Type: text/plain; charset=ISO-8859-1 Content-length: 5404 Here is Changelogs and patch after fixing Uros remarks. 2012-11-04 Vladimir Yakovlev * mode-switching.c (create_pre_exit): Added code for maybe_builtin_apply case. * config/i386/i386-protos.h (emit_i387_cw_initialization): Deleted. (emit_vzero): Added prototype. (ix86_mode_entry): Likewise. (ix86_mode_exit): Likewise. (ix86_emit_mode_set): Likewise. * config/i386/i386.c (typedef struct block_info_def): Deleted. (define BLOCK_INFO): Deleted. (check_avx256_stores): Added checking for MEM_P. (move_or_delete_vzeroupper_2): Deleted. (move_or_delete_vzeroupper_1): Deleted. (move_or_delete_vzeroupper): Deleted. (ix86_maybe_emit_epilogue_vzeroupper): Deleted. (function_pass_avx256_p): Deleted. (ix86_function_ok_for_sibcall): Deleted disabling sibcall. (nit_cumulative_args): Deleted initialization of of avx256 fields of cfun->machine. (ix86_emit_restore_sse_regs_using_mov): Deleted vzeroupper generation. (ix86_expand_epilogue): Likewise. (ix86_avx_u128_mode_needed): New. (ix86_i387_mode_needed): Renamed ix86_mode_needed. (ix86_mode_needed): New. (ix86_avx_u128_mode_after): New. (ix86_mode_after): New. (ix86_avx_u128_mode_entry): New. (ix86_mode_entry): New. (ix86_avx_u128_mode_exit): New. (ix86_mode_exit): New. (ix86_emit_mode_set): New. (ix86_expand_call): Deleted vzeroupper generation. (ix86_split_call_vzeroupper): Deleted. (ix86_init_machine_status): Initialzed optimize_mode_switching. (ix86_expand_special_args_builtin): Changed. (ix86_reorg): Deleted a call of move_or_delete_vzeroupper. * config/i386/i386.h (VALID_AVX256_REG_OR_OI_MODE): New. (AVX_U128): New. (avx_u128_state): New. (NUM_MODES_FOR_MODE_SWITCHING): Added AVX_U128_ANY. (MODE_AFTER): New. (MODE_ENTRY): New. (MODE_EXIT): New. (EMIT_MODE_SET): Changed. (machine_function): Deleted avx256 fields. * config/i386/i386.md (UNSPEC_CALL_NEEDS_VZEROUPPER): Deleted. (define_insn_and_split "*call_vzeroupper"): Deleted. (define_insn_and_split "*call_rex64_ms_sysv_vzeroupper"): Deleted. (define_insn_and_split "*sibcall_vzeroupper"): Deleted. (define_insn_and_split "*call_pop_vzeroupper"): Deleted. (define_insn_and_split "*sibcall_pop_vzeroupper"): Deleted. (define_insn_and_split "*call_value_vzeroupper"): Deleted. (define_insn_and_split "*sibcall_value_vzeroupper"): Deleted. (define_insn_and_split "*call_value_rex64_ms_sysv_vzeroupper"): Deleted. (define_insn_and_split "*call_value_pop_vzeroupper"): Deleted. (define_insn_and_split "*sibcall_value_pop_vzeroupper"): Deleted. (define_expand "return"): Deleted vzeroupper emitting. (define_expand "simple_return"): Deleted. * config/i386/predicates.md (vzeroupper_operation): New. * config/i386/sse.md (avx_vzeroupper): Changed. 2012-11-04 Vladimir Yakovlev * gcc.target/i386/avx-vzeroupper-5.c: Changed scan-assembler-times. gcc.target/i386/avx-vzeroupper-8.c: Likewise. gcc.target/i386/avx-vzeroupper-9.c: Likewise. gcc.target/i386/avx-vzeroupper-10.c: Likewise. gcc.target/i386/avx-vzeroupper-11.c: Likewise. gcc.target/i386/avx-vzeroupper-12.c: Likewise. gcc.target/i386/avx-vzeroupper-19.c: Likewis. gcc.target/i386/avx-vzeroupper-27.c: New. 2012/11/4 Uros Bizjak : > On Sun, Nov 4, 2012 at 5:18 PM, Vladimir Yakovlev wrote: >> Thank you for review. I did changes you asked (see attached) with >> small change: I left argument in 'emit_insn (GEN_FCN (icode) >> (target));' because 'GEN_FCN (icode)' requeres it. > > Yes, you are correct. > > -/* Output code to initialize control word copies used by trunc?f?i and > - rounding patterns. CURRENT_MODE is set to current control word, > - while NEW_MODE is set to new control word. */ > - > > Please leave this comment... > > +#define VALID_AVX256_REG_OR_OI_MODE(m) \ > + (VALID_AVX256_REG_MODE (m) \ > + || (m) == OImode) > > Please use (MODE) as is case with other predicates. Also, put on one line: > > + (VALID_AVX256_REG_MODE (MODE) || (MODE) == OImode) > > +;; eturn true if OP is a vzeroupper operation. > > Return ... > > + [(unspec_volatile [(const_int 0)] > UNSPECV_VZEROUPPER)] > > Please merge these two lines to one line. > >> Some comment about tests >>> -/* { dg-final { scan-assembler-not "avx_vzeroupper" } } */ >>> +/* { dg-final { scan-assembler-times "avx_vzeroupper" 3 } } */ >>> >>> (... and a couple of similar testsuite changes ...) >>> >>> These asm scans were put there for a reason. I assume you have looked >>> at these differences and are correct (this also implies that current >>> vzeroupper placement code is not optimal or even wrong). >>> >> >> The tests use builtin functions therefore I don't remove them. > > Yes, I agree with this approach. > > These additional changes are OK, I have no further comments. > > Thanks, > Uros. --f46d0444e92bc7a60d04cdb13590 Content-Type: application/octet-stream; name="vzu.patch" Content-Disposition: attachment; filename="vzu.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h94m41k50 Content-length: 58870 ZGlmZiAtLWdpdCBhL2djYy9jb25maWcvaTM4Ni9pMzg2LXByb3Rvcy5oIGIv Z2NjL2NvbmZpZy9pMzg2L2kzODYtcHJvdG9zLmgKaW5kZXggOTY5NzFhZS4u MGQ2NDNiMSAxMDA2NDQKLS0tIGEvZ2NjL2NvbmZpZy9pMzg2L2kzODYtcHJv dG9zLmgKKysrIGIvZ2NjL2NvbmZpZy9pMzg2L2kzODYtcHJvdG9zLmgKQEAg LTE2Nyw4ICsxNjcsMTMgQEAgZXh0ZXJuIGJvb2wgaXg4Nl9zZWNvbmRhcnlf bWVtb3J5X25lZWRlZCAoZW51bSByZWdfY2xhc3MsIGVudW0gcmVnX2NsYXNz LAogCQkJCQkgIGVudW0gbWFjaGluZV9tb2RlLCBpbnQpOwogZXh0ZXJuIGJv b2wgaXg4Nl9jYW5ub3RfY2hhbmdlX21vZGVfY2xhc3MgKGVudW0gbWFjaGlu ZV9tb2RlLAogCQkJCQkgICBlbnVtIG1hY2hpbmVfbW9kZSwgZW51bSByZWdf Y2xhc3MpOworCiBleHRlcm4gaW50IGl4ODZfbW9kZV9uZWVkZWQgKGludCwg cnR4KTsKLWV4dGVybiB2b2lkIGVtaXRfaTM4N19jd19pbml0aWFsaXphdGlv biAoaW50KTsKK2V4dGVybiBpbnQgaXg4Nl9tb2RlX2FmdGVyIChpbnQsIGlu dCwgcnR4KTsKK2V4dGVybiBpbnQgaXg4Nl9tb2RlX2VudHJ5IChpbnQpOwor ZXh0ZXJuIG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yA9IENBTExf SU5TTl9GVU5DVElPTl9VU0FHRSAoaW5zbik7IGFyZzsKKwkgICBhcmcgPSBY RVhQIChhcmcsIDEpKQorCXsKKwkgIGlmIChHRVRfQ09ERSAoWEVYUCAoYXJn LCAwKSkgPT0gVVNFKQorCSAgICB7CisJICAgICAgcnR4IHJlZyA9IFhFWFAg KFhFWFAgKGFyZywgMCksIDApOworCisJICAgICAgaWYgKHJlZyAmJiBSRUdf UCAocmVnKQorCQkgICYmIFZBTElEX0FWWDI1Nl9SRUdfT1JfT0lfTU9ERSAo R0VUX01PREUgKHJlZykpKQorCQlyZXR1cm4gQVZYX1UxMjhfQU5ZOworCSAg ICB9CisJfQorCisgICAgICByZXR1cm4gQVZYX1UxMjhfQ0xFQU47CisgICAg fQorCisgIC8qIENoZWNrIGlmIGEgMjU2Yml0IEFWWCByZWdpc3RlciBpcyBy ZWZlcmVuY2VkIGluIHN0b3Jlcy4gICovCisgIHN0YXRlID0gdW51c2VkOwor ICBub3RlX3N0b3JlcyAocGF0LCBjaGVja19hdngyNTZfc3RvcmVzLCAmc3Rh dGUpOworICBpZiAoc3RhdGUgPT0gdXNlZCkKKyAgICByZXR1cm4gQVZYX1Ux MjhfRElSVFk7CisgIHJldHVybiBBVlhfVTEyOF9BTlk7Cit9CisKKy8qIFJl dHVybiBtb2RlIHRoYXQgaTM4NyBtdXN0IGJlIHN3aXRjaGVkIGludG8KKyAg IHByaW9yIHRvIHRoZSBleGVjdXRpb24gb2YgaW5zbi4gICovCisKK3N0YXRp YyBpbnQKK2l4ODZfaTM4N19tb2RlX25lZWRlZCAoaW50IGVudGl0eSwgcnR4 IGluc24pCiB7CiAgIGVudW0gYXR0cl9pMzg3X2N3IG1vZGU7CiAKQEAgLTE1 NTIyLDExICsxNTA2NywxNjYgQEAgaXg4Nl9tb2RlX25lZWRlZCAoaW50IGVu dGl0eSwgcnR4IGluc24pCiAgIHJldHVybiBJMzg3X0NXX0FOWTsKIH0KIAor LyogUmV0dXJuIG1vZ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09ERSAocGF0KSA9PSAg UEFSQUxMRUwpCisJZm9yIChpID0gWFZFQ0xFTiAocGF0LCAwKSAtIDE7IGkg Pj0gMDsgaS0tKQorCSAgeworCSAgICBydHggeCA9IFhWRUNFWFAgKHBhdCwg MCwgaSk7CisJICAgIGlmIChHRVRfQ09ERSh4KSA9PSBTRVQpCisJICAgICAg cmVnID0gU0VUX0RFU1QgKHgpOworCSAgfQorICAgICAgLyogTW9kZSBhZnRl ciBjYWxsIGlzIHNldCB0byBBVlhfVTEyOF9ESVJUWSBpZiB0aGVyZSBhcmUK KwkgMjU2Yml0IG1vZGVzIHVzZWQgaW4gdGhlIGZ1bmN0aW9uIHJldHVybiBy ZWdpc3Rlci4gICovCisgICAgICBpZiAocmVnICYmIFJFR19QIChyZWcpICYm IFZBTElEX0FWWDI1Nl9SRUdfT1JfT0lfTU9ERSAoR0VUX01PREUgKHJlZykp KQorCXJldHVybiBBVlhfVTEyOF9ESVJUWTsKKyAgICAgIGVsc2UKKwlyZXR1 cm4gQVZYX1UxMjhfQ0xFQU47CisgICAgfQorCisgIGlmICh2emVyb3VwcGVy X29wZXJhdGlvbiAocGF0LCBWT0lEbW9kZSkKKyAgICAgIHx8IHZ6ZXJvYWxs X29wZXJhdGlvbiAocGF0LCBWT0lEbW9kZSkpCisgICAgcmV0dXJuIEFWWF9V MTI4X0NMRUFOOworCisgIC8qIENoZWNrIGlmIGEgMjU2Yml0IEFWWCByZWdp c3RlciBpcyByZWZlcmVuY2VkIGluIHN0b3Jlcy4gICovCisgIHN0YXRlID0g dW51c2VkOworICBub3RlX3N0b3JlcyAocGF0LCBjaGVja19hdngyNTZfc3Rv cmVzLCAmc3RhdGUpOworICBpZiAoc3RhdGUgPT0gdXNlZCkKKyAgICByZXR1 cm4gQVZYX1UxMjhfRElSVFk7CisKKyAgcmV0dXJuIG1vZGU7Cit9CisKKy8q IFJldHVybiB0aGUgbW9kZSB0aGF0IGFuIGluc24gcmVzdWx0cyBpbi4gICov CisKK2ludAoraXg4Nl9tb2RlX2FmdGVyIChpbnQgZW50aXR5LCBpbnQgbW9k ZSwgcnR4IGluc24pCit7CisgIHN3aXRjaCAoZW50aXR5KQorICAgIHsKKyAg ICBjYXNlIEFWWF9VMTI4OgorICAgICAgcmV0dXJuIGl4ODZfYXZ4X3UxMjhf bW9kZV9hZnRlciAobW9kZSwgaW5zbik7CisgICAgY2FzZSBJMzg3X1RSVU5D OgorICAgIGNhc2UgSTM4N19GTE9PUjoKKyAgICBjYXNlIEkzODdfQ0VJTDoK KyAgICBjYXNlIEkzODdfTUFTS19QTToKKyAgICAgIHJldHVybiBtb2RlOwor ICAgIGRlZmF1bHQ6CisgICAgICBnY2NfdW5yZWFjaGFibGUgKCk7CisgICAg fQorfQorCitzdGF0aWMgaW50CitpeDg2X2F2eF91MTI4X21vZGVfZW50cnkg KHZvaWQpCit7CisgIHRyZWUgYXJnOworCisgIC8qIEVudHJ5IG1vZGUgaXMg c2V0IHRvIEFWWF9VMTI4X0RJUlRZIGlmIHRoZXJlIGFyZQorICAgICAyNTZi aXQgbW9kZXMgdXNlZCBpbiBmdW5jdGlvbiBhcmd1bWVudHMuICAqLworICBm b3IgKGFyZyA9IERFQ0xfQVJHVU1FTlRTIChjdXJyZW50X2Z1bmN0aW9uX2Rl Y2wpOyBhcmc7CisgICAgICAgYXJnID0gVFJFRV9DSEFJTiAoYXJnKSkKKyAg ICB7CisgICAgICBydHggcmVnID0gREVDTF9JTkNPTUlOR19SVEwgKGFyZyk7 CisKKyAgICAgIGlmIChyZWcgJiYgUkVHX1AgKHJlZykgJiYgVkFMSURfQVZY MjU2X1JFR19PUl9PSV9NT0RFIChHRVRfTU9ERSAocmVnKSkpCisJcmV0dXJu IEFWWF9VMTI4X0RJUlRZOworICAgIH0KKworICByZXR1cm4gQVZYX1UxMjhf Q0xFQU47Cit9CisKKy8qIFJldHVybiBhIG1vZGUgdGhhdCBFTlRJVFkgaXMg YXNzdW1lZCB0byBiZQorICAgc3dpdGNoZWQgdG8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