diff options
author | Dylan Noblesmith <nobled@dreamwidth.org> | 2014-08-26 02:03:25 +0000 |
---|---|---|
committer | Dylan Noblesmith <nobled@dreamwidth.org> | 2014-08-26 02:03:25 +0000 |
commit | 17f05a3fc6c515a636b30776780ce03410495e06 (patch) | |
tree | 9e2dd58b57b8624710a0a12ab290c62c16815469 /llvm/lib/CodeGen/LiveVariables.cpp | |
parent | 3715461b48ae720559901162687edb46cc6e65d8 (diff) | |
download | bcm5719-llvm-17f05a3fc6c515a636b30776780ce03410495e06.tar.gz bcm5719-llvm-17f05a3fc6c515a636b30776780ce03410495e06.zip |
CodeGen/LiveVariables: use vector::assign()
Address review comments.
llvm-svn: 216426
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveVariables.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp index d91c9300d3b..f9040fd6486 100644 --- a/llvm/lib/CodeGen/LiveVariables.cpp +++ b/llvm/lib/CodeGen/LiveVariables.cpp @@ -623,10 +623,8 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &mf) { TRI = MF->getSubtarget().getRegisterInfo(); const unsigned NumRegs = TRI->getNumRegs(); - PhysRegDef.clear(); - PhysRegUse.clear(); - PhysRegDef.resize(NumRegs, nullptr); - PhysRegUse.resize(NumRegs, nullptr); + PhysRegDef.assign(NumRegs, nullptr); + PhysRegUse.assign(NumRegs, nullptr); PHIVarInfo.resize(MF->getNumBlockIDs()); PHIJoins.clear(); @@ -648,10 +646,8 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &mf) { for (MachineBasicBlock *MBB : depth_first_ext(Entry, Visited)) { runOnBlock(MBB, NumRegs); - PhysRegDef.clear(); - PhysRegUse.clear(); - PhysRegDef.resize(NumRegs, nullptr); - PhysRegUse.resize(NumRegs, nullptr); + PhysRegDef.assign(NumRegs, nullptr); + PhysRegUse.assign(NumRegs, nullptr); } // Convert and transfer the dead / killed information we have gathered into |