Zap the last two -Wself-assign warnings in llvm.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 6 Jan 2011 01:33:22 +0000 (01:33 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 6 Jan 2011 01:33:22 +0000 (01:33 +0000)
Simplify RALinScan::DowngradeRegister with TRI::getOverlaps while we are there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122940 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocLinearScan.cpp
lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp

index b18f62be005c86f925417478985fcdad3b1b78dc..bbff42471027d0fe474dbffb70fc4358eef3cde6 100644 (file)
@@ -933,13 +933,9 @@ LiveInterval *RALinScan::hasNextReloadInterval(LiveInterval *cur) {
 }
 
 void RALinScan::DowngradeRegister(LiveInterval *li, unsigned Reg) {
-  bool isNew = DowngradedRegs.insert(Reg);
-  (void)isNew; // Silence compiler warning.
-  assert(isNew && "Multiple reloads holding the same register?");
-  DowngradeMap.insert(std::make_pair(li->reg, Reg));
-  for (const unsigned *AS = tri_->getAliasSet(Reg); *AS; ++AS) {
-    isNew = DowngradedRegs.insert(*AS);
-    isNew = isNew; // Silence compiler warning.
+  for (const unsigned *AS = tri_->getOverlaps(Reg); *AS; ++AS) {
+    bool isNew = DowngradedRegs.insert(*AS);
+    (void)isNew; // Silence compiler warning.
     assert(isNew && "Multiple reloads holding the same register?");
     DowngradeMap.insert(std::make_pair(li->reg, *AS));
   }
index 87c9d63d58f477c00eae43de0a6ef420d0e55e53..70ff32e02310be50a8cf2ac2483aa3ad742c3a07 100644 (file)
@@ -97,7 +97,8 @@ InlineHalfPowrs(const std::vector<Instruction *> &HalfPowrs,
 
     InlineFunctionInfo IFI(0, TD);
     bool B = InlineFunction(Call, IFI);
-    assert(B && "half_powr didn't inline?"); B=B;
+    assert(B && "half_powr didn't inline?");
+    (void)B;
 
     BasicBlock *NewBody = NewBlock->getSinglePredecessor();
     assert(NewBody);