This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Do not merge CUDA target attributes.
ClosedPublic

Authored by tra on Sep 13 2016, 2:36 PM.

Details

Summary

CUDA target attributes are used for function overloading and must not be merged.

This fixes a bug where attributes were inherited during function template
specialization in CUDA and made it impossible for specialized function
to provide its own target attributes.

Diff Detail

Repository
rL LLVM

Event Timeline

tra updated this revision to Diff 71238.Sep 13 2016, 2:36 PM
tra retitled this revision from to [CUDA] Do not merge CUDA target attributes..
tra updated this object.
tra added a reviewer: jlebar.
tra added a subscriber: cfe-commits.
jlebar accepted this revision.Sep 13 2016, 2:57 PM
jlebar edited edge metadata.

Yay, this is great.

test/SemaCUDA/target_attr_inheritance.cu
4 ↗(On Diff #71238)

Other reviewers have pointed out to me that we don't usually (ever?) need this. I think these have to do with llvm's ability to generate code for our targets, but it's not relevant to clang here.

This revision is now accepted and ready to land.Sep 13 2016, 2:57 PM
tra updated this revision to Diff 71244.Sep 13 2016, 3:09 PM
tra edited edge metadata.
tra marked an inline comment as done.

Removed REQUIRED lines.

This revision was automatically updated to reflect the committed changes.