Following up from D130374.
-O1 explicitly tries to not run passes that hurt debuggability too much.
tail-call-elim hurts debuggability, so don't run it under -O1.
Paths
| Differential D131980
[Passes] Don't run tail-call-elim in -O1 AbandonedPublic Authored by aeubanks on Aug 16 2022, 10:33 AM.
Details
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 16 2022, 10:33 AM Comment Actions LGTM
This revision is now accepted and ready to land.Aug 16 2022, 10:52 AM Comment Actions
specifically tail call marking we have symbolizers that stopped displaying some frames with this change that we expect to work under -O1 Comment Actions If you're specifically concerned about sibcall (call->jmp) optimization in the backend, it might be better to adjust the backend to avoid sibcalls at -O1, as opposed to messing with optimization passes. (i.e. make -fno-optimize-sibling-calls the default at -O1.) "tail" markings are useful for other purposes, like alias analysis, and I don't really want every optimization pass/frontend that might add "tail" markings to worry about the optimization level. Large DiffThis large diff affects 444 files. Files without inline comments have been collapsed. Expand All Files
Revision Contents
Diff 453063 llvm/lib/Passes/PassBuilderPipelines.cpp
|
Update this comment? IIUC, we are decisively saying that tail call elim is not worth the impact to debuggability for -O1. That way, someone -- possibly me again :) -- won't try to unknowingly change this.