mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 17:33:29 +00:00
inline CannotYetSelectIntrinsic into CannotYetSelect and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97690 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
67bda7215b
commit
2c4afd1d8e
@ -276,7 +276,6 @@ private:
|
||||
SDNode *Select_UNDEF(SDNode *N);
|
||||
SDNode *Select_EH_LABEL(SDNode *N);
|
||||
void CannotYetSelect(SDNode *N);
|
||||
void CannotYetSelectIntrinsic(SDNode *N);
|
||||
|
||||
private:
|
||||
void DoInstructionSelection();
|
||||
|
@ -2711,29 +2711,26 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
|
||||
|
||||
|
||||
void SelectionDAGISel::CannotYetSelect(SDNode *N) {
|
||||
if (N->getOpcode() == ISD::INTRINSIC_W_CHAIN ||
|
||||
N->getOpcode() == ISD::INTRINSIC_WO_CHAIN ||
|
||||
N->getOpcode() == ISD::INTRINSIC_VOID)
|
||||
return CannotYetSelectIntrinsic(N);
|
||||
|
||||
std::string msg;
|
||||
raw_string_ostream Msg(msg);
|
||||
Msg << "Cannot yet select: ";
|
||||
N->printrFull(Msg, CurDAG);
|
||||
|
||||
if (N->getOpcode() != ISD::INTRINSIC_W_CHAIN &&
|
||||
N->getOpcode() != ISD::INTRINSIC_WO_CHAIN &&
|
||||
N->getOpcode() != ISD::INTRINSIC_VOID) {
|
||||
N->printrFull(Msg, CurDAG);
|
||||
} else {
|
||||
bool HasInputChain = N->getOperand(0).getValueType() == MVT::Other;
|
||||
unsigned iid =
|
||||
cast<ConstantSDNode>(N->getOperand(HasInputChain))->getZExtValue();
|
||||
if (iid < Intrinsic::num_intrinsics)
|
||||
Msg << "intrinsic %" << Intrinsic::getName((Intrinsic::ID)iid);
|
||||
else if (const TargetIntrinsicInfo *TII = TM.getIntrinsicInfo())
|
||||
Msg << "target intrinsic %" << TII->getName(iid);
|
||||
else
|
||||
Msg << "unknown intrinsic #" << iid;
|
||||
}
|
||||
llvm_report_error(Msg.str());
|
||||
}
|
||||
|
||||
void SelectionDAGISel::CannotYetSelectIntrinsic(SDNode *N) {
|
||||
dbgs() << "Cannot yet select: ";
|
||||
unsigned iid =
|
||||
cast<ConstantSDNode>(N->getOperand(N->getOperand(0).getValueType() ==
|
||||
MVT::Other))->getZExtValue();
|
||||
if (iid < Intrinsic::num_intrinsics)
|
||||
llvm_report_error("Cannot yet select: intrinsic %" +
|
||||
Intrinsic::getName((Intrinsic::ID)iid));
|
||||
else if (const TargetIntrinsicInfo *tii = TM.getIntrinsicInfo())
|
||||
llvm_report_error(Twine("Cannot yet select: target intrinsic %") +
|
||||
tii->getName(iid));
|
||||
}
|
||||
|
||||
char SelectionDAGISel::ID = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user