[llvm-dev] Question on Instruction Combining

David Majnemer via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 27 12:56:33 PST 2016


At first blush, DCE can reduce the number of uses which might encourage
InstCombine to further canonicalize which would indicate that we should set
the flag.  However, that would only matter if the users of the instruction
made it to the worklist in the first place which doesn't appear to be a
guarantee.

Do you have any code which is not fully canonicalized by InstCombine?

On Wed, Jan 27, 2016 at 12:35 PM, Sain-Zee Ueng via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hello,
>
> In InstructionCombining.cpp, under AddReachableCodeToWorklist
> <http://llvm.org/docs/doxygen/html/InstructionCombining_8cpp.html#a65beadbfc094f4040b353518b98d0c07>,
> DCE and ConstFold are performed but MadeIRChange is not set to true (lines
> 2912 and 2924). Is there some underlying assumption that supports this?
>
> Intuitively not setting MadeIRChanges to true at these points could allow
> Instruction Combining to exit early while there is still work to do.
>
> Thank you,
> Sain
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160127/3799588c/attachment.html>


More information about the llvm-dev mailing list