[PATCH] D40482: [X86] Instrument Control Flow For Indirect Branch Tracking

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 00:12:52 PST 2017


craig.topper added inline comments.


================
Comment at: lib/Target/X86/CMakeLists.txt:61
   X86CallingConv.cpp
+  X86IndirectBranchTracking.cpp
   )
----------------
I think this list was supposed to be in alphabetical order. Looks like someone already messed it up with X86CallingConv.cpp, but we should try to keep the rest in order.


================
Comment at: lib/Target/X86/X86.h:54
+/// destinations as part of CET IBT mechanism.
+FunctionPass *createX86IndirectBranchTracking();
+
----------------
Add "Pass" to the end of this for consistency.


================
Comment at: lib/Target/X86/X86IndirectBranchTracking.cpp:12
+// of Control-Flow Enforcement Technology (CET).
+// The pass adds ENDBRANCH machine instructions at the beginning of each basic
+// block or function that is referenced by an indrect jump/call instruction.
----------------
Should this be ENDBR not ENDBRANCH if that's the name of the instruction?


================
Comment at: lib/Target/X86/X86TargetMachine.cpp:57
+static cl::opt<bool>
+    InstrumentControlFlow("instrument-control-flow", cl::init(false),
+                          cl::Hidden,
----------------
Should this be in a non-x86 specific place? If the x86 target isn't being built this won't exist.


Repository:
  rL LLVM

https://reviews.llvm.org/D40482





More information about the llvm-commits mailing list