diff options
author | Dan Gohman <gohman@apple.com> | 2008-12-22 21:06:20 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-12-22 21:06:20 +0000 |
commit | 983bbbaf361bed826e650e3615c008195782c8f9 (patch) | |
tree | 3183afe941f5a4416a6f828e8d3d9b02aa59a0d8 /include | |
parent | b5544940c17720f51a74fea9fba33f26fafe4819 (diff) | |
download | external_llvm-983bbbaf361bed826e650e3615c008195782c8f9.zip external_llvm-983bbbaf361bed826e650e3615c008195782c8f9.tar.gz external_llvm-983bbbaf361bed826e650e3615c008195782c8f9.tar.bz2 |
Add an assertion to catch SUnits reallocations. And add a doxygen
comment for the ScheduleDAGSDNodes class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/ScheduleDAGSDNodes.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/ScheduleDAGSDNodes.h b/include/llvm/CodeGen/ScheduleDAGSDNodes.h index fa78faa..b3ec280 100644 --- a/include/llvm/CodeGen/ScheduleDAGSDNodes.h +++ b/include/llvm/CodeGen/ScheduleDAGSDNodes.h @@ -59,6 +59,20 @@ namespace llvm { virtual void EmitNoop() {} }; + /// ScheduleDAGSDNodes - A ScheduleDAG for scheduling SDNode-based DAGs. + /// + /// Edges between SUnits are initially based on edges in the SelectionDAG, + /// and additional edges can be added by the schedulers as heuristics. + /// SDNodes such as Constants, Registers, and a few others that are not + /// interesting to schedulers are not allocated SUnits. + /// + /// SDNodes with MVT::Flag operands are grouped along with the flagged + /// nodes into a single SUnit so that they are scheduled together. + /// + /// SDNode-based scheduling graphs do not use SDep::Anti or SDep::Output + /// edges. Physical register dependence information is not carried in + /// the DAG and must be handled explicitly by schedulers. + /// class ScheduleDAGSDNodes : public ScheduleDAG { public: SmallSet<SDNode*, 16> CommuteSet; // Nodes that should be commuted. @@ -88,7 +102,11 @@ namespace llvm { /// NewSUnit - Creates a new SUnit and return a ptr to it. /// SUnit *NewSUnit(SDNode *N) { +#ifndef NDEBUG + const SUnit *Addr = &SUnits[0]; +#endif SUnits.push_back(SUnit(N, (unsigned)SUnits.size())); + assert(Addr == &SUnits[0] && "SUnits std::vector reallocated on the fly!"); SUnits.back().OrigNode = &SUnits.back(); return &SUnits.back(); } |