[llvm] r223786 - [CodeGenPrepare] Split branch conditions into multiple conditional branches.

Hal Finkel hfinkel at anl.gov
Tue Dec 9 09:16:18 PST 2014


----- Original Message -----
> From: "Juergen Ributzka" <juergen at apple.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "LLVM Commits" <llvm-commits at cs.uiuc.edu>
> Sent: Tuesday, December 9, 2014 11:03:44 AM
> Subject: Re: [llvm] r223786 - [CodeGenPrepare] Split branch conditions into multiple conditional branches.
> 
> I see.
> 
> 
> I still would like to get rid of the implementation in SelectionDAG,
> but it looks like we need to add a new target hook for this.
> There is also the issue that CodeGenPrepare doesn’t run during -O0
> (yet).
> 
> 
> What do you think Hal?

I don't really care one way or the other whether we do this at -O0, I have no evidence that the performance matters that much relative to other factors. I don't want to do this for optimized builds, and apparently I did not have a complete picture of where this was happening -- if you look in CGP for the call to TLI->hasMultipleConditionRegisters(), you'll see one place where I've disabled a related optimization for PPC. In short, yes, go ahead and remove the SDAG implementation, and I think the necessary target hook already exists (TLI->hasMultipleConditionRegisters()) -- although perhaps we'd like to name it something else?)

Thanks again,
Hal

> 
> 
> —Juergen
> 
> 
> 
> 
> 
> On Dec 9, 2014, at 8:48 AM, Hal Finkel < hfinkel at anl.gov > wrote:
> 
> At least for PPC, it should likely stay that way. At -O0, we don't
> use CR-bit-register tracking, and so this is likely profitable. For
> optimized builds, PPC uses CR bit register tracking, and this
> transformation is likely not profitable (it is definitely not
> profitable on the A2 and other embedded cores, and likely not on the
> others either).
> 
> Thanks again,
> Hal
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-commits mailing list