[SCEV] Add an expandAddToGEP overload for a single operand. NFC.
authorKeno Fischer <keno@alumni.harvard.edu>
Thu, 26 Jul 2018 21:55:03 +0000 (21:55 +0000)
committerKeno Fischer <keno@alumni.harvard.edu>
Thu, 26 Jul 2018 21:55:03 +0000 (21:55 +0000)
commit259ea987f56a2e68379adfbf290a52ef855d0207
tree0f3684d9ba3f59b5d07891d8b25efc6eef383da5
parent0f81faed05c3c7c1fbaf6af402411c99d715cf56
[SCEV] Add an expandAddToGEP overload for a single operand. NFC.

Only wanting to pass a single SCEV operand to use as the offset of
the GEP is a common operation. Right now this requires creating a
temporary stack array at every call site. Add an overload
that encapsulates that pattern and simplify the call sites.

Suggested-By: sanjoy (in https://reviews.llvm.org/D49832)
llvm-svn: 338072
llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
llvm/lib/Analysis/ScalarEvolutionExpander.cpp