This will address the issue: P8198 and P8199 (from D73534).
The methods was not handle bundles properly.
Paths
| Differential D74904
[CallSiteInfo] Handle bundles when updating call site info ClosedPublic Authored by djtodoro on Feb 20 2020, 7:58 AM.
Details Summary This will address the issue: P8198 and P8199 (from D73534). The methods was not handle bundles properly.
Diff Detail Event TimelineComment Actions Maybe we can discuss about calling the eraseCallSiteInfo() within MachineFunction::DeleteMachineInstr(), but find all the places where we should call move*()/copy*() call site info.
djtodoro added inline comments.
Comment Actions At this point, what I think we should do is:
I don't see a downside to that approach, and it'll be beneficial for downstream targets to have D73534 landed for good.
Comment Actions
Strong +1
djtodoro added inline comments.
djtodoro retitled this revision from WIP: [CallSiteInfo] Erase call site info for a MI from bundle to [CallSiteInfo] Handle bundles when updating call site info. Comment Actions-Handle bundles within:
TODO: Reduce the test case.
Comment Actions I see this was triggered in a case when we have not used the '-g' option at all. When we started the work, there were thoughts the "call-site-info" could be used somewhere else, but it is not the case now. It is being used only for the Debug Entry Values feature, so I think it makes sense to avoid production (and handling though out the pipeline) of the call-site-info if not '-g' and '-O>0'. The DWARF generation (for call-site-params) is controlled the same way as production of call-sites by looking at the DISupprogam flag AllCallsDescribed. Comment Actions
Something like D75175 (and then rebase reland of the D73534 on top of that). Comment Actions
Does that patch make this one redundant, or can we land in the cases that this patch fixes with -O>0?
This revision is now accepted and ready to land.Feb 26 2020, 8:55 AM Comment Actions
This patch fixes the problem and we need it for sure. But, the D75175 is another idea (nothing to do with this patch) to avoid production of call site info in the case of non-debug builds, which makes sense to me, since it is being used only for Debug Entry Values feature, but we can move the discussion to that patch.
Comment Actions
Okay, thanks for the explanation!
Revision Contents
Diff 246654 llvm/include/llvm/CodeGen/MachineFunction.h
llvm/include/llvm/CodeGen/MachineInstr.h
llvm/lib/CodeGen/BranchFolding.cpp
llvm/lib/CodeGen/IfConversion.cpp
llvm/lib/CodeGen/LiveRangeEdit.cpp
llvm/lib/CodeGen/MachineFunction.cpp
llvm/lib/CodeGen/MachineInstr.cpp
llvm/lib/CodeGen/MachineLICM.cpp
llvm/lib/CodeGen/MachineOutliner.cpp
llvm/lib/CodeGen/PeepholeOptimizer.cpp
llvm/lib/CodeGen/TailDuplicator.cpp
llvm/lib/CodeGen/TargetInstrInfo.cpp
llvm/lib/CodeGen/UnreachableBlockElim.cpp
llvm/lib/CodeGen/XRayInstrumentation.cpp
llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp
llvm/test/CodeGen/Thumb2/call-site-info-update.ll
|
A better description might be: "Returns true if copying, moving, or erasing this instruction requires updating Call Site Info (see \ref copyCallSiteInfo, \ref moveCallSiteInfo, etc)."