[llvm-dev] Heads-up: Handling target-specific intrinsics in InstCombine

Chris Lattner via llvm-dev llvm-dev at lists.llvm.org
Tue Jun 30 13:25:51 PDT 2020


I agree this is a great direction.  I have some concerns about the details of the patch (added to the patch) but I agree this is a great direction to go.  You might want to check out the MLIR canonicalize pass which is effectively this but factored in a more flexible way.

-Chris

> On Jun 30, 2020, at 9:13 AM, David Greene via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Nicolai Hähnle via llvm-dev <llvm-dev at lists.llvm.org> writes:
> 
>> InstCombine has dealt with target-specific intrinsics for a long time,
>> since its fix-point iteration is arguably the right place to do so. A
>> downside is that there's a pull to add an increasing amount of code
>> into lib/Transforms/InstCombine/ that really is target-specific.
>> 
>> What the aforementioned change does is provide a target hook via
>> TargetTransformInfo, and move the handling of all target intrinsics
>> for InstCombine purposes into the corresponding lib/Target/$foo/
>> directory via the hook, thus cleaning up the core of InstCombine.
> 
> +1.  This is great!  I hope to see more such target optimizer hooks in
> the future.
> 
>                -David
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list