aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/ModuleDependencyCollector.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2025-04-08 15:25:28 +0200
committerGitHub <noreply@github.com>2025-04-08 15:25:28 +0200
commit35b3886382f0172aa76bfbfc8e731e46c9c11cc3 (patch)
tree21d1c2c593a87c47aae236b34ff5bf35e7972490 /clang/lib/Frontend/ModuleDependencyCollector.cpp
parentfdf20941a8f95b26578fbeb579019f74efe45545 (diff)
downloadllvm-35b3886382f0172aa76bfbfc8e731e46c9c11cc3.zip
llvm-35b3886382f0172aa76bfbfc8e731e46c9c11cc3.tar.gz
llvm-35b3886382f0172aa76bfbfc8e731e46c9c11cc3.tar.bz2
[win/arm64] Enable tail call with inreg arguments when possible (#134671)
Tail calls were disabled from callers with inreg parameters in 5dc8aeb with a fixme to check if the callee also takes an inreg parameter. The issue is that inreg parameters (which are passed in x0 or x1 for free and member functions respectively) are supposed to be returned (in x0) at the end of the function. In case of a tail call, that means the callee needs to return the same value as the caller would. We can check for that case, and it's not as niche as it sounds, as that's how Clang will lower one function with an sret return value calling another, such as: ``` struct T { int x; }; struct S { T foo(); T bar(); }; T S::foo() { return bar(); } // foo's sret argument will get passed directly to bar ``` Fixes #133098
Diffstat (limited to 'clang/lib/Frontend/ModuleDependencyCollector.cpp')
0 files changed, 0 insertions, 0 deletions