[LLVMdev] Area for improvement

Jeff Cohen jeffc at jolt-lang.org
Tue Feb 22 08:16:16 PST 2005


Vikram S. Adve wrote:

>> The only way to make preselection or lowermultidimrefs work is to 
>> duplication all of the knowledge of how the instruction selector will 
>> select the code (e.g. the advice about allowing constant indices to 
>> be grouped together).
>
>
> This is why you need a separate, low-level optimization framework - 
> the kind you were describing.
>
> --Vikram
> http://www.cs.uiuc.edu/~vadve
> http://llvm.cs.uiuc.edu/

Sounds reasonable to me.  It seems to me it would be best if LSR was 
part of the low-level optimization framework, otherwise it would be 
forced to duplicate too much work on its own.

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.

There is still probably a need for a mid-level LSR that handles the 
explicit multiplications, divisions, etc...




More information about the llvm-dev mailing list