[MachineCSE][NFC]: Refactor and comment on preventing CSE for isConvergent instrs
authorMichael Kitzan <mkitzan@apple.com>
Sat, 1 May 2021 02:50:54 +0000 (19:50 -0700)
committerMichael Kitzan <mkitzan@apple.com>
Wed, 5 May 2021 21:22:03 +0000 (14:22 -0700)
commita11489ae3e36063c64921439cbab89d1f3280f4a
treeced9cf24c66bf643807e1dbdf05ae92338d0957b
parent78a7d8c4dd1076dccfde2c48fc924d8f5529f4d1
[MachineCSE][NFC]: Refactor and comment on preventing CSE for isConvergent instrs

- Move the code preventing CSE of `isConvergent` instrs into
  `ProcessBlockCSE` (from `isProfitableToCSE`)
- Add comments explaining why `isConvergent` is used to prevent
  CSE of non-local instrs in MachineCSE and the new test
llvm/lib/CodeGen/MachineCSE.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/no-cse-nonlocal-convergent-instrs.mir