forked from OSchip/llvm-project
[Reassociate] Use IRBuilderBase; NFC
And remove now unnecessary IRBuilder.h include in header.
This commit is contained in:
parent
1055e9e3c8
commit
ebd5a1b049
|
@ -25,7 +25,6 @@
|
|||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/PostOrderIterator.h"
|
||||
#include "llvm/ADT/SetVector.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/IR/ValueHandle.h"
|
||||
#include <deque>
|
||||
|
@ -37,6 +36,7 @@ class BasicBlock;
|
|||
class BinaryOperator;
|
||||
class Function;
|
||||
class Instruction;
|
||||
class IRBuilderBase;
|
||||
class Value;
|
||||
|
||||
/// A private "module" namespace for types and utilities used by Reassociate.
|
||||
|
@ -114,7 +114,7 @@ private:
|
|||
bool CombineXorOpnd(Instruction *I, reassociate::XorOpnd *Opnd1,
|
||||
reassociate::XorOpnd *Opnd2, APInt &ConstOpnd,
|
||||
Value *&Res);
|
||||
Value *buildMinimalMultiplyDAG(IRBuilder<> &Builder,
|
||||
Value *buildMinimalMultiplyDAG(IRBuilderBase &Builder,
|
||||
SmallVectorImpl<reassociate::Factor> &Factors);
|
||||
Value *OptimizeMul(BinaryOperator *I,
|
||||
SmallVectorImpl<reassociate::ValueEntry> &Ops);
|
||||
|
|
|
@ -1721,7 +1721,7 @@ static bool collectMultiplyFactors(SmallVectorImpl<ValueEntry> &Ops,
|
|||
}
|
||||
|
||||
/// Build a tree of multiplies, computing the product of Ops.
|
||||
static Value *buildMultiplyTree(IRBuilder<> &Builder,
|
||||
static Value *buildMultiplyTree(IRBuilderBase &Builder,
|
||||
SmallVectorImpl<Value*> &Ops) {
|
||||
if (Ops.size() == 1)
|
||||
return Ops.back();
|
||||
|
@ -1744,7 +1744,7 @@ static Value *buildMultiplyTree(IRBuilder<> &Builder,
|
|||
/// DAG of multiplies to compute the final product, and return that product
|
||||
/// value.
|
||||
Value *
|
||||
ReassociatePass::buildMinimalMultiplyDAG(IRBuilder<> &Builder,
|
||||
ReassociatePass::buildMinimalMultiplyDAG(IRBuilderBase &Builder,
|
||||
SmallVectorImpl<Factor> &Factors) {
|
||||
assert(Factors[0].Power);
|
||||
SmallVector<Value *, 4> OuterProduct;
|
||||
|
|
Loading…
Reference in New Issue