Skip to content

Commit fef3426

Browse files
authored
Revert "[LLVM][rtsan] Add LLVM nosanitize_realtime attribute (#105447)" (#106743)
This reverts commit 178fc47. This attribute was not needed now that we are using the lsan style ScopedDisabler for disabling this sanitizer See #106736 #106125 For more discussion
1 parent ece6566 commit fef3426

File tree

10 files changed

+2
-42
lines changed

10 files changed

+2
-42
lines changed

llvm/docs/LangRef.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,10 +2189,6 @@ example:
21892189
``nosanitize_coverage``
21902190
This attribute indicates that SanitizerCoverage instrumentation is disabled
21912191
for this function.
2192-
``nosanitize_realtime``
2193-
This attribute indicates that the Realtime Sanitizer instrumentation is
2194-
disabled for this function.
2195-
This attribute is incompatible with the ``sanitize_realtime`` attribute.
21962192
``null_pointer_is_valid``
21972193
If ``null_pointer_is_valid`` is set, then the ``null`` address
21982194
in address-space 0 is considered to be a valid address for memory loads and
@@ -2319,7 +2315,6 @@ example:
23192315
This attribute indicates that RealtimeSanitizer checks
23202316
(realtime safety analysis - no allocations, syscalls or exceptions) are enabled
23212317
for this function.
2322-
This attribute is incompatible with the ``nosanitize_realtime`` attribute.
23232318
``speculative_load_hardening``
23242319
This attribute indicates that
23252320
`Speculative Load Hardening <https://llvm.org/docs/SpeculativeLoadHardening.html>`_

llvm/include/llvm/Bitcode/LLVMBitCodes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,6 @@ enum AttributeKindCodes {
759759
ATTR_KIND_INITIALIZES = 94,
760760
ATTR_KIND_HYBRID_PATCHABLE = 95,
761761
ATTR_KIND_SANITIZE_REALTIME = 96,
762-
ATTR_KIND_NO_SANITIZE_REALTIME = 97,
763762
};
764763

765764
enum ComdatSelectionKindCodes {

llvm/include/llvm/IR/Attributes.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,6 @@ def NoSanitizeBounds : EnumAttr<"nosanitize_bounds", [FnAttr]>;
212212
/// No SanitizeCoverage instrumentation.
213213
def NoSanitizeCoverage : EnumAttr<"nosanitize_coverage", [FnAttr]>;
214214

215-
/// No SanitizeRealtime instrumentation.
216-
def NoSanitizeRealtime : EnumAttr<"nosanitize_realtime", [FnAttr]>;
217-
218215
/// Null pointer in address space zero is valid.
219216
def NullPointerIsValid : EnumAttr<"null_pointer_is_valid", [FnAttr]>;
220217

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,8 +2093,6 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
20932093
return Attribute::NoSanitizeBounds;
20942094
case bitc::ATTR_KIND_NO_SANITIZE_COVERAGE:
20952095
return Attribute::NoSanitizeCoverage;
2096-
case bitc::ATTR_KIND_NO_SANITIZE_REALTIME:
2097-
return Attribute::NoSanitizeRealtime;
20982096
case bitc::ATTR_KIND_NULL_POINTER_IS_VALID:
20992097
return Attribute::NullPointerIsValid;
21002098
case bitc::ATTR_KIND_OPTIMIZE_FOR_DEBUGGING:

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,6 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
795795
return bitc::ATTR_KIND_NO_SANITIZE_BOUNDS;
796796
case Attribute::NoSanitizeCoverage:
797797
return bitc::ATTR_KIND_NO_SANITIZE_COVERAGE;
798-
case llvm::Attribute::NoSanitizeRealtime:
799-
return bitc::ATTR_KIND_NO_SANITIZE_REALTIME;
800798
case Attribute::NullPointerIsValid:
801799
return bitc::ATTR_KIND_NULL_POINTER_IS_VALID;
802800
case Attribute::OptimizeForDebugging:

llvm/lib/IR/Verifier.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,12 +2223,6 @@ void Verifier::verifyFunctionAttrs(FunctionType *FT, AttributeList Attrs,
22232223
"Attributes 'optdebug and optnone' are incompatible!", V);
22242224
}
22252225

2226-
Check(!(Attrs.hasFnAttr(Attribute::SanitizeRealtime) &&
2227-
Attrs.hasFnAttr(Attribute::NoSanitizeRealtime)),
2228-
"Attributes "
2229-
"'sanitize_realtime and nosanitize_realtime' are incompatible!",
2230-
V);
2231-
22322226
if (Attrs.hasFnAttr(Attribute::OptimizeForDebugging)) {
22332227
Check(!Attrs.hasFnAttr(Attribute::OptimizeForSize),
22342228
"Attributes 'optsize and optdebug' are incompatible!", V);

llvm/lib/Transforms/Utils/CodeExtractor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,6 @@ Function *CodeExtractor::constructFunction(const ValueSet &inputs,
937937
case Attribute::NoUnwind:
938938
case Attribute::NoSanitizeBounds:
939939
case Attribute::NoSanitizeCoverage:
940-
case Attribute::NoSanitizeRealtime:
941940
case Attribute::NullPointerIsValid:
942941
case Attribute::OptimizeForDebugging:
943942
case Attribute::OptForFuzzing:

llvm/test/Bitcode/attributes.ll

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -511,12 +511,6 @@ define void @f92() sanitize_realtime
511511
ret void;
512512
}
513513

514-
; CHECK: define void @f93() #54
515-
define void @f93() nosanitize_realtime
516-
{
517-
ret void;
518-
}
519-
520514
; CHECK: define void @f87() [[FNRETTHUNKEXTERN:#[0-9]+]]
521515
define void @f87() fn_ret_thunk_extern { ret void }
522516

@@ -612,7 +606,6 @@ define void @initializes(ptr initializes((-4, 0), (4, 8)) %a) {
612606
; CHECK: attributes #51 = { uwtable(sync) }
613607
; CHECK: attributes #52 = { nosanitize_bounds }
614608
; CHECK: attributes #53 = { sanitize_realtime }
615-
; CHECK: attributes #54 = { nosanitize_realtime }
616609
; CHECK: attributes [[FNRETTHUNKEXTERN]] = { fn_ret_thunk_extern }
617610
; CHECK: attributes [[SKIPPROFILE]] = { skipprofile }
618611
; CHECK: attributes [[OPTDEBUG]] = { optdebug }

llvm/test/Bitcode/compatibility.ll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ exit:
15621562
; CHECK: select <2 x i1> <i1 true, i1 false>, <2 x i8> <i8 2, i8 3>, <2 x i8> <i8 3, i8 2>
15631563

15641564
call void @f.nobuiltin() builtin
1565-
; CHECK: call void @f.nobuiltin() #54
1565+
; CHECK: call void @f.nobuiltin() #53
15661566

15671567
call fastcc noalias ptr @f.noalias() noinline
15681568
; CHECK: call fastcc noalias ptr @f.noalias() #12
@@ -1992,9 +1992,6 @@ declare void @f.sanitize_numerical_stability() sanitize_numerical_stability
19921992
declare void @f.sanitize_realtime() sanitize_realtime
19931993
; CHECK: declare void @f.sanitize_realtime() #52
19941994

1995-
declare void @f.nosanitize_realtime() nosanitize_realtime
1996-
; CHECK: declare void @f.nosanitize_realtime() #53
1997-
19981995
; CHECK: declare nofpclass(snan) float @nofpclass_snan(float nofpclass(snan))
19991996
declare nofpclass(snan) float @nofpclass_snan(float nofpclass(snan))
20001997

@@ -2118,8 +2115,7 @@ define float @nofpclass_callsites(float %arg) {
21182115
; CHECK: attributes #50 = { allockind("alloc,uninitialized") }
21192116
; CHECK: attributes #51 = { sanitize_numerical_stability }
21202117
; CHECK: attributes #52 = { sanitize_realtime }
2121-
; CHECK: attributes #53 = { nosanitize_realtime }
2122-
; CHECK: attributes #54 = { builtin }
2118+
; CHECK: attributes #53 = { builtin }
21232119

21242120
;; Metadata
21252121

llvm/test/Verifier/rtsan-attrs.ll

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)