Page MenuHomePhabricator

[VE,#1] Scalar code generation
AcceptedPublic

Authored by simoll on Dec 11 2019, 3:04 AM.

Details

Reviewers
arsenm
Summary

This is patch #1 in the patch series for the VE backend for NEC-SX Aurora.
This patch builds on the SjLj preparation patch of https://reviews.llvm.org/D71337

This patch implements scalar code generation for the VE target.

Diff Detail

Event Timeline

simoll created this revision.Dec 11 2019, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 11 2019, 3:04 AM

To clarify: this patch is not intended to be committed as-is but gives an overview of the required changes. It's the a patch of a series for the VE backend and includes all the earlier patches.

simoll updated this revision to Diff 233332.Dec 11 2019, 5:38 AM
simoll edited the summary of this revision. (Show Details)
  • Stripped SjLj-prep changes from diff.
simoll added a project: Restricted Project.Dec 11 2019, 5:45 AM
simoll updated this revision to Diff 237018.Jan 9 2020, 4:45 AM

Rebased

Unit tests: pass. 61884 tests passed, 0 failed and 877 were skipped.

clang-tidy: unknown.

clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

arsenm added a subscriber: arsenm.Jan 15 2020, 6:19 AM
arsenm added inline comments.
llvm/lib/Target/VE/AsmParser/VEAsmParser.cpp
114–124

I assume these are all in one class, so you could just directly access the MCRegisterClass?

llvm/lib/Target/VE/VEISelDAGToDAG.cpp
94

Can't this just re-use the existing type instead of calling TLI->getPointerTy?

117

A future improvement would be to use isBaseWithConstantOffset here to catch the annoying add->or case

135–138

Why is this necessary exactly? I didn't know any targets had to manually process inline asm selection

llvm/lib/Target/VE/VEISelLowering.cpp
300–302

Relying on pointer element type. I think we already have a correct opaque pointer way to do this for sret?

695

New word 'investivated'

997

No else after return

1246

Just reuse the existing type?

1873

s/unsigned/Register, here and many other places

llvm/lib/Target/VE/VEInstrInfo.cpp
53

Previous line

74

Previous line

332

Dead code

llvm/lib/Target/VE/VERegisterInfo.cpp
147–150

Leftover debugging junk

arsenm added inline comments.Jan 15 2020, 6:23 AM
llvm/lib/Target/VE/VERegisterInfo.cpp
76

I recommend using the MCRegAliasIterator to do this, see AMDGPURegisterInfo::reserveRegisterTuples

simoll planned changes to this revision.Jan 16 2020, 8:29 AM
simoll marked 9 inline comments as done.
simoll updated this revision to Diff 239164.Jan 20 2020, 10:22 AM
simoll marked 6 inline comments as done.

Addressed comments by @arsenm

Unit tests: pass. 62027 tests passed, 0 failed and 878 were skipped.

clang-tidy: unknown.

clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

arsenm accepted this revision.Jan 20 2020, 1:18 PM

LGTM

This revision is now accepted and ready to land.Jan 20 2020, 1:18 PM