[llvm-commits] [PATCH] remove BranchInst::setUnconditionalDest()

Gabor Greif ggreif at gmail.com
Sun Jan 9 12:56:28 PST 2011


Yay from me too. The FIXME is older than my change was, and with my
change things did not get prettier :-)

I was not radical enough that time to eradicate this wart, partly
because my change was big already. RAUWing away the sucker is the
right way to go. Glad you made the jump!

    Gabor

On 1/7/11, Jay Foad <jay.foad at gmail.com> wrote:
> 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.
>



More information about the llvm-commits mailing list