[PATCH] D111288: [fir] Add data flow optimization pass
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 25 23:24:46 PDT 2021
mehdi_amini added inline comments.
================
Comment at: flang/lib/Optimizer/Transforms/MemRefDataFlowOpt.cpp:84
+ std::vector<ReadOp> &&loadOps) {
+ for (auto &loadOp : loadOps) {
+ if (domInfo->dominates(storeOp, loadOp))
----------------
clementval wrote:
> mehdi_amini wrote:
> > mehdi_amini wrote:
> > > It is a bit misleading that the variable name is loadOps but contains instances of `ReadOp` (while there is also a `LoadOp` class...)
> > I'm also interested in what "the team" would argue here: this code is **very** misleading in the naming and this is mostly because of the use of `auto`.
> >
> In this case `ReadOp` is a template parameter so not sure it would help here. This is what I gathered from the team so if we need to discuss this in more details we can arrange something.
OK I totally missed that this was a template parameter in my initial comment here!
By the way there seems to be a single instantiation of the template right now? It this intended to have more?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111288/new/
https://reviews.llvm.org/D111288
More information about the llvm-commits
mailing list