[llvm-commits] [poolalloc] r161204 - /poolalloc/trunk/lib/DSA/CallTargets.cpp
Will Dietz
wdietz2 at illinois.edu
Thu Aug 2 12:15:54 PDT 2012
Author: wdietz2
Date: Thu Aug 2 14:15:54 2012
New Revision: 161204
URL: http://llvm.org/viewvc/llvm-project?rev=161204&view=rev
Log:
CallTargets: Don't choke on Undef/InlineAsm.
Fix \n in assertion while at it.
Modified:
poolalloc/trunk/lib/DSA/CallTargets.cpp
Modified: poolalloc/trunk/lib/DSA/CallTargets.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/CallTargets.cpp?rev=161204&r1=161203&r2=161204&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/CallTargets.cpp (original)
+++ poolalloc/trunk/lib/DSA/CallTargets.cpp Thu Aug 2 14:15:54 2012
@@ -59,6 +59,9 @@
AllSites.push_back(cs);
Function* CF = cs.getCalledFunction();
+ if (isa<UndefValue>(cs.getCalledValue())) continue;
+ if (isa<InlineAsm>(cs.getCalledValue())) continue;
+
//
// If the called function is casted from one function type to
// another, peer into the cast instruction and pull out the actual
@@ -103,7 +106,7 @@
DSNode* N = T->getDSGraph(*cs.getCaller())
->getNodeForValue(cs.getCalledValue()).getNode();
- assert (N && "CallTarget: findIndTargets: No DSNode!\n");
+ assert (N && "CallTarget: findIndTargets: No DSNode!");
if (!N->isIncompleteNode() && !N->isExternalNode() && IndMap[cs].size()) {
CompleteSites.insert(cs);
More information about the llvm-commits
mailing list