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

jayfoad via All-commits all-commits at lists.llvm.org
Thu Jun 11 06:53:43 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 69bdfb075b293c4b3363f2dc0ac732ca03c3c9ca
      https://github.com/llvm/llvm-project/commit/69bdfb075b293c4b3363f2dc0ac732ca03c3c9ca
  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.

Reapply with a bug fix: don't drop the "!KeepOneInputPHIs" argument when
removePredecessor calls PHINode::removeIncomingValue.

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




More information about the All-commits mailing list