summaryrefslogtreecommitdiff
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-11 08:13:40 +0000
committerChris Lattner <sabre@nondot.org>2011-01-11 08:13:40 +0000
commitb5b7997fd0765f73b711ea4c72e4433ce3637794 (patch)
tree787c16378cdb53323a326b2dba89cdd5b26b6774 /include/llvm/Transforms
parentb298db72531e607c4c4db31df3373f74a9b983b1 (diff)
downloadllvm-b5b7997fd0765f73b711ea4c72e4433ce3637794.tar.gz
llvm-b5b7997fd0765f73b711ea4c72e4433ce3637794.tar.bz2
llvm-b5b7997fd0765f73b711ea4c72e4433ce3637794.tar.xz
Fix FoldSingleEntryPHINodes to update memdep and AA when it deletes
phi nodes. It is called from MergeBlockIntoPredecessor which is called from GVN, which claims to preserve these. I'm skeptical that this is the actual problem behind PR8954, but this is a stab in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123222 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/Utils/BasicBlockUtils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Transforms/Utils/BasicBlockUtils.h b/include/llvm/Transforms/Utils/BasicBlockUtils.h
index 2e8c335b37..6de8b85070 100644
--- a/include/llvm/Transforms/Utils/BasicBlockUtils.h
+++ b/include/llvm/Transforms/Utils/BasicBlockUtils.h
@@ -35,7 +35,7 @@ void DeleteDeadBlock(BasicBlock *BB);
/// any single-entry PHI nodes in it, fold them away. This handles the case
/// when all entries to the PHI nodes in a block are guaranteed equal, such as
/// when the block has exactly one predecessor.
-void FoldSingleEntryPHINodes(BasicBlock *BB);
+void FoldSingleEntryPHINodes(BasicBlock *BB, Pass *P = 0);
/// DeleteDeadPHIs - Examine each PHI in the given block and delete it if it
/// is dead. Also recursively delete any operands that become dead as
@@ -46,7 +46,7 @@ bool DeleteDeadPHIs(BasicBlock *BB);
/// MergeBlockIntoPredecessor - Attempts to merge a block into its predecessor,
/// if possible. The return value indicates success or failure.
-bool MergeBlockIntoPredecessor(BasicBlock* BB, Pass* P = 0);
+bool MergeBlockIntoPredecessor(BasicBlock *BB, Pass *P = 0);
// ReplaceInstWithValue - Replace all uses of an instruction (specified by BI)
// with a value, then remove and delete the original instruction.