diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-04-26 20:35:01 -0400 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-06-01 09:45:40 -0400 |
commit | 0e1c71e4a42335399ce599086db2f99cf81d7624 (patch) | |
tree | 0fe8df8ecccc917a02d83c8f8a8852676b68035d /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 3c3f2f99c445a4f5ae83ce9dc6ec0868246fbb4e (diff) | |
download | llvm-0e1c71e4a42335399ce599086db2f99cf81d7624.zip llvm-0e1c71e4a42335399ce599086db2f99cf81d7624.tar.gz llvm-0e1c71e4a42335399ce599086db2f99cf81d7624.tar.bz2 |
CodeGen: Move getAddressSpaceForPseudoSourceKind into TargetMachine
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.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index f2b0024..e067799 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -229,9 +229,7 @@ void MachineFunction::init() { "Can't create a MachineFunction using a Module with a " "Target-incompatible DataLayout attached\n"); - PSVManager = - std::make_unique<PseudoSourceValueManager>(*(getSubtarget(). - getInstrInfo())); + PSVManager = std::make_unique<PseudoSourceValueManager>(getTarget()); } MachineFunction::~MachineFunction() { |