[PATCH] D61881: Deal with return-twice function such as vfork, setjmp when CET-IBT enabled

Xiang Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 18:28:26 PDT 2019


xiangzhangllvm marked an inline comment as done.
xiangzhangllvm added inline comments.


================
Comment at: lib/Target/X86/X86IndirectBranchTracking.cpp:144
+      if (IsCallReturnTwice(I->getOperand(0)))
+        Changed |= addENDBR(MBB, I);
+    }
----------------
xiangzhangllvm wrote:
> craig.topper wrote:
> > What if we passed I++ here and passed MBB.begin() on the other callsites. Could we then avoid two different cases in addENDBR?
> Hi Craig, we can not avoid.
> because the 2 cases in addENDBR(MBB, I) are different.
> 
> one case is insert endbr after I
> and another case is insert endbr before I
> 
> 
Sorry, I miss understand before. Your suggestion is right!
Here can pass "I+1" not "I++" to  addENDBR()


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61881/new/

https://reviews.llvm.org/D61881





More information about the llvm-commits mailing list