Skip to content
Commit af4c8730 authored by Yuanfang Chen's avatar Yuanfang Chen
Browse files

[NewPM] Allow passes to never be skipped

A pass declares itself unskippable by defining a method `static bool isRequired()`.

Also, this patch makes pass managers and adaptor passes required (unskippable).

PassInstrumentation before-pass-callbacks could be used to skip passes by returning false.
However, some passes should not be skipped at all. Especially so for special-purpose passes such as pass managers and adaptor passes since if they are skipped for any reason, the passes contained by them would also be skipped ignoring contained passes's return value of `isRequired()`.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D82344
parent 606e756b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment