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 | e4d87aa2de6e52952dca73716386db09aad5a8fd (patch) | |
| tree | ce8c6e6ddc845de3585020c856118892f4206593 /lib/Analysis/IPA | |
| parent | add2bd7f5941537a97a41e037ae2277fbeed0b4f (diff) | |
| download | external_llvm-e4d87aa2de6e52952dca73716386db09aad5a8fd.zip external_llvm-e4d87aa2de6e52952dca73716386db09aad5a8fd.tar.gz external_llvm-e4d87aa2de6e52952dca73716386db09aad5a8fd.tar.bz2 | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA')
| -rw-r--r-- | lib/Analysis/IPA/Andersens.cpp | 5 | ||||
| -rw-r--r-- | lib/Analysis/IPA/GlobalsModRef.cpp | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index 5d284118..805e771 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/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/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp index 7c305b7..e34d03b 100644 --- a/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/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()); |
