- Mar 08, 2023
-
-
Chia-hung Duan authored
With memory group, we always mark the free blocks from the same region. Therefore, we don't need to calculate the offset from base and determine the region index. Also improve the way we deal with the last block in the region so that the loop body is simpler. Reviewed By: cferris Differential Revision: https://reviews.llvm.org/D143303
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D145518
-
David Green authored
There is a fold to create LD1DUPpost from dup(load) that can be postinc. If the dup is used by a "by element" operation such as fmul or fma then it can be slightly better to fold the dup into the fmul instead, which produces slightly fast code. ld1r { v1.4s }, [x0], #4 fmul v0.4s, v1.4s, v0.4s vs ldr s1, [x0], #4 fmul v0.4s, v0.4s, v1.s[0] This could also be done with integer operations such as smull/umull too, so long as the load/dup gets correctly combined into the mul operation. Currently this just operates on foating point types. Differential Revision: https://reviews.llvm.org/D145184 -
Kazu Hirata authored
This patch freezes potentially poisonous conditions in conditional branches so that we do not "move up" conditional branches "br i1 poison". Differential Revision: https://reviews.llvm.org/D145008
-
Aaron Ballman authored
The proposal is about the behavior of the _Float16, _Float32, and _Float64 types and whether they undergo default argument promotions (they don't). Clang doesn't yet support TS 18661 or the parts that made it into C2x, so we don't implement this paper.
-
Dave Lee authored
Redefine the `p` alias to the `dwim-print` command instead of `expression`. See https://reviews.llvm.org/D138315 for the introduction of `dwim-print`. To summarize, `dwim-print` is, as the name suggests, a command for printing. How a value gets printed, is decided by `dwim-print`. In some cases, `dwim-print` will print values using the same means as `frame variable` (because it's generally more reliable and faster that `expression` evaluation), and in other cases `dwim-print` uses the same code path as `expression`. This change has been tested in two different ways: 1. Re-aliasing `p` to `dwim-print`, as in this patch 2. Redefinining the `expression` command to `CommandObjectDWIMPrint` Previously, many of the lldb's tests used `p`, and which meant a test run with `p` aliases to `dwim-print` was a good way to test `dwim-print`. However most of those tests were updated to use `expression` explicitly (in anticipation of this change). Now, the best way to test `dwim-print` is the second approach: ``` diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 373c894f34f5..9c943cd30c7c 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -539,7 +539,7 @@ void CommandInterpreter::LoadCommandDictionary() { REGISTER_COMMAND_OBJECT("diagnostics", CommandObjectDiagnostics); REGISTER_COMMAND_OBJECT("disassemble", CommandObjectDisassemble); REGISTER_COMMAND_OBJECT("dwim-print", CommandObjectDWIMPrint); - REGISTER_COMMAND_OBJECT("expression", CommandObjectExpression); + REGISTER_COMMAND_OBJECT("expression", CommandObjectDWIMPrint); REGISTER_COMMAND_OBJECT("frame", CommandObjectMultiwordFrame); REGISTER_COMMAND_OBJECT("gui", CommandObjectGUI); REGISTER_COMMAND_OBJECT("help", CommandObjectHelp); ``` When the test suite is run with this change, there are two main categories of test failures for specific to features that `dwim-print` intentionally doesn't support: 1. Top level expressions (`--top-level`/`-p`) 2. Multiline expressions In cases where the behavior of `expression` is needed, users can use `expression` at those times. Differential Revision: https://reviews.llvm.org/D145189
-
Alexey Bataev authored
Previously only the very first gather/buildvector node might be probed for reshuffling of other nodes. But the compiler may do the same for other gather/buildvector nodes too, just need to check the dependency and postpone the emission of the dependent nodes, if the origin nodes were not emitted yet. Part of D110978 Differential Revision: https://reviews.llvm.org/D144958
-
Snehasish Kumar authored
Update the isRuntime check to only match against known memprof filenames where interceptors are defined. This avoid issues where the path does not include the directory based on how the runtime was compiled. Also update the unittest. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D145521
-
Mark de Wever authored
Since the CI is broken, I didn't investigate why it happened. It just fixes it.
-
Mitch Phillips authored
Getting compile units for data addresses is much slower, as it often requires a slow fallback path to walk every DWARF entry, as data addresses don't fall into the compilation unit ranges. Most lookups are code addresses, and don't need this logic. Split the functionality out so that we restore the fast-path behaviour for the code lookups. More context at: https://discourse.llvm.org/t/llvm-symbolizer-has-gotten-extremely-slow/67262 Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D145009
-
James Y Knight authored
After the work in a538d1f1 5351878b 372240df, and subsequently cleanup of all the in-tree targets, we can now delete the support for positional operand matching! This removes three options which could previously be set in a Target's "InstrInfo" tablegen definition: - useDeprecatedPositionallyEncodedOperands - decodePositionallyEncodedOperands - noNamedPositionallyEncodedOperands (Also announced at https://discourse.llvm.org/t/tablegen-deleting-deprecated-positional-instruction-operand-matching-support/68524) Differential Revision: https://reviews.llvm.org/D144210
-
Rahul Kayaith authored
This updates most (all?) error-diagnostic-emitting python APIs to capture error diagnostics and include them in the raised exception's message: ``` >>> Operation.parse('"arith.addi"() : () -> ()')) Traceback (most recent call last): File "<stdin>", line 1, in <module> mlir._mlir_libs.MLIRError: Unable to parse operation assembly: error: "-":1:1: 'arith.addi' op requires one result note: "-":1:1: see current operation: "arith.addi"() : () -> () ``` The diagnostic information is available on the exception for users who may want to customize the error message: ``` >>> try: ... Operation.parse('"arith.addi"() : () -> ()') ... except MLIRError as e: ... print(e.message) ... print(e.error_diagnostics) ... print(e.error_diagnostics[0].message) ... Unable to parse operation assembly [<mlir._mlir_libs._mlir.ir.DiagnosticInfo object at 0x7fed32bd6b70>] 'arith.addi' op requires one result ``` Error diagnostics captured in exceptions aren't propagated to diagnostic handlers, to avoid double-reporting of errors. The context-level `emit_error_diagnostics` option can be used to revert to the old behaviour, causing error diagnostics to be reported to handlers instead of as part of exceptions. API changes: - `Operation.verify` now raises an exception on verification failure, instead of returning `false` - The exception raised by the following methods has been changed to `MLIRError`: - `PassManager.run` - `{Module,Operation,Type,Attribute}.parse` - `{RankedTensorType,UnrankedTensorType}.get` - `{MemRefType,UnrankedMemRefType}.get` - `VectorType.get` - `FloatAttr.get` closes #60595 depends on D144804, D143830 Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D143869 -
Michael Buch authored
Reland "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers" With this patch member-function pointers are formatted using `CXXFunctionPointerSummaryProvider`. This turns, ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 ``` into ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 (a.out`Foo::member_func() at main.cpp:3) ``` Differential Revision: https://reviews.llvm.org/D145242
-
Michael Buch authored
Before this patch, LLDB used to format pointers to members, such as, ``` void (Foo::*pointer_to_member_func)() = &Foo::member_func; ``` as `eFormatBytes`. E.g., ``` (lldb) v pointer_to_member_func (void (Foo::*)()) $1 = 94 3f 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ``` This patch makes sure we format pointers to member functions the same way we do regular function pointers. After this patch we format member pointers as: ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 ``` Differential Revision: https://reviews.llvm.org/D145241
-
Alex Langford authored
Currently empty arguments are not respected. They are silently dropped in two places: (1) when extracting them from the target.run-args setting and (2) when constructing the lldb-argdumper invocation. (1) is actually a regression from a few years ago. We did not always drop empty arguments. See 31d97a5c. rdar://106279228 Differential Revision: https://reviews.llvm.org/D145450
-
Dave Lee authored
Change lldb-vscode to use the `expression` command for generating completions, instead of the `p` alias. Aliases are user overrideable, and even deletable, but the `expression` command is unchangeable. See D141539 where a similar replacement was done to tests. Differential Revision: https://reviews.llvm.org/D145437
-
Andrew Gozillon authored
[Flang][OpenMP][MLIR][Driver][bbc] Add -fopenmp-is-device flag to Flang -fc1 & the bbc tool, and omp.is_device attribute Adds the -fopenmp-is-device flag to bbc and Flang's -fc1 (but not flang-new) and in addition adds an omp.is_device attribute onto the module when fopenmp is passed, this is a boolean attribute that is set to false or true dependent on if fopenmp-is-device is specified alongside the fopenmp flag on the commandline when invoking flang or bbc. Reviewers: awarzynski kiranchandramohan Differential Revision: https://reviews.llvm.org/D144864
-
Piotr Zegar authored
-
Fangrui Song authored
GNU ld's internal linker scripts for RISC-V place .sdata and .sbss close. This makes GP relaxation more profitable. While here, when .sbss is present, set `__bss_start` to the start of .sbss instead of .bss, to match GNU ld. Note: GNU ld's internal linker scripts have symbol assignments and input section descriptions which are not relevant for modern systems. We only add things that make sense. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D145118
-
Mark de Wever authored
LWG3358 §[span.cons] is mistaken that to_address can throw Since last - first has to throw tests are added to make sure this always happens. Depends on D142808 Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D142843
-
Mark de Wever authored
LWG3839 range_formatter's set_separator, set_brackets, and underlying functions should be noexcept Adds tests for: template<ranges::input_range R, class charT> struct range-default-formatter<range_format::sequence, R, charT> These were missing, the format functions tests for the sequences are already present. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D144286 -
Siva Chandra Reddy authored
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D145466
-
Siva Chandra Reddy authored
Also, an "arm" subfolder for baremetal config has been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D145476
-
Mark de Wever authored
LWG3881 Incorrect formatting of container adapters backed by std::string Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D144277
-
Siva Chandra Reddy authored
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D145475
-
John Brawn authored
This prevents the test from failing when the default target doesn't support the .warning directive.
-
Mark de Wever authored
Avoids using operator& in basic_string since an evil char-like type can hijack this operator. Added some more evil operators, this found a place where equality was compared directly and not via the traits. This adds a helper test string. This is now only used in a few tests, but the intention is to use this in more tests for basic_string. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D145257
-
Mark de Wever authored
The m type in a range formatter may only be used when a pair or a tuple with two elements is used. This was not correctly validated as reported in llvm.org/PR60995. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D145309
-
Mark de Wever authored
Fixes llvm.org/PR58714 reported by @jwakely and a similar issue reported privately by @vitaut. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D145306
-
Alex Brachet authored
-
Uday Bondhugula authored
Fix affine analysis check for ops with no common block in their affine scope. Clean up some out of date comments and naming. Fixes: https://github.com/llvm/llvm-project/issues/59444 Differential Revision: https://reviews.llvm.org/D145460
-
Justin Cady authored
The `REVERSE` keyword is described here: https://sourceware.org/bugzilla/show_bug.cgi?id=27565 It complements `SORT` by allowing the order of input sections to be reversed. This is particularly useful for order-dependent sections such as .init_array, where `REVERSE` can be used to either detect static initialization order fiasco issues or as a mechanism to maintain .ctors element order while transitioning to the modern .init_array. Such a transition is described here: https://discourse.llvm.org/t/is-it-possible-to-manually-specify-init-array-order/68649 Differential Revision: https://reviews.llvm.org/D145381
-
Ethan Luis McDonough authored
Implements HLFIR lowering for %im and %re. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D145005
-
Craig Topper authored
We can form a MU TU operation and remove the merge if they use the same merge value. My primary interest was a case involving VP intrinsics from our downstream, but it requires another optimization that isn't in upstream yet. So I've used RVV intrinsics to get the desired instructions. Co-authored-by:
Nitin John Raj <nitin.raj@sifive.com> Reviewed By: fakepaper56 Differential Revision: https://reviews.llvm.org/D145272
-
Mariya Podchishchaeva authored
This results in expressions that appear in default function argument not being checked for being actual constant expressions. This aligns clang's behavior with the standard and fixes one of the examples from https://wg21.link/P1073R3. Reviewed By: shafik, cor3ntin Differential Revision: https://reviews.llvm.org/D145251
-
Saleem Abdulrasool authored
Add a set of `-Xmicrosoft` flags to control the Windows SDK and VisualC tools directories. This allows control over the selection of the SDK and tools when using the GNU driver. Differential Revision: https://reviews.llvm.org/D145007 Reviewed By: mstorjo
-
Mariya Podchishchaeva authored
https://wg21.link/p1937 proposes that in unevaluated contexts, consteval functions should not be immediately evaluated. Clang implemented p1937 a while ago, its behavior is correct and the test needs an update. Reviewed By: aaron.ballman, shafik Differential Revision: https://reviews.llvm.org/D145362
-
Nikolas Klauser authored
Fixes #61160 Reviewed By: ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D145287
-
John Brawn authored
GNU line marker directives are not recognised when preprocessing assembly files, meaning they can't be used in the predefines file meaning macros defined on the command line are reported as being built-in. Change this to permit line markers but only in the predefines file, so we can correctly report command line macros as coming from the command line. Differential Revision: https://reviews.llvm.org/D145397
-
Florian Hahn authored
At the moment, proveNoWrapViaConstantRanges is only used when creating SCEV[Zero,Sign]ExtendExprs. We can get significant improvements by strengthening flags after creating the AddRec. I'll also share a follow-up patch that removes the code to strengthen flags when creating SCEV[Zero,Sign]ExtendExprs. Modifying AddRecs while creating those can lead to surprising changes. Compile-time looks neutral: https://llvm-compile-time-tracker.com/compare.php?from=94676cf8a13c511a9acfc24ed53c98964a87bde3&to=aced434e8b103109104882776824c4136c90030d&stat=instructions:u Reviewed By: mkazantsev, nikic Differential Revision: https://reviews.llvm.org/D144050
-