diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-23 06:05:41 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-23 06:05:41 +0000 |
| commit | 266e42b312ab7c457d1eab01475f63e59f60933c (patch) | |
| tree | 7ac7dbe9437ac2cdbbf532cacb9e043dc6f5645a /llvm/lib/Analysis/IPA | |
| parent | f171af97d50df7ebd7661756e89eef2295014e81 (diff) | |
| download | bcm5719-llvm-266e42b312ab7c457d1eab01475f63e59f60933c.tar.gz bcm5719-llvm-266e42b312ab7c457d1eab01475f63e59f60933c.zip | |
For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.
llvm-svn: 32751
Diffstat (limited to 'llvm/lib/Analysis/IPA')
| -rw-r--r-- | llvm/lib/Analysis/IPA/Andersens.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Analysis/IPA/GlobalsModRef.cpp | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp index 5d2841187a6..805e771e542 100644 --- a/llvm/lib/Analysis/IPA/Andersens.cpp +++ b/llvm/lib/Analysis/IPA/Andersens.cpp @@ -325,7 +325,8 @@ namespace { void visitGetElementPtrInst(GetElementPtrInst &GEP); void visitPHINode(PHINode &PN); void visitCastInst(CastInst &CI); - void visitSetCondInst(SetCondInst &SCI) {} // NOOP! + void visitICmpInst(ICmpInst &ICI) {} // NOOP! + void visitFCmpInst(FCmpInst &ICI) {} // NOOP! void visitSelectInst(SelectInst &SI); void visitVAArg(VAArgInst &I); void visitInstruction(Instruction &I); @@ -778,6 +779,8 @@ void Andersens::visitInstruction(Instruction &I) { case Instruction::Shl: case Instruction::LShr: case Instruction::AShr: + case Instruction::ICmp: + case Instruction::FCmp: return; default: // Is this something we aren't handling yet? diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp index 7c305b7a5ed..e34d03bbdd0 100644 --- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp @@ -251,8 +251,8 @@ bool GlobalsModRef::AnalyzeUsesOfPointer(Value *V, } else { return true; } - } else if (SetCondInst *SCI = dyn_cast<SetCondInst>(*UI)) { - if (!isa<ConstantPointerNull>(SCI->getOperand(1))) + } else if (ICmpInst *ICI = dyn_cast<ICmpInst>(*UI)) { + if (!isa<ConstantPointerNull>(ICI->getOperand(1))) return true; // Allow comparison against null. } else if (FreeInst *F = dyn_cast<FreeInst>(*UI)) { Writers.push_back(F->getParent()->getParent()); |

