[LLVMdev] Area for improvement

Chris Lattner sabre at nondot.org
Tue Feb 22 09:41:51 PST 2005


On Tue, 22 Feb 2005, Jeff Cohen wrote:
> Chris Lattner wrote:
>> On Tue, 22 Feb 2005, Jeff Cohen wrote:
>>> Also, some of what LSR needs to decide is architecture dependent.  For 
>>> example, it may not want to strength reduce a multiplication which 
>>> multiplies by a small power of two, as this is handled by addressing modes 
>>> on some architectures.
>> 
>> 
>> You're right.  However, we can choose to expose information about target 
>> parameters through the Target* interfaces that llvm->llvm passes can use as 
>> well, so at least this aspect is not a killer issue.
>> 
>> -Chris
>
> The only problem I have with this is that bytecode ought to be platform 
> independent.  If I compile on an X86 with complex addressing modes, then take 
> the bytecode and translate it to machine code on some RISC, that's not fair 
> to the RISC.  Or vice versa.  But then this might already be a problem with 
> other optimizations so it might not really introduce anything new (does it?). 
> Or delay all optimization until machine code generation time.

That's a good point.  Currently, given a target-independent input, we only 
do target independent transformations on the code (and this breaks that 
premise somewhat).  I think that you're right that we should eventually do 
this in the code generator, but as a concession to what is easiest in the 
short term and will have the biggest performance impact, I still think 
doing it at the LLVM level is the way to go.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list