[llvm-commits] [llvm] r158937 - in /llvm/trunk: include/llvm/Analysis/MemoryBuiltins.h lib/Analysis/MemoryBuiltins.cpp lib/Transforms/InstCombine/InstCombineCalls.cpp lib/Transforms/InstCombine/InstructionCombining.cpp test/Transforms/InstCombine

Nick Lewycky nlewycky at google.com
Thu Jun 21 14:47:54 PDT 2012


On 21 June 2012 14:25, Nuno Lopes <nunoplopes at sapo.pt> wrote:

> Author: nlopes
> Date: Thu Jun 21 16:25:05 2012
> New Revision: 158937
>
> URL: http://llvm.org/viewvc/llvm-project?rev=158937&view=rev
> Log:
> Add support for invoke to the MemoryBuiltin analysid.
> Update comments accordingly.
>
> Make instcombine remove useless invokes to C++'s 'new' allocation function
> (test attached).
>

Note that instcombine has "setPreservesCFG" set, which means that it really
shouldn't be touching any terminator instructions. It currently does to
swap things like "br i1 (xor b, true), label %l1, label %l2" and arguably
that doesn't really change the CFG (though I think that in an ideal world
instcombine should not be doing that either). This patch certainly does
though, and instcombine shouldn't be doing it. You could put it in
SimplifyCFG maybe?

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120621/f8c7cfad/attachment.html>


More information about the llvm-commits mailing list