diff options
author | Tim Northover <tnorthover@apple.com> | 2016-08-31 21:24:02 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-08-31 21:24:02 +0000 |
commit | 11a235467088c800fe0a7323cb18a55fe9fe0cd3 (patch) | |
tree | b8a59758a42fd6d569adfd9b48779a935c3337fe /llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp | |
parent | 7caf48cc5bd762a1a5a363c73ec31184cf89e9bc (diff) | |
download | bcm5719-llvm-11a235467088c800fe0a7323cb18a55fe9fe0cd3.tar.gz bcm5719-llvm-11a235467088c800fe0a7323cb18a55fe9fe0cd3.zip |
GlobalISel: use G_TYPE to annotate physregs with a type.
More preparation for dropping source types from MachineInstrs: regsters coming
out of already-selected code (i.e. non-generic instructions) don't have a type,
but that information is needed so we must add it manually.
This is done via a new G_TYPE instruction.
llvm-svn: 280292
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp b/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp index 5e5541799c5..5a950ff17c1 100644 --- a/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp +++ b/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp @@ -224,7 +224,8 @@ RegisterBankInfo::getInstrMappingImpl(const MachineInstr &MI) const { bool CompleteMapping = true; // For copies we want to walk over the operands and try to find one // that has a register bank. - bool isCopyLike = MI.isCopy() || MI.isPHI(); + bool isCopyLike = + MI.isCopy() || MI.isPHI() || MI.getOpcode() == TargetOpcode::G_TYPE; // Remember the register bank for reuse for copy-like instructions. const RegisterBank *RegBank = nullptr; // Remember the size of the register for reuse for copy-like instructions. |