================
@@ -1829,6 +1829,11 @@ class DeclContext {
     // refers to an enclosing template for hte purposes of [temp.friend]p9.
     LLVM_PREFERRED_TYPE(bool)
     uint64_t FriendConstraintRefersToEnclosingTemplate : 1;
+
+    // Indicates this function contains a non-(arm)-streaming safe expression.
+    // This can be directly, or transitively via always_inline calls.
+    LLVM_PREFERRED_TYPE(bool)
+    uint64_t BodyContainsNonStreamingSafeExpression : 1;
----------------
MacDue wrote:

I've reworked this to add a DenseSet 
(`AArch64ContansExprNotSafeForStreamingFunctions`) to ASTContext. I think this 
should be acceptable as it only adds the cost of a single set to the context 
(rather than an extra `bool` to all decls). It seems like this is also what 
other targets do as there's already `FunctionDecl` sets like 
`CUDAImplicitHostDeviceFunUsedByDevice`. 

I can't simple add a field to `SemaARM` since the logic is split between 
`SemaARM` and `AArch64TargetCodeGenInfo`, and AFAIK, the only way to pass state 
between those is via the AST/ASTContext. 


https://github.com/llvm/llvm-project/pull/174608
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to