From 63a9e5c068ea3bebedb413ce366a6a9798451fd6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 18 Nov 2002 21:44:19 +0000 Subject: Add peak memory usage support llvm-svn: 4748 --- llvm/lib/Analysis/DataStructure/Local.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Analysis') diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index 169ccbf9f33..cd838d483ae 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/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) { -- cgit v1.2.3