[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
Tue May 14 18:02:42 PDT 2019
xiangzhangllvm marked 3 inline comments as done.
xiangzhangllvm added inline comments.
================
Comment at: lib/Target/X86/X86IndirectBranchTracking.cpp:73
+bool X86IndirectBranchTrackingPass::addENDBR(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator I) const {
assert(TII && "Target instruction info was not initialized");
----------------
MaskRay wrote:
> indent with clang-format.
Hi! Fang rui, Nice to see you here!
It will more than 80 chars if I aligned the "Machine..", Is it suitable to write like this: ?
```
bool
X86IndirectBranchTrackingPass::addENDBR(MachineBasicBlock &MBB,
MachineBasicBlock::iterator I) const {
```
================
Comment at: lib/Target/X86/X86IndirectBranchTracking.cpp:79
+ if (EndbrOpcode != I->getOpcode()) {
+ I++;
+ BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(EndbrOpcode));
----------------
MaskRay wrote:
> `++I;`
It seems same with ++I ? More performance ?
================
Comment at: lib/Target/X86/X86IndirectBranchTracking.cpp:140
+
+ for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end();
+ I != E; ++I) {
----------------
MaskRay wrote:
> `for (const MachineInstr &MI : MBB)`
I used iterator I, because I want to pass I into BuildMI in 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