aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
diff options
context:
space:
mode:
authorDavid Sherwood <david.sherwood@arm.com>2020-09-23 14:05:15 +0100
committerDavid Sherwood <david.sherwood@arm.com>2020-10-12 08:23:38 +0100
commitc5ba0d33cc060cc06a28a5d9101060afd1c0ee9a (patch)
tree931c0e0fb0d8109172bd5d6a26216eaf5ce8ff35 /llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
parent6bf25f45a9b6bd2bf6bd4bf03f6b0d0e2839c33f (diff)
downloadllvm-c5ba0d33cc060cc06a28a5d9101060afd1c0ee9a.zip
llvm-c5ba0d33cc060cc06a28a5d9101060afd1c0ee9a.tar.gz
llvm-c5ba0d33cc060cc06a28a5d9101060afd1c0ee9a.tar.bz2
[SVE] Make ElementCount and TypeSize use a new PolySize class
I have introduced a new template PolySize class, where the template parameter determines the type of quantity, i.e. for an element count this is just an unsigned value. The ElementCount class is now just a simple derivation of PolySize<unsigned>, whereas TypeSize is more complicated because it still needs to contain the uint64_t cast operator, since there are still many places in the code that rely upon this implicit cast. As such the class also still needs some of it's own operators. I've tried to minimise the amount of code in the base PolySize class, which led to a couple of changes: 1. In some places we were relying on '==' operator comparisons between ElementCounts and the scalar value 1. I didn't put this operator in the new PolySize class, and thought it was actually clearer to use the isScalar() function instead. 2. I removed the isByteSized function and replaced it with calls to isKnownMultipleOf(8). I've also renamed NextPowerOf2 to be coefficientNextPowerOf2 so that it's more consistent with coefficientDivideBy. Differential Revision: https://reviews.llvm.org/D88409
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
0 files changed, 0 insertions, 0 deletions