From: Sanjoy Das Date: Sun, 29 May 2016 04:08:50 +0000 (+0000) Subject: Revert "[SCEV] Remove unused function; NFC" X-Git-Tag: android-x86-7.1-r4~32584 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=48ef4cdcae9bfd5f7f3a2178a3b06a970279ce22;p=android-x86%2Fexternal-llvm.git Revert "[SCEV] Remove unused function; NFC" This reverts commit r271155. The `apply` function is actually used by Polly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271167 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h index a658b808e90..dfb25f44424 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h @@ -680,6 +680,13 @@ namespace llvm { private: LoopToScevMapT ⤅ }; + +/// Applies the Map (Loop -> SCEV) to the given Scev. +static inline const SCEV *apply(const SCEV *Scev, LoopToScevMapT &Map, + ScalarEvolution &SE) { + return SCEVLoopAddRecRewriter::rewrite(Scev, Map, SE); +} + } #endif