This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Jan 2015 08:15:08 +0000
- Subject: [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64
- Auto-submitted: auto-generated
- References: <bug-64580-4 at http dot gcc dot gnu dot org/bugzilla/>
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);