[all-commits] [llvm/llvm-project] 4494e4: [IR] Clean up dead instructions after simplifying ...

jayfoad via All-commits all-commits at lists.llvm.org
Thu Jun 11 05:28:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4494e45316a0bfaabb6bb1450fb0f49a0e6832af
      https://github.com/llvm/llvm-project/commit/4494e45316a0bfaabb6bb1450fb0f49a0e6832af
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2020-06-11 (Thu, 11 Jun 2020)

  Changed paths:
    M llvm/include/llvm/IR/BasicBlock.h
    M llvm/lib/IR/BasicBlock.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/test/Transforms/PGOProfile/chr.ll

  Log Message:
  -----------
  [IR] Clean up dead instructions after simplifying a conditional branch

Change BasicBlock::removePredecessor to optionally return a vector of
instructions which might be dead. Use this in ConstantFoldTerminator to
delete them if they are dead.

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




More information about the All-commits mailing list