[llvm-commits] [patch][pr11202] Handle BB with address taken being deleted from codegen
Rafael Ávila de Espíndola
respindola at mozilla.com
Mon Oct 24 13:02:27 PDT 2011
We currently handle the following cases when removing a BB that has its
address taken
* An IL pass is deleting it, and no references to it were emitted so
far. In this case replaceAllUsesWith takes care of everything.
* An IL pass is deleting it, but a reference to it was already emitted.
When emitting the reference we created a CallbackVH, so now we get
notified about the deleting and remember to produce a dummy label for it .
The case we are not handling in this bug is a BB that is referenced from
another function or global variable being remove by a codegen pass.
There are two problems
* replaceAllUsesWith will not work once we are in Codegen, so we will
need to use dummy labels for both cases.
* MachineBasicBlock are not Values, so we cannot use CallbackVH.
What this patch does is add a method to MMI that Codegen can use to
record that a MBB is being deleted. This is handled almost the same way
we handle and IL BB being deleted, but we have to keep the hash table
entry since the IL level BB will not be delete and can still be in use.
Cheers,
Rafael
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111024/440bed2a/attachment.ksh>
More information about the llvm-commits
mailing list