mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Merging r155984:
------------------------------------------------------------------------ r155984 | void | 2012-05-02 02:59:45 -0700 (Wed, 02 May 2012) | 4 lines The value held in the vector may be RAUW'ed by some of the canonicalization methods. Use a weak value handle to keep up with this. PR12245 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_31@155985 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -559,7 +559,8 @@ static unsigned FindInOperandList(SmallVectorImpl<ValueEntry> &Ops, unsigned i,
|
||||
|
||||
/// EmitAddTreeOfValues - Emit a tree of add instructions, summing Ops together
|
||||
/// and returning the result. Insert the tree before I.
|
||||
static Value *EmitAddTreeOfValues(Instruction *I, SmallVectorImpl<Value*> &Ops){
|
||||
static Value *EmitAddTreeOfValues(Instruction *I,
|
||||
SmallVectorImpl<WeakVH> &Ops){
|
||||
if (Ops.size() == 1) return Ops.back();
|
||||
|
||||
Value *V1 = Ops.back();
|
||||
@@ -833,7 +834,7 @@ Value *Reassociate::OptimizeAdd(Instruction *I,
|
||||
// from an expression will drop a use of maxocc, and this can cause
|
||||
// RemoveFactorFromExpression on successive values to behave differently.
|
||||
Instruction *DummyInst = BinaryOperator::CreateAdd(MaxOccVal, MaxOccVal);
|
||||
SmallVector<Value*, 4> NewMulOps;
|
||||
SmallVector<WeakVH, 4> NewMulOps;
|
||||
for (unsigned i = 0; i != Ops.size(); ++i) {
|
||||
// Only try to remove factors from expressions we're allowed to.
|
||||
BinaryOperator *BOp = dyn_cast<BinaryOperator>(Ops[i].Op);
|
||||
|
||||
Reference in New Issue
Block a user