[PATCH] MachineFunction is exposed to X86AsmParser.

Yuri Gorshenin ygorshenin at chromium.org
Fri Mar 21 07:20:15 PDT 2014


  PTAL

  Value of "fsanitize" option + asan blacklist should be exposed in a separate CL, as it requires changes to clang.


================
Comment at: lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp:32
@@ +31,3 @@
+static cl::opt<bool> ClAsanNoInstrumentInlineAssembly(
+    "asan-no-instrument-inline-assembly",
+    cl::desc("don't instrument inline assembly"), cl::Hidden, cl::init(false));
----------------
Evgeniy Stepanov wrote:
> This would enable not yet well tested asm instrumentation by default.
> 
> I think it's better to keep the flag name positive, and off by default (for now).
> 
Done.

================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:722
@@ +721,3 @@
+  void onMachineFunctionSet() override {
+    Instrumentation.reset(CreateX86AsmInstrumentation(MF, STI));
+  }
----------------
Evgeniy Stepanov wrote:
> This would read and parse the blacklist anew for every machine function.
> 
> The whole AsmParser is created from scratch for every inline asm instruction, so it's not a good owner for the blacklist.
> 
Done.


http://llvm-reviews.chandlerc.com/D3106



More information about the llvm-commits mailing list