[PATCH] D102463: Making Instrumentation aware of LoopNest Pass

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 12:52:24 PDT 2021


aeubanks added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:363-365
+  const Loop *L = any_isa<const LoopNest *>(&IR)
+                      ? &any_cast<const LoopNest *>(&IR)->getOutermostLoop()
+                      : any_cast<const Loop *>(&IR);
----------------
`IR` is either a `Loop&` or a `LoopNest&` right? not an `Any`
so we need to extract a `Loop` out of either `Loop` or `LoopNest`. with templates, it should be as simple as creating two functions with the same name that both return a `Loop&`, where one takes `Loop&` and the other takes a `LoopNest&`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102463/new/

https://reviews.llvm.org/D102463



More information about the llvm-commits mailing list