[llvm] [RemoveDIs][DebugInfo] Handle DPVAssign in most transforms (PR #78986)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 05:31:43 PST 2024
================
@@ -1761,6 +1761,11 @@ bool SimplifyCFGOpt::hoistSuccIdenticalTerminatorToSwitchOrIf(
OtherSuccTI->replaceAllUsesWith(NT);
NT->takeName(I1);
}
+ // Also clone DPValues from the existing terminator, and all others (to
+ // duplicate existing hoisting behaviour).
+ NT->cloneDebugInfoFrom(I1);
+ for (Instruction *OtherSuccTI : OtherSuccTIs)
+ NT->cloneDebugInfoFrom(OtherSuccTI);
----------------
SLTozer wrote:
Nevermind, I was wrong - `DebugInfo/Generic/assignment-tracking/simplifycfg/empty-block.ll` fails without this! Will re-add this to the patch (and also make sure that test is included).
https://github.com/llvm/llvm-project/pull/78986
More information about the llvm-commits
mailing list