Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1231)

Unified Diff: lib/CodeGen/TargetInfo.h

Issue 887223008: Rebased localmods in clang to 223109. (Closed)
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/CodeGen/CGStmt.cpp ('k') | lib/CodeGen/TargetInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/CodeGen/TargetInfo.h
diff --git a/lib/CodeGen/TargetInfo.h b/lib/CodeGen/TargetInfo.h
index cc469d69e3905f70af9401613831cf37a8772568..031879d68aee1d0a6836d6067206f9560892be79 100644
--- a/lib/CodeGen/TargetInfo.h
+++ b/lib/CodeGen/TargetInfo.h
@@ -219,6 +219,28 @@ public:
llvm::StringRef Value,
llvm::SmallString<32> &Opt) const {}
+ // @LOCALMOD-START
+ /// Determine whether the sequentially consistent fence generated for
+ /// the legacy GCC-style ``__sync_synchronize()`` builtin should be
+ /// surrounded by empty assembly directives which touch all of
+ /// memory. This allows platforms which aim for portability to
+ /// isolate themselves from changes in sequentially consistent
+ /// fence's semantics, since its intent is to represent the
+ /// C11/C++11 memory model which only orders atomic memory accesses.
+ /// This won't guarantee that all accesses (e.g. those to
+ /// non-escaping objects) will not be reordered.
+ virtual bool addAsmMemoryAroundSyncSynchronize() const {
+ return false;
+ }
+
+ /// Determine whether a full sequentially consistent fence should be
+ /// emitted when ``asm("":::"memory")`` is encountered, treating it
+ /// like ``__sync_synchronize()``.
+ virtual bool asmMemoryIsFence() const {
+ return false;
+ }
+ // @LOCALMOD-END
+
/// Gets the target-specific default alignment used when an 'aligned' clause
/// is used with a 'simd' OpenMP directive without specifying a specific
/// alignment.
« no previous file with comments | « lib/CodeGen/CGStmt.cpp ('k') | lib/CodeGen/TargetInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698