This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add support for handling the +sve target feature
ClosedPublic

Authored by aemerson on Jul 7 2017, 4:28 AM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

aemerson created this revision.Jul 7 2017, 4:28 AM
rengolin added a subscriber: t.p.northover.
rengolin added inline comments.
lib/Basic/Targets.cpp
6245 ↗(On Diff #105620)

Is there any AArch64 arch without SIMD?

Anyway, that seems deliberate, @t.p.northover any idea?

aemerson added inline comments.Jul 7 2017, 5:16 AM
lib/Basic/Targets.cpp
6245 ↗(On Diff #105620)

SIMD support can be disabled with +nosimd. This change doesn't affect how that works.

rengolin edited edge metadata.
rengolin added a subscriber: jmolloy.

@jmolloy Can you check this change, please?

lib/Basic/Targets.cpp
6245 ↗(On Diff #105620)

The commit that introduced this (by James) states: "Allow the disabling of NEON and crypto instructions."

I wouldn't remove the FPUMode as is.

It's also surprising that this passes the test that James updated on the same commit. Maybe the tests weren't good enough?

@jmolloy Can you check this change, please?

I'm not really removing FPUMode, I'm just converting an enum to a bit field. FPUMode, i.e. no NEON, after this change is now represented by simply having all bits be 0. See the equivalent implementation for ARM which does the same thing.

@jmolloy Can you check this change, please?

I'm not really removing FPUMode, I'm just converting an enum to a bit field. FPUMode, i.e. no NEON, after this change is now represented by simply having all bits be 0. See the equivalent implementation for ARM which does the same thing.

That's not really a bit field, but the point is that you're removing the explicit categorisation, which helps people understand what it all means and why it was there in the first place.

There is no reason to remove FPUMode. You can just add "SveMode" to that list and make it (1 << 1) to make it explicit that this is bit pattern enum.

aemerson updated this revision to Diff 106386.Jul 13 2017, 3:44 AM

The reason it's removed is because it's not actually used anywhere, just as a default value. I'm not going to debate it further though so I've put it back in.

rengolin accepted this revision.Jul 13 2017, 3:55 AM

Thanks. LGTM.

This revision is now accepted and ready to land.Jul 13 2017, 3:55 AM
This revision was automatically updated to reflect the committed changes.