When the source has a series of assignments, users reasonably want to
have the debugger step through each one individually. Turn off the combine
for adjacent stores so we get this behavior at -O0.
Similar to D7181.
Differential D115808
[DAGCombiner] Avoid combining adjacent stores at -O0 to improve debug experience xgupta on Dec 15 2021, 9:46 AM. Authored by
Details When the source has a series of assignments, users reasonably want to Similar to D7181.
Diff Detail
Event Timeline
Comment Actions There is some problem with the script when I generate .ll file with -g flag and use it to generate CHECK lines it will not work, but it work when the test case has no debug info. This debuginfo test also doesn't use the script for check lines https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/RISCV/dwarf-eh.ll. Before patch 0x0000000000401110 2 0 1 0 0 is_stmt After patch 0x0000000000010180 2 0 1 0 0 is_stmt
Comment Actions Thank you suggestions. I get to know many things.
Comment Actions This goes against the LLVM Code-Review Policy and Practices:
I only commented on the test case to make sure you didn't make a mess of llvm/test/CodeGen/RISCV. I don't agree with the DAGCombiner change itself, which may not surprise you, as it's just trying to patch over a fundamental issue (or non-issue) with SelectionDAG's current implementation, so my lack of commenting on that was not approval, just "I don't feel strongly enough to block it, and will let someone else decide on whether it's a worthwhile change". Comment Actions Honestly, I am not aware that you are only reviewing the RISCV test case. I have no objection to reverting it immediately if any SelectionDAG developer objects to change. Comment Actions I agree that it would be better to have a higher-level fix for the problem and made a similar comment here: But it doesn't seem like there's enough motivation to overcome whatever the underlying bugs are, so we have a bunch of these 'optnone' checks around DAGCombiner now. For reference, the original bug that mentioned disabling the whole combiner was: With more discussion here: Comment Actions Sorry, I didn't read it before (I have seen a few times contributors commit in the such/same way) I will take care to not commit until patch is approved and all reviewers satisfy with the changes. Sorry, I read it fast that I didn't understand the meaning, I think you agree with the change, for now, don't want to revert it, right?
I did read it before but not thoroughly I think it is fine to disable combining & canonicalization both if they affect debug info as mentioned in this mail by Robinson, Paul https://lists.llvm.org/pipermail/llvm-dev/2016-May/099772.html. I doubt I can (may try) implement the registration mechanism that @qcolombet was talking about in that email thread. Comment Actions Correct - based on previous patches/discussion, I see no reason to block this change. So LGTM, but please wait a day or so to re-commit in case others have more suggestions.
|
"This test verifies that a repeated store is not eliminated with optnone (improves debugging)."