From f350b277f32d7d47f86c0e54f4aec4d470500618 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sat, 23 Aug 2008 02:25:05 +0000 Subject: Move the point at which FastISel taps into the SelectionDAGISel process up to a higher level. This allows FastISel to leverage more of SelectionDAGISel's infastructure, such as updating Machine PHI nodes. Also, implement transitioning from SDISel back to FastISel in the middle of a block, so it's now possible to go back and forth. This allows FastISel to hand individual CallInsts and other complicated things off to SDISel to handle, while handling the rest of the block itself. To help support this, reorganize the SelectionDAG class so that it is allocated once and reused throughout a function, instead of being completely reallocated for each block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55219 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CellSPU/SPUISelDAGToDAG.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/Target/CellSPU') diff --git a/lib/Target/CellSPU/SPUISelDAGToDAG.cpp b/lib/Target/CellSPU/SPUISelDAGToDAG.cpp index c8d04b4..c2a3e3a 100644 --- a/lib/Target/CellSPU/SPUISelDAGToDAG.cpp +++ b/lib/Target/CellSPU/SPUISelDAGToDAG.cpp @@ -285,8 +285,7 @@ public: /// inline asm expressions. virtual bool SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode, - std::vector &OutOps, - SelectionDAG &DAG) { + std::vector &OutOps) { SDValue Op0, Op1; switch (ConstraintCode) { default: return true; @@ -319,7 +318,7 @@ public: /// InstructionSelect - This callback is invoked by /// SelectionDAGISel when it has created a SelectionDAG for us to codegen. - virtual void InstructionSelect(SelectionDAG &DAG); + virtual void InstructionSelect(); virtual const char *getPassName() const { return "Cell SPU DAG->DAG Pattern Instruction Selection"; @@ -342,13 +341,13 @@ public: /// InstructionSelect - This callback is invoked by /// SelectionDAGISel when it has created a SelectionDAG for us to codegen. void -SPUDAGToDAGISel::InstructionSelect(SelectionDAG &DAG) +SPUDAGToDAGISel::InstructionSelect() { DEBUG(BB->dump()); // Select target instructions for the DAG. SelectRoot(); - DAG.RemoveDeadNodes(); + CurDAG->RemoveDeadNodes(); } /*! -- cgit v1.1