| OLD | NEW |
| 1 //===---- TargetInfo.h - Encapsulate target details -------------*- C++ -*-===// | 1 //===---- TargetInfo.h - Encapsulate target details -------------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // These classes wrap the information about a call or function | 10 // These classes wrap the information about a call or function |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 /// will lead to C99 violations. | 164 /// will lead to C99 violations. |
| 165 /// | 165 /// |
| 166 /// However, some platforms make the conventions identical except | 166 /// However, some platforms make the conventions identical except |
| 167 /// for passing additional out-of-band information to a variadic | 167 /// for passing additional out-of-band information to a variadic |
| 168 /// function: for example, x86-64 passes the number of SSE | 168 /// function: for example, x86-64 passes the number of SSE |
| 169 /// arguments in %al. On these platforms, it is desireable to | 169 /// arguments in %al. On these platforms, it is desireable to |
| 170 /// call unprototyped functions using the variadic convention so | 170 /// call unprototyped functions using the variadic convention so |
| 171 /// that unprototyped calls to varargs functions still succeed. | 171 /// that unprototyped calls to varargs functions still succeed. |
| 172 virtual bool isNoProtoCallVariadic(const CodeGen::CallArgList &args, | 172 virtual bool isNoProtoCallVariadic(const CodeGen::CallArgList &args, |
| 173 const FunctionNoProtoType *fnType) const; | 173 const FunctionNoProtoType *fnType) const; |
| 174 |
| 175 // @LOCALMOD-START |
| 176 /// Determine whether the sequentially consistent fence generated for |
| 177 /// the legacy GCC-style ``__sync_synchronize()`` builtin should be |
| 178 /// surrounded by empty assembly directives which touch all of |
| 179 /// memory. This allows platforms which aim for portability to |
| 180 /// isolate themselves from changes in sequentially consistent |
| 181 /// fence's semantics, since its intent is to represent the |
| 182 /// C11/C++11 memory model which only orders atomic memory accesses. |
| 183 /// This won't guarantee that all accesses (e.g. those to |
| 184 /// non-escaping objects) will not be reordered. |
| 185 virtual bool addAsmMemoryAroundSyncSynchronize() const { |
| 186 return false; |
| 187 } |
| 188 |
| 189 /// Determine whether a full sequentially consistent fence should be |
| 190 /// emitted when ``asm("":::"memory")`` is encountered, treating it |
| 191 /// like ``__sync_synchronize()``. |
| 192 virtual bool asmMemoryIsFence() const { |
| 193 return false; |
| 194 } |
| 195 // @LOCALMOD-END |
| 174 }; | 196 }; |
| 175 } | 197 } |
| 176 | 198 |
| 177 #endif // CLANG_CODEGEN_TARGETINFO_H | 199 #endif // CLANG_CODEGEN_TARGETINFO_H |
| OLD | NEW |