diff options
author | Amir Ayupov <aaupov@fb.com> | 2025-04-08 13:50:09 -0700 |
---|---|---|
committer | Amir Ayupov <aaupov@fb.com> | 2025-04-08 13:50:09 -0700 |
commit | abfbac2b6d63ef0604f65e55999ecab6f7095cd6 (patch) | |
tree | 4d2efab7016188b3f577d6975c201ebffab91c37 | |
parent | 144687ce25dfc0520ee33be24cae1fc88876d44b (diff) | |
download | llvm-users/aaupov/spr/bolt-check-callprofile-annotation-in-buildcallgraph.zip llvm-users/aaupov/spr/bolt-check-callprofile-annotation-in-buildcallgraph.tar.gz llvm-users/aaupov/spr/bolt-check-callprofile-annotation-in-buildcallgraph.tar.bz2 |
Created using spr 1.3.4
-rw-r--r-- | bolt/lib/Core/BinaryFunctionCallGraph.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bolt/lib/Core/BinaryFunctionCallGraph.cpp b/bolt/lib/Core/BinaryFunctionCallGraph.cpp index 76fc524..5f99d00 100644 --- a/bolt/lib/Core/BinaryFunctionCallGraph.cpp +++ b/bolt/lib/Core/BinaryFunctionCallGraph.cpp @@ -252,6 +252,8 @@ buildCallGraph(BinaryContext &BC, CgFilterFunction Filter, bool CgFromPerfData, for (MCInst &Inst : *BB) { // Find call instructions and extract target symbols from each one. + // Check CallProfile annotation if the instruction is not recognized + // as a call, e.g. unknown control flow indirect jump. if (BC.MIB->isCall(Inst) || BC.MIB->hasAnnotation(Inst, "CallProfile")) { const CallInfoTy CallInfo = getCallInfo(BB, Inst); |