[TableGen] Add asserts for a few register related checks (#182680)
Move some register file related error checking from C++ code to asserts
in Target.td file. Rename and extend the lit test to exercise these
errors.
Update my ports' maintainer field after becoming a committer
Reviewed by: osa, vvd (mentors)
Approved by: osa (mentor)
Differential Revision: https://reviews.freebsd.org/D55456
[AMDGPU] Fix caller/callee mismatch in SGPR assignment for inreg args
On the callee side, `LowerFormalArguments` marks SGPR0-3 as allocated in
`CCState` before running the CC analysis. On the caller side, `LowerCall` (and
GlobalISel's `lowerCall`/`lowerTailCall`) added the scratch resource to
`RegsToPass` without marking it in `CCState`. This caused `CC_AMDGPU_Func` to
treat SGPR0-3 as available on the caller side, assigning user inreg args there,
while the callee skipped them without marking it in `CCState`. This caused
`CC_AMDGPU_Func` to treat SGPR0-3 as available on the caller side, assigning
user inreg args there, while the callee skipped them.
[AMDGPUCtorDtorLowering] Remove unnecessary pointer arithmetic (#182869)
This code was computing `begin + ((end - begin) exact/ 8) * 8`, which is
a very complicated way to spell end.
This is the AMDGPU edition of
https://github.com/llvm/llvm-project/pull/182269.
Add records about new ports committer (nxjoseph)
Update Mentor and Mentee Information to follow step
5 of the Committers Guide.
Reviewed by: osa, vvd (mentors)
Approved by: osa (mentor)
Differential Revision: https://reviews.freebsd.org/D55457
[AMDGPU] Fix caller/callee mismatch in SGPR assignment for inreg args
On the callee side, `LowerFormalArguments` marks SGPR0-3 as allocated in
`CCState` before running the CC analysis. On the caller side, `LowerCall` (and
GlobalISel's `lowerCall`/`lowerTailCall`) added the scratch resource to
`RegsToPass` without marking it in `CCState`. This caused `CC_AMDGPU_Func` to
treat SGPR0-3 as available on the caller side, assigning user inreg args there,
while the callee skipped them without marking it in `CCState`. This caused
`CC_AMDGPU_Func` to treat SGPR0-3 as available on the caller side, assigning
user inreg args there, while the callee skipped them.
[clang-tidy] Fix bugprone-casting-through-void to run only on C++ code (#182844)
This check tells users to use `reinterpret_cast`, which is not possible
in pure C code.
[NFC][AMDGPU] Add test showing caller/callee SGPR mismatch for inreg args (#182753)
Add a test demonstrating a bug where the caller and callee disagree on
which SGPRs hold user inreg arguments when there are enough to reach the
SGPR0-3 range.
On the callee side, `LowerFormalArguments` marks SGPR0-3 as allocated in
`CCState` before the CC analysis runs. On the caller side, `LowerCall`
adds the scratch resource to `RegsToPass` without marking SGPR0-3 in
`CCState`. This causes `CC_AMDGPU_Func` to assign user inreg args to
SGPR0-3 on the caller side (they appear free) while the callee skips
them.
In the test, the caller writes arg 0 (value 42) to s0, but the callee
reads arg 0 from s16.
[libclang]: visit C++17 switch init statements (#173670)
Modelled after commit 08e18126431878373abfa33136768d0ec7c13def, which
did the same for If statements.
Tested with KDevelop : with a patched clang, initializers in switch
statement get cursors.