aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2006-09-22 01:05:33 +0000
committerDevang Patel <dpatel@apple.com>2006-09-22 01:05:33 +0000
commit8d3ab25335d985665cbf69231811da9e58e27592 (patch)
tree47de1780933e3da287e8e51922abcd6c08618f24 /include
parentce6e84ca6caeb5d2fc903a897d7225f098f1f750 (diff)
downloadexternal_llvm-8d3ab25335d985665cbf69231811da9e58e27592.zip
external_llvm-8d3ab25335d985665cbf69231811da9e58e27592.tar.gz
external_llvm-8d3ab25335d985665cbf69231811da9e58e27592.tar.bz2
Use iterative algorith to assign DFS number. This reduces
call stack depth. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30575 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/ET-Forest.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/include/llvm/Analysis/ET-Forest.h b/include/llvm/Analysis/ET-Forest.h
index b05776a..be9df98 100644
--- a/include/llvm/Analysis/ET-Forest.h
+++ b/include/llvm/Analysis/ET-Forest.h
@@ -250,16 +250,7 @@ public:
return this->Below(other);
}
- void assignDFSNumber(int &num) {
- DFSNumIn = num++;
-
- if (Son) {
- Son->assignDFSNumber(num);
- for (ETNode *son = Son->Right; son != Son; son = son->Right)
- son->assignDFSNumber(num);
- }
- DFSNumOut = num++;
- }
+ void assignDFSNumber (int);
bool hasFather() const {
return Father != NULL;