[all-commits] [llvm/llvm-project] 11e879: [Loop Simplify] Resolve an issue where metadata is...

Sidharth Baveja via All-commits all-commits at lists.llvm.org
Fri Jul 17 07:02:55 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 11e879d4f111d21a669b2cde1444b85768b8a241
      https://github.com/llvm/llvm-project/commit/11e879d4f111d21a669b2cde1444b85768b8a241
  Author: Sidharth Baveja <sidharth.baveja at ibm.com>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
    A llvm/test/Transforms/LoopSimplify/update_latch_md.ll

  Log Message:
  -----------
  [Loop Simplify] Resolve an issue where metadata is not applied to a loop latch.

Summary:
This patch resolves an issue where the metadata of a loop is not added to the
new loop latch, and not removed from the old loop latch. This issue occurs in
the SplitBlockPredecessors function, which  adds a new block in a loop, and
in the case that the block passed into this function is the header of the loop,
the loop can be modified such that the latch of the loop is replaced.
This patch applies to the Loop Simplify pass since it ensures that each loop
has exit blocks which only have predecessors that are inside of the loop. In
the case that this is not true, the pass will create a new exit block for the
loop. This guarantees that the loop preheader/header will dominate the exit blocks.

Author: sidbav (Sidharth Baveja)

Reviewers: asbirlea (Alina Sbirlea), chandlerc (Chandler Carruth), Whitney (Whitney Tsang), bmahjour (Bardia Mahjour)

Reviewed By:  asbirlea (Alina Sbirlea)

Subscribers: hiraditya (Aditya Kumar), llvm-commits

Tag: LLVM

Differential Revision: https://reviews.llvm.org/D83869




More information about the All-commits mailing list