mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Instruction counters must skip the bitcasts that
feed into llvm.dbg.declare nodes, as well as the debug directives themselves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65976 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -477,6 +477,12 @@ Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
|
||||
Instruction *Inst = --ScanFrom;
|
||||
if (isa<DbgInfoIntrinsic>(Inst))
|
||||
continue;
|
||||
// Likewise, we skip bitcasts that feed into a llvm.dbg.declare; these are
|
||||
// not present when debugging is off.
|
||||
if (isa<BitCastInst>(Inst) && Inst->hasOneUse() &&
|
||||
isa<DbgDeclareInst>(Inst->use_begin()))
|
||||
continue;
|
||||
|
||||
// Restore ScanFrom to expected value in case next test succeeds
|
||||
ScanFrom++;
|
||||
|
||||
|
Reference in New Issue
Block a user