On 02/19/2016 03:03 PM, Bernd Schmidt wrote:
In this PR, we generate unnecessarily bad code for code that declares a
global register var. Since global regs get added to fixed_regs, IRA
never considers them as candidates. However, we do seem to have proper
data flow information for them. In the testcase, the global reg dies,
some operations are done on temporary results, and the final result
stored back in the global reg. We can achieve the desired code
generation by reusing the global reg for those temporaries.
Bootstrapped and tested on x86_64-linux. Ok? An argument could be made
not to use this for gcc-6 since global register vars are both not very
important and not very well represented in the testsuite.
Bernd
global-regalloc.diff
PR rtl-optimization/44281
* hard-reg-set.h (struct target_hard_regs): New field
x_fixed_nonglobal_reg_set.
(fixed_nonglobal_reg_set): New macro.
* reginfo.c (init_reg_sets_1): Initialize it.
* ira.c (setup_alloc_regs): Use fixed_nonglobal_reg_set instead
of fixed_reg_set.
PR rtl-optimization/44281
* gcc.target/i386/pr44281.c: New test.
So my recollection of where we left things was that we needed to
dataflow information fixed for implicit uses/sets in asms. With that
infrastructure in place I think we'll be ready to resolve this old
issue. Right?
jeff