[llvm-commits] [poolalloc] r155386 - /poolalloc/trunk/lib/DSA/Local.cpp

John Criswell criswell at uiuc.edu
Mon Apr 23 13:34:08 PDT 2012


Author: criswell
Date: Mon Apr 23 15:34:08 2012
New Revision: 155386

URL: http://llvm.org/viewvc/llvm-project?rev=155386&view=rev
Log:
Beginning of fix for PR#12639: Add support for the blockaddress constant.
This code simply adds a DSNode with the Unknown flag for the blockaddress
constant.  In the future, we should probably add a Blockaddress flag to the
set of DSFlags.

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=155386&r1=155385&r2=155386&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Local.cpp (original)
+++ poolalloc/trunk/lib/DSA/Local.cpp Mon Apr 23 15:34:08 2012
@@ -296,6 +296,13 @@
       // fix for some special cases.
       NH = getValueDest(cast<GlobalAlias>(C)->getAliasee());
       return NH;
+    } else if (isa<BlockAddress>(C)) {
+      //
+      // FIXME: This may not be quite right; we should probably add a
+      // BlockAddress flag to the DSNode instead of using the unknown flag.
+      //
+      N = createNode();
+      N->setUnknownMarker();
     } else {
       errs() << "Unknown constant: " << *C << "\n";
       assert(0 && "Unknown constant type!");





More information about the llvm-commits mailing list