aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/StackProtector.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2021-02-04 19:34:09 -0800
committerArthur Eubanks <aeubanks@google.com>2021-02-10 11:22:12 -0800
commit5d960cba34682d0d4e0cd56837131888eb647c62 (patch)
treef378cebbd782be2d6f0c1597cb9fa1407e7320f4 /llvm/lib/CodeGen/StackProtector.cpp
parentfc4d780eaf52cb2361579dcc8d5073e662a950e5 (diff)
downloadllvm-5d960cba34682d0d4e0cd56837131888eb647c62.zip
llvm-5d960cba34682d0d4e0cd56837131888eb647c62.tar.gz
llvm-5d960cba34682d0d4e0cd56837131888eb647c62.tar.bz2
[opt][NewPM] Add a --print-passes flag to print all available passes
It seems nicer to list passes given a flag rather than displaying all passes in opt --help. This is awkwardly structured because a PassBuilder is required, but reusing the PassBuilder in runPassPipeline() doesn't work because we read the input IR before getting to runPassPipeline(). So printing the list of passes needs to happen before reading the input IR. If we remove the legacy PM code in main() and move everything from NewPMDriver.cpp into opt.cpp, we can create the PassBuilder before reading IR and check if we should print the list of passes and exit. But until then this hack seems fine. Compared to the legacy PM, the new PM passes are lacking descriptions. We'll need to figure out a way to add descriptions if we think this is important. Also, this only works for passes specified in PassRegistry.def. If we want to print other custom registered passes, we'll need a different mechanism. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D96101
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
0 files changed, 0 insertions, 0 deletions