Skip to content

Commit 5f4d0b0

Browse files
committed
Cleanup
1 parent 0a02dcd commit 5f4d0b0

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,6 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
992992
});
993993

994994
if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) {
995-
fprintf(stderr, "Adding RealtimeSanitizerPass\n");
996995
PB.registerLoopOptimizerEndEPCallback(
997996
[](LoopPassManager &LPM, OptimizationLevel Level) {
998997
LPM.addPass(RealtimeSanitizerLoopPass());

compiler-rt/test/rtsan/bound_loop.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
// RUN: %clangxx -fsanitize=realtime %s -o %t -O1
66
// RUN: %run %t 2>&1 | FileCheck %s --allow-empty
77

8-
// TODO: this test is failing with O0, investigate why
9-
// xxx: %clangxx -fsanitize=realtime %s -o %t -O0
10-
// xxx: %run %t 2>&1 | FileCheck %s
8+
// RUN: %clangxx -fsanitize=realtime %s -o %t -O0
9+
// RUN: %run %t 2>&1 | FileCheck %s --allow-empty
1110

1211
// UNSUPPORTED: ios
1312

llvm/include/llvm/Transforms/Instrumentation/RealtimeSanitizer.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "llvm/IR/PassManager.h"
2323
#include "llvm/Transforms/Scalar/LoopPassManager.h"
2424

25-
2625
namespace llvm {
2726

2827
struct RealtimeSanitizerOptions {};
@@ -41,7 +40,6 @@ struct RealtimeSanitizerLoopPass : PassInfoMixin<RealtimeSanitizerLoopPass> {
4140
static bool isRequired() { return true; }
4241
};
4342

44-
4543
} // namespace llvm
4644

4745
#endif // LLVM_TRANSFORMS_INSTRUMENTATION_REALTIMESANITIZER_H

llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,16 @@ RealtimeSanitizerPass::RealtimeSanitizerPass(
6363

6464
PreservedAnalyses RealtimeSanitizerPass::run(Function &F,
6565
AnalysisManager<Function> &AM) {
66-
PreservedAnalyses PA = PreservedAnalyses::all();
6766
if (F.hasFnAttribute(Attribute::SanitizeRealtime)) {
6867
insertCallAtFunctionEntryPoint(F, "__rtsan_realtime_enter");
6968
insertCallAtAllFunctionExitPoints(F, "__rtsan_realtime_exit");
70-
PA = PreservedAnalyses::none();
69+
70+
PreservedAnalyses PA;
7171
PA.preserveSet<CFGAnalyses>();
72+
return PA;
7273
}
7374

74-
return PA;
75+
return PreservedAnalyses::all();
7576
}
7677

7778
PreservedAnalyses RealtimeSanitizerLoopPass::run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U) {

0 commit comments

Comments
 (0)