[PATCH] Debug info: Support fragmented variables.

Chandler Carruth chandlerc at gmail.com
Mon Dec 15 13:22:10 PST 2014


To finish reviewing this, it would help to have a full context patch? If that's a problem, I can patch it locally and take a look...


================
Comment at: lib/Transforms/Scalar/SROA.cpp:959
@@ +958,3 @@
+  /// IR. This side-table holds the missing use edges.
+  DenseMap<Value *, DbgDeclareInst *> DbgDeclares;
+
----------------
These are of Value *s, but what Values? The loads? The allocas? Something else?

Essentially, I think this comment needs to indicate what the synthetic "use" edge looks like for the purpose of SROA.

================
Comment at: lib/Transforms/Scalar/SROA.cpp:2117-2118
@@ -2112,1 +2116,4 @@
 
+  DenseMap<Value *, DbgDeclareInst *>& DbgDeclares;
+  DIBuilder DIB;
+
----------------
The order here seems a bit odd. I would group the references separately from the builders....

Also, nit-picky issue, clang-format please. =]

================
Comment at: lib/Transforms/Scalar/SROA.cpp:3724
@@ +3723,3 @@
+    else if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(I))
+    DbgDeclares.insert(std::make_pair(DDI->getAddress(), DDI));
+  }
----------------
Bad indentation...

http://reviews.llvm.org/D2680

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list