[all-commits] [llvm/llvm-project] 17139f: [LAA] Check HasSameSize before couldPreventStoreLo...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Nov 27 02:11:00 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 17139f38e55ec06b8546b9306e04e64d0408033a
      https://github.com/llvm/llvm-project/commit/17139f38e55ec06b8546b9306e04e64d0408033a
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-11-27 (Mon, 27 Nov 2023)

  Changed paths:
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll

  Log Message:
  -----------
  [LAA] Check HasSameSize before couldPreventStoreLoadForward.

After 9645267, TypeByteSize is 0 if both access do not have the same
size (i.e. HasSameSize will be false). This can cause an infinite loop
in couldPreventStoreLoadForward, if HasSameSize is not checked first.

So check HasSameSize first instead of after
couldPreventStoreLoadForward. Checking HasSameSize first is also
cheaper.




More information about the All-commits mailing list