aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/ARM/ARMTargetMachine.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/ARM/ARMTargetMachine.cpp
parente4ca441a65ab33bb4bb48bfbbe9b89cae8931c37 (diff)
downloadllvm-ed47b2295111e80902479d6b55a6f3c653d0461e.zip
llvm-ed47b2295111e80902479d6b55a6f3c653d0461e.tar.gz
llvm-ed47b2295111e80902479d6b55a6f3c653d0461e.tar.bz2
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/ARM/ARMTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMTargetMachine.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
index 11fbb5c..a97a058 100644
--- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
@@ -326,7 +326,12 @@ void ARMPassConfig::addIRPasses() {
bool ARMPassConfig::addPreISel() {
if (TM->getOptLevel() != CodeGenOpt::None)
- addPass(createGlobalMergePass(TM));
+ // FIXME: This is using the thumb1 only constant value for
+ // maximal global offset for merging globals. We may want
+ // to look into using the old value for non-thumb1 code of
+ // 4095 based on the TargetMachine, but this starts to become
+ // tricky when doing code gen per function.
+ addPass(createGlobalMergePass(TM, 127));
return false;
}