summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-27 23:48:12 +0000
committerChris Lattner <sabre@nondot.org>2008-04-27 23:48:12 +0000
commitd04b818a91aa5dcb78165f5d3ff5502f99090f45 (patch)
treec2d3c8e097385fdad526131e089adc8974173f21
parent122721843b5eef7af26cc3fb2cc16177d8193ac9 (diff)
downloadbcm5719-llvm-d04b818a91aa5dcb78165f5d3ff5502f99090f45.tar.gz
bcm5719-llvm-d04b818a91aa5dcb78165f5d3ff5502f99090f45.zip
move static function out of anon namespace, no functionality change.
llvm-svn: 50330
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp48
1 files changed, 23 insertions, 25 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index b43ff1c625f..d82f0d613a2 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -89,33 +89,31 @@ namespace {
namespace { struct SDISelAsmOperandInfo; }
-namespace {
- /// ComputeValueVTs - Given an LLVM IR type, compute a sequence of
- /// MVT::ValueTypes that represent all the individual underlying
- /// non-aggregate types that comprise it.
- static void ComputeValueVTs(const TargetLowering &TLI,
- const Type *Ty,
- SmallVectorImpl<MVT::ValueType> &ValueVTs) {
- // Given a struct type, recursively traverse the elements.
- if (const StructType *STy = dyn_cast<StructType>(Ty)) {
- for (StructType::element_iterator EI = STy->element_begin(),
- EB = STy->element_end();
- EI != EB; ++EI)
- 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);
+/// ComputeValueVTs - Given an LLVM IR type, compute a sequence of
+/// MVT::ValueTypes that represent all the individual underlying
+/// non-aggregate types that comprise it.
+static void ComputeValueVTs(const TargetLowering &TLI, const Type *Ty,
+ SmallVectorImpl<MVT::ValueType> &ValueVTs) {
+ // Given a struct type, recursively traverse the elements.
+ if (const StructType *STy = dyn_cast<StructType>(Ty)) {
+ for (StructType::element_iterator EI = STy->element_begin(),
+ EB = STy->element_end();
+ EI != EB; ++EI)
+ 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.
+ ValueVTs.push_back(TLI.getValueType(Ty));
+}
+namespace {
/// RegsForValue - This struct represents the physical registers that a
/// particular value is assigned and the type information about the value.
/// This is needed because values can be promoted into larger registers and
OpenPOWER on IntegriCloud