This is an archive of the discontinued LLVM Phabricator instance.

CodeGen: Move getAddressSpaceForPseudoSourceKind into TargetMachine
ClosedPublic

Authored by arsenm on Apr 27 2022, 8:49 AM.

Details

Summary

Avoid the dependency on TargetInstrInfo, which depends on the subtarget
and therefore the individual function.

Currently AMDGPU is constructing PseudoSourceValue instances in MachineFunctionInfo.
In order to facilitate copying MachineFunctionInfo, we need to stop allocating these
there. Alternatively we could allow targets to subclass PseudoSourceValueManager,
and allocate them similarly to MachineFunctionInfo.

Diff Detail

Event Timeline

arsenm created this revision.Apr 27 2022, 8:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2022, 8:49 AM
arsenm requested review of this revision.Apr 27 2022, 8:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2022, 8:49 AM
Herald added a subscriber: wdng. · View Herald Transcript
foad accepted this revision.May 4 2022, 1:57 AM

LGTM.

Currently AMDGPU is constructing PseudoSourceValue instances in MachineFunctionInfo.

This patch doesn't change that, right?

This revision is now accepted and ready to land.May 4 2022, 1:57 AM
arsenm added a comment.May 4 2022, 2:54 AM

LGTM.

Currently AMDGPU is constructing PseudoSourceValue instances in MachineFunctionInfo.

This patch doesn't change that, right?

Right. I have 3 alternative patches to do that later