diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2015-03-31 12:52:27 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2015-03-31 12:52:27 +0000 |
commit | 1f6666a49c9a8cc773e81545d8cd70b047b73672 (patch) | |
tree | 47b195856a4fa125b0b24a49ac13af3e55dc1d70 /llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp | |
parent | 6c66ad0d7500458884931437e0f54e215b0ec1f2 (diff) | |
download | llvm-1f6666a49c9a8cc773e81545d8cd70b047b73672.zip llvm-1f6666a49c9a8cc773e81545d8cd70b047b73672.tar.gz llvm-1f6666a49c9a8cc773e81545d8cd70b047b73672.tar.bz2 |
[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.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp b/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp index 86baccb6..b2f8175 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)); + }); +} |