summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2015-03-31 12:52:27 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2015-03-31 12:52:27 +0000
commit1f6666a49c9a8cc773e81545d8cd70b047b73672 (patch)
tree47b195856a4fa125b0b24a49ac13af3e55dc1d70 /llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
parent6c66ad0d7500458884931437e0f54e215b0ec1f2 (diff)
downloadbcm5719-llvm-1f6666a49c9a8cc773e81545d8cd70b047b73672.tar.gz
bcm5719-llvm-1f6666a49c9a8cc773e81545d8cd70b047b73672.zip
[SystemZ] Provide basic TargetTransformInfo implementation
This hooks up the TargetTransformInfo machinery for SystemZ, and provides an implementation of getIntImmCost. In addition, the patch adds the isLegalICmpImmediate and isLegalAddImmediate TargetLowering overrides, and updates a couple of test cases where we now generate slightly better code. llvm-svn: 233688
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp b/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
index 86baccb658e..b2f8175579f 100644
--- a/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "SystemZTargetMachine.h"
+#include "SystemZTargetTransformInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Transforms/Scalar.h"
@@ -108,3 +109,9 @@ void SystemZPassConfig::addPreEmitPass() {
TargetPassConfig *SystemZTargetMachine::createPassConfig(PassManagerBase &PM) {
return new SystemZPassConfig(this, PM);
}
+
+TargetIRAnalysis SystemZTargetMachine::getTargetIRAnalysis() {
+ return TargetIRAnalysis([this](Function &F) {
+ return TargetTransformInfo(SystemZTTIImpl(this, F));
+ });
+}
OpenPOWER on IntegriCloud