[llvm-commits] patch: treat selector ref globals as constant in MachineLICM

Evan Cheng evan.cheng at apple.com
Wed Nov 2 17:51:52 PDT 2011


LGTM

Evan

On Nov 2, 2011, at 5:11 PM, Peter Cooper wrote:

> Hi
> 
> Please review this patch to allow the compiler to treat objc selector reference globals as constant when optimizing.  These globals aren't actually constant at compile time in that the value they point at may be changed by the linker or runtime, but the value they have is the same for all loads from that address once the program has started.
> 
> Ideally this code shouldn't be checking for the name of the global, but the correct change likely involves adding a new linkage type which is much more significant and overkill while there's only one type of variable this applies to.
> 
> Thanks,
> Pete
> <selref.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list