Re: [patch] fix tests for AVX512
On Tue, May 27, 2014 at 12:28 PM, Petr Murzin petrmurz...@gmail.com wrote: Hi, I've fixed tests for AVX512, so they could be compiled with -Werror -Wall. Please have a look. 2014-05-19 Petr Murzin petr.mur...@intel.com * gcc.target/i386/avx512f-vaddpd-2.c: Add static void for CALC, void for TEST instead of static void. * gcc.target/i386/avx512f-vaddps-2.c: Ditto. * gcc.target/i386/avx512f-vblendmpd-2.c: Ditto. * gcc.target/i386/avx512f-vblendmps-2.c: Ditto. * gcc.target/i386/avx512f-vbroadcastf32x4-2.c:Ditto. * gcc.target/i386/avx512f-vbroadcastf64x4-2.c:Ditto. * gcc.target/i386/avx512f-vbroadcasti32x4-2.c: Ditto. * gcc.target/i386/avx512f-vbroadcasti64x4-2.c: Ditto. * gcc.target/i386/avx512f-vbroadcastsd-2.c: Ditto. * gcc.target/i386/avx512f-vbroadcastss-2.c: Ditto. * gcc.target/i386/avx512f-vcvtps2dq-2.c: Ditto. * gcc.target/i386/avx512f-vcvttps2dq-2.c: Ditto. * gcc.target/i386/avx512f-vdivpd-2.c: Ditto. * gcc.target/i386/avx512f-vdivps-2.c: Ditto. * gcc.target/i386/avx512f-vextractf32x4-2.c: Ditto. * gcc.target/i386/avx512f-vextracti32x4-2.c: Ditto. * gcc.target/i386/avx512f-vmaxpd-2.c: Ditto. * gcc.target/i386/avx512f-vmaxps-2.c: Ditto. * gcc.target/i386/avx512f-vminpd-2.c: Ditto. * gcc.target/i386/avx512f-vminps-2.c: Ditto. * gcc.target/i386/avx512f-vmulpd-2.c: Ditto. * gcc.target/i386/avx512f-vmulps-2.c: Ditto. * gcc.target/i386/avx512f-vpaddd-2.c: Ditto. * gcc.target/i386/avx512f-vpaddq-2.c: Ditto. * gcc.target/i386/avx512f-vpblendmd-2.c: Ditto. * gcc.target/i386/avx512f-vpblendmq-2.c: Ditto. * gcc.target/i386/avx512f-vpbroadcastd-2.c: Ditto. * gcc.target/i386/avx512f-vpbroadcastq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpeqd-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpeqq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpgtd-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpgtq-2.c: Ditto. * gcc.target/i386/avx512f-vpmovdb-2.c: Ditto. * gcc.target/i386/avx512f-vpmovdw-2.c: Ditto. * gcc.target/i386/avx512f-vpmovqb-2.c: Ditto. * gcc.target/i386/avx512f-vpmovqw-2.c: Ditto. * gcc.target/i386/avx512f-vpmovsdb-2.c: Ditto. * gcc.target/i386/avx512f-vpmovsdw-2.c: Ditto. * gcc.target/i386/avx512f-vpmovsqb-2.c: Ditto. * gcc.target/i386/avx512f-vpmovsqd-2.c: Ditto. * gcc.target/i386/avx512f-vpmovsqw-2.c: Ditto. * gcc.target/i386/avx512f-vpslld-2.c: Ditto. * gcc.target/i386/avx512f-vpslldi-2.c: Ditto. * gcc.target/i386/avx512f-vpsllq-2.c: Ditto. * gcc.target/i386/avx512f-vpsllqi-2.c: Ditto. * gcc.target/i386/avx512f-vpsrad-2.c: Ditto. * gcc.target/i386/avx512f-vpsradi-2.c: Ditto. * gcc.target/i386/avx512f-vpsraq-2.c: Ditto. * gcc.target/i386/avx512f-vpsraqi-2.c: Ditto. * gcc.target/i386/avx512f-vpsravd-2.c: Ditto. * gcc.target/i386/avx512f-vpsravq-2.c: Ditto. * gcc.target/i386/avx512f-vpsubd-2.c: Ditto. * gcc.target/i386/avx512f-vpsubq-2.c: Ditto. * gcc.target/i386/avx512f-vptestmd-2.c: Ditto. * gcc.target/i386/avx512f-vptestmq-2.c: Ditto. * gcc.target/i386/avx512f-vptestnmd-2.c: Ditto. * gcc.target/i386/avx512f-vptestnmq-2.c: Ditto. * gcc.target/i386/avx512f-vpunpckhdq-2.c: Ditto. * gcc.target/i386/avx512f-vpunpckhqdq-2.c: Ditto. * gcc.target/i386/avx512f-vpunpckldq-2.c: Ditto. * gcc.target/i386/avx512f-vpunpcklqdq-2.c: Ditto. * gcc.target/i386/avx512f-vscalefpd-2.c: Ditto. * gcc.target/i386/avx512f-vscalefps-2.c: Ditto. * gcc.target/i386/avx512f-vshuff32x4-2.c: Ditto. * gcc.target/i386/avx512f-vshuff64x2-2.c: Ditto. * gcc.target/i386/avx512f-vshufi32x4-2.c: Ditto. * gcc.target/i386/avx512f-vshufi64x2-2.c: Ditto. * gcc.target/i386/avx512f-vsubpd-2.c: Ditto. * gcc.target/i386/avx512f-vsubps-2.c: Ditto. * gcc.target/i386/avx512f-vpmovdb-2.c: Ditto. * gcc.target/i386/avx512f-vpmovdw-2.c: Ditto. * gcc.target/i386/avx512f-vpmovqb-2.c: Ditto. * gcc.target/i386/avx512f-vpmovqw-2.c: Ditto. * gcc.target/i386/avx512f-vpmovsdb-2.c: Ditto. * gcc.target/i386/avx512f-vpmovsdw-2.c: Ditto. * gcc.target/i386/avx512f-vpmovsqb-2.c: Ditto. * gcc.target/i386/avx512f-vpmovsqd-2.c: Ditto. * gcc.target/i386/avx512f-vpmovsqw-2.c: Ditto. * gcc.target/i386/avx512f-vpsllvd-2.c: Ditto. * gcc.target/i386/avx512f-vpsllvq-2.c: Ditto. * gcc.target/i386/avx512f-vpsrld-2.c: Ditto. * gcc.target/i386/avx512f-vpsrldi-2.c: Ditto. * gcc.target/i386/avx512f-vpsrlq-2.c: Ditto. * gcc.target/i386/avx512f-vpsrlqi-2.c: Ditto. * gcc.target/i386/avx512f-vpsrlvd-2.c: Ditto. * gcc.target/i386/avx512f-vpsrlvq-2.c: Ditto. * gcc.target/i386/avx512f-vpshufd-2.c: Delete variables, void for TEST instead of static void. * gcc.target/i386/avx512f-vpcmpged-2.c: Add static void for CALC, delete unused variables. * gcc.target/i386/avx512f-vpcmpgeq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpgeud-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpgeuq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpled-2.c: Add static void for CALC, delete unused variables, void for TEST instead of static void. * gcc.target/i386/avx512f-vpcmpleq-2.c: Ditto. * gcc.target/i386/avx512f-vpcmpleud-2.c: Ditto.
[PATCH, ARM] MI-thunk fix for TARGET_THUMB1_ONLY
Hi Richard, Ramana, Attached is a small fix for resolving a g++.old-deja/g++.jason/thunk2.C regression we found under a TARGET_THUMB1_ONLY multilib (-mthumb -march=armv6-m to be exact). Basically under those conditions, the thunk is in Thumb mode, so the subtraction should be 4 rather than 8. Original patch was by Julian, with trivial adaptations for trunk by me. We've been carrying this fix for a while by now. Okay for trunk? (and stable branches?) Thanks, Chung-Lin 2014-06-08 Julian Brown jul...@codesourcery.com Chung-Lin Tang clt...@codesourcery.com * config/arm/arm.c (arm_output_mi_thunk): Fix offset for TARGET_THUMB1_ONLY. Add comments. Index: config/arm/arm.c === --- config/arm/arm.c (revision 211353) +++ config/arm/arm.c (working copy) @@ -28428,9 +28428,13 @@ arm_output_mi_thunk (FILE *file, tree thunk ATTRIB fputs (:\n, file); if (flag_pic) { - /* Output .word .LTHUNKn-7-.LTHUNKPCn. */ + /* Output .word .LTHUNKn-[37]-.LTHUNKPCn. */ rtx tem = XEXP (DECL_RTL (function), 0); - tem = plus_constant (GET_MODE (tem), tem, -7); + /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC + pipeline offset is four rather than eight. Adjust the offset + accordingly. */ + tem = plus_constant (GET_MODE (tem), tem, + TARGET_THUMB1_ONLY ? -3 : -7); tem = gen_rtx_MINUS (GET_MODE (tem), tem, gen_rtx_SYMBOL_REF (Pmode,
[v3] Tighten some config/abi/pre/gnu.ver patterns
Hi, as discussed, tested x86_64-linux multilib, committed. Thanks, Paolo. /// 2014-06-08 Paolo Carlini paolo.carl...@oracle.com * config/abi/pre/gnu.ver: Tighten some patterns; tidy. Index: config/abi/pre/gnu.ver === --- config/abi/pre/gnu.ver (revision 211353) +++ config/abi/pre/gnu.ver (working copy) @@ -24,11 +24,9 @@ # Names inside the 'extern' block are demangled names. extern C++ { - std::[A-Z]*; - std::a[a-c]*; - std::ad[a-n]*; - std::ad[p-z]*; - std::a[e-z]*; +# std::[A-Z]*; +# std::a[e-z]*; + std::ad[a-np-z]*; # std::ba[a-r]*; std::basic_[a-e]*; std::basic_f[a-h]*; @@ -45,12 +43,10 @@ std::basic_istr[f-z]*; std::basic_i[t-z]*; std::basic_[j-n]*; - std::basic_o[a-e]*; # std::basic_ofstream; # std::basic_o[g-z]*; - std::basic_o[g-r]*; - std::basic_ostr[a-d]*; - std::basic_ostr[f-z]*; + std::basic_o[a-eg-r]*; + std::basic_ostr[a-df-z]*; std::basic_[p-r]*; # std::basic_streambuf # std::basic_string @@ -64,20 +60,20 @@ # std::c[i-z]*; std::c[i-n]*; # std::condition_variable; - std::co[^n]*; - std::c[p-s]*; +# std::co[^n]*; + std::cout; +# std::codecvt*; + std::collate*; + std::c[p-sv-z]*; std::cu[^r]*; # std::current_exception - std::c[v-z]*; # std::[d-g]*; - std::d[a-d]*; - std::d[f-n]*; + std::d[a-df-np-z]*; std::domain_error::d*; # std::domain_error::~d*; - std::d[p-z]*; - std::e[a-q]*; + std::e[a-m]*; std::error[^_]*; - std::e[s-z]*; +# std::e[s-z]; std::gslice*; std::h[^a]*; std::i[a-m]*; @@ -84,9 +80,24 @@ std::invalid_argument::i*; # std::invalid_argument::~i*; # std::ios_base::[A-Ha-z]*; - std::ios_base::[A-Ha-f]*; + std::ios_base::[A-Ha-e]*; + std::ios_base::failbit; + std::ios_base::failure*; + std::ios_base::fixed; + std::ios_base::float; + std::ios_base::floatfield; std::ios_base::goodbit; - std::ios_base::[h-z]*; +# std::ios_base::[h-z]*; + std::ios_base::[h-otu]*; + std::ios_base::register_callback*; + std::ios_base::right; + std::ios_base::scientific; + std::ios_base::showbase; + std::ios_base::showpoint; + std::ios_base::showpos; + std::ios_base::skipws; + std::ios_base::sync_with_stdio*; + std::ios_base::xalloc*; std::ios_base::_M_grow_words*; std::ios_base::_M_init*; std::ios_base::Init::[A-Za-z]*; @@ -96,19 +107,19 @@ # std::istreambuf_iterator std::istringstream*; std::istrstream*; - std::i[t-z]*; +# std::i[t-z]*; std::[A-Zj-k]*; std::length_error::l*; # std::length_error::~l*; std::logic_error*; std::locale::[A-Za-e]*; - std::locale::facet::[A-Za-z]*; + std::locale::facet::[A-Zg-z]*; std::locale::facet::_S_get_c_locale*; std::locale::facet::_S_clone_c_locale*; std::locale::facet::_S_create_c_locale*; std::locale::facet::_S_destroy_c_locale*; std::locale::[A-Zg-h]*; - std::locale::id::[A-Za-z]*; +# std::locale::id::[A-Za-z]*; std::locale::id::_M_id*; std::locale::[A-Zj-z]*; std::locale::_[A-Ha-z]*; @@ -117,15 +128,13 @@ std::locale::_[J-Ra-z]*; std::locale::_S_normalize_category*; std::locale::_[T-Za-z]*; -# std::[A-Zm-r]*; -# std::[A-Zm]*; - std::[A-Z]*; - std::messages*; - std::money*; -# std::n[^u]*; - std::n[^aue]*; - std::nu[^m]*; - std::num[^e]*; +# std::messages*; +# std::money*; +# std::n[^aue]*; + std::nothrow; +# std::nu[^m]*; +# std::num[^e]*; + std::numpunct*; std::ostrstream*; std::out_of_range::o*; # std::out_of_range::~o*; @@ -145,18 +154,16 @@ std::strstreambuf*; # std::t[a-q]*; std::t[a-g]*; - std::th[a-h]*; - std::th[j-q]*; - std::th[s-z]*; + std::th[a-hj-qs-z]*; # std::t[i-n]*; std::tr1::h[^a]*; - std::t[s-z]*; +# std::t[s-z]*; # std::[A-Zu-z]*; std::underflow_error::u*; # std::underflow_error::~u*; std::uncaught_exception*; std::unexpected*; - std::[A-Zv-z]*; + std::[A-Zw-z]*; std::_List_node_base::hook*; std::_List_node_base::swap*; std::_List_node_base::unhook*; @@ -179,6 +186,11 @@ # among the standard integer types and sizes on different platforms and # under different modes of 64-bit architecture (ILP64, LLP64, etc.) +# std::allocator +_ZNSaI[cw]EC[12]Ev; +_ZNSaI[cw]ED*; +_ZNSaI[cw]EC[12]ERKS_; + # std::string # 'y' here and below represents 'unsigned long long' # where it is used for size_type on LLP64 platforms.
[fortran,patch] Fix Cray pointers in modules
The attached one-line patch fixes PR45187 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45187), where we would sometimes try to create the backend_decl of Cray-pointees twice. We should simply bail out early of the procedure, following what is done in the similar situation in gfc_finish_var_decl(). Bootstrapped and regtested on x86_64-apple-darwin13, includes a testcase. OK to commit? FX cray.diff Description: Binary data cray.ChangeLog Description: Binary data
Re: ipa-visibility TLC 2/n
Honza, I finally was able to bootstrap GCC on AIX yesterday. The bootstrap works, but the testsuite results are in extremely bad shape: 250 failures in G++ testsuite and 470 failures in libstdc++ testsuite. David, this is first of the AIX fixes. It makes aliases to be output after thunks so they are not silently miscompiled by the assembler. I checked and the other ordering issue was actually Solaris linker not liking thunks before functions (that is a pity, because thunk just before function desn't need the tail jump: something I still want to get right, but incrementally). Bootstrapped/regtested on AIX, comitted. Honza * cgraphunit.c (assemble_thunks_and_aliases): Expand thunks before outputting aliases. Index: cgraphunit.c === --- cgraphunit.c(revision 211106) +++ cgraphunit.c(working copy) @@ -1718,8 +1718,8 @@ struct cgraph_node *thunk = e-caller; e = e-next_caller; +expand_thunk (thunk, true); assemble_thunks_and_aliases (thunk); -expand_thunk (thunk, true); } else e = e-next_caller;
Re: ipa-visibility TLC 2/n
Hi, this is second part of fix - it just makes ipa-visibility to work less hard when initializer already contains local aliases. I noticed this when debugging the original issue. Bootstrapped/regtested rs6000-aix, comitted. Honza * ipa-visibility.c: Include varasm.h (can_replace_by_local_alias): Ceck decl_binds_to_current_def_p. Index: ipa-visibility.c === --- ipa-visibility.c(revision 211120) +++ ipa-visibility.c(working copy) @@ -82,6 +82,7 @@ #include pointer-set.h #include calls.h #include gimple-expr.h +#include varasm.h /* Return true when NODE can not be local. Worker for cgraph_local_node_p. */ @@ -340,6 +341,7 @@ can_replace_by_local_alias (symtab_node *node) { return (symtab_node_availability (node) AVAIL_OVERWRITABLE + !decl_binds_to_current_def_p (node-decl) !symtab_can_be_discarded (node)); }
Re: ipa-visibility TLC 2/n
Hi, this is third part - it fixes handling of aliases in the anchor sections by recursing in place_block_symbol as discussed and also fixing one case where we lookup attribute instead of using symbol table * varasm.c (use_blocks_for_decl_p): Check symbol table instead of alias attribute. (place_block_symbol): Recurse on aliases. Index: varasm.c === --- varasm.c(revision 211356) +++ varasm.c(working copy) @@ -1184,6 +1184,8 @@ static bool use_blocks_for_decl_p (tree decl) { + struct symtab_node *snode; + /* Only data DECLs can be placed into object blocks. */ if (TREE_CODE (decl) != VAR_DECL TREE_CODE (decl) != CONST_DECL) return false; @@ -1197,7 +1199,9 @@ /* If this decl is an alias, then we don't want to emit a definition. */ - if (lookup_attribute (alias, DECL_ATTRIBUTES (decl))) + if (TREE_CODE (decl) == VAR_DECL + (snode = symtab_get_node (decl)) != NULL + snode-alias) return false; return targetm.use_blocks_for_decl_p (decl); @@ -7028,6 +7032,8 @@ if (snode-alias) { rtx target = DECL_RTL (symtab_alias_ultimate_target (snode)-decl); + + place_block_symbol (target); SYMBOL_REF_BLOCK_OFFSET (symbol) = SYMBOL_REF_BLOCK_OFFSET (target); return; }
Re: ipa-visibility TLC 2/n
Hi, this is the last part. It makes DECL_VIRTUAL to be copied when creating aliases. This is needed to make sanity check in gimple-fold happy (it checks that vtables are DECL_VIRTUAL). It also resets initializers of aliases to save memory. Bootstrapped/regtested rs6000-aix, comitted. Index: symtab.c === --- symtab.c(revision 211357) +++ symtab.c(working copy) @@ -1154,7 +1154,9 @@ TREE_PUBLIC (new_decl) = 0; DECL_COMDAT (new_decl) = 0; DECL_WEAK (new_decl) = 0; - DECL_VIRTUAL_P (new_decl) = 0; + + /* Since the aliases can be added to vtables, keep DECL_VIRTUAL flag. */ + DECL_VIRTUAL_P (new_decl) = DECL_VIRTUAL_P (node-decl); if (TREE_CODE (new_decl) == FUNCTION_DECL) { DECL_STATIC_CONSTRUCTOR (new_decl) = 0; @@ -1165,6 +1167,7 @@ else { TREE_READONLY (new_decl) = TREE_READONLY (node-decl); + DECL_INITIAL (new_decl) = error_mark_node; new_node = varpool_create_variable_alias (new_decl, node-decl); } symtab_resolve_alias (new_node, node);
Re: [PATCH] Fix PR middle-end/61141
On 4-Jun-14, at 3:38 AM, Jeff Law wrote: On 05/24/14 12:39, John David Anglin wrote: The insns are being deleted in final after the assembly output has being done. So, for example, pa_output_call is never called with a delayed branch sequence containing a NOTE_INSN_DELETED. OK. That's good to know. I scanned final and final_scan_insn and see a couple places where we delete insns, but if I'm reading the code correctly, they would result in seeing the NOTE_INSN_DELETED rather than a real insn in the output routines. So what code during final is deleting these insns? It's the PA backend. For example, /* If this isn't a sibcall, we put the load of %r27 into the delay slot. We can't do this in a sibcall as we don't have a second call-clobbered scratch register available. */ if (seq_length != 0 ! JUMP_P (NEXT_INSN (insn)) !sibcall) { final_scan_insn (NEXT_INSN (insn), asm_out_file, optimize, 0, NULL); /* Now delete the delay insn. */ SET_INSN_DELETED (NEXT_INSN (insn)); delay_insn_deleted = 1; } The insn is deleted so that it won't be emitted again. This is done in a bunch of places. What's new is the verification after assembly output. Dave -- John David Anglin dave.ang...@bell.net
Re: [PATCH] Fix PR middle-end/61141
On 06/08/14 12:06, John David Anglin wrote: On 4-Jun-14, at 3:38 AM, Jeff Law wrote: On 05/24/14 12:39, John David Anglin wrote: The insns are being deleted in final after the assembly output has being done. So, for example, pa_output_call is never called with a delayed branch sequence containing a NOTE_INSN_DELETED. OK. That's good to know. I scanned final and final_scan_insn and see a couple places where we delete insns, but if I'm reading the code correctly, they would result in seeing the NOTE_INSN_DELETED rather than a real insn in the output routines. So what code during final is deleting these insns? It's the PA backend. For example, /* If this isn't a sibcall, we put the load of %r27 into the delay slot. We can't do this in a sibcall as we don't have a second call-clobbered scratch register available. */ if (seq_length != 0 ! JUMP_P (NEXT_INSN (insn)) !sibcall) { final_scan_insn (NEXT_INSN (insn), asm_out_file, optimize, 0, NULL); /* Now delete the delay insn. */ SET_INSN_DELETED (NEXT_INSN (insn)); delay_insn_deleted = 1; } The insn is deleted so that it won't be emitted again. This is done in a bunch of places. What's new is the verification after assembly output. Ah. OK. Glad to see I wasn't missing something in final.c. Let me review things again, but I'm a *lot* less worried now :-) Thanks for digging into this! jeff
Re: [PATCH] Trust TREE_ADDRESSABLE
... In this particular translation unit you mean? Yes, in the translation unit being processed. That would be worthless information for decls also reachable from elsewhere. It's the information: ADDR_EXPR of this DECL is taken somewhere in the IL, it's no more or not less worthless than any other information. Information whether ADDR_EXPR exists on DECL is actually more accurately mainted by ipa-ref code (that is also used to drop TREE_ADDRSSABLE on static vars). Having information whether source language permits taking address of a given object is more useful. So - let's say history is something of the past? Maybe, but it's an annoying precedent: no clear explanation for the change, no testcase and no audit of the affected front-ends (all I guess). That should really have been discussed beforehand. It is my fault here - I alwasy interpreted TREE_ADDRESSABLE this way and it seems to work for C/C++ that are the frontends I usually look into. Sorry for that. Honza -- Eric Botcazou
[fortran,patch] Binding label can be any initialisation expression
Well, only scalar character of the default kind, but still… This patch achieves this goal by following the obvious plan, which has not changed since I wrote it in PR 36275 in 2008 :) The custom matcher for binding label, in gfc_match_bind_c(), is removed and the generic matcher gfc_match_init_expr() is called, followed by checks that the expression obtained fulfills the constraints of a C identifier. So, now is the time to think about PR 38839 (what characters to allow as a binding label): right now, I allow alphadecimals, underscore and dollar. From the PR comments, it seems like @ and ` might be also allowed for universal-character names, but they are not supported by GCC on platforms I tested right now. Let me know what you think, but I don’t think we should worry to much about it. Bootstrapped and regtested on x86_64-apple-darwin13, comes with testcases. OK to commit? FX PS: you may notice I have had some time to hack at gfortran these past few days... it feels good! bind_c.ChangeLog Description: Binary data bind_c.diff Description: Binary data
Re: [Patch] Minor fixes for regtesting gfortran with -flto
On Mon, 5 May 2014, Dominique Dhumieres wrote: With the following patch, gfortran can be regtested with -flto with no failure, but pr54852 and pr60061. OK for trunk? Dominique 2014-05-05 Dominique d'Humieres domi...@lps.ens.fr * gfortran.dg/gfortran.dg/bind_c_array_params_2.f90: Adjust regexp for -flto. * gfortran.dg/gfortran.dg/pr48636-2.f90: Likewise. * gfortran.dg/pr52835.f90: Likewise. --- ../_clean/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2013-01-25 09:57:48.0 +0100 +++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2014-02-04 19:24:06.0 +0100 @@ -16,7 +16,7 @@ integer :: aa(4,4) call test(aa) end -! { dg-final { scan-assembler-times myBindC 1 { target { ! { hppa*-*-hpux* } } } } } -! { dg-final { scan-assembler-times myBindC,%r2 1 { target { hppa*-*-hpux* } } } } +! { dg-final { scan-assembler-times call\[^\n\r\]*myBindC 1 { target { ! { hppa*-*-hpux* } } } } } +! { dg-final { scan-assembler-times call\[^\n\r\]*myBindC,%r2 1 { target { hppa*-*-hpux* } } } } ! { dg-final { scan-tree-dump-times test \\\(parm\\. 1 original } } ! { dg-final { cleanup-tree-dump original } } No, the related subroutine call instruction does not include the string call for *all* targets, so this now regressed this test everywhere else. ISTR there being a better recipe to deal with LTO in this situation, but I'll leave the grepping to you. I opened PR61453 for this. brgds, H-P
Move DECL_SECTION_NAME into symtab
Hi, this patch follows the change to move DECL_COMDAT_GROUP by moving DECL_SECTION_NAME into symtab nodes instead of keeping it in decl_with_vis. (I pla to proceed with other symbol table related fields). It follows exactly same path as the previous patch. Notable change is adding of node removal into duplicate_decl in c-decl.c. Memory usage wise the patch is small win for non-WPA, at WPA we actually consume bit more memory (about 800K on Firefox). We have more symtab nodes than declarations because of inline clonning. This will be solved by fixing memory representation of symbol nodes (I plan to move rare items into on side hashtables). With accessors API it should be easy. Bootstrapped/regtested x86_64-linux, slightly earlier version of patch was tested also at PPC (linux/AIX) Honza * symtab.c (dump_symtab_base): Update dumping. (symtab_make_decl_local): Clear only DECL_COMDAT. * tree-vect-data-refs.c (Check that variable is static before tampering with sections. * cgraphclones.c (duplicate_thunk_for_node): Do not clear section name. (cgraph_create_virtual_clone): Likewise. * tree.c (decl_comdat_group, decl_comdat_group_id): Constify argument. (decl_section_name, set_decl_section_name): New accessors. (find_decls_types_r): Do not walk section name * tree.h (DECL_SECTION_NAME): Implement using decl_section_name. (decl_comdat_group, decl_comdat_group_id): Constify. (decl_section_name, set_decl_section_name): Update. * varpool.c (varpool_finalize_named_section_flags): Use get_section. * cgraph.c (cgraph_add_thunk): Reset node instead of rebuilding. (cgraph_make_node_local_1): Clear section and comdat group. * cgraph.h (set_comdat_group): Sanity check. (get_section, set_section): New. * ipa-comdats.c (ipa_comdats): Use get_section. * ipa.c (ipa_discover_readonly_nonaddressable_var): Likewise. * lto-streamer-out.c: Do not follow section names. * c-family/c-common.c (handle_section_attribute): Update. * lto-cgraph.c (lto_output_node): Output section. (lto_output_varpool_node): Likewise. (read_comdat_group): Rename to ... (read_identifier): ... this one. (read_string_cst): New function. (input_node, input_varpool_node): Input section names. * tree-emutls.c (get_emutls_init_templ_addr): Update. (new_emutls_decl): Update. (secname_for_decl): Check section names only of static vars. * config/mep/mep.c (mep_unique_section): Use set_decl_section_name. * config/i386/winnt.c (i386_pe_unique_section): Likewise. * config/i386/i386.c (x86_64_elf_unique_section): Likewise. * config/c6x/c6x.c (c6x_elf_unique_section): Likewise. * config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Likewise. * config/mcore/mcore.c (mcore_unique_section): Likewise. * config/mips/mips.c (mips16_build_function_stub): Likewise. * config/v850/v850.c (v850_insert_attributes): Likewise. * config/h8300/h8300.c: (h8300_handle_eightbit_data_attribute): Likewise. (h8300_handle_tiny_data_attribute): Likewise. * config/bfin/bfin.c (bfin_handle_l1_text_attribute): Likewise. (bfin_handle_l2_attribute): Likewise. * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1, lto_fixup_prevailing_decls): Skip section names. * go/go-gcc.cc (global_variable_set_init): Use set_decl_section_name. * tree-streamer-in.c (lto_input_ts_decl_with_vis_tree_pointers): Do not read section name. * gcc-interface/utils.c (process_attributes): Use it. * c-decl.c (merge_decls): Use set_decl_section_name. (duplicate_decls): Remove node if it exists. * class.c (build_utf8_ref): Use set_decl_section_name. (emit_register_classes_in_jcr_section): Likewise. (emit_register_classes_in_jcr_section): Likewise. * method.c (use_thunk): Use set_decl_section_name. * optimize.c (maybe_clone_body): Use set_decl_section_name. * decl.c (duplicate_decls): Likewise. * vtable-class-hierarchy.c: Likewise. Index: ipa-visibility.c === --- ipa-visibility.c(revision 211362) +++ ipa-visibility.c(working copy) @@ -512,6 +512,7 @@ function_and_variable_visibility (bool w next = next-same_comdat_group) { next-set_comdat_group (NULL); + next-set_section (NULL); symtab_make_decl_local (next-decl); next-unique_name = ((next-resolution == LDPR_PREVAILING_DEF_IRONLY || next-unique_name @@ -526,6 +527,8 @@ function_and_variable_visibility (bool w } if (TREE_PUBLIC
Re: [PATCH] Don't call init_caller_save if LRA enabled
2014-06-06 21:37 GMT+08:00 Vladimir Makarov vmaka...@redhat.com: On 2014-06-04, 12:31 PM, Kito Cheng wrote: LRA generate caller-save register store/restore during split register, not generate by caller-save.c:save_call_clobbered_regs, so initialize this module by init_caller_save is meaningless if LRA enabled 2014-06-05 Kito Cheng k...@0xlab.org * ira.c (ira): Don't call init_caller_save if LRA enabled since LRA use its own infrastructure to handle that. The patch is ok. As I remember changelog entries should contain what is done but not why it is done. But I guess this entry is ok too as it is still very brief. Kito, thanks for fixing it. You can commit it into the trunk. It seems that Kito hasn't got his commit right yet. I can help commit this patch. Committed as Rev. 211364 http://gcc.gnu.org/r211364 Best regards, jasonwucj
Re: [PATCH] Support asan-instrumentation-with-call-threshold in GCC (second try)
1) instrument_mem_region_access/instrument_strlen should use a single build_check_stmt call instead of two that they do now, I agree with instrument_mem_region_access but the strlen case is quite different because checks are inserted at different sides of instrumented insn. Adding yet more flags and code paths to build_check_stmt would IMHO overcomplicate it. -Y