[all-commits] [llvm/llvm-project] eadf29: [CodeMoverUtils] Use dominator tree level to decid...

rithik sharma via All-commits all-commits at lists.llvm.org
Wed May 27 11:03:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: eadf2959567c89bebff153feac873cbc1b71eb04
      https://github.com/llvm/llvm-project/commit/eadf2959567c89bebff153feac873cbc1b71eb04
  Author: Rithik Sharma <rithiksh02 at gmail.com>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/OrderedInstructions.h
    M llvm/lib/Analysis/OrderedInstructions.cpp
    M llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
    M llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp

  Log Message:
  -----------
  [CodeMoverUtils] Use dominator tree level to decide the direction of
code motion

Summary: Currently isSafeToMoveBefore uses DFS numbering for determining
the relative position of instruction and insert point which is not
always correct. This PR proposes the use of Dominator Tree depth for the
same. If a node is at a higher level than the insert point then it is
safe to say that we want to move in the forward direction.
Authored By: RithikSharma
Reviewer: Whitney, nikic, bmahjour, etiotto, fhahn
Reviewed By: Whitney
Subscribers: fhahn, hiraditya, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D80084




More information about the All-commits mailing list