[PATCH] D41879: [X86] Added support for nocf_check attribute for indirect Branch Tracking

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 12:34:44 PST 2018


craig.topper added a comment.

I think you need to add support to the assembly parser to read assembly with notrack in it as well.



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:37874
+    // notrack prefix to the indirect branch.
+    // In order to do that we createds NT_BRIND SDNode.
+    // Upon ISEL, the pattern will convert it to jmp with NoTrack prefix.
----------------
createds is mispelled.


================
Comment at: lib/Target/X86/X86ISelLowering.h:1110
 
+    SDValue expandIndirectJTBranch(SDLoc dl, SDValue Value, SDValue Addr,
+                                   SelectionDAG &DAG) const override;
----------------
SDLoc should be passed by const reference I think.


================
Comment at: lib/Target/X86/X86IndirectBranchTracking.cpp:146
-  // Adds ENDBR instructions to MBB destinations of the jump table.
-  // TODO: In case of more than 50 destinations, do not add ENDBR and
-  // instead add DS_PREFIX.
----------------
Is this TODO implemented by this patch? I didn't see anywhere that checks for the number of destination.


================
Comment at: test/CodeGen/X86/indirect-branch-tracking.ll:8
 ;; -----
-;; Checks ENDBR insertion in case of indirect branch IR instruction.
+;; Checks DS_PREFIX insertion in case of switch case statement.
 ;; Also since the function is not internal, make sure that endbr32/64 was 
----------------
DS_PREFIX should be NOTRACK


Repository:
  rL LLVM

https://reviews.llvm.org/D41879





More information about the llvm-commits mailing list