[PATCH] D66656: [DebugInfo][NFCI] Refactor LiveDebugValues containers to be pass fields
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 08:28:46 PDT 2019
aprantl added a comment.
I'm not a big fan of this approach unless there is a performance aspect that would motivate it.
The reason why I chose the "pass everything around" approach was because this makes it very obvious what the dependencies of each function are and also makes it glaringly obvious that there is no hidden state that is modified and depended on by the various steps. Currently each function explicitly declares its dependencies and expectations. I do think that the stateful variant may be easier to understand for someone who is already an expert on LiveDebugValues, but the explicit variant is definitely easier to reason about for someone who has to come in understand the pass and fix a bug. I think long-term it is better to optimize for the latter case.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66656/new/
https://reviews.llvm.org/D66656
More information about the llvm-commits
mailing list