diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-25 04:41:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-25 04:41:16 +0000 |
commit | 3d7d07ef038696cefcaf3ce5335072964199a78d (patch) | |
tree | bcebe6fa4410d37e4c293c45035badc617ae6285 /lib/CodeGen/SelectionDAG/InstrEmitter.h | |
parent | 5d428511ca9607d52a09d3483d0738f483e09934 (diff) | |
download | llvm-3d7d07ef038696cefcaf3ce5335072964199a78d.tar.gz llvm-3d7d07ef038696cefcaf3ce5335072964199a78d.tar.bz2 llvm-3d7d07ef038696cefcaf3ce5335072964199a78d.tar.xz |
reapply 99444/99445, which I speculatively reverted in
r99453.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99482 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/InstrEmitter.h')
-rw-r--r-- | lib/CodeGen/SelectionDAG/InstrEmitter.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/InstrEmitter.h b/lib/CodeGen/SelectionDAG/InstrEmitter.h index 6b70d6afac..baabb7554b 100644 --- a/lib/CodeGen/SelectionDAG/InstrEmitter.h +++ b/lib/CodeGen/SelectionDAG/InstrEmitter.h @@ -111,7 +111,12 @@ public: /// void EmitNode(SDNode *Node, bool IsClone, bool IsCloned, DenseMap<SDValue, unsigned> &VRBaseMap, - DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM); + DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM) { + if (Node->isMachineOpcode()) + EmitMachineNode(Node, IsClone, IsCloned, VRBaseMap, EM); + else + EmitSpecialNode(Node, IsClone, IsCloned, VRBaseMap); + } /// getBlock - Return the current basic block. MachineBasicBlock *getBlock() { return MBB; } @@ -122,6 +127,13 @@ public: /// InstrEmitter - Construct an InstrEmitter and set it to start inserting /// at the given position in the given block. InstrEmitter(MachineBasicBlock *mbb, MachineBasicBlock::iterator insertpos); + +private: + void EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned, + DenseMap<SDValue, unsigned> &VRBaseMap, + DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM); + void EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned, + DenseMap<SDValue, unsigned> &VRBaseMap); }; } |