This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Move splitToValueTypes to generic code
ClosedPublic

Authored by arsenm on Feb 28 2021, 9:50 AM.

Details

Summary

I copied the nearly identical function from AArch64 into AMDGPU, so
fix this duplication.

Mips and X86 have their own more exotic versions which should be
removed. However replacing those is better left for a separate patch
since it requires other changes to avoid regressions.

Diff Detail

Event Timeline

arsenm created this revision.Feb 28 2021, 9:50 AM
arsenm requested review of this revision.Feb 28 2021, 9:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2021, 9:50 AM
Herald added a subscriber: wdng. · View Herald Transcript
aemerson accepted this revision.Mar 1 2021, 12:36 AM
This revision is now accepted and ready to land.Mar 1 2021, 12:36 AM

Is there a plan to eventually get rid of the EVTs in call lowering and directly work with the LLVM IR Type?
Our downstream target needs special handling for pointer arguments, but unfortunately ComputeValueVTs loses the information about pointerness.
We solved this by directly operating on the LLVM IR type, although we do not handle vectors yet, which makes this a bit simpler

arsenm added a comment.Mar 1 2021, 5:45 AM

Is there a plan to eventually get rid of the EVTs in call lowering and directly work with the LLVM IR Type?

The EVT usage is just to bootstrap on top of the DAG infrastructure. Ideally we will eventually get rid of it and only use LLT

Our downstream target needs special handling for pointer arguments, but unfortunately ComputeValueVTs loses the information about pointerness.
We solved this by directly operating on the LLVM IR type, although we do not handle vectors yet, which makes this a bit simpler

ComputeValueVTs loses it, but the hack the DAG uses still should work. ArgFlagsTy still should contain the discarded address spaces