[PATCH] D119777: [X86] Introduce x86-cmov-converter-force-all

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 12:39:06 PST 2022


Amir marked 2 inline comments as done.
Amir added inline comments.


================
Comment at: llvm/lib/Target/X86/X86CmovConversion.cpp:186-195
+  if (ForceMemOperand || ForceAll) {
     CmovGroups AllCmovGroups;
     SmallVector<MachineBasicBlock *, 4> Blocks;
     for (auto &MBB : MF)
       Blocks.push_back(&MBB);
     if (collectCmovCandidates(Blocks, AllCmovGroups, /*IncludeLoads*/ true)) {
       for (auto &Group : AllCmovGroups) {
----------------
skan wrote:
> Amir wrote:
> > skan wrote:
> > > We should at least have a quick return for `ForceAll` here b/c there is no more CMOV.
> > What do you mean by "there's no more CMOV"? ForceAll would have to similarly collect all blocks, then collectCmovCandidates and iterate over AllCmovGroups. I don't see an early return option.
> The code after line 203 should not be executed when ForceAll is enabled, right?
Right, I see what you mean. Fixed in the updated rev.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119777



More information about the llvm-commits mailing list