[PATCH] Refactor Code inside LoopVectorizer's function isInductionVariable

Arnold Schwaighofer aschwaighofer at apple.com
Thu Mar 26 10:45:47 PDT 2015


> On Mar 25, 2015, at 7:54 AM, Karthik Bhat <kv.bhat at samsung.com> wrote:
> 
> Hi rengolin, nadav, aschwaighofer,
> 
> Hi Adam, Renato,
> I would like to reuse code inside isInductionVariable in one of my Pass. 
> This patch refactors the code and exposes function isInductionPHI. No functionality change.
> 
> Please let me know if this is good to commit.
> 
> Thanks and Regards
> Karthik Bhat
> 
> http://reviews.llvm.org/D8608
> 
> Files:
>  include/llvm/Transforms/Utils/LoopUtils.h
>  lib/Transforms/Vectorize/LoopVectorize.cpp
> 
> Index: include/llvm/Transforms/Utils/LoopUtils.h
> ===================================================================
> --- include/llvm/Transforms/Utils/LoopUtils.h
> +++ include/llvm/Transforms/Utils/LoopUtils.h
> @@ -122,6 +122,9 @@
> /// Updates safety information in LICMSafetyInfo argument.
> void computeLICMSafetyInfo(LICMSafetyInfo *, Loop *);
> 
> +/// \brief Checks if the give PHINode in a loop header is a induction variable.
> +/// Returns true if this is an induction PHI along with the step value.

s/give/given
s/is a induction/is an induction/

LGTM.





More information about the llvm-commits mailing list