aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-12-28 21:23:38 +0000
committerChris Lattner <sabre@nondot.org>2003-12-28 21:23:38 +0000
commitf70e0c216c074bd2ae2b08178f5512849545db4e (patch)
treeecfce5ac045e092db18b62c4cc5f4903749e9e45 /lib/CodeGen
parent27490a6fcc8e24be0ee4ddfcdbdf7e9da9e5af41 (diff)
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
implementation from the TargetMachine directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/InstrSelection/InstrSelection.cpp12
-rw-r--r--lib/CodeGen/IntrinsicLowering.cpp1
2 files changed, 4 insertions, 9 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrSelection.cpp b/lib/CodeGen/InstrSelection/InstrSelection.cpp
index f1fcc8fdc8..5d9d0a355b 100644
--- a/lib/CodeGen/InstrSelection/InstrSelection.cpp
+++ b/lib/CodeGen/InstrSelection/InstrSelection.cpp
@@ -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 @@ namespace {
//
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 @@ namespace {
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 @@ bool InstructionSelection::runOnFunction(Function &F) {
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 @@ InstructionSelection::PostprocessMachineCodeForTree(InstructionNode* instrNode,
// 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);
}
diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp
index 31a904351d..4815be9f28 100644
--- a/lib/CodeGen/IntrinsicLowering.cpp
+++ b/lib/CodeGen/IntrinsicLowering.cpp
@@ -13,7 +13,6 @@
#include "llvm/IntrinsicLowering.h"
#include "llvm/Constant.h"
-#include "llvm/Intrinsics.h"
#include "llvm/Module.h"
#include "llvm/Type.h"
#include "llvm/iOther.h"