1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[Reassociate] Use IRBuilderBase; NFC

And remove now unnecessary IRBuilder.h include in header.
This commit is contained in:
Nikita Popov 2020-04-04 12:34:16 +02:00
parent b87bc671ab
commit ed72276673
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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;