diff options
author | Keno Fischer <keno@alumni.harvard.edu> | 2018-07-26 21:55:03 +0000 |
---|---|---|
committer | Keno Fischer <keno@alumni.harvard.edu> | 2018-07-26 21:55:03 +0000 |
commit | db695a11d79719b8a4d8de8eb7e624a6ba712591 (patch) | |
tree | 5e670ba36cc3c7c74eaa0a7f74d70d277dfaab92 /include | |
parent | 235b4df870a8aad9df76ca5f6abf890703d3c9cf (diff) |
[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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/ScalarEvolutionExpander.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index 6476568695c..58d42680d6b 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpander.h +++ b/include/llvm/Analysis/ScalarEvolutionExpander.h @@ -335,6 +335,7 @@ namespace llvm { Value *expandAddToGEP(const SCEV *const *op_begin, const SCEV *const *op_end, PointerType *PTy, Type *Ty, Value *V); + Value *expandAddToGEP(const SCEV *Op, PointerType *PTy, Type *Ty, Value *V); /// Find a previous Value in ExprValueMap for expand. ScalarEvolution::ValueOffsetPair |