[llvm-commits] [poolalloc] r108033 - /poolalloc/trunk/lib/DSA/Local.cpp
Will Dietz
wdietz2 at illinois.edu
Fri Jul 9 16:50:51 PDT 2010
Author: wdietz2
Date: Fri Jul 9 18:50:51 2010
New Revision: 108033
URL: http://llvm.org/viewvc/llvm-project?rev=108033&view=rev
Log:
Remove outdated code. getValueDest() peers through casts for us, no reason to do it ourselves.
Added assert to make this clearer if it happens again instead of a segfault.
Modified:
poolalloc/trunk/lib/DSA/Local.cpp
Modified: poolalloc/trunk/lib/DSA/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=108033&r1=108032&r2=108033&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Local.cpp (original)
+++ poolalloc/trunk/lib/DSA/Local.cpp Fri Jul 9 18:50:51 2010
@@ -620,23 +620,10 @@
if (DSNode *N = RetNH.getNode())
visitVAStartNode(N);
- else
- {
- //
- // Sometimes the argument to the vastart is casted and has no DSNode.
- // Peer past the cast.
- //
- Value * Operand = CS.getInstruction()->getOperand(1);
- if (CastInst * CI = dyn_cast<CastInst>(Operand))
- Operand = CI->getOperand (0);
- const DSNodeHandle & CastNH = getValueDest(Operand);
- visitVAStartNode(CastNH.getNode());
- //We assert out here because it's not clear when this happens
- assert(0 && "When does this happen?");
- }
}
void GraphBuilder::visitVAStartNode(DSNode* N) {
+ assert(N && "Null node as argument");
assert(FB && "No function for this graph?");
Module *M = FB->getParent();
assert(M && "No module for function");
More information about the llvm-commits
mailing list