[PATCH] D129086: [NFC][AMDGPU] Cleanup the SIOptimizeExecMasking pass.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 5 06:04:32 PDT 2022
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp:744
+
+ Utils = std::make_unique<SIOptimizeExecMaskingUtils>(MF);
+
----------------
foad wrote:
> I don't understand the value of making this a separate class, instead of part of the main SIOptimizeExecMasking class.
Even if you do want a separate class there is no need for dynamically creating an instance. You could just have a local variable:
```
SIOptimizeExecMaskingUtils Utils(MF);
bool Changed = Utils.optimizeExecSequence(MF);
Changed |= Utils.optimizeVCmpxAndSaveexecSequence(MF);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129086/new/
https://reviews.llvm.org/D129086
More information about the llvm-commits
mailing list