[all-commits] [llvm/llvm-project] 448584: Revert "[clang][AST] Inline StmtVisitor fallback m...
Jinsong Ji via All-commits
all-commits at lists.llvm.org
Wed Jul 8 06:24:02 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 44858419d766322d9c51d85f4ac83501a5181597
https://github.com/llvm/llvm-project/commit/44858419d766322d9c51d85f4ac83501a5181597
Author: Jinsong Ji <jinsong.ji at intel.com>
Date: 2026-07-08 (Wed, 08 Jul 2026)
Changed paths:
M clang/include/clang/AST/StmtVisitor.h
M llvm/include/llvm/Support/Compiler.h
Log Message:
-----------
Revert "[clang][AST] Inline StmtVisitor fallback methods" for STMT macro in debug builds (#208106)
This partially reverts commit 8b50847a31f927d258cf22953035db206d42fc5d.
The LLVM_ATTRIBUTE_ALWAYS_INLINE on STMT macro fallback methods caused
stack overflow in debug builds when processing deeply nested
expressions.
The test many-logical-ops.c with 2000+ logical AND operators would crash
in SequenceChecker due to excessive stack consumption.
Introduce LLVM_ATTRIBUTE_ALWAYS_INLINE_UNLESS_DEBUG which expands to
LLVM_ATTRIBUTE_ALWAYS_INLINE in release builds (preserving the binary
size optimization) but to plain `inline` in debug builds (avoiding stack
overflow).
Apply this to the STMT macro while keeping LLVM_ATTRIBUTE_ALWAYS_INLINE
on BINOP_FALLBACK, CAO_FALLBACK, and UNARYOP_FALLBACK.
Fixes regressions in debug builds only:
Clang :: C/C99/n590.c
Clang :: Index/index-many-logical-ops.c
Clang :: Sema/deep_recursion.c
Clang :: Sema/many-logical-ops.c
Co-Authored-By: Claude Sonnet 4.5 <noreply at anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list