Author: Arthur Eubanks Date: 2020-11-13T15:15:27-08:00 New Revision: 52f05fb2c2c30d12238f7e4ce3f3a4f849c40972
URL: https://github.com/llvm/llvm-project/commit/52f05fb2c2c30d12238f7e4ce3f3a4f849c40972 DIFF: https://github.com/llvm/llvm-project/commit/52f05fb2c2c30d12238f7e4ce3f3a4f849c40972.diff LOG: [MemProf][NewPM] Make memprof passes required Just like other sanitizers. Fixes check-memprof under NPM. Reviewed By: leonardchan Differential Revision: https://reviews.llvm.org/D91389 Added: Modified: clang/test/CodeGen/no-skipped-passes-O0-opt-bisect.c llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h Removed: ################################################################################ diff --git a/clang/test/CodeGen/no-skipped-passes-O0-opt-bisect.c b/clang/test/CodeGen/no-skipped-passes-O0-opt-bisect.c index 8acba73f6653..1d85f8819579 100644 --- a/clang/test/CodeGen/no-skipped-passes-O0-opt-bisect.c +++ b/clang/test/CodeGen/no-skipped-passes-O0-opt-bisect.c @@ -9,6 +9,7 @@ // RUN: %clang_cc1 -triple x86_64-linux-gnu -mllvm -enable-npm-optnone -O0 -fexperimental-new-pass-manager %s -fdebug-pass-manager -emit-llvm -o /dev/null -fsanitize=local-bounds 2>&1 | FileCheck %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -mllvm -enable-npm-optnone -O0 -fexperimental-new-pass-manager %s -fdebug-pass-manager -emit-llvm -o /dev/null -fsanitize=dataflow 2>&1 | FileCheck %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -mllvm -enable-npm-optnone -O0 -fexperimental-new-pass-manager %s -fdebug-pass-manager -emit-llvm -o /dev/null -fsanitize-coverage-trace-pc-guard 2>&1 | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -mllvm -enable-npm-optnone -O0 -fexperimental-new-pass-manager %s -fdebug-pass-manager -emit-llvm -o /dev/null -fmemory-profile 2>&1 | FileCheck %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -mllvm -opt-bisect-limit=0 -fexperimental-new-pass-manager %s -fdebug-pass-manager -emit-llvm -o /dev/null 2>&1 | FileCheck %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -mllvm -opt-bisect-limit=0 -fexperimental-new-pass-manager %s -fdebug-pass-manager -emit-llvm -o /dev/null -fcoroutines-ts 2>&1 | FileCheck %s @@ -19,6 +20,7 @@ // RUN: %clang_cc1 -triple x86_64-linux-gnu -mllvm -opt-bisect-limit=0 -fexperimental-new-pass-manager %s -fdebug-pass-manager -emit-llvm -o /dev/null -fsanitize=local-bounds 2>&1 | FileCheck %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -mllvm -opt-bisect-limit=0 -fexperimental-new-pass-manager %s -fdebug-pass-manager -emit-llvm -o /dev/null -fsanitize=dataflow 2>&1 | FileCheck %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -mllvm -opt-bisect-limit=0 -fexperimental-new-pass-manager %s -fdebug-pass-manager -emit-llvm -o /dev/null -fsanitize-coverage-trace-pc-guard 2>&1 | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -mllvm -opt-bisect-limit=0 -fexperimental-new-pass-manager %s -fdebug-pass-manager -emit-llvm -o /dev/null -fmemory-profile 2>&1 | FileCheck %s // CHECK-NOT: Skipping pass diff --git a/llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h b/llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h index 6918a24183b0..ac6a07d299a6 100644 --- a/llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h +++ b/llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h @@ -30,6 +30,7 @@ class MemProfilerPass : public PassInfoMixin<MemProfilerPass> { public: explicit MemProfilerPass(); PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); + static bool isRequired() { return true; } }; /// Public interface to the memory profiler module pass for instrumenting code @@ -38,6 +39,7 @@ class ModuleMemProfilerPass : public PassInfoMixin<ModuleMemProfilerPass> { public: explicit ModuleMemProfilerPass(); PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); + static bool isRequired() { return true; } }; // Insert MemProfiler instrumentation _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits