summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-09-15 22:04:42 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-09-15 22:04:42 +0000
commit94ee55d4b39d6506cf4e0f4e4b1c0b7fbbfeaed5 (patch)
treea11274bb86a14e22b860582986b742ff4e07e948 /lib/CodeGen
parent766f25306af343fb2784350cb4d8cd9ca180f0d3 (diff)
downloadllvm-94ee55d4b39d6506cf4e0f4e4b1c0b7fbbfeaed5.tar.gz
llvm-94ee55d4b39d6506cf4e0f4e4b1c0b7fbbfeaed5.tar.bz2
llvm-94ee55d4b39d6506cf4e0f4e4b1c0b7fbbfeaed5.tar.xz
Replace some unnecessary vector copies with references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190770 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/MachineLICM.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp
index 596b7a3ada..104eacdb96 100644
--- a/lib/CodeGen/MachineLICM.cpp
+++ b/lib/CodeGen/MachineLICM.cpp
@@ -502,7 +502,7 @@ void MachineLICM::HoistRegionPostRA() {
// Walk the entire region, count number of defs for each register, and
// collect potential LICM candidates.
- const std::vector<MachineBasicBlock*> Blocks = CurLoop->getBlocks();
+ const std::vector<MachineBasicBlock *> &Blocks = CurLoop->getBlocks();
for (unsigned i = 0, e = Blocks.size(); i != e; ++i) {
MachineBasicBlock *BB = Blocks[i];
@@ -584,7 +584,7 @@ void MachineLICM::HoistRegionPostRA() {
/// AddToLiveIns - Add register 'Reg' to the livein sets of BBs in the current
/// loop, and make sure it is not killed by any instructions in the loop.
void MachineLICM::AddToLiveIns(unsigned Reg) {
- const std::vector<MachineBasicBlock*> Blocks = CurLoop->getBlocks();
+ const std::vector<MachineBasicBlock *> &Blocks = CurLoop->getBlocks();
for (unsigned i = 0, e = Blocks.size(); i != e; ++i) {
MachineBasicBlock *BB = Blocks[i];
if (!BB->isLiveIn(Reg))