[llvm-dev] [Proposal] Introducing the concept of invalid costs to the IR cost model

Nicolai Hähnle via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 25 07:29:08 PST 2020


I don't have a lot at stake here, just wanted to point out:

On Thu, Nov 5, 2020 at 5:26 PM David Sherwood via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> This new wrapper class would work almost seamlessly with existing code as it
> would contain the full set of operators required for arithmetic and comparisons.
> This is in addition to the ability to create invalid costs and query the validity
> of an existing cost. Once a cost becomes invalid or unknown it will remain in that
> state regardless of any further arithmetic performed.

Enough thought needs to go into the corner cases. For example, what is
0 * infinite? What is unknown < infinite? What is unknown == unknown?
And so on. It reminds me of the mess that is floating point NaN.

Cheers,
Nicolai


>
>
>
> Kind Regards,
>
> David Sherwood.
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



-- 
Lerne, wie die Welt wirklich ist,
aber vergiss niemals, wie sie sein sollte.


More information about the llvm-dev mailing list