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/MachineLegalizer.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/MachineLegalizer.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp b/llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp index baef7657eac..cc3d4ecd7c6 100644 --- a/llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp +++ b/llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp @@ -30,6 +30,9 @@ MachineLegalizer::MachineLegalizer() : TablesInitialized(false) { DefaultActions[TargetOpcode::G_ANYEXT] = Legal; DefaultActions[TargetOpcode::G_TRUNC] = Legal; + // G_TYPE is essentially an annotated COPY so it's always legal. + DefaultActions[TargetOpcode::G_TYPE] = Legal; + DefaultActions[TargetOpcode::G_INTRINSIC] = Legal; DefaultActions[TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS] = Legal; |

