mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-21 02:25:13 +00:00
Fixing a heisenbug where the memory dependence analysis behaves differently
with and without -g. Adding a test case to make sure that the threshold used in the memory dependence analysis is respected. The test case also checks that debug intrinsics are not counted towards this threshold. Differential Revision: http://llvm-reviews.chandlerc.com/D2141 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194646 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -371,18 +371,19 @@ getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,
|
||||
|
||||
// Walk backwards through the basic block, looking for dependencies.
|
||||
while (ScanIt != BB->begin()) {
|
||||
Instruction *Inst = --ScanIt;
|
||||
|
||||
if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst))
|
||||
// Debug intrinsics don't (and can't) cause dependencies.
|
||||
if (isa<DbgInfoIntrinsic>(II)) continue;
|
||||
|
||||
// Limit the amount of scanning we do so we don't end up with quadratic
|
||||
// running time on extreme testcases.
|
||||
--Limit;
|
||||
if (!Limit)
|
||||
return MemDepResult::getUnknown();
|
||||
|
||||
Instruction *Inst = --ScanIt;
|
||||
|
||||
if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
|
||||
// Debug intrinsics don't (and can't) cause dependences.
|
||||
if (isa<DbgInfoIntrinsic>(II)) continue;
|
||||
|
||||
// If we reach a lifetime begin or end marker, then the query ends here
|
||||
// because the value is undefined.
|
||||
if (II->getIntrinsicID() == Intrinsic::lifetime_start) {
|
||||
|
Reference in New Issue
Block a user