This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Do not addrspacecast AS-specific kernel arguments.
ClosedPublic

Authored by tra on Jan 25 2023, 2:11 PM.

Details

Summary

Fixes https://github.com/llvm/llvm-project/issues/46954

The assumption that generic pointers passed to a CUDA kernel is CUDA-specific and should not be applied to non-CUDA compilations.
Addrspacecasts to global AS and back should never be applied to AS-specific pointers.

In order to make tests actually do the testing for non-CUDA compilation, we need to get
TargetMachine from the TargetPassConfig, instead of passing it explicitly as a pass constructor argument.

Diff Detail

Event Timeline

tra created this revision.Jan 25 2023, 2:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2023, 2:11 PM
tra updated this revision to Diff 492260.Jan 25 2023, 2:26 PM

Cosmetic refactoring

tra published this revision for review.Jan 25 2023, 2:32 PM
tra edited the summary of this revision. (Show Details)
tra added reviewers: jlebar, yaxunl.
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2023, 2:33 PM
yaxunl accepted this revision.Jan 25 2023, 3:13 PM

LGTM. Thanks.

This revision is now accepted and ready to land.Jan 25 2023, 3:13 PM
This revision was landed with ongoing or failed builds.Jan 26 2023, 11:34 AM
This revision was automatically updated to reflect the committed changes.