File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,15 @@ class TargetCodeGenInfo {
101101 // / Returns true if inlining the function call would produce incorrect code
102102 // / for the current target and should be ignored (even with the always_inline
103103 // / or flatten attributes).
104+ // /
105+ // / Note: This probably should be handled in LLVM. However, the `alwaysinline`
106+ // / attribute currently means the inliner will ignore mismatched attributes
107+ // / (which sometimes can generate invalid code). So, this hook allows targets
108+ // / to avoid adding the `alwaysinline` attributes based on attributes or other
109+ // / target-specific reasons.
110+ // /
111+ // / See previous discussion here:
112+ // / https://discourse.llvm.org/t/rfc-avoid-inlining-alwaysinline-functions-when-they-cannot-be-inlined/79528
104113 virtual bool
105114 wouldInliningViolateFunctionCallABI (const FunctionDecl *Caller,
106115 const FunctionDecl *Callee) const {
You can’t perform that action at this time.
0 commit comments