[llvm-commits] [PATCH] remove BranchInst::setUnconditionalDest()
Jay Foad
jay.foad at gmail.com
Fri Jan 7 06:50:43 CST 2011
These patches fix a FIXME in BranchInst::setUnconditionalDest():
// setUnconditionalDest - Change the current branch to an unconditional branch
// targeting the specified block.
// FIXME: Eliminate this ugly method.
This means that BranchInsts are now created with either 1 or 3
operands, and that never changes over the lifetime of the BranchInst.
This allows some nice cleanups in the allocation and freeing of Users'
operand lists. (The complexity was originally introduced when Gabor
changed BranchInst to allocate its operands along with the
instruction, instead of as a separate allocation, here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090309/075152.html
)
The patches are, in order:
remove-uses: change the existing uses of setUnconditionalDest() to
create a new unconditional BranchInst instead
remove-impl: remove the implementation of setUnconditionalDest()
cleanup-operandlist: the cleanups mentioned above
I've tested them all with "make all check".
Comments? Or, OK to commit?
Thanks,
Jay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-uses
Type: application/octet-stream
Size: 1903 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110107/c5a22d5d/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-impl
Type: application/octet-stream
Size: 1655 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110107/c5a22d5d/attachment-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cleanup-operandlist
Type: application/octet-stream
Size: 5995 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110107/c5a22d5d/attachment-0002.obj
More information about the llvm-commits
mailing list