[PATCH] Implement ADRP CSE for global symbols

Jiangning Liu liujiangning1 at gmail.com
Tue May 6 18:54:00 PDT 2014


The changes of this version are mainly the followings, and no other things.

Thanks,
-Jiangning

================
Comment at: include/llvm/Target/TargetLowering.h:889
@@ +888,3 @@
+  /// By default, returns the natural alignment of merged data structure.
+  virtual unsigned getGMOnExternalAlignment(StructType *MergedTy) const {
+    return getDataLayout()->getABITypeAlignment(MergedTy);
----------------
This is newly added target hook to return alignment required for different targets.

================
Comment at: lib/Target/ARM64/ARM64ISelLowering.cpp:640
@@ +639,3 @@
+/// 4096-byte aligned boundary.
+unsigned ARM64TargetLowering::getGMOnExternalAlignment(
+                                StructType *MergedTy) const {
----------------
The specific version for ARM64 returns RoundupToPowerOf2(sizeof(MergedGlobal)).

http://reviews.llvm.org/D3432






More information about the llvm-commits mailing list