[all-commits] [llvm/llvm-project] 5f6fe6: [AVR] Fix incorrect calling convention for varargs...
pcc via All-commits
all-commits at lists.llvm.org
Tue May 24 10:54:41 PDT 2022
Branch: refs/heads/release/14.x
Home: https://github.com/llvm/llvm-project
Commit: 5f6fe6b93e85aa90b92681037f4dd42403368bb4
https://github.com/llvm/llvm-project/commit/5f6fe6b93e85aa90b92681037f4dd42403368bb4
Author: Ben Shi <ben.shi at streamcomputing.com>
Date: 2022-05-24 (Tue, 24 May 2022)
Changed paths:
M llvm/lib/Target/AVR/AVRCallingConv.td
M llvm/test/CodeGen/AVR/calling-conv/c/basic.ll
M llvm/test/CodeGen/AVR/calling-conv/c/basic_aggr.ll
M llvm/test/CodeGen/AVR/calling-conv/c/stack.ll
Log Message:
-----------
[AVR] Fix incorrect calling convention for varargs functions
An i8 argument should only cost 1 byte on the stack. This is
compatible with avr-gcc.
There are also more test cases (of calling convention) are added.
Reviewed By: aykevl, dylanmckay
Differential Revision: https://reviews.llvm.org/D121767
(cherry picked from commit 3fd9a320da8adbefa47071f70667d641f7dd26f2)
Commit: c81f3d00cbd4f1e6771512f837440d1676fb55ae
https://github.com/llvm/llvm-project/commit/c81f3d00cbd4f1e6771512f837440d1676fb55ae
Author: Ben Shi <ben.shi at streamcomputing.com>
Date: 2022-05-24 (Tue, 24 May 2022)
Changed paths:
M llvm/lib/Target/AVR/AVRInstrInfo.td
M llvm/test/CodeGen/AVR/call.ll
Log Message:
-----------
[AVR] Generate 'rcall' instead of 'call' on avr2 and avr25
The 'call' (long call) instruction is available on avr3 and above,
and devices in avr2 and avr25 should use the 'rcall' (short call)
instruction for function calls.
Reviewed By: aykevl, dylanmckay
Differential Revision: https://reviews.llvm.org/D121539
(cherry picked from commit 45638931fb7c7a1b9c850e47601541b398868538)
Commit: 53eaee6bf3b3dd49b3f0bc34385c29b03b4905da
https://github.com/llvm/llvm-project/commit/53eaee6bf3b3dd49b3f0bc34385c29b03b4905da
Author: Nathan Sidwell <nathan at acm.org>
Date: 2022-05-24 (Tue, 24 May 2022)
Changed paths:
M clang/lib/AST/ItaniumMangle.cpp
Log Message:
-----------
[clang][NFC] Standard substitution checking cleanup
In preparing for module mangling changes I noticed some issues with
the way we check for std::basic_string instantiations and friends.
*) there's a single routine for std::basic_{i,o,io}stream but it is
templatized on the length of the name. Really? just use a
StringRef, rather than clone the entire routine just for
'basic_iostream'.
*) We have a helper routine to check for char type, and call it from
several places. But given all the instantiations are of the form
TPL<char, Other<char> ...> we could just check the first arg is char
and the later templated args are instantiating that same type. A
simpler type comparison.
*) Because basic_string has a third allocator parameter, it is open
coded, which I found a little confusing. But otherwise it's exactly
the same pattern as the iostream ones. Just tell that checker about
whether there's an expected allocator argument.[*]
*) We may as well return in each block of mangleStandardSubstitution
once we determine it is not one of the entities of interest -- it
certainly cannot be one of the other kinds of entities.
FWIW this shaves about 500 bytes off the executable.
[*] I suppose we could also have this routine a tri-value, with one to
indicat 'it is this name, but it's not the one you're looking for', to
avoid later calls trying different names?
Reviewd By: ChuanqiXu
Differential Revision: https://reviews.llvm.org/D119333
Commit: 0009cdbd8a3ab27b1edefa0e9a6fdf41d66dbb5f
https://github.com/llvm/llvm-project/commit/0009cdbd8a3ab27b1edefa0e9a6fdf41d66dbb5f
Author: Nathan Sidwell <nathan at acm.org>
Date: 2022-05-24 (Tue, 24 May 2022)
Changed paths:
M clang/lib/AST/ItaniumMangle.cpp
Log Message:
-----------
[clang][NFC] Remove IgnoreLinkageSpecDecls
The Itanium mangler uses IgnoreLinkageSpecDecls to strip linkage spec
contexts. It doesn't do this consistently, but there is no need for
it to do it at all. getEffectiveDeclContext never returns a linkage
spec, as it either recurses, uses getRedeclContext (which itself
removes the specs), or gets the decl context of non-namespace entities.
This patch removes the function and all calls to it. For safety I add
a couple of asserts to make sure we never get them.
Reviewed By: ChuanqiXu
Differential Revision: https://reviews.llvm.org/D119748
Commit: 725d57c39039246b6fed1908f7e2eeb8d8afe17d
https://github.com/llvm/llvm-project/commit/725d57c39039246b6fed1908f7e2eeb8d8afe17d
Author: Peter Collingbourne <peter at pcc.me.uk>
Date: 2022-05-24 (Tue, 24 May 2022)
Changed paths:
M clang/lib/AST/ItaniumMangle.cpp
Log Message:
-----------
AST: Make getEffectiveDeclContext() a member function of ItaniumMangleContextImpl. NFCI.
In an upcoming change we are going to need to access mangler state
from the getEffectiveDeclContext() function. Therefore, make it a
member function of ItaniumMangleContextImpl. Any callers that are
not currently members of ItaniumMangleContextImpl or CXXNameMangler
are made members of one or the other depending on where they are
called from.
Differential Revision: https://reviews.llvm.org/D116773
Commit: fecfc8394484be0ff686e2c936eb494ce6a19645
https://github.com/llvm/llvm-project/commit/fecfc8394484be0ff686e2c936eb494ce6a19645
Author: Peter Collingbourne <peter at pcc.me.uk>
Date: 2022-05-24 (Tue, 24 May 2022)
Changed paths:
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/ItaniumMangle.cpp
M clang/test/CodeGen/aarch64-varargs.c
M clang/test/CodeGen/arm64-be-hfa-vararg.c
M clang/test/Headers/stdarg.cpp
Log Message:
-----------
AST: Move __va_list tag back to std conditionally on AArch64.
In post-commit feedback on D104830 Jessica Clarke pointed out that
unconditionally adding __va_list to the std namespace caused namespace
debug info to be emitted in C, which is not only inappropriate but
turned out to confuse the dtrace tool. Therefore, move __va_list back
to std only in C++ so that the correct debug info is generated. We
also considered moving __va_list to the top level unconditionally
but this would contradict the specification and be visible to AST
matchers and such, so make it conditional on the language mode.
To avoid breaking name mangling for __va_list, teach the Itanium
name mangler to always mangle it as if it were in the std namespace
when targeting ARM architectures. This logic is not needed for the
Microsoft name mangler because Microsoft platforms define va_list as
a typedef of char *.
Depends on D116773
Differential Revision: https://reviews.llvm.org/D116774
Compare: https://github.com/llvm/llvm-project/compare/42fe7ccbeb44...fecfc8394484
More information about the All-commits
mailing list