mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
Set up IRBuilder for use during simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131545 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/ConstantRange.h"
|
#include "llvm/Support/ConstantRange.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
|
#include "llvm/Support/IRBuilder.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <set>
|
#include <set>
|
||||||
@@ -2638,6 +2639,8 @@ bool SimplifyCFGOpt::run(BasicBlock *BB) {
|
|||||||
if (MergeBlockIntoPredecessor(BB))
|
if (MergeBlockIntoPredecessor(BB))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
IRBuilder<> Builder(BB);
|
||||||
|
|
||||||
// If there is a trivial two-entry PHI node in this basic block, and we can
|
// If there is a trivial two-entry PHI node in this basic block, and we can
|
||||||
// eliminate it, do so now.
|
// eliminate it, do so now.
|
||||||
if (PHINode *PN = dyn_cast<PHINode>(BB->begin()))
|
if (PHINode *PN = dyn_cast<PHINode>(BB->begin()))
|
||||||
|
|||||||
Reference in New Issue
Block a user