[all-commits] [llvm/llvm-project] 48fc78: [UnifyFunctionExitNodes] Fix Modified status for u...

David via All-commits all-commits at lists.llvm.org
Wed Sep 9 04:36:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 48fc781438767bd8337facf2e232c695b0426fb4
      https://github.com/llvm/llvm-project/commit/48fc781438767bd8337facf2e232c695b0426fb4
  Author: David Stenberg <david.stenberg at ericsson.com>
  Date:   2020-09-09 (Wed, 09 Sep 2020)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
    M llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
    A llvm/test/Transforms/UnifyFunctionExitNodes/unreachable-blocks-status.ll

  Log Message:
  -----------
  [UnifyFunctionExitNodes] Fix Modified status for unreachable blocks

If a function had at most one return block, the pass would return false
regardless if an unified unreachable block was created.

This patch fixes that by refactoring runOnFunction into two separate
helper functions for handling the unreachable blocks respectively the
return blocks, as suggested by @bjope in a review comment.

This was caught using the check introduced by D80916.

Reviewed By: serge-sans-paille

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




More information about the All-commits mailing list