This is an archive of the discontinued LLVM Phabricator instance.

Add ARM subtarget feature +long64
AbandonedPublic

Authored by pirama on May 26 2016, 4:01 PM.

Details

Summary

This patch adds an ARM subtarget feature +long64 to request that long
datatype's width and alignment be 64-bits.

Tests included in accompanying patch to Clang.

Diff Detail

Event Timeline

pirama updated this revision to Diff 58712.May 26 2016, 4:01 PM
pirama retitled this revision from to Add ARM subtarget feature +long64.
pirama updated this object.
pirama added a reviewer: kristof.beyls.
pirama added subscribers: srhines, llvm-commits.
kristof.beyls edited edge metadata.May 30 2016, 4:53 AM

http://reviews.llvm.org/D20709 is where the review happens for the clang side of this patch.

See also my comments on that ticket.

When using the long-is-64-bits-abi-variant introduced in this patch, code generation must change. I think there should be tests for this as part of this patch.

I don't understand how this patch can change code generation. Did you forget to add some changes to this patch, or am I missing something?

t.p.northover edited edge metadata.May 30 2016, 6:12 PM

The only thing I know of that "long" could affect is the libcalls we produce, but as far as I'm aware the only dodgy cases are specified in terms of size_t and ptrdiff_t.

Those types vary completely independently of "long" (on some platforms they're "long", on others "long long").

The only thing I know of that "long" could affect is the libcalls we produce, but as far as I'm aware the only dodgy cases are specified in terms of size_t and ptrdiff_t.

Those types vary completely independently of "long" (on some platforms they're "long", on others "long long").

I commented on D20709 that this might be better as a proper ABI, but even in the case we don't do that, having this flag should be mostly harmless.

Users won't have a way to set it without calling CC1 directly, and if they do, than whatever lib calls they were expecting to work has to know about the new sizes/alignments.

cheers,
--renato

pirama abandoned this revision.Jun 1 2016, 3:44 PM

Abandoning this revision as the required behavior can be achieved without a change to the backend.