[PATCH] D43813: [Machine Combiner] Valid use of OptSize

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 16 07:36:29 PDT 2018


RKSimon added a comment.

LGTM with a couple of style comments - pity we can't get a test case



================
Comment at: lib/CodeGen/MachineCombiner.cpp:413
+      return true; // Do substitute in any case if new size < old size
+    return false;  // We should not do substitute if new size >= old size
+  }
----------------
```
return (NewSize < OldSize);  // Only substitute if new size < old size
```


================
Comment at: lib/CodeGen/MachineCombiner.cpp:594
         break;
-      } else {
+      } else if (!(OptSize && (NewInstCount > OldInstCount))) {
         // For big basic blocks, we only compute the full trace the first time
----------------
```
} else if (!OptSize || (NewInstCount <= OldInstCount))) {
```


https://reviews.llvm.org/D43813





More information about the llvm-commits mailing list