[Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 22 08:15:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Annotating rs6000_stack_info() in perf shows:
│ /* First, find out if we use _any_ altivec registers. */
│ for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i)
│ if (df_regs_ever_live_p (i))
0.00 │ mr r3,r31
│ bl 10293df0 <.df_regs_ever_live_p(unsigned int)>
0.00 │ nop
│ cmpdi cr7,r3,0
│ beq cr7,10a7c3f4 <.rs6000_stack_info()+0xc14>
│ mask |= ALTIVEC_REG_BIT (i);
│ addi r9,r31,-77
│ srw r9,r22,r9
│ or r9,r9,r24
│ clrldi r24,r9,32
│ if (DEFAULT_ABI == ABI_DARWIN && crtl->calls_eh_return
│ && ! TARGET_ALTIVEC)
│ mask |= 0xFFF;
│
│ /* First, find out if we use _any_ altivec registers. */
│ for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i)
0.00 │ addi r31,r31,1
│ cmplwi cr7,r31,109
│ clrldi r31,r31,32
│ bne cr7,10a7c3d0 <.rs6000_stack_info()+0xbf0>
│ if (df_regs_ever_live_p (i))
│ mask |= ALTIVEC_REG_BIT (i);
│
│ if (mask == 0)
0.00 │ cmpdi cr7,r24,0
│ beq cr7,10a7c5c0 <.rs6000_stack_info()+0xde0>
│ /* Next, remove the argument registers from the set. These
must
│ be in the VRSAVE mask set by the caller, so we don't need to
add
│ them in again. More importantly, the mask we compute here
is
│ used to generate CLOBBERs in the set_vrsave insn, and we do
not
│ wish the argument registers to die. */
│ for (i = crtl->args.info.vregno - 1; i >= ALTIVEC_ARG_MIN_REG;
--i)
│ lwa r10,144(r29)
│ addi r9,r10,-1
│ cmplwi cr7,r9,78
│ ble cr7,10a7c458 <.rs6000_stack_info()+0xc78>
│ addi r10,r10,-78
│ mask &= ~ALTIVEC_REG_BIT (i);
│ lis r8,-32768
│ clrldi r10,r10,32
│ addi r9,r10,-2
│ clrldi r9,r9,32
│ addi r9,r9,1
│ mtctr r9
│ nop
│ nop
99.57 │ srw r9,r8,r10
│ addi r10,r10,-1
│ andc r9,r24,r9
0.41 │ clrldi r10,r10,32
│ clrldi r24,r9,32
│ /* Next, remove the argument registers from the set. These
must
│ be in the VRSAVE mask set by the caller, so we don't need to
add
│ them in again. More importantly, the mask we compute here
is
│ used to generate CLOBBERs in the set_vrsave insn, and we do
not
│ wish the argument registers to die. */
│ for (i = crtl->args.info.vregno - 1; i >= ALTIVEC_ARG_MIN_REG;
--i)
│ bdnz 10a7c440 <.rs6000_stack_info()+0xc60>
│ mask &= ~ALTIVEC_REG_BIT (i);
│
│ /* Similarly, remove the return value from the set. */
│ {
│ bool yes = false;
│ li r9,0
│ mr r4,r1
│ diddle_return_value (is_altivec_return_reg, &yes);
│ addis r3,r2,-4
│ for (i = crtl->args.info.vregno - 1; i >= ALTIVEC_ARG_MIN_REG;
--i)
│ mask &= ~ALTIVEC_REG_BIT (i);
More information about the Gcc-bugs
mailing list