[PATCH] Implement ADRP CSE for global symbols
Jiangning Liu
liujiangning1 at gmail.com
Mon Apr 28 17:52:20 PDT 2014
Hi Quentin,
> > But if we set MergedGlobal's alignment to RoundUpToPowerOfTwo(sizeof(MergedGlobal)), both syntax A and B should be correct.
>
> Yes, but my point is, we do not want to have this big alignment. Especially because it may make sense *only* for ARM64. Moreover, the fact that this alignment works is because both ADD and LDR have the same encoding space for the immediate. In my opinion this is a lot of assumptions that would be hard to match for all targets to make that a desirable change.h for all targets to make that a desirable change.
I see your point now. I think you are correct and there is an assumption here. What about we create a target specific hook and allow target/back-end to choose the alignment between RoundupToPowerOfTwo(sizeof(MergedGlobal)) and NaturalAlignment(MergedGlobal)?
Thanks,
-Jiangning
http://reviews.llvm.org/D3432
More information about the llvm-commits
mailing list