[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
Mon Oct 29 13:36:14 PDT 2018


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

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

> I had a quick look and it doesn't seem to be a good fit for simplifyCFG.
>  In particular, simplifyCFG only inspects terminator instructions and it feels out of place to add a scan through the entire list of instructions to find a call to free.
>
> Let me know if you want me to pursue in that direction or if you have another idea.


I was afraid this was going to be an odd fit no matter what we tried to do with it, so no I don't have any better ideas short of making a standalone pass, and I'm not sure if there are any other transforms like this to justify that effort.

Given that this is a small extension of the existing transform, I'll say LGTM.


Repository:
  rL LLVM

https://reviews.llvm.org/D53356





More information about the llvm-commits mailing list