mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-23 12:45:47 +00:00
Revert r99009 temporarily it seems to be breaking the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99011 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
76a312b7d1
commit
d7de54068c
@ -754,8 +754,12 @@ static unsigned GetNumNodeResults(Record *Operator, CodeGenDAGPatterns &CDP) {
|
|||||||
Operator->getName() == "parallel")
|
Operator->getName() == "parallel")
|
||||||
return 0; // All return nothing.
|
return 0; // All return nothing.
|
||||||
|
|
||||||
if (Operator->isSubClassOf("Intrinsic"))
|
if (Operator->isSubClassOf("Intrinsic")) {
|
||||||
return CDP.getIntrinsic(Operator).IS.RetVTs.size();
|
unsigned NumRes = CDP.getIntrinsic(Operator).IS.RetVTs.size();
|
||||||
|
if (NumRes == 1 && CDP.getIntrinsic(Operator).IS.RetVTs[0] == MVT::isVoid)
|
||||||
|
return 0;
|
||||||
|
return NumRes;
|
||||||
|
}
|
||||||
|
|
||||||
if (Operator->isSubClassOf("SDNode"))
|
if (Operator->isSubClassOf("SDNode"))
|
||||||
return CDP.getSDNodeInfo(Operator).getNumResults();
|
return CDP.getSDNodeInfo(Operator).getNumResults();
|
||||||
@ -1206,6 +1210,8 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
|
|||||||
// Apply the result type to the node.
|
// Apply the result type to the node.
|
||||||
unsigned NumRetVTs = Int->IS.RetVTs.size();
|
unsigned NumRetVTs = Int->IS.RetVTs.size();
|
||||||
unsigned NumParamVTs = Int->IS.ParamVTs.size();
|
unsigned NumParamVTs = Int->IS.ParamVTs.size();
|
||||||
|
if (NumRetVTs == 1 && Int->IS.RetVTs[0] == MVT::isVoid)
|
||||||
|
NumRetVTs = 0;
|
||||||
|
|
||||||
for (unsigned i = 0, e = NumRetVTs; i != e; ++i)
|
for (unsigned i = 0, e = NumRetVTs; i != e; ++i)
|
||||||
MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP);
|
MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP);
|
||||||
@ -1585,7 +1591,7 @@ TreePatternNode *TreePattern::ParseTreePattern(DagInit *Dag) {
|
|||||||
|
|
||||||
// If this intrinsic returns void, it must have side-effects and thus a
|
// If this intrinsic returns void, it must have side-effects and thus a
|
||||||
// chain.
|
// chain.
|
||||||
if (Int.IS.RetVTs.empty()) {
|
if (Int.IS.RetVTs[0] == MVT::isVoid) {
|
||||||
Operator = getDAGPatterns().get_intrinsic_void_sdnode();
|
Operator = getDAGPatterns().get_intrinsic_void_sdnode();
|
||||||
} else if (Int.ModRef != CodeGenIntrinsic::NoMem) {
|
} else if (Int.ModRef != CodeGenIntrinsic::NoMem) {
|
||||||
// Has side-effects, requires chain.
|
// Has side-effects, requires chain.
|
||||||
|
@ -490,15 +490,12 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R) {
|
|||||||
OverloadedVTs.push_back(VT);
|
OverloadedVTs.push_back(VT);
|
||||||
isOverloaded |= true;
|
isOverloaded |= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
IS.RetVTs.push_back(VT);
|
IS.RetVTs.push_back(VT);
|
||||||
IS.RetTypeDefs.push_back(TyEl);
|
IS.RetTypeDefs.push_back(TyEl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS.RetVTs.size() == 1 && IS.RetVTs[0] == MVT::isVoid) {
|
if (IS.RetVTs.size() == 0)
|
||||||
IS.RetVTs.pop_back();
|
throw "Intrinsic '"+DefName+"' needs at least a type for the ret value!";
|
||||||
IS.RetTypeDefs.pop_back();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse the list of parameter types.
|
// Parse the list of parameter types.
|
||||||
TypeList = R->getValueAsListInit("ParamTypes");
|
TypeList = R->getValueAsListInit("ParamTypes");
|
||||||
|
@ -172,11 +172,10 @@ static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
|
|||||||
static void EmitTypeGenerate(raw_ostream &OS,
|
static void EmitTypeGenerate(raw_ostream &OS,
|
||||||
const std::vector<Record*> &ArgTypes,
|
const std::vector<Record*> &ArgTypes,
|
||||||
unsigned &ArgNo) {
|
unsigned &ArgNo) {
|
||||||
if (ArgTypes.empty())
|
if (ArgTypes.size() == 1) {
|
||||||
return EmitTypeForValueType(OS, MVT::isVoid);
|
EmitTypeGenerate(OS, ArgTypes.front(), ArgNo);
|
||||||
|
return;
|
||||||
if (ArgTypes.size() == 1)
|
}
|
||||||
return EmitTypeGenerate(OS, ArgTypes.front(), ArgNo);
|
|
||||||
|
|
||||||
OS << "StructType::get(Context, ";
|
OS << "StructType::get(Context, ";
|
||||||
|
|
||||||
@ -252,11 +251,11 @@ namespace {
|
|||||||
unsigned RHSSize = RHSVec->size();
|
unsigned RHSSize = RHSVec->size();
|
||||||
unsigned LHSSize = LHSVec->size();
|
unsigned LHSSize = LHSVec->size();
|
||||||
|
|
||||||
for (; i != LHSSize; ++i) {
|
do {
|
||||||
if (i == RHSSize) return false; // RHS is shorter than LHS.
|
if (i == RHSSize) return false; // RHS is shorter than LHS.
|
||||||
if ((*LHSVec)[i] != (*RHSVec)[i])
|
if ((*LHSVec)[i] != (*RHSVec)[i])
|
||||||
return (*LHSVec)[i]->getName() < (*RHSVec)[i]->getName();
|
return (*LHSVec)[i]->getName() < (*RHSVec)[i]->getName();
|
||||||
}
|
} while (++i != LHSSize);
|
||||||
|
|
||||||
if (i != RHSSize) return true;
|
if (i != RHSSize) return true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user