From f8c09ee341e16b940cbf4e4268ea44275ddfbf78 Mon Sep 17 00:00:00 2001 From: Anand Shukla Date: Fri, 14 Feb 2003 20:41:53 +0000 Subject: Changes to runtime framework llvm-svn: 5572 --- .../Instrumentation/ProfilePaths/ProfilePaths.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp') diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp index 4c689b12eec..39e7c351210 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp @@ -155,6 +155,8 @@ bool ProfilePaths::runOnFunction(Function &F){ // numPaths is the number of acyclic paths in the graph int numPaths=valueAssignmentToEdges(g, nodePriority, be); + //if(numPaths<=1) return false; + if(numPaths<=1 || numPaths >5000) return false; #ifdef DEBUG_PATH_PROFILES @@ -172,10 +174,17 @@ bool ProfilePaths::runOnFunction(Function &F){ AllocaInst(Type::IntTy, ConstantUInt::get(Type::UIntTy,1),"R"); - Instruction *countVar=new - AllocaInst(Type::IntTy, - ConstantUInt::get(Type::UIntTy, numPaths), "Count"); - + //Instruction *countVar=new + //AllocaInst(Type::IntTy, + // ConstantUInt::get(Type::UIntTy, numPaths), "Count"); + + //initialize counter array! + std::vector arrayInitialize; + for(int xi=0; xi