[ConstraintElimination] Add Decomposition struct (NFCI)
authorNikita Popov <npopov@redhat.com>
Fri, 11 Nov 2022 16:27:31 +0000 (17:27 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 14 Nov 2022 09:44:16 +0000 (10:44 +0100)
commite82b5b5bbd1a97c289988a9bf2007511d35eb5cf
treefbb9316dfa52ff90983bbfdc2a1aceb2b4e625d5
parent30982a595da66c4224ca0c2601fbad16ce75a78a
[ConstraintElimination] Add Decomposition struct (NFCI)

Replace the vector of DecompEntry with a struct that stores the
constant offset separately. I think this is cleaner than giving the
first element special handling.

This probably also fixes some potential ubsan errors by more
consistently using addWithOverflow/multiplyWithOverflow.
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp