[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Feb 24 11:55:44 PST 2005



Changes in directory llvm/lib/Analysis/DataStructure:

Local.cpp updated: 1.121 -> 1.122
---
Log message:

This instruction:
  X = gep null, ...

Used to not create a scalar map entry for X, which caused clients to barf.
This is bad.






---
Diffs of the changes:  (+2 -1)

 Local.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.121 llvm/lib/Analysis/DataStructure/Local.cpp:1.122
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.121	Sun Jan 30 17:51:02 2005
+++ llvm/lib/Analysis/DataStructure/Local.cpp	Thu Feb 24 13:55:31 2005
@@ -318,7 +318,8 @@
 
 void GraphBuilder::visitGetElementPtrInst(User &GEP) {
   DSNodeHandle Value = getValueDest(*GEP.getOperand(0));
-  if (Value.isNull()) return;
+  if (Value.isNull())
+    Value = createNode();
 
   // As a special case, if all of the index operands of GEP are constant zeros,
   // handle this just like we handle casts (ie, don't do much).






More information about the llvm-commits mailing list