[PATCH] D35570: [ORE] Port TailRecursionElimination to the new API

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 13:20:00 PDT 2017


davide added inline comments.


================
Comment at: lib/Transforms/Scalar/TailRecursionElimination.cpp:305
+      // using namespace ore;
+      ORE->emit(OptimizationRemark(DEBUG_TYPE, "tailcallelim", CI)
+               << "marked as tail call candidate");
----------------
davide wrote:
> anemet wrote:
> > It's up to you but you may want to differentiate the remarks by name (i.e. not use the same "tailcalelim" name).  It's easier to do stats, etc.
> What do you mean exactly? Change the second parameter to be an unique identifier *within* the same file? 
> e.g. "tailcallelim" vs "tailcallreadnone"?
> Fine, but please note that in this case it's less interesting as we're always applying the same transformation (i.e. set TailCall()).
> In other passes, e.g. Value Numbering it may have more sense as we perform different kind of xforms (e.g. instruction removal, moving etc..)
Still probably makes sense to differentiate why, although that should be always uniquely identified by the string (I guess stats don't really want to grep in text messages, so, OK).


https://reviews.llvm.org/D35570





More information about the llvm-commits mailing list