Revert "Implement global merge optimization for global variables."
[oota-llvm.git] / lib / Target / AArch64 / AArch64ISelLowering.cpp
index a676600e5dfb1f5e767f83957f29d9b1ca521b78..852d324476a6deadb9de171e00e6460b10121cf3 100644 (file)
@@ -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;
-}
-