[llvm-commits] [llvm] r66399 - /llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Owen Anderson
resistor at mac.com
Sun Mar 8 22:12:38 PDT 2009
Author: resistor
Date: Mon Mar 9 00:12:38 2009
New Revision: 66399
URL: http://llvm.org/viewvc/llvm-project?rev=66399&view=rev
Log:
Ignore debug intrinsics when computing dependences.
Modified:
llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=66399&r1=66398&r2=66399&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Mon Mar 9 00:12:38 2009
@@ -18,6 +18,7 @@
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
+#include "llvm/IntrinsicInst.h"
#include "llvm/Function.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/ADT/Statistic.h"
@@ -121,6 +122,8 @@
// FreeInsts erase the entire structure
PointerSize = ~0ULL;
} else if (isa<CallInst>(Inst) || isa<InvokeInst>(Inst)) {
+ // Debug intrinsics don't cause dependences.
+ if (isa<DbgInfoIntrinsic>(Inst)) break;
CallSite InstCS = CallSite::get(Inst);
// If these two calls do not interfere, look past it.
switch (AA->getModRefInfo(CS, InstCS)) {
@@ -175,6 +178,9 @@
while (ScanIt != BB->begin()) {
Instruction *Inst = --ScanIt;
+ // Debug intrinsics don't cause dependences.
+ if (isa<DbgInfoIntrinsic>(Inst)) continue;
+
// Values depend on loads if the pointers are must aliased. This means that
// a load depends on another must aliased load from the same value.
if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
More information about the llvm-commits
mailing list