[llvm] Add option to print entire function instead of just the loops for loo… (PR #123229)

Akshay Deodhar via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 14:52:29 PST 2025


================
@@ -999,6 +999,18 @@ void llvm::printLoop(Loop &L, raw_ostream &OS, const std::string &Banner) {
     return;
   }
 
+  if (forcePrintFuncIR()) {
----------------
akshayrdeodhar wrote:

I usually want to run -print-after-all, split the output into files, and diff files corresponding to consecutive passes. If the entire module _is_ dumped, the diff is less clean. Hence just the func IR.

With the suggested change, the function will get dumped in _addition_ to the module when -print-module-scope is specified, I think. Since the function is a part of the module, this seems redundant.

https://github.com/llvm/llvm-project/pull/123229


More information about the llvm-commits mailing list