[llvm-commits] [PATCH] check for blockaddress in Function::hasAddressTaken

Jay Foad jay.foad at gmail.com
Fri May 11 14:08:36 PDT 2012


The attached patch addresses a FIXME in Function::hasAddressTaken:

    // FIXME: Check for blockaddress, which does not take the address.

(Eli, you added this comment in r142572.)

I've adjusted GlobalOpt, which was assuming that !F->hasAddressTaken()
implies that all users of F are Call or Invoke instructions. I suppose
it's possible that other out-of-tree code makes the same assumption
and will need adjusting. I've added a new test to check that
-globalopt can now work some of its magic on a function that contains
a blockaddress.

Tested with "make check-all", LLVM and Clang, on Linux/x86-64. OK to commit?

Thanks,
Jay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppp
Type: application/octet-stream
Size: 2677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120511/21955686/attachment.obj>


More information about the llvm-commits mailing list