[PATCH] D91389: [MemProf][NewPM] Make memprof passes required

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 12 13:40:42 PST 2020


aeubanks created this revision.
aeubanks added reviewers: leonardchan, ychen, asbirlea.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
aeubanks requested review of this revision.

Just like other sanitizers.
Fixes check-memprof under NPM.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91389

Files:
  clang/test/CodeGen/O0-no-skipped-passes.c
  llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h


Index: llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
===================================================================
--- llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
+++ llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
@@ -30,6 +30,7 @@
 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 @@
 public:
   explicit ModuleMemProfilerPass();
   PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
+  static bool isRequired() { return true; }
 };
 
 // Insert MemProfiler instrumentation
Index: clang/test/CodeGen/O0-no-skipped-passes.c
===================================================================
--- clang/test/CodeGen/O0-no-skipped-passes.c
+++ clang/test/CodeGen/O0-no-skipped-passes.c
@@ -8,6 +8,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=thread 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=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-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
 
 // CHECK-NOT: Skipping pass
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91389.304965.patch
Type: text/x-patch
Size: 1791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201112/a8f20b2c/attachment-0001.bin>


More information about the cfe-commits mailing list