[all-commits] [llvm/llvm-project] 6d36b2: [GlobalOpt] Fix an incorrect Modified status

David via All-commits all-commits at lists.llvm.org
Wed Sep 2 06:02:17 PDT 2020


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

  Changed paths:
    M llvm/lib/Transforms/IPO/GlobalOpt.cpp
    A llvm/test/Transforms/GlobalOpt/const-return-status-atomic.ll
    A llvm/test/Transforms/GlobalOpt/const-return-status.ll

  Log Message:
  -----------
  [GlobalOpt] Fix an incorrect Modified status

When marking a global variable constant, and simplifying users using
CleanupConstantGlobalUsers(), the pass could incorrectly return false if
there were still some uses left, and no further optimizations was done.

This was caught using the check introduced by D80916.

This fixes PR46749.

Reviewed By: fhahn

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




More information about the All-commits mailing list