[llvm-commits] [llvm] r136080 - /llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
Duncan Sands
baldrick at free.fr
Tue Jul 26 08:05:06 PDT 2011
Author: baldrick
Date: Tue Jul 26 10:05:06 2011
New Revision: 136080
URL: http://llvm.org/viewvc/llvm-project?rev=136080&view=rev
Log:
SrcDef is only written and never read. Remove it.
Modified:
llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
Modified: llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp?rev=136080&r1=136079&r2=136080&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp (original)
+++ llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp Tue Jul 26 10:05:06 2011
@@ -295,7 +295,6 @@
if (!DefMI || !DefMI->getDesc().isBitcast())
return false;
- unsigned SrcDef = 0;
unsigned SrcSrc = 0;
NumDefs = DefMI->getDesc().getNumDefs();
NumSrcs = DefMI->getDesc().getNumOperands() - NumDefs;
@@ -308,13 +307,13 @@
unsigned Reg = MO.getReg();
if (!Reg)
continue;
- if (MO.isDef())
- SrcDef = Reg;
- else if (SrcSrc)
- // Multiple sources?
- return false;
- else
- SrcSrc = Reg;
+ if (!MO.isDef()) {
+ if (SrcSrc)
+ // Multiple sources?
+ return false;
+ else
+ SrcSrc = Reg;
+ }
}
if (MRI->getRegClass(SrcSrc) != MRI->getRegClass(Def))
More information about the llvm-commits
mailing list