llvm-project/clang/lib/Analysis
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
..
plugins Don't install example analyzer plugins 2019-09-28 13:28:50 +00:00
AnalysisDeclContext.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
BodyFarm.cpp [analyzer] Fix more ObjC accessor body farms after 2073dd2d. 2019-12-04 16:29:08 -08:00
CFG.cpp Fix SFINAE in CFG.cpp. 2020-02-11 10:37:08 -08:00
CFGReachabilityAnalysis.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CFGStmtMap.cpp [CFG] NFC: Remove implicit conversion from CFGTerminator to Stmt *. 2019-05-24 01:34:22 +00:00
CMakeLists.txt [analyzer] NFC: Move PathDiagnostic classes to libAnalysis. 2019-09-11 20:54:27 +00:00
CallGraph.cpp [clang][Analysis] CallGraph: store the actual call `Expr*` in the CallGraphNode::CallRecord 2020-02-13 23:37:53 +03:00
CloneDetection.cpp Remove Expr.h include from ASTContext.h, NFC 2019-12-06 15:30:49 -08:00
CocoaConventions.cpp [analyzer] Fix more analyzer warnings on analyzer and libAnalysis. 2019-08-28 21:19:58 +00:00
CodeInjector.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConstructionContext.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Consumed.cpp [NFC] Refactor representation of materialized temporaries 2019-11-19 18:20:45 +01:00
Dominators.cpp Make a buildbot using a buggy gcc happy 2019-07-03 12:06:10 +00:00
ExprMutationAnalyzer.cpp [ASTMatchers] Add cxxNoexceptExpr AST matcher 2020-01-28 13:12:28 +00:00
LiveVariables.cpp [DataFlow] Factor two worklist implementations out 2020-01-17 08:11:15 -08:00
ObjCNoReturn.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PathDiagnostic.cpp [analyzer] PR43102: Fix an assertion and an out-of-bounds error for diagnostic location construction 2019-09-18 22:24:26 +00:00
PostOrderCFGView.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProgramPoint.cpp [analyzer] Display cast kinds in program point dumps. 2019-10-17 23:10:05 +00:00
ReachableCode.cpp Avoid including Builtins.h in Preprocessor.h 2019-11-15 16:45:16 -08:00
RetainSummaryManager.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
ThreadSafety.cpp Use std::foo_t rather than std::foo in clang. 2020-02-11 10:37:08 -08:00
ThreadSafetyCommon.cpp [NFC] Refactor representation of materialized temporaries 2019-11-19 18:20:45 +01:00
ThreadSafetyLogical.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ThreadSafetyTIL.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UninitializedValues.cpp Support output constraints on "asm goto" 2020-02-24 18:51:29 -08:00