[PATCH] Implement ADRP CSE for global symbols

Quentin Colombet qcolombet at apple.com
Tue Apr 29 10:48:42 PDT 2014


Hi Jiangning,

A target hook seems like a good idea.
I would be more agressive on its scope though.

> What about we create a target specific hook and allow target/back-end to choose the alignment between RoundupToPowerOfTwo(sizeof(MergedGlobal)) and NaturalAlignment(MergedGlobal)?

Instead of choosing the alignment between RoundupToPowerOfTwo(sizeof(MergedGlobal)) and NaturalAlignment(MergedGlobal), what about choosing an alignment period :).
We could then assert that the returned alignment is at least equal to the natural alignment. The default implementation of the target hook could just return the natural alignment.

What do you think?

Thanks,
-Quentin

http://reviews.llvm.org/D3432






More information about the llvm-commits mailing list