This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Run ARMParallelDSP in the IRPasses phase
ClosedPublic

Authored by samparker on Mar 12 2019, 8:13 AM.

Details

Summary

As a better alternative to D59207, run Early CSE before ARMParallelDSP. This leads to some small improvements some embedded benchmarks. I've also moved this to the IRPasses phase, along with alias analysis, because this is what we've been doing for a while downstream.

Diff Detail

Repository
rL LLVM

Event Timeline

samparker created this revision.Mar 12 2019, 8:13 AM
SjoerdMeijer added inline comments.Mar 12 2019, 8:24 AM
test/CodeGen/ARM/vldm-sched-a9.ll
9 ↗(On Diff #190260)

Not having looked at that PR, or at this test case for very long, but it looks like this test is useless now? Does it needs to be modified to do and check for something useful?

samparker marked an inline comment as done.Mar 12 2019, 9:01 AM
samparker added inline comments.
test/CodeGen/ARM/vldm-sched-a9.ll
9 ↗(On Diff #190260)

Yeah, it is useless now... there are other tests for vldm but fewer for vstm and none of them look particularly good! I'll see what I can do to produce something useful.

samparker updated this revision to Diff 190397.Mar 13 2019, 4:29 AM

I've re-written the vldm test so that at least a couple of vldmia are generated. Also added a todo because there seems to still be some inefficiencies there.

samparker updated this revision to Diff 190416.Mar 13 2019, 7:47 AM

Updated some existing tests.

SjoerdMeijer added inline comments.Mar 13 2019, 9:59 AM
lib/Target/ARM/ARMTargetMachine.cpp
411 ↗(On Diff #190416)

Under CodeGenOpt::Aggressive, I don't see adding a cleanup pass like CSE being a problem (e.g. for compile-times).
However, I was wondering if we need all of these passes, like ScopedNoAliasAA. I haven't looked at this pass before, so don't know what it is, do we need it? :-)

samparker marked an inline comment as done.Mar 14 2019, 3:06 AM
samparker added inline comments.
lib/Target/ARM/ARMTargetMachine.cpp
411 ↗(On Diff #190416)

Scoped alias appears to handle the cases where code is inlined from functions. I know that I included this passes at some point for a good reason, but I cannot remember and the tests do not reflect their requirement... so I'll remove them for now.

samparker updated this revision to Diff 190583.Mar 14 2019, 3:11 AM

Remove alias analysis and added at -O3 opt pipeline test.

SjoerdMeijer accepted this revision.Mar 14 2019, 3:28 AM

Thanks, this looks good to me.

This revision is now accepted and ready to land.Mar 14 2019, 3:28 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2019, 3:56 AM

This broke compilation of libcxx for armv7 mingw for me, see https://bugs.llvm.org/show_bug.cgi?id=41081 for details.