llvm-project/clang/lib/Sema
cynecx 8ec9fd4839 Support unwinding from inline assembly
I've taken the following steps to add unwinding support from inline assembly:

1) Add a new `unwind` "attribute" (like `sideeffect`) to the asm syntax:

```
invoke void asm sideeffect unwind "call thrower", "~{dirflag},~{fpsr},~{flags}"()
    to label %exit unwind label %uexit
```

2.) Add Bitcode writing/reading support + LLVM-IR parsing.

3.) Emit EHLabels around inline assembly lowering (SelectionDAGBuilder + GlobalISel) when `InlineAsm::canThrow` is enabled.

4.) Tweak InstCombineCalls/InlineFunction pass to not mark inline assembly "calls" as nounwind.

5.) Add clang support by introducing a new clobber: "unwind", which lower to the `canThrow` being enabled.

6.) Don't allow unwinding callbr.

Reviewed By: Amanieu

Differential Revision: https://reviews.llvm.org/D95745
2021-05-13 19:13:03 +01:00
..
AnalysisBasedWarnings.cpp [-Wcalled-once] Do not run analysis on Obj-C++ 2021-04-22 15:20:52 +03:00
CMakeLists.txt [clang] Make libBasic not depend on MC 2021-04-28 12:16:22 -04:00
CodeCompleteConsumer.cpp [Sema] Use isa<> instead of dyn_cast<> as pointer is never dereferenced. NFCI. 2020-11-15 12:58:36 +00:00
CoroutineStmtBuilder.h
DeclSpec.cpp [OpenCL] Refactor diagnostic for OpenCL extension/feature 2021-03-12 11:43:53 +03:00
DelayedDiagnostic.cpp
IdentifierResolver.cpp
JumpDiagnostics.cpp Implemented [[clang::musttail]] attribute for guaranteed tail calls. 2021-04-15 17:12:21 -07:00
MultiplexExternalSemaSource.cpp Make iteration over the DeclContext::lookup_result safe. 2021-03-17 08:59:04 +00:00
OpenCLBuiltins.td [OpenCL] Add inc/dec/cmpxchg C++ legacy atomics with generic 2021-04-26 09:46:11 +01:00
ParsedAttr.cpp Correct the tablegen for checking mutually exclusive stmt attrs 2021-04-13 15:20:30 -04:00
Scope.cpp
ScopeInfo.cpp [clang] Enable support for #pragma STDC FENV_ACCESS 2020-10-25 06:46:25 -07:00
Sema.cpp Suppress Deferred Diagnostics in discarded statements. 2021-05-12 12:48:47 -07:00
SemaAccess.cpp [clang] Fix an assertion crash in delayed access check. 2020-11-13 14:02:57 +01:00
SemaAttr.cpp [clang] Make libBasic not depend on MC 2021-04-28 12:16:22 -04:00
SemaAvailability.cpp Prune TargetInfo.h include from ParsedAttr.h, NFC 2020-03-11 20:47:11 -07:00
SemaCUDA.cpp [CUDA][HIP] Fix checking dependent initalizer 2021-02-04 18:04:54 -05:00
SemaCXXScopeSpec.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
SemaCast.cpp [Matrix] Implement C-style explicit type conversions in CXX for matrix types 2021-05-04 15:27:57 +01:00
SemaChecking.cpp [RISCV] Validate the SEW and LMUL operands to __builtin_rvv_vsetvli(max) 2021-05-10 12:11:13 -07:00
SemaCodeComplete.cpp Introduce -Wreserved-identifier 2021-05-04 11:19:01 +02:00
SemaConcept.cpp [clang] Use decltype((E)) for compound requirement type constraint 2021-03-30 22:00:33 +02:00
SemaConsumer.cpp
SemaCoroutine.cpp [C++20] [P1825] More implicit moves 2021-02-16 17:24:20 -05:00
SemaDecl.cpp [OpenMP] Overhaul `declare target` handling 2021-05-06 02:10:41 -05:00
SemaDeclAttr.cpp [AIX][TLS] Diagnose use of unimplemented TLS models 2021-05-11 17:21:08 -05:00
SemaDeclCXX.cpp Add type information to integral template argument if required. 2021-05-12 19:00:08 +00:00
SemaDeclObjC.cpp [ObjC] Add a command line flag that disables recognition of objc_direct for testability 2021-04-06 11:17:01 -04:00
SemaExceptionSpec.cpp Update libstdc++ hack comment 2021-04-29 03:57:10 -07:00
SemaExpr.cpp [clang] Minor fix for MarkVarDeclODRUsed 2021-05-12 22:32:10 -04:00
SemaExprCXX.cpp Handle unexpanded packs appearing in type-constraints. 2021-05-12 18:45:34 -07:00
SemaExprMember.cpp [OpenCL] Accept .rgba in OpenCL 3.0 2021-04-12 09:30:06 +01:00
SemaExprObjC.cpp [Sema] Don't set BlockDecl's DoesNotEscape bit if the parameter type of 2021-04-29 16:19:48 -07:00
SemaFixItUtils.cpp
SemaInit.cpp Remove warning "suggest braces" for aggregate initialization of an empty class with an aggregate base class. 2021-04-13 15:45:09 -04:00
SemaLambda.cpp Recommit of a2fdf9d4d7. 2021-02-05 11:27:30 -05:00
SemaLookup.cpp [OpenCL] Do not add builtins with unavailable types 2021-04-21 11:59:29 +01:00
SemaModule.cpp Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC 2020-11-02 15:11:51 -05:00
SemaObjCProperty.cpp Make iteration over the DeclContext::lookup_result safe. 2021-03-17 08:59:04 +00:00
SemaOpenMP.cpp [OpenMP] Use compound operators for reduction combiner if available. 2021-05-11 11:39:12 -07:00
SemaOverload.cpp CWG2076: Permit implicit conversions within a single level of braces 2021-04-22 16:49:39 -07:00
SemaPseudoObject.cpp Revert "[NFC, Refactor] Modernize StorageClass from Specifiers.h to a scoped enum (II)" 2021-01-04 23:17:45 +01:00
SemaSYCL.cpp Recommit "[CUDA][HIP] Defer overloading resolution diagnostics for host device functions" 2020-10-19 17:48:04 -04:00
SemaStmt.cpp Introduce -Wreserved-identifier 2021-05-04 11:19:01 +02:00
SemaStmtAsm.cpp Support unwinding from inline assembly 2021-05-13 19:13:03 +01:00
SemaStmtAttr.cpp Implemented [[clang::musttail]] attribute for guaranteed tail calls. 2021-04-15 17:12:21 -07:00
SemaTemplate.cpp Handle unexpanded packs appearing in type-constraints. 2021-05-12 18:45:34 -07:00
SemaTemplateDeduction.cpp Add type information to integral template argument if required. 2021-05-12 19:00:08 +00:00
SemaTemplateInstantiate.cpp Clean up handling of constrained parameters in lambdas. 2021-05-12 18:45:33 -07:00
SemaTemplateInstantiateDecl.cpp Clean up handling of constrained parameters in lambdas. 2021-05-12 18:45:33 -07:00
SemaTemplateVariadic.cpp Revert "Following up on PR48517, fix handling of template arguments that refer" 2021-01-20 15:55:35 +01:00
SemaType.cpp Handle unexpanded packs appearing in type-constraints. 2021-05-12 18:45:34 -07:00
TreeTransform.h Clean up handling of constrained parameters in lambdas. 2021-05-12 18:45:33 -07:00
TypeLocBuilder.cpp [NFC] avoid AlignedCharArray in clang 2019-07-29 23:12:48 +00:00
TypeLocBuilder.h [NFC] avoid AlignedCharArray in clang 2019-07-29 23:12:48 +00:00
UsedDeclVisitor.h DeferredDiagnosticsEmitter crashes 2020-10-08 11:42:21 -04:00