Skip to content

Commit 709c218

Browse files
committed
Switch outlining to default, remove verification focused flag changes
1 parent 9ff2fb9 commit 709c218

File tree

6 files changed

+2
-32
lines changed

6 files changed

+2
-32
lines changed

clang/docs/TypeSanitizer.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,6 @@ forces all code instrumentation to be outlined. This reduces the size of the
144144
generated code and reduces compile-time overhead, but it also reduces runtime
145145
performance.
146146

147-
This outlined instrumentation is new. If you wish to verify that the outlined instrumentation
148-
is behaving in the same way as the inline instrumentation, you can force TypeSanitizer
149-
to use both types of instrumentation. You can use the clang flag
150-
``-fsanitize-type-verify-outlined-instrumentation`` (default: ``false``) to do this.
151-
152147
``__has_feature(type_sanitizer)``
153148
------------------------------------
154149

clang/include/clang/Driver/SanitizerArgs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class SanitizerArgs {
6868
bool TsanAtomics = true;
6969
bool MinimalRuntime = false;
7070
bool TysanOutlineInstrumentation = false;
71-
bool TysanVerifyOutlinedInstrumentation = false;
7271
// True if cross-dso CFI support if provided by the system (i.e. Android).
7372
bool ImplicitCfiRuntime = false;
7473
bool NeedsMemProfRt = false;

clang/include/clang/Options/Options.td

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,12 +2465,6 @@ def fsanitize_type_outline_instrumentation : Flag<["-"], "fsanitize-type-outline
24652465
def fno_sanitize_type_outline_instrumentation : Flag<["-"], "fno-sanitize-type-outline-instrumentation">,
24662466
Group<f_clang_Group>,
24672467
HelpText<"Use default code inlining logic for the type sanitizer">;
2468-
def fsanitize_type_verify_outlined_instrumentation : Flag<["-"], "fsanitize-type-verify-outlined-instrumentation">,
2469-
Group<f_clang_Group>,
2470-
HelpText<"Use both inlined and outlined instrumentation for type sanitizer to verify equivilence">;
2471-
def fno_sanitize_type_verify_outlined_instrumentation : Flag<["-"], "fno_sanitize-type-verify-outlined-instrumentation">,
2472-
Group<f_clang_Group>,
2473-
HelpText<"Don't use both inlined and outlined instrumentation for type sanitizer to verify equivilence">;
24742468
defm sanitize_stable_abi
24752469
: OptInCC1FFlag<"sanitize-stable-abi", "Stable ", "Conventional ",
24762470
"ABI instrumentation for sanitizer runtime. Default: Conventional">;

clang/lib/Driver/SanitizerArgs.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,10 +1181,6 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
11811181
Args.hasFlag(options::OPT_fsanitize_type_outline_instrumentation,
11821182
options::OPT_fno_sanitize_type_outline_instrumentation,
11831183
TysanOutlineInstrumentation);
1184-
TysanVerifyOutlinedInstrumentation = Args.hasFlag(
1185-
options::OPT_fsanitize_type_verify_outlined_instrumentation,
1186-
options::OPT_fno_sanitize_type_verify_outlined_instrumentation,
1187-
TysanVerifyOutlinedInstrumentation);
11881184
}
11891185

11901186
LinkRuntimes = Args.hasFlag(options::OPT_fsanitize_link_runtime,
@@ -1511,14 +1507,10 @@ void SanitizerArgs::addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args,
15111507
CmdArgs.push_back("-asan-instrumentation-with-call-threshold=0");
15121508
}
15131509

1514-
if (TysanOutlineInstrumentation || TysanVerifyOutlinedInstrumentation) {
1510+
if (TysanOutlineInstrumentation) {
15151511
CmdArgs.push_back("-mllvm");
15161512
CmdArgs.push_back("-tysan-outline-instrumentation");
15171513
}
1518-
if (TysanVerifyOutlinedInstrumentation) {
1519-
CmdArgs.push_back("-mllvm");
1520-
CmdArgs.push_back("-tysan-verify-outlined-instrumentation");
1521-
}
15221514

15231515
// When emitting Stable ABI instrumentation, force outlining calls and avoid
15241516
// inlining shadow memory poisoning. While this is a big performance burden

clang/test/CodeGen/sanitize-type-outlined.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,8 @@
66
// RUN: -fsanitize-type-outline-instrumentation \
77
// RUN: | FileCheck %s --check-prefixes=CHECK-OUTLINE
88

9-
// RUN: %clang -S -fsanitize=type -emit-llvm -o - -fsanitize=type %s \
10-
// RUN: -fsanitize-type-outline-instrumentation \
11-
// RUN: -fsanitize-type-verify-outlined-instrumentation \
12-
// RUN: | FileCheck %s --check-prefixes=CHECK-OUTLINE-VERIFY
13-
// RUN: %clang -S -fsanitize=type -emit-llvm -o - -fsanitize=type %s \
14-
// RUN: -fsanitize-type-verify-outlined-instrumentation \
15-
// RUN: | FileCheck %s --check-prefixes=CHECK-VERIFY
16-
179
// CHECK-NO-OUTLINE-NOT: call{{.*}}@__tysan_instrument_mem_inst
1810
// CHECK-OUTLINE: call{{.*}}@__tysan_instrument_mem_inst
19-
// CHECK-OUTLINE-VERIFY: call{{.*}}@__tysan_instrument_mem_inst
20-
// CHECK-VERIFY: call{{.*}}@__tysan_instrument_mem_inst
2111

2212
float alias(int *ptr){
2313
float *aliasedPtr = (float *)ptr;

llvm/lib/Transforms/Instrumentation/TypeSanitizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static cl::opt<bool> ClOutlineInstrumentation(
6262
"tysan-outline-instrumentation",
6363
cl::desc("Uses function calls for all TySan instrumentation, reducing "
6464
"ELF size"),
65-
cl::Hidden, cl::init(false));
65+
cl::Hidden, cl::init(true));
6666

6767
static cl::opt<bool> ClVerifyOutlinedInstrumentation(
6868
"tysan-verify-outlined-instrumentation",

0 commit comments

Comments
 (0)