[PATCH] D152534: [NFC][DebugInfo][RemoveDIs] Use moveBeforePreserving when transforms intend to move dbg.values
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 07:12:57 PDT 2023
Orlando added a comment.
The mechanical change itself LGTM.
> A future patch will add an implementation of moveBeforePreserving that takes action to correctly preserve debug-info, but that's tightly coupled with our non-instruction debug-info representation. This patch just shows how invasive the changes are.
Is this patch purely illustrative or will it more or less be landed as is, with the implementation coming later?
I'm not sure exactly what the current status of the testing discussion is but it does seem like it'd be easier to add lit tests if the implementation came first, before updating call sites. OTOH if unittests are sufficient coverage for the `moveBeforePreserving` changes it doesn't matter as much.
================
Comment at: llvm/include/llvm/IR/Instruction.h:139
void moveBefore(Instruction *MovePos);
+ void moveBeforePreserving(Instruction *MovePos) {
+ moveBefore(MovePos);
----------------
Could be worth adding a comment explaining the intended semantics?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152534/new/
https://reviews.llvm.org/D152534
More information about the llvm-commits
mailing list