summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-18 00:44:37 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-18 00:44:37 +0000
commitcb3fb5d4f5902d6759a27e04521a4a30b8fef7e7 (patch)
treef8e9717638771828ae21cd888a59c5aa40851604 /llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
parente5914d8555e1bb04274a09db8e4c5a110255260e (diff)
downloadbcm5719-llvm-cb3fb5d4f5902d6759a27e04521a4a30b8fef7e7.tar.gz
bcm5719-llvm-cb3fb5d4f5902d6759a27e04521a4a30b8fef7e7.zip
bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage llvm-svn: 14953
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp b/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
index b7c19e6e097..e357e841cdc 100644
--- a/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
@@ -55,14 +55,12 @@ bool FunctionProfiler::run(Module &M) {
new GlobalVariable(ATy, false, GlobalValue::InternalLinkage,
Constant::getNullValue(ATy), "FuncProfCounters", &M);
- ConstantPointerRef *CounterCPR = ConstantPointerRef::get(Counters);
-
// Instrument all of the functions...
unsigned i = 0;
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isExternal())
// Insert counter at the start of the function
- IncrementCounterInBlock(I->begin(), i++, CounterCPR);
+ IncrementCounterInBlock(I->begin(), i++, Counters);
// Add the initialization call to main.
InsertProfilingInitCall(Main, "llvm_start_func_profiling", Counters);
@@ -96,14 +94,12 @@ bool BlockProfiler::run(Module &M) {
new GlobalVariable(ATy, false, GlobalValue::InternalLinkage,
Constant::getNullValue(ATy), "BlockProfCounters", &M);
- ConstantPointerRef *CounterCPR = ConstantPointerRef::get(Counters);
-
// Instrument all of the blocks...
unsigned i = 0;
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
for (Function::iterator BB = I->begin(), E = I->end(); BB != E; ++BB)
// Insert counter at the start of the block
- IncrementCounterInBlock(BB, i++, CounterCPR);
+ IncrementCounterInBlock(BB, i++, Counters);
// Add the initialization call to main.
InsertProfilingInitCall(Main, "llvm_start_block_profiling", Counters);
OpenPOWER on IntegriCloud