1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

move static function out of anon namespace, no functionality change.

llvm-svn: 50330
This commit is contained in:
Chris Lattner 2008-04-27 23:48:12 +00:00
parent 113de6b3a8
commit 459f6ed05c

View File

@ -89,33 +89,31 @@ namespace {
namespace { struct SDISelAsmOperandInfo; } namespace { struct SDISelAsmOperandInfo; }
namespace { /// ComputeValueVTs - Given an LLVM IR type, compute a sequence of
/// ComputeValueVTs - Given an LLVM IR type, compute a sequence of /// MVT::ValueTypes that represent all the individual underlying
/// MVT::ValueTypes that represent all the individual underlying /// non-aggregate types that comprise it.
/// non-aggregate types that comprise it. static void ComputeValueVTs(const TargetLowering &TLI, const Type *Ty,
static void ComputeValueVTs(const TargetLowering &TLI, SmallVectorImpl<MVT::ValueType> &ValueVTs) {
const Type *Ty, // Given a struct type, recursively traverse the elements.
SmallVectorImpl<MVT::ValueType> &ValueVTs) { if (const StructType *STy = dyn_cast<StructType>(Ty)) {
// Given a struct type, recursively traverse the elements. for (StructType::element_iterator EI = STy->element_begin(),
if (const StructType *STy = dyn_cast<StructType>(Ty)) { EB = STy->element_end();
for (StructType::element_iterator EI = STy->element_begin(), EI != EB; ++EI)
EB = STy->element_end(); ComputeValueVTs(TLI, *EI, ValueVTs);
EI != EB; ++EI) return;
ComputeValueVTs(TLI, *EI, ValueVTs);
return;
}
// Given an array type, recursively traverse the elements.
if (const ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
const Type *EltTy = ATy->getElementType();
for (unsigned i = 0, e = ATy->getNumElements(); i != e; ++i)
ComputeValueVTs(TLI, EltTy, ValueVTs);
return;
}
// Base case: we can get an MVT::ValueType for this LLVM IR type.
MVT::ValueType VT = TLI.getValueType(Ty);
ValueVTs.push_back(VT);
} }
// Given an array type, recursively traverse the elements.
if (const ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
const Type *EltTy = ATy->getElementType();
for (unsigned i = 0, e = ATy->getNumElements(); i != e; ++i)
ComputeValueVTs(TLI, EltTy, ValueVTs);
return;
}
// Base case: we can get an MVT::ValueType for this LLVM IR type.
ValueVTs.push_back(TLI.getValueType(Ty));
}
namespace {
/// RegsForValue - This struct represents the physical registers that a /// RegsForValue - This struct represents the physical registers that a
/// particular value is assigned and the type information about the value. /// particular value is assigned and the type information about the value.
/// This is needed because values can be promoted into larger registers and /// This is needed because values can be promoted into larger registers and