mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
[SelectionDAG] Force cycle detection in AssignTopologicalOrder before aborting
DAG cycle detection is only enabled with ENABLE_EXPENSIVE_CHECKS. However we can run it just before we would crash in order to provide more informative diagnostics. Now in addition to the "Overran sorted position" message we also get the Node printed if a cycle was detected. Tested by building several configs: Debug+Assert, Debug+Assert+Check (this is ENABLE_EXPENSIVE_CHECKS), Release+Assert and Release. Also tried that the AssignTopologicalOrder assert produces the expected results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209977 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -151,7 +151,7 @@ public:
|
||||
};
|
||||
|
||||
class SelectionDAG;
|
||||
void checkForCycles(const SelectionDAG *DAG);
|
||||
void checkForCycles(const SelectionDAG *DAG, bool force = false);
|
||||
|
||||
/// SelectionDAG class - This is used to represent a portion of an LLVM function
|
||||
/// in a low-level Data Dependence DAG representation suitable for instruction
|
||||
|
@@ -49,7 +49,8 @@ template <typename T> struct DenseMapInfo;
|
||||
template <typename T> struct simplify_type;
|
||||
template <typename T> struct ilist_traits;
|
||||
|
||||
void checkForCycles(const SDNode *N, const SelectionDAG *DAG = nullptr);
|
||||
void checkForCycles(const SDNode *N, const SelectionDAG *DAG = nullptr,
|
||||
bool force = false);
|
||||
|
||||
/// SDVTList - This represents a list of ValueType's that has been intern'd by
|
||||
/// a SelectionDAG. Instances of this simple value class are returned by
|
||||
|
Reference in New Issue
Block a user