rjmccall added inline comments.

================
Comment at: lib/CodeGen/CGStmt.cpp:537
@@ +536,3 @@
+                                      llvm::LLVMContext::MD_noalias),
+                                      NewScopeList));
+
----------------
This is a very strange representation.  Every memory operation in the lexical 
block is annotated with a list of all of the scopes that were entered within 
the block, even if they were entered after the operation.  But for some reason, 
not with nested scopes?

What's the right patch for me to read about this representation?

================
Comment at: lib/CodeGen/CodeGenFunction.h:539
@@ +538,3 @@
+    SmallVector<llvm::Instruction *, 8> MemoryInsts;
+    SmallVector<llvm::Metadata *, 4> NoAliasScopes;
+
----------------
These should be TinyPtrVectors.  Restrict-qualified local variables are very, 
very uncommon.

================
Comment at: lib/CodeGen/CodeGenFunction.h:559
@@ +558,3 @@
+    void addNoAliasMD();
+  } FnNoAliasInfo;
+
----------------
Our normal convention in Clang is to declare the type separately from a 
variable of it.

================
Comment at: lib/CodeGen/CodeGenFunction.h:572
@@ +571,3 @@
+    explicit LexicalScope(CodeGenFunction &CGF, SourceRange Range,
+                          bool RMI = false)
+      : RunCleanupsScope(CGF), LexicalNoAliasInfo(RMI), Range(Range),
----------------
This is a completely useless parameter name.

================
Comment at: lib/CodeGen/CodeGenFunction.h:1245
@@ +1244,3 @@
+  /// The noalias domain metadata for this function.
+  llvm::MDNode* NoAliasDomain;
+  /// A map between the addresses of local restrict-qualified variables and
----------------
Star placement.


http://reviews.llvm.org/D9403



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to