[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 24 16:18:01 PST 2004
Changes in directory llvm/lib/Analysis/DataStructure:
Local.cpp updated: 1.87 -> 1.88
---
Log message:
Add support for 'rename'
---
Diffs of the changes: (+9 -4)
Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.87 llvm/lib/Analysis/DataStructure/Local.cpp:1.88
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.87 Tue Feb 24 16:02:48 2004
+++ llvm/lib/Analysis/DataStructure/Local.cpp Tue Feb 24 16:17:00 2004
@@ -484,10 +484,15 @@
N->setHeapNodeMarker()->setModifiedMarker()->setReadMarker();
return;
} else if (F->getName() == "atoi" || F->getName() == "atof" ||
- F->getName() == "remove") {
- // atoi reads its argument.
- if (DSNode *N = getValueDest(**CS.arg_begin()).getNode())
- N->setReadMarker();
+ F->getName() == "remove" || F->getName() == "unlink" ||
+ F->getName() == "rename") {
+ // These functions read all of their pointer operands.
+ for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end();
+ AI != E; ++AI) {
+ if (isPointerType((*AI)->getType()))
+ if (DSNode *N = getValueDest(**AI).getNode())
+ N->setReadMarker();
+ }
return;
} else if (F->getName() == "fopen" && CS.arg_end()-CS.arg_begin() == 2){
More information about the llvm-commits
mailing list