[PATCH] D145168: Move DBG_VALUE's that depend on loads to after a load if the load is moved due to the pre register allocation ld/st optimization pass
Shubham Sandeep Rastogi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 16:38:35 PDT 2023
rastogishubham added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp:2499
+static inline void populateRegisterAndInstrMapForDebugInstr(
+ Register Reg, SmallDenseMap<Register, MachineInstr *, 8> &RegisterMap,
----------------
rastogishubham wrote:
> aprantl wrote:
> > nit: `static inline` is effectively equivalent to `static` and thus LLVM code usually uses `static` alone.
> >
> > Given the ratio of the parameter list and the function body, maybe this makes more sense as a lambda anyway?
> I am still not used to writing lambdas, so they don't come to mind as a first thing, but I think it makes a lot of sense here, I also replaced
> ```
> undefDbgValueList
> ```
> with a lambda
Actually, I just removed
```
undefDbgValueList
```
I can use
```
forEachDbgRegOperand
```
to do the same thing
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145168/new/
https://reviews.llvm.org/D145168
More information about the llvm-commits
mailing list