[llvm] r191585 - TBAA: try to fix the dragonegg bots.

Manman Ren manman.ren at gmail.com
Fri Sep 27 15:59:21 PDT 2013


Author: mren
Date: Fri Sep 27 17:59:21 2013
New Revision: 191585

URL: http://llvm.org/viewvc/llvm-project?rev=191585&view=rev
Log:
TBAA: try to fix the dragonegg bots.

Modified:
    llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp

Modified: llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp?rev=191585&r1=191584&r2=191585&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp Fri Sep 27 17:59:21 2013
@@ -326,7 +326,9 @@ TypeBasedAliasAnalysis::getAnalysisUsage
 /// it as struct-path aware TBAA format, otherwise, we treat it as scalar TBAA
 /// format.
 static bool isStructPathTBAA(const MDNode *MD) {
-  return isa<MDNode>(MD->getOperand(0));
+  // Anonymous TBAA root starts with a MDNode and dragonegg uses it as
+  // a TBAA tag.
+  return isa<MDNode>(MD->getOperand(0)) && MD->getNumOperands() >= 3;
 }
 
 /// Aliases - Test whether the type represented by A may alias the





More information about the llvm-commits mailing list