[PATCH] D63459: Loop Cache Analysis

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 17:38:49 PDT 2019


Meinersbur added a comment.

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.


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