diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-01-25 23:05:59 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-01-25 23:05:59 +0000 |
commit | a8b289b70d5ef416608bb71a874b8b4fe80158e1 (patch) | |
tree | 17a720ed98c8eb4d13cf364a7028bb50a3f810ef /lib/Target/PowerPC/PPCTargetMachine.cpp | |
parent | f777d09f375c1206cd0cea649bd0b2c04d668bfa (diff) |
Initial implementation of PPCTargetTransformInfo
This provides a place to add customized operation cost information and
control some other target-specific IR-level transformations.
The only non-trivial logic in this checkin assigns a higher cost to
unaligned loads and stores (covered by the included test case).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index b8b7882ac0..fe851c1b6f 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -126,3 +126,12 @@ bool PPCTargetMachine::addCodeEmitter(PassManagerBase &PM, return false; } + +void PPCTargetMachine::addAnalysisPasses(PassManagerBase &PM) { + // Add first the target-independent BasicTTI pass, then our PPC pass. This + // allows the PPC pass to delegate to the target independent layer when + // appropriate. + PM.add(createBasicTargetTransformInfoPass(getTargetLowering())); + PM.add(createPPCTargetTransformInfoPass(this)); +} + |