[LLVMdev] Area for improvement
Vikram S. Adve
vadve at cs.uiuc.edu
Tue Feb 22 08:24:27 PST 2005
On Feb 22, 2005, at 10:16 AM, Jeff Cohen wrote:
> 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.
I agree. I would say that the only part of this problem (array
indexing) that is nearly always important is decomposing
multidimensional array refs into individual index operations so that
LICM in pariticular can hoist each component to the appropriate loop
level. Everything else, including GCSE and strength reduction, is
somewhat sensitive to target parameters like register set size and
addressing modes.
--Vikram
>
> There is still probably a need for a mid-level LSR that handles the
> explicit multiplications, divisions, etc...
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list