forked from OSchip/llvm-project
fixup: Missing operator in [globalisel][legalizer] Separate the deprecated LegalizerInfo from the current one
My local compiler was fine with it but the bots complain about ambiguous types.
This commit is contained in:
parent
8d80139ccc
commit
9372662050
|
@ -74,6 +74,8 @@ enum LegacyLegalizeAction : std::uint8_t {
|
|||
NotFound,
|
||||
};
|
||||
} // end namespace LegacyLegalizeActions
|
||||
raw_ostream &operator<<(raw_ostream &OS,
|
||||
LegacyLegalizeActions::LegacyLegalizeAction Action);
|
||||
|
||||
/// Legalization is decided based on an instruction's opcode, which type slot
|
||||
/// we're considering, and what the existing type is. These aspects are gathered
|
||||
|
|
|
@ -25,6 +25,45 @@ using namespace LegacyLegalizeActions;
|
|||
|
||||
#define DEBUG_TYPE "legalizer-info"
|
||||
|
||||
raw_ostream &llvm::operator<<(raw_ostream &OS, LegacyLegalizeAction Action) {
|
||||
switch (Action) {
|
||||
case Legal:
|
||||
OS << "Legal";
|
||||
break;
|
||||
case NarrowScalar:
|
||||
OS << "NarrowScalar";
|
||||
break;
|
||||
case WidenScalar:
|
||||
OS << "WidenScalar";
|
||||
break;
|
||||
case FewerElements:
|
||||
OS << "FewerElements";
|
||||
break;
|
||||
case MoreElements:
|
||||
OS << "MoreElements";
|
||||
break;
|
||||
case Bitcast:
|
||||
OS << "Bitcast";
|
||||
break;
|
||||
case Lower:
|
||||
OS << "Lower";
|
||||
break;
|
||||
case Libcall:
|
||||
OS << "Libcall";
|
||||
break;
|
||||
case Custom:
|
||||
OS << "Custom";
|
||||
break;
|
||||
case Unsupported:
|
||||
OS << "Unsupported";
|
||||
break;
|
||||
case NotFound:
|
||||
OS << "NotFound";
|
||||
break;
|
||||
}
|
||||
return OS;
|
||||
}
|
||||
|
||||
LegacyLegalizerInfo::LegacyLegalizerInfo() : TablesInitialized(false) {
|
||||
// Set defaults.
|
||||
// FIXME: these two (G_ANYEXT and G_TRUNC?) can be legalized to the
|
||||
|
|
Loading…
Reference in New Issue