llvm-project/clang/test
Bill Wendling 50cac24877 Support output constraints on "asm goto"
Summary:
Clang's "asm goto" feature didn't initially support outputs constraints. That
was the same behavior as gcc's implementation. The decision by gcc not to
support outputs was based on a restriction in their IR regarding terminators.
LLVM doesn't restrict terminators from returning values (e.g. 'invoke'), so
it made sense to support this feature.

Output values are valid only on the 'fallthrough' path. If an output value's used
on an indirect branch, then it's 'poisoned'.

In theory, outputs *could* be valid on the 'indirect' paths, but it's very
difficult to guarantee that the original semantics would be retained. E.g.
because indirect labels could be used as data, we wouldn't be able to split
critical edges in situations where two 'callbr' instructions have the same
indirect label, because the indirect branch's destination would no longer be
the same.

Reviewers: jyknight, nickdesaulniers, hfinkel

Reviewed By: jyknight, nickdesaulniers

Subscribers: MaskRay, rsmith, hiraditya, llvm-commits, cfe-commits, craig.topper, rnk

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D69876
2020-02-24 18:51:29 -08:00
..
ARCMT
AST [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
ASTMerge
Analysis Support output constraints on "asm goto" 2020-02-24 18:51:29 -08:00
CXX Fix TryParsePtrOperatorSeq. 2020-02-24 08:08:47 -05:00
ClangScanDeps [clang][clang-scan-deps] Aggregate the full dependency information. 2020-01-23 16:58:50 -08:00
CodeCompletion Another fix for 7d91633a2b 2020-02-19 17:15:11 -05:00
CodeGen Support output constraints on "asm goto" 2020-02-24 18:51:29 -08:00
CodeGenCUDA [OpenCL][CUDA][HIP][SYCL] Add norecurse 2020-02-16 20:41:00 -05:00
CodeGenCXX Revert "Reland "[DebugInfo] Enable the debug entry values feature by default"" 2020-02-20 14:41:39 +01:00
CodeGenCoroutines [Coroutines][6/6] Clang schedules new passes 2020-02-19 01:03:28 -05:00
CodeGenHIP Don't dump IR output from this test to stdout. 2020-01-16 19:19:45 -08:00
CodeGenObjC [ubsan] Omit return value check when return block is unreachable 2020-02-06 10:24:03 -08:00
CodeGenObjCXX [ubsan] Null-check and adjust TypeLoc before using it 2020-02-10 14:10:06 -08:00
CodeGenOpenCL [OpenCL][CUDA][HIP][SYCL] Add norecurse 2020-02-16 20:41:00 -05:00
CodeGenOpenCLCXX [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387) 2019-12-17 11:10:06 +00:00
Coverage
CoverageMapping
Driver [SystemZ] Support the kernel back chain. 2020-02-23 13:42:36 -08:00
FixIt [objc_direct] Small updates to help with adoption. 2020-02-16 16:32:41 -08:00
Format
Frontend [clang][test][NFC] Use more widely supported sanitizer for file dependency tests 2020-01-14 12:55:11 -08:00
Headers Revert "PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer." 2020-01-20 16:34:09 -08:00
Import Tighten up CHECK lines added in a9f10ebffa to work on ARM. 2019-12-05 18:35:08 -08:00
Index [clang][Index] Fix the incomplete instantiations in libindex. 2020-02-20 14:42:30 +01:00
Integration
InterfaceStubs [clang][IFS][test] Temporary work around for in-process cc1 ASAN issues. 2020-01-21 22:56:20 -05:00
Layout
Lexer Add -std=c++20 flag, replace C++2a with C++20 throughout the Clang 2020-02-18 16:16:37 -08:00
Misc Use getLocation() in "too few/too many arguments" diagnostic 2020-02-18 11:23:17 -05:00
Modules Fix a reentrance bug with deserializing ObjC type parameters. 2020-02-12 18:44:19 -05:00
OpenMP [OpenMP] Refactor the analysis in checkMapClauseBaseExpression using StmtVisitor class. 2020-02-24 10:30:41 -05:00
PCH Revert "[CodeGenModule] Assume dso_local for -fpic -fno-semantic-interposition" 2020-02-03 10:09:39 -08:00
Parser Support output constraints on "asm goto" 2020-02-24 18:51:29 -08:00
Preprocessor [Preprocessor][X86] Fix __code_model_*__ predefine macros 2020-02-21 23:30:07 -08:00
Profile
Refactor
Rewriter
Sema Support output constraints on "asm goto" 2020-02-24 18:51:29 -08:00
SemaCUDA Revert "[CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese" 2020-02-18 14:45:34 -05:00
SemaCXX [Sema] Fix pointer-to-int-cast diagnostic for _Bool 2020-02-22 19:39:49 +01:00
SemaObjC [objc_direct] Small updates to help with adoption. 2020-02-16 16:32:41 -08:00
SemaObjCXX Clean up and slightly generalize implementation of composite pointer 2020-01-10 16:12:00 -08:00
SemaOpenCL [OpenCL] Only declare _sat conversions for integer types 2020-02-19 13:52:58 +00:00
SemaOpenCLCXX [OpenCL] Restrict addr space conversions in nested pointers 2020-02-07 12:04:35 +00:00
SemaSYCL
SemaTemplate PR44890: Inherit explicitly-specified template arguments into base class 2020-02-15 02:16:21 -08:00
TableGen
Templight
Tooling
Unit
VFS [VFS] More consistent support for Windows 2020-02-05 11:38:20 -08:00
clang-rename [clang-rename] Fix the failure rename test. 2020-02-11 10:07:00 +01:00
utils/update_cc_test_checks Move update_cc_test_checks.py tests to clang 2020-02-14 14:39:55 +00:00
.clang-format
CMakeLists.txt [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation 2020-01-13 10:40:18 -05:00
TestRunner.sh
cxx-sections.data
lit.cfg.py
lit.site.cfg.py.in build: reduce CMake handling for zlib 2020-01-02 11:19:12 -08:00
make_test_dirs.pl