paschalis-mpeis wrote:

The benefits of having`getFRemInstrCost` in my view are the below:
1. frem is a special case anyway:
It's an IR instruction that is not supported by all hw and targets have to 
specialize.
Handling it in a dedicated switch case with a dedicated TTI function call, 
clearly exposes that information to anyone who reads the code in both 
vectorizers (and not obscuring it away). 
Plus it won't add any `if (TLI hasVecLib) doThis else doThat` logic to the 
vectorizers.

2. This won't be a significant API change.
It won't force any other user of the `getArithmeticInstrCost` to go through 
that change.

https://github.com/llvm/llvm-project/pull/82488
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to