summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-02-23 19:28:45 +0000
committerEric Christopher <echristo@gmail.com>2015-02-23 19:28:45 +0000
commited47b2295111e80902479d6b55a6f3c653d0461e (patch)
treed757362dcd94e587c3f7c0874880771ab13ba81d /llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
parente4ca441a65ab33bb4bb48bfbbe9b89cae8931c37 (diff)
downloadbcm5719-llvm-ed47b2295111e80902479d6b55a6f3c653d0461e.tar.gz
bcm5719-llvm-ed47b2295111e80902479d6b55a6f3c653d0461e.zip
Rewrite the global merge pass to be subprogram agnostic for now.
It was previously using the subtarget to get values for the global offset without actually checking each function as it was generating code. Go ahead and solidify the current behavior and make the existing FIXMEs more prominent. As a note the ARM backend previously had a thumb1 and non-thumb1 set of defaults. Only the former was tested so I've changed the behavior to only use that for now. llvm-svn: 230245
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64TargetMachine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
index 53360428050..d73d0b3f8b7 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -236,8 +236,11 @@ bool AArch64PassConfig::addPreISel() {
// get a chance to be merged
if (TM->getOptLevel() != CodeGenOpt::None && EnablePromoteConstant)
addPass(createAArch64PromoteConstantPass());
+ // FIXME: On AArch64, this depends on the type.
+ // Basically, the addressable offsets are up to 4095 * Ty.getSizeInBytes().
+ // and the offset has to be a multiple of the related size in bytes.
if (TM->getOptLevel() != CodeGenOpt::None)
- addPass(createGlobalMergePass(TM));
+ addPass(createGlobalMergePass(TM, 4095));
if (TM->getOptLevel() != CodeGenOpt::None)
addPass(createAArch64AddressTypePromotionPass());
OpenPOWER on IntegriCloud