This is an archive of the discontinued LLVM Phabricator instance.

[ARM][ParallelDSP] Change the search for smlads
ClosedPublic

Authored by samparker on May 10 2019, 2:11 AM.

Details

Summary

Two functional changes have been made here:

  1. Now search up from any add instruction to find the chains of operations that we may turn into a smlad. This allows the generation of a smlad which doesn't accumulate into a phi.
  2. The search function has been corrected to stop it falsely searching up through an invalid path.

The bulk of the changes have been making the Reduction struct a class and making it more C++y with getters and setters.

Diff Detail

Repository
rL LLVM

Event Timeline

samparker created this revision.May 10 2019, 2:11 AM

A first pass, see inlined nits.

lib/Target/ARM/ARMParallelDSP.cpp
100 ↗(On Diff #198991)

if we use doxygen style comments for the methods of this class, should we provide a general description here too?

104 ↗(On Diff #198991)

nit: indentation

112 ↗(On Diff #198991)

nit: apart?

115 ↗(On Diff #198991)

same here?

123 ↗(On Diff #198991)

nit: perhaps this can also be a setter method, as that's the only thing it does essentially.

I am now curious about the false case. I.e., perhaps also briefly comment on what is supported (1 or more accumulators in 1 loop), and what happens in the false case.

141 ↗(On Diff #198991)

another nit: the getter and setter methods are not capitalised, while the other methods are. Not sure they should be though....perhaps they are an exception.

461 ↗(On Diff #198991)

Comment out of date? Don't think we look at PHIs anymore, but just at any add?

491 ↗(On Diff #198991)

nit: newline

499 ↗(On Diff #198991)

Perhaps good to spend a few words here on which non-instructions that might be?

samparker updated this revision to Diff 208893.Jul 10 2019, 1:43 AM

Added and modified comments.

SjoerdMeijer accepted this revision.Jul 10 2019, 5:38 AM

Thanks. This looks very reasonable to me.

This revision is now accepted and ready to land.Jul 10 2019, 5:38 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2019, 12:47 AM