mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Final step of instcombine debuginfo; switch a couple more places over to InsertNewInstWith, and use setDebugLoc for the cases which can't be easily handled by the automated mechanisms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -241,7 +241,7 @@ bool InstCombiner::SimplifyAssociativeOrCommutative(BinaryOperator &I) {
|
||||
|
||||
Constant *Folded = ConstantExpr::get(Opcode, C1, C2);
|
||||
Instruction *New = BinaryOperator::Create(Opcode, A, B);
|
||||
InsertNewInstBefore(New, I);
|
||||
InsertNewInstWith(New, I);
|
||||
New->takeName(Op1);
|
||||
I.setOperand(0, New);
|
||||
I.setOperand(1, Folded);
|
||||
@ -1591,7 +1591,8 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
||||
DEBUG(errs() << "IC: Old = " << *I << '\n'
|
||||
<< " New = " << *Result << '\n');
|
||||
|
||||
Result->setDebugLoc(I->getDebugLoc());
|
||||
if (!I->getDebugLoc().isUnknown())
|
||||
Result->setDebugLoc(I->getDebugLoc());
|
||||
// Everything uses the new instruction now.
|
||||
I->replaceAllUsesWith(Result);
|
||||
|
||||
|
Reference in New Issue
Block a user