Message ID | 20141030163753.GA51241@msticlxl57.ims.intel.com |
---|---|
State | New |
Headers | show |
On 10/30/14 10:37, Ilya Enkovich wrote: > > Hi, > > I rebased patches on current trunk. Bootstrap and check are clean on > linux-x86_64. > > Darwin bootstrap has few issues due to IPA ICF pass. I also found my > patches introduce an unused variable warning due to conditional code > (under #ifdef ASM_OUTPUT_DEF) in varasm. With IPA ICF disabled and > this warning fixed Darwin 64 bootstrap is OK. Excellent. > > ARM cross build revealed another problem with conditional code. > Function immed_double_const was put under #if > (TARGET_SUPPORTS_WIDE_INT == 0) some time ago but I missed it and > didn't update my patches. With this fixed cross build is also OK. Thanks for taking the extra time to test ARM too. It is greatly appreciated. FWIW, I'd like to see the amount of #if conditional code go down over time. The glibc team is making a similar change and while painful I do thing it brings noticeable long term maintenance benefits. But that's clearly out of scope for this stuff ;-) > > Below are required changes. If these fixes are OK, I'm ready to > commit whole series (I'm going to commit it as a single patch because > didn't test each part separately). They're fine. ANd yes, please commit as a single patch. Thanks for your patience on this stuff, I know it's been a long slow process. jeff
diff --git a/gcc/varasm.c b/gcc/varasm.c index eb68fd3..40eeb5e 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5522,7 +5522,6 @@ vec<alias_pair, va_gc> *alias_pairs; void do_assemble_alias (tree decl, tree target) { - tree orig_decl = decl; tree id; /* Emulated TLS had better not get this var. */ @@ -5533,11 +5532,6 @@ do_assemble_alias (tree decl, tree target) if (TREE_ASM_WRITTEN (decl)) return; - if (TREE_CODE (decl) == FUNCTION_DECL - && cgraph_node::get (decl)->instrumentation_clone - && cgraph_node::get (decl)->instrumented_version) - orig_decl = cgraph_node::get (decl)->instrumented_version->decl; - id = DECL_ASSEMBLER_NAME (decl); ultimate_transparent_alias_target (&id); @@ -5572,6 +5566,13 @@ do_assemble_alias (tree decl, tree target) } #ifdef ASM_OUTPUT_DEF + tree orig_decl = decl; + + if (TREE_CODE (decl) == FUNCTION_DECL + && cgraph_node::get (decl)->instrumentation_clone + && cgraph_node::get (decl)->instrumented_version) + orig_decl = cgraph_node::get (decl)->instrumented_version->decl; + /* Make name accessible from other files, if appropriate. */ if (TREE_PUBLIC (decl) || TREE_PUBLIC (orig_decl)) diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 41c616d..04f677e 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -6133,7 +6133,10 @@ init_emit_once (void) for (mode = GET_CLASS_NARROWEST_MODE (MODE_POINTER_BOUNDS); mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) - const_tiny_rtx[0][mode] = immed_double_const (0, 0, mode); + { + wide_int wi_zero = wi::zero (GET_MODE_PRECISION (mode)); + const_tiny_rtx[0][mode] = immed_wide_int_const (wi_zero, mode); + } pc_rtx = gen_rtx_fmt_ (PC, VOIDmode); ret_rtx = gen_rtx_fmt_ (RETURN, VOIDmode);