echristo added a comment.

Hi,

Couple of inline comments. The direction is getting there, but there's some 
overall architecture issues to sort out I think.

Thanks!

-eric


================
Comment at: include/clang/AST/Stmt.h:1555
@@ +1554,3 @@
+  // target feature (by attribute or invocation options).
+  bool SupportsAVX;
+
----------------
I'd prefer not to keep SupportsAVX cached, or pass it though, but rather look 
up what we need from the function if we need it. We can also cache the set of 
valid subtarget features on the Stmt if necessary from the Function.

================
Comment at: lib/Sema/SemaStmtAsm.cpp:144-146
@@ +143,5 @@
+// find a function context.
+static void CollectTargetFeatures(Sema &S,
+                                  std::vector<std::string> &TargetFeatures,
+                                  StringRef &TargetCPU) {
+  DeclContext *DC = S.CurContext;
----------------
Hate to say, but this is the point that we now have 3 of these scattered around 
- can you take a look at what it will take to merge all of these in a way that 
we can look up the cached features?


http://reviews.llvm.org/D18700



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

Reply via email to