[PATCH] D40482: [X86] Instrument Control Flow For Indirect Branch Tracking
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 21 09:57:58 PST 2017
craig.topper added inline comments.
================
Comment at: lib/Target/X86/X86IndirectBranchTracking.cpp:32
+static cl::opt<bool>
+ IndirectBranchTracking("indirect-branch-tracking", cl::init(false),
+ cl::Hidden,
----------------
Prefix the command line option name with "x86-" and mention X86 in the description.
================
Comment at: lib/Target/X86/X86IndirectBranchTracking.cpp:75
+
+char X86IndirectBranchTrackingPass::ID = 0;
+} // namespace
----------------
Move this initialization of X86IndirectBranchTrackingPass::ID out of the anonymous namespace. I think some passes are inconsistent on this, but I think outside would be correct by coding standards.
================
Comment at: lib/Target/X86/X86IndirectBranchTracking.cpp:76
+char X86IndirectBranchTrackingPass::ID = 0;
+} // namespace
+
----------------
Use "end anonymous namespace" I think that's more consistent.
================
Comment at: lib/Target/X86/X86IndirectBranchTracking.cpp:125
+ // Non-internal function or function whose address was taken, can be
+ // accesses through indirect calls. Mark the first BB with ENDBR instruction.
+ // TODO: Do not add ENDBR instruction in case notrack attribute is used.
----------------
accessed* I think.
Repository:
rL LLVM
https://reviews.llvm.org/D40482
More information about the llvm-commits
mailing list