Skip to content

[DNM] SIL: Enable verification and printing. #80776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/AST/IRGenOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ class IRGenOptions {

IRGenOptions()
: OutputKind(IRGenOutputKind::LLVMAssemblyAfterOptimization),
Verify(true), VerifyEach(false), OptMode(OptimizationMode::NotSet),
Verify(true), VerifyEach(true), OptMode(OptimizationMode::NotSet),
Sanitizers(OptionSet<SanitizerKind>()),
SanitizersWithRecoveryInstrumentation(OptionSet<SanitizerKind>()),
SanitizeAddressUseODRIndicator(false), SanitizerUseStableABI(false),
Expand Down
4 changes: 2 additions & 2 deletions include/swift/AST/SILOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ class SILOptions {
bool EnableWMORequiredDiagnostics = true;

/// Controls whether or not paranoid verification checks are run.
bool VerifyAll = false;
bool VerifyAll = true;

/// Verify ownership after every pass.
bool VerifyOwnershipAll = false;
bool VerifyOwnershipAll = true;

/// If true, no SIL verification is done at all.
bool VerifyNone = false;
Expand Down
2 changes: 1 addition & 1 deletion lib/SIL/IR/SILPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ SILPrintSourceInfo("sil-print-sourceinfo", llvm::cl::init(false),
llvm::cl::desc("Include source annotation in SIL output"));

llvm::cl::opt<bool>
SILPrintTypes("sil-print-types", llvm::cl::init(false),
SILPrintTypes("sil-print-types", llvm::cl::init(true),
llvm::cl::desc("always print type annotations for instruction operands in SIL output"));

llvm::cl::opt<bool>
Expand Down
4 changes: 2 additions & 2 deletions lib/SIL/Utils/PrettyStackTrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
using namespace swift;

llvm::cl::opt<bool>
SILPrintOnError("sil-print-on-error", llvm::cl::init(false),
SILPrintOnError("sil-print-on-error", llvm::cl::init(true),
llvm::cl::desc("Printing SIL function bodies in crash diagnostics."));

llvm::cl::opt<bool> SILPrintModuleOnError(
"sil-print-module-on-error", llvm::cl::init(false),
"sil-print-module-on-error", llvm::cl::init(true),
llvm::cl::desc("Printing SIL module in crash diagnostics."));

static void printLocationDescription(llvm::raw_ostream &out,
Expand Down