[PATCH] D18700: [Inline asm][GCC compatibility] Handle %v-prefixed code in inline assembly

Eric Christopher via cfe-commits cfe-commits at lists.llvm.org
Sun May 1 22:07:25 PDT 2016


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





More information about the cfe-commits mailing list