summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorFrits van Bommel <fvbommel@gmail.com>2011-07-18 12:00:32 +0000
committerFrits van Bommel <fvbommel@gmail.com>2011-07-18 12:00:32 +0000
commit717d7edd3e01d928ad9a186f2464331c86f71ef9 (patch)
treee92ccf103dd045391f4ce3cd7edcb1bf8d318ffd /llvm/lib/CodeGen
parent23db45e99c833273144cf2d86e678887944afe6b (diff)
downloadbcm5719-llvm-717d7edd3e01d928ad9a186f2464331c86f71ef9.tar.gz
bcm5719-llvm-717d7edd3e01d928ad9a186f2464331c86f71ef9.zip
Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
Mostly mechanical with some manual reformatting. llvm-svn: 135390
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveRangeEdit.h2
-rw-r--r--llvm/lib/CodeGen/RegAllocGreedy.cpp7
-rw-r--r--llvm/lib/CodeGen/RegisterClassInfo.h2
3 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.h b/llvm/lib/CodeGen/LiveRangeEdit.h
index db6740c1fbc..9b0a671ea9e 100644
--- a/llvm/lib/CodeGen/LiveRangeEdit.h
+++ b/llvm/lib/CodeGen/LiveRangeEdit.h
@@ -115,7 +115,7 @@ public:
LiveInterval *get(unsigned idx) const { return newRegs_[idx+firstNew_]; }
ArrayRef<LiveInterval*> regs() const {
- return ArrayRef<LiveInterval*>(newRegs_).slice(firstNew_);
+ return makeArrayRef(newRegs_).slice(firstNew_);
}
/// FIXME: Temporary accessors until we can get rid of
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index e235e87b54f..570a832303a 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -684,7 +684,7 @@ void RAGreedy::addThroughConstraints(InterferenceCache::Cursor Intf,
assert(T < GroupSize && "Array overflow");
TBS[T] = Number;
if (++T == GroupSize) {
- SpillPlacer->addLinks(ArrayRef<unsigned>(TBS, T));
+ SpillPlacer->addLinks(makeArrayRef(TBS, T));
T = 0;
}
continue;
@@ -714,7 +714,7 @@ void RAGreedy::addThroughConstraints(InterferenceCache::Cursor Intf,
ArrayRef<SpillPlacement::BlockConstraint> Array(BCS, B);
SpillPlacer->addConstraints(Array);
- SpillPlacer->addLinks(ArrayRef<unsigned>(TBS, T));
+ SpillPlacer->addLinks(makeArrayRef(TBS, T));
}
void RAGreedy::growRegion(GlobalSplitCandidate &Cand) {
@@ -749,8 +749,7 @@ void RAGreedy::growRegion(GlobalSplitCandidate &Cand) {
// Any new blocks to add?
if (ActiveBlocks.size() == AddedTo)
break;
- addThroughConstraints(Cand.Intf,
- ArrayRef<unsigned>(ActiveBlocks).slice(AddedTo));
+ addThroughConstraints(Cand.Intf, makeArrayRef(ActiveBlocks).slice(AddedTo));
AddedTo = ActiveBlocks.size();
// Perhaps iterating can enable more bundles?
diff --git a/llvm/lib/CodeGen/RegisterClassInfo.h b/llvm/lib/CodeGen/RegisterClassInfo.h
index d21fd67efe8..90c0a7ee4a6 100644
--- a/llvm/lib/CodeGen/RegisterClassInfo.h
+++ b/llvm/lib/CodeGen/RegisterClassInfo.h
@@ -32,7 +32,7 @@ class RegisterClassInfo {
RCInfo() : Tag(0), NumRegs(0) {}
operator ArrayRef<unsigned>() const {
- return ArrayRef<unsigned>(Order.get(), NumRegs);
+ return makeArrayRef(Order.get(), NumRegs);
}
};
OpenPOWER on IntegriCloud