[PATCH] D68633: [utils] InlineFunction: fix for debug info affecting optimizations

Chris Ye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 01:12:07 PDT 2019


yechunliang added a comment.

> ! In D68633#1699421 <https://reviews.llvm.org/D68633#1699421>, @bjope wrote:
>  So I think that the solution might be based on one of these ideas:
> 
> 1. Remove the check for use_empty in the outer loop.
> 2. Add a check for !use_empty in the inner loop.
> 3. Remove the inner loop (i.e only splice one alloca at a time).
> 
>   Alternative 3 would be the simplest. If there really is a speedup on doing fewer splices, then alternative 2 still moves consequtive !use_empty allocas in batches. The idea with alternative 2 is to split batches on allocas that has no uses (as they are handled in the outer loop). Alternative 1 might work assuming that allocas with no uses are cleaned up somewhere else. But I think this alternative is the least interesting one.

I prefer to adopt alternative 2. I think use_empty alloca (the dead alloca) should also be erased in inner loop.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68633/new/

https://reviews.llvm.org/D68633





More information about the llvm-commits mailing list