[all-commits] [llvm/llvm-project] 8393b9: [LoopInterchange] Move instructions from preheader...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Aug 10 04:46:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8393b9fd1f36d9273fa0720872e3996495aacc1c
      https://github.com/llvm/llvm-project/commit/8393b9fd1f36d9273fa0720872e3996495aacc1c
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
    M llvm/test/Transforms/LoopInterchange/lcssa-preheader.ll
    A llvm/test/Transforms/LoopInterchange/pr45743-move-from-inner-preheader.ll

  Log Message:
  -----------
  [LoopInterchange] Move instructions from preheader to outer loop header.

Instructions defined in the original inner loop preheader may depend on
values defined in the outer loop header, but the inner loop header will
become the entry block in the loop nest. Move the instructions from the
preheader to the outer loop header, so we do not break dominance. We
also have to check for unsafe instructions in the preheader. If there
are no unsafe instructions, all instructions should be movable.

Currently we move all instructions except the terminator and rely on
LICM to hoist out invariant instructions later.

Fixes PR45743




More information about the All-commits mailing list