[llvm] [PassManager] Add pretty stack frames (PR #96078)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 09:55:11 PDT 2024


================
@@ -224,11 +224,21 @@ class PassManager : public PassInfoMixin<
   std::vector<std::unique_ptr<PassConceptT>> Passes;
 };
 
+template <typename IRUnitT>
+void printIRUnitNameForStackTrace(raw_ostream &OS, const IRUnitT &IR);
----------------
nikic wrote:

In theory, no, because other places using PassManagerImpl.h also need to specialize these for other types. In practice, yes, we could, because all non-Module/Function users actually specialize the PassManager::run implementation (and as such currently aren't part of the stack trace).

Architecturally, I think putting the in PassManager.h is correct, though possibly this whole implementation is unnecessarily general given that we only end up using it for Module/Function right now.

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


More information about the llvm-commits mailing list