#include "llvm/IR/PredIteratorCache.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Scalar.h"
-#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Transforms/Utils/SSAUpdater.h"
using namespace llvm;
Worklist.push_back(PostProcessPN);
// Keep track of PHI nodes that we want to remove because they did not have
- // any uses rewritten. If the new PHI is used, store it so that we can
- // try to propagate dbg.value intrinsics to it.
- SmallVector<PHINode *, 2> NeedDbgValues;
+ // any uses rewritten.
for (PHINode *PN : AddedPHIs)
if (PN->use_empty())
PHIsToRemove.insert(PN);
- else
- NeedDbgValues.push_back(PN);
- insertDebugValuesForPHIs(InstBB, NeedDbgValues);
+
Changed = true;
}
// Remove PHI nodes that did not have any uses rewritten.
; RUN: opt < %s -lcssa -S | FileCheck %s
; RUN: opt < %s -passes=lcssa -S | FileCheck %s
-; RUN: opt < %s -debugify -lcssa -S | FileCheck -check-prefix=CHECK2 %s
define void @lcssa(i1 %S2) {
; CHECK-LABEL: @lcssa