diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-18 21:44:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-18 21:44:19 +0000 |
commit | 4fe346184a6445ef03b2a39b5f31244f9a10b6c3 (patch) | |
tree | 84f8d14c5f8d80e1c6418a2000af24c2b91f1ce7 /lib/Analysis/DataStructure/Local.cpp | |
parent | 49a1ed07abb894548dfa3a417d38edcb6ef169ff (diff) |
Add peak memory usage support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 169ccbf9f3..cd838d483a 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -18,6 +18,7 @@ #include "llvm/Support/InstVisitor.h" #include "llvm/Target/TargetData.h" #include "Support/Statistic.h" +#include "Support/Timer.h" // FIXME: This should eventually be a FunctionPass that is automatically // aggregated into a Pass. @@ -132,6 +133,9 @@ DSGraph::DSGraph(Function &F, DSGraph *GG) : Func(&F), GlobalsGraph(GG) { PrintAuxCalls = false; // Use the graph builder to construct the local version of the graph GraphBuilder B(*this, Nodes, RetNode, ScalarMap, FunctionCalls); +#ifndef NDEBUG + Timer::addPeakMemoryMeasurement(); +#endif markIncompleteNodes(); // Remove any nodes made dead due to merging... @@ -143,7 +147,6 @@ DSGraph::DSGraph(Function &F, DSGraph *GG) : Func(&F), GlobalsGraph(GG) { // Helper method implementations... // - /// getValueDest - Return the DSNode that the actual value points to. /// DSNodeHandle GraphBuilder::getValueDest(Value &Val) { |