[llvm-commits] CVS: llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Dec 28 15:24:10 PST 2003
Changes in directory llvm/lib/CodeGen/InstrSelection:
InstrSelection.cpp updated: 1.67 -> 1.68
---
Log message:
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
implementation from the TargetMachine directly.
---
Diffs of the changes: (+4 -8)
Index: llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
diff -u llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.67 llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.68
--- llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.67 Sun Dec 28 03:53:23 2003
+++ llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp Sun Dec 28 15:23:38 2003
@@ -16,7 +16,6 @@
#include "llvm/CodeGen/InstrSelection.h"
#include "llvm/Function.h"
-#include "llvm/Intrinsics.h"
#include "llvm/IntrinsicLowering.h"
#include "llvm/iPHINode.h"
#include "llvm/iOther.h"
@@ -68,7 +67,6 @@
//
class InstructionSelection : public FunctionPass {
TargetMachine &Target;
- IntrinsicLowering &IL;
void InsertCodeForPhis(Function &F);
void InsertPhiElimInstructions(BasicBlock *BB,
const std::vector<MachineInstr*>& CpVec);
@@ -76,8 +74,7 @@
void PostprocessMachineCodeForTree(InstructionNode* instrNode,
int ruleForNode, short* nts);
public:
- InstructionSelection(TargetMachine &TM, IntrinsicLowering &il)
- : Target(TM), IL(il) {}
+ InstructionSelection(TargetMachine &TM) : Target(TM) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
@@ -145,7 +142,7 @@
default:
// All other intrinsic calls we must lower.
Instruction *Before = CI->getPrev();
- IL.LowerIntrinsicCall(CI);
+ Target.getIntrinsicLowering().LowerIntrinsicCall(CI);
if (Before) { // Move iterator to instruction after call
I = Before; ++I;
} else {
@@ -415,7 +412,6 @@
// createInstructionSelectionPass - Public entrypoint for instruction selection
// and this file as a whole...
//
-FunctionPass *llvm::createInstructionSelectionPass(TargetMachine &T,
- IntrinsicLowering &IL) {
- return new InstructionSelection(T, IL);
+FunctionPass *llvm::createInstructionSelectionPass(TargetMachine &TM) {
+ return new InstructionSelection(TM);
}
More information about the llvm-commits
mailing list