Page MenuHomePhabricator

[AArch64] Simplify MacroFusion
ClosedPublic

Authored by evandro on Mar 14 2017, 12:49 PM.

Details

Reviewers
MatzeB
atrick
Summary

This patch assumes that the dependents to be scanned for the ExitSU are its predecessors; otherwise, the successors of the instr are scanned.

Furthermore, sometimes the ExitSU was being fused twice, since it may be fused once when scanning the successors from the beginning of the BB and then again when scanning the predecessors of ExitSU. Thus, when scanning the successors of an instr, skip the ExitSU.

Diff Detail

Repository
rL LLVM

Event Timeline

evandro created this revision.Mar 14 2017, 12:49 PM
evandro updated this revision to Diff 92562.Mar 21 2017, 3:52 PM
evandro edited the summary of this revision. (Show Details)
atrick edited edge metadata.Apr 10 2017, 11:13 AM

This is probably fine, but I can't look at it closely at the moment. @MatzeB did some work in this area recently.

MatzeB edited edge metadata.Apr 10 2017, 11:32 AM
  • Please upload patches with context!
  • Variables names here are becoming hard to understand with each revision, please add comments or rename to something that makes sense:
    • LMI, RMI: What does L and R stand for? Left/Right, what would that mean? (Before the variable only existed in a DEBUG() section so I didn't care, not it is used in more places with variants like LSU/RSU).
    • ASU, BSU, XSU. I guess this made sense when it only was A/B in a first/second sense. Now we have X in the mix and it gets confusing.
MatzeB accepted this revision.Apr 10 2017, 11:40 AM

The change itself looks fine, so go ahead and commit after cleaning and/or documenting the code some more.

This revision is now accepted and ready to land.Apr 10 2017, 11:40 AM
evandro updated this revision to Diff 94728.Apr 10 2017, 1:10 PM
evandro edited the summary of this revision. (Show Details)

I tried to use more verbose names for variables and to comment more copiously this time.

I'm still a bit confused about the notion of left/right. We usually write instruction in a list with one instruction per line. That way top/bottom, above/below, predecessor/successor etc. makes sense to me. But I don't know how an instruction can be left or right of another one...

evandro updated this revision to Diff 94739.Apr 10 2017, 2:09 PM
evandro closed this revision.Apr 11 2017, 12:28 PM

Closed by commit rL299974: [AArch64] Simplify MacroFusion