summaryrefslogtreecommitdiff
path: root/lib/Target/AArch64
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-05-16 13:02:18 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-05-16 13:02:18 +0000
commit21cfedee056a1e0789bbe6cafa23549d0ff16f24 (patch)
treeec91a01c03827b063b817116a403ec039408b40d /lib/Target/AArch64
parent2b3ef615cab1134cda3c41d448b470124705d734 (diff)
downloadllvm-21cfedee056a1e0789bbe6cafa23549d0ff16f24.tar.gz
llvm-21cfedee056a1e0789bbe6cafa23549d0ff16f24.tar.bz2
llvm-21cfedee056a1e0789bbe6cafa23549d0ff16f24.tar.xz
Revert "Implement global merge optimization for global variables."
This reverts commit r208934. The patch depends on aliases to GEPs with non zero offsets. That is not supported and fairly broken. The good news is that GlobalAlias is being redesigned and will have support for offsets, so this patch should be a nice match for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64')
-rw-r--r--lib/Target/AArch64/AArch64ISelLowering.cpp14
-rw-r--r--lib/Target/AArch64/AArch64ISelLowering.h4
2 files changed, 0 insertions, 18 deletions
diff --git a/lib/Target/AArch64/AArch64ISelLowering.cpp b/lib/Target/AArch64/AArch64ISelLowering.cpp
index a676600e5d..852d324476 100644
--- a/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -5560,17 +5560,3 @@ unsigned AArch64TargetLowering::getMaximalGlobalOffset() const {
return 4095;
}
-/// getGlobalMergeAlignment - Set alignment to be the max size of merged
-/// global variable data structure, and make it aligned up to power of 2.
-/// This way, we could guarantee the merged global variable data structure
-/// doesn't cross page boundary, because usually OS always allocates page at
-/// 4096-byte aligned boundary.
-unsigned AArch64TargetLowering::getGlobalMergeAlignment(
- StructType *MergedTy) const {
- unsigned Align = getDataLayout()->getTypeAllocSize(MergedTy);
- if (Align & (Align - 1))
- Align = llvm::NextPowerOf2(Align);
-
- return Align;
-}
-
diff --git a/lib/Target/AArch64/AArch64ISelLowering.h b/lib/Target/AArch64/AArch64ISelLowering.h
index 9818b7a2dc..070db94808 100644
--- a/lib/Target/AArch64/AArch64ISelLowering.h
+++ b/lib/Target/AArch64/AArch64ISelLowering.h
@@ -386,10 +386,6 @@ public:
/// be used for loads / stores from the global.
unsigned getMaximalGlobalOffset() const override;
- /// getGlobalMergeAlignment - Set alignment to be the max size of merged
- /// global variable data structure, and make it aligned up to power of 2.
- unsigned getGlobalMergeAlignment(StructType *MergedTy) const override;
-
protected:
std::pair<const TargetRegisterClass*, uint8_t>
findRepresentativeClass(MVT VT) const override;