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

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 10:08:00 PDT 2017


anemet added a comment.

Yep, looks good.



================
Comment at: lib/Transforms/Scalar/TailRecursionElimination.cpp:70
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/DiagnosticInfo.h"
 #include "llvm/IR/Function.h"
----------------
Remove this?


================
Comment at: lib/Transforms/Scalar/TailRecursionElimination.cpp:305
+      // using namespace ore;
+      ORE->emit(OptimizationRemark(DEBUG_TYPE, "tailcallelim", CI)
+               << "marked as tail call candidate");
----------------
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.


https://reviews.llvm.org/D35570





More information about the llvm-commits mailing list