[all-commits] [llvm/llvm-project] 253a29: [PassManager] Add pretty stack frames (#96078)
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Jun 27 03:16:52 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 253a294b54a6096a0b66f840931dd0e345d70c4f
https://github.com/llvm/llvm-project/commit/253a294b54a6096a0b66f840931dd0e345d70c4f
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-06-27 (Thu, 27 Jun 2024)
Changed paths:
M llvm/include/llvm/IR/PassInstrumentation.h
M llvm/include/llvm/IR/PassManager.h
M llvm/include/llvm/IR/PassManagerImpl.h
M llvm/lib/IR/PassManager.cpp
M llvm/lib/Passes/PassBuilder.cpp
M llvm/lib/Passes/PassRegistry.def
A llvm/test/Other/crash-stack-trace.ll
M llvm/test/Other/print-on-crash.ll
Log Message:
-----------
[PassManager] Add pretty stack frames (#96078)
In NewPM pass managers, add a "pretty stack frame" that tells you which
pass crashed while running which function.
For example `opt -O3 -passes-ep-peephole=trigger-crash-function test.ll`
will print something like this:
```
Stack dump:
0. Program arguments: build/bin/opt -S -O3 -passes-ep-peephole=trigger-crash-function test.ll
1. Running pass "function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,trigger-crash-function,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>)" on module "test.ll"
2. Running pass "trigger-crash-function" on function "fshl_concat_i8_i8"
```
While the crashing pass is usually evident from the stack trace, this
also shows which function triggered the crash, as well as the pipeline
string for the pass (including options).
Similar functionality existed in the LegacyPM.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list