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

Oren Ben Simhon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 06:10:17 PST 2018


oren_ben_simhon added a comment.

In https://reviews.llvm.org/D41879#978046, @craig.topper wrote:

> Should we be printing the DS_PREFIX as "notrack" like gcc?


In LLVM you can't print two different instructions (notrack and ds) for the same encoding. The only solution to that is creating separate call/jmp instructions (just like lock/rep).
You can't use flags (TSFlags or MIFlags) to change the instruction encoding, you must use different call/jmp instructions.

So we are down to 2 options:

1. Remain as is and benefit from call/jmp optimization with the risk of MI optimization that will change the order after instruction selection (unless we try using bundle).
2. Use same mechanism as lock/rep, multiple the number of call/jmp instructions and ISEL nodes but have the flexibility to emit notrack instead of ds.

You suggest to use the second option. are we in sync?


Repository:
  rL LLVM

https://reviews.llvm.org/D41879





More information about the llvm-commits mailing list