[llvm-dev] trouble hoisting GlobalValues

Steve King via llvm-dev
Sat, 12 Dec 2015 00:49:31 -0000

On Fri, Dec 11, 2015 at 2:33 PM, Hal Finkel <hfinkel at anl.gov>
wrote:
>
> Also, something similar-sounding to this is done in
lib/Transforms/Scalar/ConstantHoisting.cpp
>
>  -Hal
>
>>
>> Nothing simple. One possibility would be to make constants explicitly
>> materialized. Something like:
>>
>> https://github.com/apple/swift/blob/master/docs/SIL.rst#global-addr
>>
>> Which would also be useful for architectures where some constants are
>> expensive to place in a register.
>>
>> Cheers,
>> Rafael


Thanks Hal and Rafael.  The GV hoisting pass started life as a cut and
paste of ConstantHoisting.cpp.
Since there doesn't seem to be a ready solution, I'll try building in
some support.