[llvm-commits] [llvm] r107657 - /llvm/trunk/lib/Analysis/Lint.cpp

Dan Gohman gohman at apple.com
Tue Jul 6 08:23:00 PDT 2010


Author: djg
Date: Tue Jul  6 10:23:00 2010
New Revision: 107657

URL: http://llvm.org/viewvc/llvm-project?rev=107657&view=rev
Log:
Add some more TODO comments.

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

Modified: llvm/trunk/lib/Analysis/Lint.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Lint.cpp?rev=107657&r1=107656&r2=107657&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/Lint.cpp (original)
+++ llvm/trunk/lib/Analysis/Lint.cpp Tue Jul  6 10:23:00 2010
@@ -201,6 +201,8 @@
   // fairly common mistake to neglect to name a function.
   Assert1(F.hasName() || F.hasLocalLinkage(),
           "Unusual: Unnamed function with non-local linkage", &F);
+
+  // TODO: Check for irreducible control flow.
 }
 
 void Lint::visitCallSite(CallSite CS) {
@@ -224,6 +226,7 @@
             "argument count", &I);
 
     // Check argument types (in case the callee was casted) and attributes.
+    // TODO: Verify that caller and callee attributes are compatible.
     Function::arg_iterator PI = F->arg_begin(), PE = F->arg_end();
     CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end();
     for (; AI != AE; ++AI) {
@@ -361,6 +364,7 @@
 }
 
 // TODO: Check that the reference is in bounds.
+// TODO: Check readnone/readonly function attributes.
 void Lint::visitMemoryReference(Instruction &I,
                                 Value *Ptr, unsigned Size, unsigned Align,
                                 const Type *Ty, unsigned Flags) {
@@ -501,6 +505,8 @@
     // This isn't undefined behavior, it's just an obvious pessimization.
     Assert1(&I.getParent()->getParent()->getEntryBlock() == I.getParent(),
             "Pessimization: Static alloca outside of entry block", &I);
+
+  // TODO: Check for an unusual size (MSB set?)
 }
 
 void Lint::visitVAArgInst(VAArgInst &I) {





More information about the llvm-commits mailing list