Clear profiling metadata when trying to update it, and debug info is missing.
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 31497 Build 31496: arc lint + arc unit
Event Timeline
llvm/test/Transforms/SampleProfile/entry_counts_missing_dbginfo.ll | ||
---|---|---|
4 | Can you explain exactly what happens that triggers the div by zero? when bar is inlined? |
llvm/lib/Transforms/IPO/SampleProfile.cpp | ||
---|---|---|
1667 | To avoid breaking existing tests & code. When we don't want accurate profiles, we set the entry count to -1 ("invalid"), which is recognized by existing code and handled appropriately. However, come to think of it, that would still leave the prof data valid within the function. For consistency, we could perhaps set those to -1 as well. I would prefer changing the current behavior in the non-precise case in a separate CL - thoughts? | |
llvm/test/Transforms/SampleProfile/entry_counts_missing_dbginfo.ll | ||
8 | Added more detail. |
llvm/test/Transforms/SampleProfile/entry_counts_missing_dbginfo.ll | ||
---|---|---|
8 | what I meant is the what the callstack is when div by 0 happens. In particular, why the update occurs when there is no inline (as mentioned in the comment). |
llvm/lib/Transforms/Utils/InlineFunction.cpp | ||
---|---|---|
1472 | See line 1468 above -- the priorEntryCount can be zero which will trigger assertion at 1473. line 1468 can be executed before becaue updateProfileCallee can be invoked in two different contexts:
In other words, the div by zero can still happen with when debug information is avaiable. |
why 'WantAccurateProfile' guard?