[PATCH] D21724: [RFC] Enhance synchscope representation (clang)

Konstantin Zhuravlyov via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 25 07:28:29 PDT 2016


kzhuravl updated this revision to Diff 65343.
kzhuravl added a comment.

Remove metadata generation


https://reviews.llvm.org/D21724

Files:
  lib/CodeGen/CGBuiltin.cpp

Index: lib/CodeGen/CGBuiltin.cpp
===================================================================
--- lib/CodeGen/CGBuiltin.cpp
+++ lib/CodeGen/CGBuiltin.cpp
@@ -1539,12 +1539,13 @@
   case Builtin::BI__atomic_signal_fence:
   case Builtin::BI__c11_atomic_thread_fence:
   case Builtin::BI__c11_atomic_signal_fence: {
-    llvm::SynchronizationScope Scope;
+    unsigned Scope;
     if (BuiltinID == Builtin::BI__atomic_signal_fence ||
-        BuiltinID == Builtin::BI__c11_atomic_signal_fence)
-      Scope = llvm::SingleThread;
-    else
-      Scope = llvm::CrossThread;
+        BuiltinID == Builtin::BI__c11_atomic_signal_fence) {
+      Scope = llvm::SynchScope::SingleThread;
+    } else {
+      Scope = llvm::SynchScope::System;
+    }
     Value *Order = EmitScalarExpr(E->getArg(0));
     if (isa<llvm::ConstantInt>(Order)) {
       int ord = cast<llvm::ConstantInt>(Order)->getZExtValue();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21724.65343.patch
Type: text/x-patch
Size: 906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160725/e38cc85a/attachment.bin>


More information about the cfe-commits mailing list