[PATCH] D39536: [PowerPC] Eliminate redundant register copys after register allocation

Zaara Syeda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 15:16:45 PDT 2018


syzaara added inline comments.


================
Comment at: lib/Target/PowerPC/PPCRegCopyElim.cpp:285
+          // Def for the source of the register copy is found in the BB.
+          if (DefMI) {
+            if (!IsDstUsed) {
----------------
I'm finding this difficult to follow since there is a lot happening in the loop. Can we extract out more functionality into functions? From what I understand, maybe we can do something like:

```
if (DefMI)
   Simplified |= eliminateIntraBBCopy
else if (controlFlowSupported())
   Simplified |= elimanteInterBBCopy
```


https://reviews.llvm.org/D39536





More information about the llvm-commits mailing list