This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Creating 'call_mangled' for Neon intrinsics definitions
ClosedPublic

Authored by pratlucas on Feb 14 2020, 8:12 AM.

Details

Summary

As multiple versions of the same Neon intrinsic can be created through
the same TableGen definition with the same argument types, the existing
call operator is not always able to properly perform overload
resolutions.

As these different intrinsic versions are differentiated later on by the
NeonEmitter through name mangling, this patch introduces a new
call_mangled operator to the TableGen definitions, which allows a call
for an otherwise ambiguous intrinsic by matching its mangled name with
the mangled variation of the caller.

Diff Detail

Event Timeline

pratlucas created this revision.Feb 14 2020, 8:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2020, 8:12 AM
pratlucas edited the summary of this revision. (Show Details)Feb 14 2020, 8:25 AM
pratlucas added reviewers: jmolloy, t.p.northover.
dnsampaio added inline comments.
clang/utils/TableGen/NeonEmitter.cpp
1881–1882

Can we move this above the loop just before? Perhaps, if false, can we just continue the outer loop?

pratlucas updated this revision to Diff 248505.Mar 5 2020, 9:00 AM

Addressing review comment

pratlucas marked an inline comment as done.Mar 5 2020, 9:01 AM
pratlucas updated this revision to Diff 248659.Mar 6 2020, 1:28 AM

Applying clang-format.

dnsampaio accepted this revision.Mar 10 2020, 8:36 AM

LGTM, after a nit inline.

clang/include/clang/Basic/arm_neon_incl.td
66

As the example above, it would be nice to have an example here as well.

This revision is now accepted and ready to land.Mar 10 2020, 8:36 AM

Adding example to call_mangled description comment.

pratlucas marked an inline comment as done.Mar 12 2020, 10:30 AM
This revision was automatically updated to reflect the committed changes.