[llvm] [llvm-profgen] Loading binary functions from .symtab when DWARF info is incomplete (PR #163654)

Lei Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 17:27:47 PDT 2025


================
@@ -65,6 +65,13 @@ static cl::list<std::string> DisassembleFunctions(
              "names only. Only work with show-disassembly-only"),
     cl::cat(ProfGenCategory));
 
+static cl::opt<bool>
+    LoadFunctionFromSymbol("load-function-from-symbol", cl::init(true),
----------------
wlei-llvm wrote:

For reference, this is the patch https://reviews.llvm.org/D112282 we did the switch to use dwarf symbol. 

I just realized we might need to update to set the function entry `setIsFuncEntry` here, it's used for call target sample generation. 
https://github.com/llvm/llvm-project/blob/main/llvm/tools/llvm-profgen/ProfiledBinary.cpp#L539

https://github.com/llvm/llvm-project/pull/163654


More information about the llvm-commits mailing list