[PATCH] D53356: [InstCombine] Teach the move free before null test opti how to deal with noop casts

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 11:15:43 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D53356#1274624, @qcolombet wrote:

> Interestingly I think we had the exact same conversation when it was first added back in 2013, but I cannot find any trace of this discussion... My mind must play me tricks :).


I think the original patch was before I got here, so I probably didn't see it...but I did ask about that patch in https://reviews.llvm.org/D45343, so that might be what you are remembering. :)

> I am happy to move the whole thing in simplifyCFG. That said, strictly speaking that combine doesn't modify the CFG.

If it doesn't look too hard, moving it over to SimplifyCFG would be great. That way, we can be sure that the empty block removal always happens without interference from some other pass.

> CGP seems too late to me.
> 
>> It's the only transform in instcombine that is gated by 'minsize', so it's a limited optimization rather than a canonicalization?
> 
> That is correct, though, I'd argue that a lot of code in instcombine are optimizations too (as opposed to pure cannonicalization.)
> 
> How would you like to proceed?
> 
> Cheers,
> -Quentin




Repository:
  rL LLVM

https://reviews.llvm.org/D53356





More information about the llvm-commits mailing list