[llvm] [NFC][EarlyIfConverter] Turn SSAIfConv into a local variable (PR #107390)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 05:04:27 PDT 2024


================
@@ -1202,9 +1199,11 @@ bool EarlyIfPredicator::shouldConvertIf() {
 
 /// Attempt repeated if-conversion on MBB, return true if successful.
 ///
-bool EarlyIfPredicator::tryConvertIf(MachineBasicBlock *MBB) {
+bool EarlyIfPredicator::tryConvertIf(SSAIfConv &IfConv,
+                                     MachineBasicBlock *MBB) {
   bool Changed = false;
-  while (IfConv.canConvertIf(MBB, /*Predicate*/ true) && shouldConvertIf()) {
+  while (IfConv.canConvertIf(MBB, /*Predicate*/ true) &&
+         shouldConvertIf(IfConv)) {
----------------
arsenm wrote:

```suggestion
  while (IfConv.canConvertIf(MBB, /*Predicate=*/ true) &&
         shouldConvertIf(IfConv)) {
```

https://github.com/llvm/llvm-project/pull/107390


More information about the llvm-commits mailing list