[PATCH] D63459: Loop Cache Analysis

Ettore Tiotto via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 13:19:16 PST 2019


etiotto added a comment.

In D63459#1731032 <https://reviews.llvm.org/D63459#1731032>, @Meinersbur wrote:

> In D63459#1731015 <https://reviews.llvm.org/D63459#1731015>, @xbolva00 wrote:
>
> > /home/xbolva00/LLVM/llvm-project/llvm/lib/Analysis/LoopCacheAnalysis.cpp	353	warn	V612 An unconditional 'return' within a loop.
>
>
> This indeed does not look right. There are beaks and returns in the loop, but no continue. Meaning the loop is only iterated for one element (in this case: the innermost loop).  I think nothing else than the innermost loop is needed for delinearization, in which case it could be made a conditional instead of a for-statement.
>
> > /home/xbolva00/LLVM/llvm-project/llvm/lib/Analysis/LoopCacheAnalysis.cpp	456	err	V502 Perhaps the '?:' operator works in a different way than it was expected. The '?:' operator has a lower priority than the '==' operator.
>
>
>
>   TRT(TRT == None ? Optional<unsigned>(TemporalReuseThreshold) : TRT),
>
>
> Could add parens around `TRT == None` to silence the analyzer.


I have submitted a patch for review in https://reviews.llvm.org/D69821.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63459/new/

https://reviews.llvm.org/D63459





More information about the llvm-commits mailing list