mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[IRGen] Add flags to control LLVM verify-each.
Analogous to -sil-verify-all, the new flags cause LLVM verification to be run after each LLVM optimization pass.
This commit is contained in:
@@ -272,6 +272,9 @@ public:
|
||||
/// well-formed?
|
||||
unsigned Verify : 1;
|
||||
|
||||
/// Whether to verify after every optimizer change.
|
||||
unsigned VerifyEach : 1;
|
||||
|
||||
OptimizationMode OptMode;
|
||||
|
||||
/// Which sanitizer is turned on.
|
||||
@@ -580,7 +583,7 @@ public:
|
||||
|
||||
IRGenOptions()
|
||||
: OutputKind(IRGenOutputKind::LLVMAssemblyAfterOptimization),
|
||||
Verify(true), OptMode(OptimizationMode::NotSet),
|
||||
Verify(true), VerifyEach(false), OptMode(OptimizationMode::NotSet),
|
||||
Sanitizers(OptionSet<SanitizerKind>()),
|
||||
SanitizersWithRecoveryInstrumentation(OptionSet<SanitizerKind>()),
|
||||
SanitizeAddressUseODRIndicator(false), SanitizerUseStableABI(false),
|
||||
|
||||
@@ -592,6 +592,12 @@ def disable_swift_specific_llvm_optzns : Flag<["-"], "disable-swift-specific-llv
|
||||
def disable_llvm_verify : Flag<["-"], "disable-llvm-verify">,
|
||||
HelpText<"Don't run the LLVM IR verifier.">;
|
||||
|
||||
def enable_llvm_verify_each : Flag<["-"], "enable-llvm-verify-each">,
|
||||
HelpText<"Run the LLVM IR verifier after every pass.">;
|
||||
|
||||
def disable_llvm_verify_each : Flag<["-"], "disable-llvm-verify-each">,
|
||||
HelpText<"Don't run the LLVM IR verifier after every pass.">;
|
||||
|
||||
def disable_llvm_value_names : Flag<["-"], "disable-llvm-value-names">,
|
||||
HelpText<"Don't add names to local values in LLVM IR">;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user