summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-03-13 23:20:37 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-03-13 23:20:37 +0000
commit2dd2c652b21f9cbfd67d7524b80bb86c51130b90 (patch)
tree63054a50b9d8a8e7cc2fbc94f5bb2a870f7198df /llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
parent60f495100a048cc1a6e50e7e68ee5157b2b6c83c (diff)
downloadbcm5719-llvm-2dd2c652b21f9cbfd67d7524b80bb86c51130b90.tar.gz
bcm5719-llvm-2dd2c652b21f9cbfd67d7524b80bb86c51130b90.zip
Added getTargetLowering() to TargetMachine. Refactored targets to support this.
llvm-svn: 26742
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index 02881433b69..991b088e17c 100644
--- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -42,8 +42,9 @@ namespace {
PPCTargetLowering PPCLowering;
unsigned GlobalBaseReg;
public:
- PPCDAGToDAGISel(TargetMachine &TM)
- : SelectionDAGISel(PPCLowering), PPCLowering(TM) {}
+ PPCDAGToDAGISel(PPCTargetMachine &TM)
+ : SelectionDAGISel(PPCLowering),
+ PPCLowering(*TM.getTargetLowering()){}
virtual bool runOnFunction(Function &Fn) {
// Make sure we re-emit a set of the global base reg if necessary
@@ -1140,7 +1141,7 @@ void PPCDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
/// createPPCISelDag - This pass converts a legalized DAG into a
/// PowerPC-specific DAG, ready for instruction scheduling.
///
-FunctionPass *llvm::createPPCISelDag(TargetMachine &TM) {
+FunctionPass *llvm::createPPCISelDag(PPCTargetMachine &TM) {
return new PPCDAGToDAGISel(TM);
}
OpenPOWER on IntegriCloud