[PATCH] D36704: [CodeGen] Improve the consistency of instruction fusion

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 08:43:04 PST 2017


evandro marked an inline comment as done.
evandro added inline comments.


================
Comment at: llvm/lib/CodeGen/MacroFusion.cpp:90
+      SUnit *SU = SI.getSUnit();
+      if (SI.isWeak() || (SI.getKind() != SDep::Order && SI.isCtrl()) ||
+          &FirstSU == SU || FirstSU.isSucc(SU))
----------------
evandro wrote:
> evandro wrote:
> > fhahn wrote:
> > > Would it make sense to move this code to a function (maybe just a closure in this function? I suspect the fact that we use isPred/isSucc makes things slightly tricky? :(
> > Where would you suggest, as a new method in `SUinit`?
> Effectively, this test is equivalent to `SDep::getKind() == SDep::Order || SDep::getKind() == SDep::Output`.
Hit send before finishing editing the comment above.

Again, effectively, this test is equivalent to `SDep::getKind() == SDep::Anti || SDep::getKind() == SDep::Output`.



https://reviews.llvm.org/D36704





More information about the llvm-commits mailing list