[PATCH] D11060: AMDGPU/SI: Select mad patterns to v_mac_f32

Tom Stellard thomas.stellard at amd.com
Thu Jul 9 19:15:45 PDT 2015


tstellarAMD added inline comments.

================
Comment at: lib/Target/AMDGPU/SIFoldOperands.cpp:131
@@ +130,3 @@
+                              const MachineInstr *MI) {
+  for (auto Candidate : FoldList) {
+    if (Candidate.UseMI == MI)
----------------
tstellarAMD wrote:
> arsenm wrote:
> > tstellarAMD wrote:
> > > arsenm wrote:
> > > > FoldList seems like it should be a set or map instead
> > > A map with UseMI as the Key and FoldCandidate as the value?
> > Yes. Is there a reason FoldList will be known to be small?
> The size of FoldList is the number of unique uses of a register, so it will usually be small.
Actually, we can' t use a map, because it is possible to have the same UseMI in the list twice.  We only disallow it if we need to commute the UseMI in order to fold an operand into it.


http://reviews.llvm.org/D11060







More information about the llvm-commits mailing list