diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-24 22:45:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-24 22:45:47 +0000 |
commit | 26136636e0f2bc7b5daa49de781bd506ad27ef38 (patch) | |
tree | ba3954684a45af0b047e40dd35865407ae9945c6 /llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h | |
parent | 1dbd474f2e097ba2a7dbb3db10414baebee9bd02 (diff) | |
download | bcm5719-llvm-26136636e0f2bc7b5daa49de781bd506ad27ef38.tar.gz bcm5719-llvm-26136636e0f2bc7b5daa49de781bd506ad27ef38.zip |
split EmitNode in half to reduce indentation.
llvm-svn: 99444
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h index eefcd73e6e9..fe025b28d31 100644 --- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h +++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h @@ -113,7 +113,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, EM); + } /// getBlock - Return the current basic block. MachineBasicBlock *getBlock() { return MBB; } @@ -124,6 +129,14 @@ 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, + DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM); }; } |