[IC] Turn non-null MD on pointer loads to range MD on integer loads.
[oota-llvm.git] / lib / CodeGen / LiveVariables.cpp
index d91c9300d3b1f11b1da37bb4acbcc9cfa96131f2..c4bca5f3a11e3eb759481cc170aa7c86d6f3917c 100644 (file)
@@ -37,7 +37,6 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Target/TargetInstrInfo.h"
-#include "llvm/Target/TargetMachine.h"
 #include <algorithm>
 using namespace llvm;
 
@@ -623,10 +622,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 +645,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