[llvm] 5b9d462 - [HeapProf] Fix bot failures from instrumentation pass
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 10:21:34 PDT 2020
Author: Teresa Johnson
Date: 2020-08-27T10:21:19-07:00
New Revision: 5b9d462b7d3c41a605534a1d95ae0b8d97a661d0
URL: https://github.com/llvm/llvm-project/commit/5b9d462b7d3c41a605534a1d95ae0b8d97a661d0
DIFF: https://github.com/llvm/llvm-project/commit/5b9d462b7d3c41a605534a1d95ae0b8d97a661d0.diff
LOG: [HeapProf] Fix bot failures from instrumentation pass
Fix bot failure from 7ed8124d46f94601d5f1364becee9cee8538265e:
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-ubuntu/builds/8533
Since we are always using dynamic shadow,
insertDynamicShadowAtFunctionEntry should always return true for
modifying the function.
Added:
Modified:
llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp b/llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
index 93d9f0c6362d..16abe3a3de11 100644
--- a/llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
@@ -178,7 +178,7 @@ class HeapProfiler {
Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
bool instrumentFunction(Function &F);
bool maybeInsertHeapProfInitAtFunctionEntry(Function &F);
- void insertDynamicShadowAtFunctionEntry(Function &F);
+ bool insertDynamicShadowAtFunctionEntry(Function &F);
private:
void initializeCallbacks(Module &M);
@@ -550,11 +550,12 @@ bool HeapProfiler::maybeInsertHeapProfInitAtFunctionEntry(Function &F) {
return false;
}
-void HeapProfiler::insertDynamicShadowAtFunctionEntry(Function &F) {
+bool HeapProfiler::insertDynamicShadowAtFunctionEntry(Function &F) {
IRBuilder<> IRB(&F.front().front());
Value *GlobalDynamicAddress = F.getParent()->getOrInsertGlobal(
HeapProfShadowMemoryDynamicAddress, IntptrTy);
DynamicShadowOffset = IRB.CreateLoad(IntptrTy, GlobalDynamicAddress);
+ return true;
}
bool HeapProfiler::instrumentFunction(Function &F) {
@@ -577,7 +578,7 @@ bool HeapProfiler::instrumentFunction(Function &F) {
initializeCallbacks(*F.getParent());
- insertDynamicShadowAtFunctionEntry(F);
+ FunctionModified |= insertDynamicShadowAtFunctionEntry(F);
SmallVector<Instruction *, 16> ToInstrument;
More information about the llvm-commits
mailing list