[all-commits] [llvm/llvm-project] 5bc438: [AtomicExpand] Avoid creating an unnamed libcall
Alexander Richardson via All-commits
all-commits at lists.llvm.org
Mon Nov 2 09:54:02 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 5bc438efcf96c9ef83312c37674b03e98259a22b
https://github.com/llvm/llvm-project/commit/5bc438efcf96c9ef83312c37674b03e98259a22b
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date: 2020-11-02 (Mon, 02 Nov 2020)
Changed paths:
M llvm/lib/CodeGen/AtomicExpandPass.cpp
M llvm/test/Transforms/AtomicExpand/AMDGPU/unaligned-atomic.ll
Log Message:
-----------
[AtomicExpand] Avoid creating an unnamed libcall
I recently modified this pass to better support CHERI-RISC-V and while
doing so I noticed that this pass was calling M->getOrInsertFunction()
with the result of TLI->getLibcallName(RTLibType). However, AMDGPU fills
the libcalls array with nullptr, so this creates an anonymous function
instead. This patch changes expandAtomicOpToLibcall to return false in
case the libcall does not exist and changes the assert() in the callees to
a report_fatal_error() instead.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D88800
Commit: 906b9dbc9d7487ee923b6a516c36777a2be0ca35
https://github.com/llvm/llvm-project/commit/906b9dbc9d7487ee923b6a516c36777a2be0ca35
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date: 2020-11-02 (Mon, 02 Nov 2020)
Changed paths:
M clang/lib/Format/TokenAnnotator.cpp
M clang/unittests/Format/FormatTest.cpp
Log Message:
-----------
[clang-format] Improve BAS_DontAlign+AllowAllArgumentsOnNextLine=false
TokenAnnotator::splitPenalty() was always returning 0 for opening parens if
AlignAfterOpenBracket was set to BAS_DontAlign, so the preferred point for
line breaking was always after the open paren (and was ignoring
PenaltyBreakBeforeFirstCallParameter). This change restricts the zero
penalty to the AllowAllArgumentsOnNextLine case. This results in improved
formatting for FreeBSD where we set AllowAllArgumentsOnNextLine: false
and a high value for PenaltyBreakBeforeFirstCallParameter to avoid breaking
after the open paren.
Before:
```
functionCall(
paramA, paramB, paramC);
void functionDecl(
int A, int B, int C)
```
After:
```
functionCall(paramA, paramB,
paramC);
void functionDecl(int A, int B,
int C)
```
Reviewed By: MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D90246
Compare: https://github.com/llvm/llvm-project/compare/2e2be3d964fb...906b9dbc9d74
More information about the All-commits
mailing list