- May 15, 2020
-
-
Francois Ferrand authored
Summary: Even when BreakBeforeBinaryOperators is set, AlignOperands kept aligning the beginning of the line, even when it could align the actual operands (e.g. after an assignment). With this patch, the operands are actually aligned, and the operator gets aligned with the equal sign: int aaaaa = bbbbbb + cccccc; This not happen in tests, to avoid 'breaking' the indentation: if (aaaaa && bbbbb) return; Reviewers: krasimir, djasper, klimek, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: MyDeveloperDay, acoomans, cfe-commits, klimek Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D32478
-
Francois Ferrand authored
Summary: When multiple ternary operators are chained, e.g. like an if/else-if/ else-if/.../else sequence, clang-format will keep aligning the colon with the question mark, which increases the indent for each conditionals: int a = condition1 ? result1 : condition2 ? result2 : condition3 ? result3 : result4; This patch detects the situation (e.g. conditionals used in false branch of another conditional), to avoid indenting in that case: int a = condition1 ? result1 : condition2 ? result2 : condition3 ? result3 : result4; When BreakBeforeTernaryOperators is false, this will format like this: int a = condition1 ? result1 : condition2 ? result2 : conditino3 ? result3 : result4; This formatting style is referenced here: https://www.fluentcpp.com/2018/02/27/replace-else-if-ternary-operator/ and here: https://marcmutz.wordpress.com/2010/10/14/top-5-reasons-you-should-love-your-ternary-operator/ Reviewers: krasimir, djasper, klimek, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: hokein, dyung, MyDeveloperDay, acoomans, cfe-commits Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D50078
-
Alexandre Ganea authored
Before this patch, S_[L|G][THREAD32|DATA32] records were emitted with a simple name, not the fully qualified name (namespace + class scope). Differential Revision: https://reviews.llvm.org/D79447
-
James Henderson authored
-
James Henderson authored
Previously, the option was only implemented for LLVM output. This fixes https://bugs.llvm.org/show_bug.cgi?id=45695. At the current time, GNU readelf does not support this option. Consequently, this patch simply attempts to roughly follow the output style for similar options like --syms/--notes etc, combined with --string-dump output. Reviewed by: MaskRay, grimar Differential Revision: https://reviews.llvm.org/D79939
-
Dmitry Vyukov authored
Add -tsan-instrument-read-before-write which allows instrumenting reads of reads-before-writes. This is required for KCSAN [1], where under certain configurations plain writes behave differently (e.g. aligned writes up to word size may be treated as atomic). In order to avoid missing potential data races due to plain RMW operations ("x++" etc.), we will require instrumenting reads of reads-before-writes. [1] https://github.com/google/ktsan/wiki/KCSAN Author: melver (Marco Elver) Reviewed-in: https://reviews.llvm.org/D79983
-
David Sherwood authored
For now I have changed FoldConstantVectorArithmetic to return early if we encounter a scalable vector, since the subsequent code assumes you can perform lane-wise constant folds. However, in future work we should be able to extend this to look at splats of a constant value and fold those if possible. I have also added the same code to FoldConstantArithmetic, since that deals with vectors too. The warnings I fixed in this patch were being generated by this existing test: CodeGen/AArch64/sve-int-arith.ll Differential Revision: https://reviews.llvm.org/D79421
-
Ties Stuij authored
Summary: The BFloat IR type is introduced to provide support for, initially, the BFloat16 datatype introduced with the Armv8.6 architecture (optional from Armv8.2 onwards). It has an 8-bit exponent and a 7-bit mantissa and behaves like an IEEE 754 floating point IR type. This is part of a patch series upstreaming Armv8.6 features. Subsequent patches will upstream intrinsics support and C-lang support for BFloat. Reviewers: SjoerdMeijer, rjmccall, rsmith, liutianle, RKSimon, craig.topper, jfb, LukeGeeson, sdesmalen, deadalnix, ctetreau Subscribers: hiraditya, llvm-commits, danielkiss, arphaman, kristof.beyls, dexonsmith Tags: #llvm Differential Revision: https://reviews.llvm.org/D78190
-
Machiel van Hooren authored
llvm::Type has some difficult to decode member variables with different meanings depending on the TypeID. Specifically SubclassData and ContainedTys. This natvis visualisation decodes and visualises those members.
-
Jonathan Coe authored
Summary: Allow brace wrapping in C# property accessors to be controlled by configuration options. Add new tests and revert old test results for Microsoft style to their previous state (as intended). `FormatStyle.BraceWrapping.AfterFunction = true;` will change automatic property formatting from ``` Type MyType { get; set } ``` to ``` Type MyType { get; set } ``` Reviewers: krasimir, MyDeveloperDay Reviewed By: krasimir, MyDeveloperDay Subscribers: cfe-commits Tags: #clang-format, #clang Differential Revision: https://reviews.llvm.org/D79000
-
Sam Parker authored
Add throughput tests for saturating, overflowing and reduction operations.
-
Marek Kurdej authored
It was implemented by commit 6d2599e4 "[libcxx][span] Implement P1976R2".
-
Tres Popp authored
Summary: These represent shape based preconditions on execution of code. Differential Revision: https://reviews.llvm.org/D79717
-
Simon Pilgrim authored
Now that D79814 has landed, we can assume that subvector ops use constant, in-range indices.
-
Konstantin Schwarz authored
Summary: D78319 introduced basic support for inline asm input operands in GlobalISel. However, that patch did not handle the case where a memory input operand still needs to be indirectified. Later code asserts that the memory operand is already indirect. This patch adds an early return false to trigger the SelectionDAG fallback for now. Reviewers: arsenm, paquette Reviewed By: arsenm Subscribers: thakis, wdng, rovka, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79955
-
Artem Dergachev authored
The updated plistlib throws a different exception class.
-
Nathan James authored
-
Simon Pilgrim authored
Now that D79814 has landed, we can assume that subvector ops use constant, in-range indices.
-
Pavel Labath authored
Increase the function size to account for the changed threshold in 8b845ac5.
-
Georgii Rymar authored
Imagine we have a broken .eh_frame. Below is a possible sample output of llvm-readelf: ``` ... entry 2 { initial_location: 0x10f5 address: 0x2080 } } } .eh_frame section at offset 0x2028 address 0x2028: LLVM ERROR: Parsing entry instructions at 0 failed PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Program arguments: /home/umb/LLVM/LLVM/llvm-project/build/bin/llvm-readelf -a 1 #0 0x000055f4a2ff5a1a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/umb/LLVM/LLVM/llvm-project/build/bin/llvm-readelf+0x2b9a1a) ... #15 0x00007fdae5dc209b __libc_start_main /build/glibc-B9XfQf/glibc-2.28/csu/../csu/libc-start.c:342:3 #16 0x000055f4a2db746a _start (/home/umb/LLVM/LLVM/llvm-project/build/bin/llvm-readelf+0x7b46a) Aborted ``` I.e. it calls abort(), suggests to submit a bug report and exits with the code 134. This patch changes the logic to propagate errors to callers. This fixes the behavior for llvm-dwarfdump, llvm-readobj and other possible tools. Differential revision: https://reviews.llvm.org/D79165
-
Pavel Labath authored
This recommits f665e80c which was reverted in 1cbd1b8f for breaking TestFoundationDisassembly.py. The fix is to use --force in the test to avoid bailing out on large functions. I have also doubled the large function limit to 8000 bytes (~~ 2000 insns), as the foundation library contains a lot of large-ish functions. The intent of this feature is to prevent accidental disassembling of enormous (multi-megabyte) "functions", not to get in people's way. The original commit message follows: If we have a binary without symbol information (and without LC_FUNCTION_STARTS, if on a mac), then we have to resort to using heuristics to determine the function boundaries. However, these don't always work, and so we can easily end up thinking we have functions which are several megabytes in size. Attempting to (accidentally) disassemble these can take a very long time spam the terminal with thousands of lines of disassembly. This patch works around that problem by adding a sanity check to the disassemble command. If we are about to disassemble a function which is larger than a certain threshold, we will refuse to disassemble such a function unless the user explicitly specifies the number of instructions to disassemble, uses start/stop addresses for disassembly, or passes the (new) --force argument. The threshold is currently fairly aggressive (4000 bytes ~~ 1000 instructions). If needed, we can increase it, or even make it configurable. Differential Revision: https://reviews.llvm.org/D79789
-
Georgii Rymar authored
yaml2obj changed in rG7ccae2cece72. Previous version of the yaml produced a different error and a 500mb binary.
-
Sven van Haastregt authored
Update a comment to account for 2deea187 ("[globalisel][tablegen] Revise API for ComplexPattern operands to improve flexibility.", 2017-04-22).
-
Alex Zinenko authored
The following Conversions are affected: LoopToStandard -> SCFToStandard, LoopsToGPU -> SCFToGPU, VectorToLoops -> VectorToSCF. Full file paths are affected. Additionally, drop the 'Convert' prefix from filenames living under lib/Conversion where applicable. API names and CLI options for pass testing are also renamed when applicable. In particular, LoopsToGPU contains several passes that apply to different kinds of loops (`for` or `parallel`), for which the original names are preserved. Differential Revision: https://reviews.llvm.org/D79940
-
Georgii Rymar authored
We might have a scenario where a the `GbuHashTable` variable correctly points to a place inside the file (we validate this fact early in `parseDynamicTable`), but nbuckets/maskwords fields are broken in the way the code tries to read the data past the EOF. This patch fixes the issue. Differential revision: https://reviews.llvm.org/D79853
-
Georgii Rymar authored
Currently there is no good way to set a physical offset for a section: * We have the `ShOffset` that allows to override the `sh_offset`, but it does not affect the real data written. * We can use a `Filler` to create an artificial gap, but it is more like a hack rather than a proper solution for this problem. This patch adds the `Offset` property which allows setting physical offsets for sections. It also generalizes the code, so that we set sh_offset field in one place Differential revision: https://reviews.llvm.org/D78927
-
Alex Zinenko authored
This is supposed to resolve the build problem with shared libraries.
-
Djordje Todorovic authored
Debug entry values functionality provides debug information about call sites and function parameters values at the call entry spot. Condition for generating this type of information is compiling with -g option and optimization level higher than zero(-O0). In ISEL phase, while lowering call instructions, collect info about registers that forward arguments into following function frame. We store such info into MachineFunction of the caller function. This is used very late, when dumping DWARF info about call site parameters. The call site info is visible at MIR level, as callSites attribute of MachineFunction. Also, when using unmodified parameter value inside callee it could be described as DW_OP_entry_value expression. To deal with callSites attribute, we should pass -emit-call-site-info option to llc. This patch enables functionality in clang frontend and adds call site info generation support for MIPS targets (mips, mipsel, mips64, mips64el). Patch by Nikola Tesic Differential Revision: https://reviews.llvm.org/D78105
-
Raphael Isemann authored
Summary: When the ClangModulesDeclVendor currently fails it just prints very basic and often incomplete diagnostics without any source locations: ``` (lldb) p @import Foundation error: while importing modules: 'foo/bar.h' file not found could not build module 'Darwin' [...] ``` or even just ``` (lldb) p @import Foundation error: while importing modules: could not build module 'Darwin' [...] ``` These diagnostics help neither the user nor us with figuring out what is the reason for the failure. This patch wires up a full TextDiagnosticPrinter in the ClangModulesDeclVendor and makes sure we always return the error stream to the user when we fail to compile our modules. Fixes rdar://63216849 Reviewers: aprantl, jdoerfert Reviewed By: aprantl Subscribers: JDevlieghere Differential Revision: https://reviews.llvm.org/D79947
-
Akira Hatanaka authored
alignment information on VarDecls in more cases This commit improves upon https://reviews.llvm.org/D21099. The code that computes the source alignment now understands array subscript expressions, binary operators, derived-to-base casts, and several more expressions. rdar://problem/59242343 Differential Revision: https://reviews.llvm.org/D78767
-
Michael Schellenberger Costa authored
Reviewers: #libc!, miscco Reviewed By: miscco Subscribers: broadwaylamb, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D79986
-
David Sherwood authored
I have changed the ScalableVecArgument case in matchIntrinsicType to create a new FixedVectorType. This means that the next case we hit (Vector) will not assert when calling getNumElements(), since we know that it's always a FixedVectorType. This is a temporary measure for now, and it will be fixed properly in another patch that refactors this code. The changes are covered by this existing test: CodeGen/AArch64/sve-intrinsics-fp-converts.ll In addition, I have added a new test to ensure that we correctly reject SVE intrinsics when called with fixed length vector types. Differential Revision: https://reviews.llvm.org/D79416
-
Russell Gallop authored
Differential Revision: https://reviews.llvm.org/D79780
-
Li Rong Yi authored
Summary: This patch adds the intrinsic llvm.ppc.popcntb for the HW instruction POPCNTB Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D79703
-
Djordje Todorovic authored
Without the ':' the check command doesn't do anything. This typo was introduced along with the commit for the D77789.
-
Sourabh Singh Tomar authored
Added `target triple` to the test case, it was failing on aarch64 bot: http://lab.llvm.org:8011/builders/flang-aarch64-ubuntu/builds/97
-
Gongyu Deng authored
Summary: Command `breakpoint read` should not accept breakpoint ids as arguments, and in fact, it is not implemented to deal with breakpoint id arguments either. So this patch is to correct the argument list of this command so that the help text won't misguide users. Reviewers: teemperor, JDevlieghere, jingham Reviewed By: teemperor, JDevlieghere Tags: #lldb Differential Revision: https://reviews.llvm.org/D79722
-
Yvan Roux authored
Enables Machine Outlining for ARM and Thumb2 modes. This is the first patch of the series which adds all the basic logic for the support, and only handles tail-calls and thunks. The outliner can be turned on by using clang -moutline option or -mllvm -enable-machine-outliner one (like AArch64). Differential Revision: https://reviews.llvm.org/D76066
-
Sourabh Singh Tomar authored
Added '-' in `mtriple` in test case There was a bot failure due to this: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-debian/builds/6790
-