[all-commits] [llvm/llvm-project] b0662a: [CodeMoverUtils] Enhance CodeMoverUtils to sink a...

Congzhe via All-commits all-commits at lists.llvm.org
Tue Apr 9 21:28:43 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0662a7a7d6d7a4a5339b95d3a20a53390636716
      https://github.com/llvm/llvm-project/commit/b0662a7a7d6d7a4a5339b95d3a20a53390636716
  Author: Congzhe <congzhe.cao at huawei.com>
  Date:   2024-04-10 (Wed, 10 Apr 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
    M llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp

  Log Message:
  -----------
   [CodeMoverUtils] Enhance CodeMoverUtils to sink an entire BB (#87857)

When moving an entire basic block after `InsertPoint`, currently we
check each instruction whether their users are dominated by
`InsertPoint`, however, this can be improved such that even a user is
not dominated by `InsertPoint`, as long as it appears as a subsequent
instruction in the same BB, it is safe to move.

This patch is similar to commit 751be2a064f119af74c7b9b1e52bc904d8aa114d
that enhanced hoisting an entire BB, and this patch enhances sinking an
entire BB. Please refer to the added functionality in test case
`llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp` that was not
supported without this patch.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list