[PATCH] D144381: [SCEV] Added a util function to SCEV
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 21:57:55 PST 2023
mkazantsev added inline comments.
================
Comment at: llvm/include/llvm/Analysis/ScalarEvolution.h:659
+ /// Return a SCEV for the constant 2 with \p Degree power of a specific type.
+ const SCEV *getPowerOfTwo(Type *Ty, long long Degree) {
+ return getConstant(Ty, 1 << Degree);
----------------
mkazantsev wrote:
> 1. `Degree -> Power`
> 2. Does it really have to be `long long`? I mean, it's neither signed nor practically that huge.
>
Change return types here to `const SCEVConstant *`? Can be an NFC follow-up.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144381/new/
https://reviews.llvm.org/D144381
More information about the llvm-commits
mailing list