- Feb 29, 2024
-
-
Stanislav Mekhanoshin authored
-
Jonas Devlieghere authored
The -d(ebug) option broke 5 years ago when I migrated the driver to libOption. Since then, we were never check if the option is set. We were incorrectly toggling the internal variable (m_debug_mode) based on OPT_no_use_colors instead. Given that the functionality doesn't seem particularly useful and nobody noticed it has been broken for 5 years, I'm just removing the flag.
-
Fangrui Song authored
-
Fangrui Song authored
`Driver::ClangExecutable` is derived from: * (-canonical-prefixes default): `realpath` on the executable path * (-no-canonical-prefixes) argv[0] (consult PATH if argv[0] is a word) `Dir` and `ResourceDir` are derived from `ClangExecutable`. Both variables are used to derive certain include and library paths. `InstalledDir` is a related concept used to derive certain other paths. `InstalledDir` is weird in the -canonical-prefixes mode: Clang calls `make_absolute` but does not follow symlinks (FIXME from 9ade6a9a). This causes some search and library paths to be mix-and-matched. The "Do a PATH lookup, if there are no directory components." logic makes things worse. `InstalledDir` is different when you invoke it via `PATH`: ``` % which clang /usr/bin/clang % clang -v |& grep InstalledDir InstalledDir: /usr/bin % /usr/lib/llvm-16/bin/clang -v |& grep InstalledDir InstalledDir: /usr/lib/llvm-16/bin ``` I believe `InstalledDir` was a partial solution to `-no-canonical-prefixes` and should be eventually removed. This patch removes `SetInstallDir` and relies on Driver::Driver to set `InstalledDir` to `Dir`. The behavior for regular file `clang` or `-no-canonical-prefixes` is unchanged. If a user creates a symlink to the regular file `clang` and uses the default `-canonical-prefixes`, they now consistently get search and library paths relative to the regular file `clang`, not mix-and-match paths. If a user creates a symlink to the regular file `clang` and replaces some directorys from the actual installation, they should change the symlink to a wrapper that calls the underlying clang with `-no-canonical-prefixes`.
-
Craig Topper authored
I've seen cases where the cost per use increase the number of spills. Disabling improves the codegen for #79918. I propose adding this option to allow easier experimentation.
-
Craig Topper authored
[SelectionDAG] Remove unused getIndexedStridedLoadVP/getIndexedStridedStoreVP functions. NFC (#82847) These appear to have been copied from getIndexedLoadVP/getIndexedStoreVP which in turn were copied from the non-VP versions.
-
Aart Bik authored
-
Nick Desaulniers authored
Codify that we use lower_case for readability-identifier-naming.ConstexprFunctionCase and then fix the 11 violations (rather than codify UPPER_CASE and have to fix the 170 violations).
-
OverMighty authored
Our implementation previously accepted signed arguments and performed integer promotion on the argument. GCC's implementation requires an unsigned argument and does not perform integer promotion on it.
-
Max191 authored
This PR fixes a bug in the inference of pack and unpack static shapes that should be using an inverse permutation.
-
Nico Weber authored
-
Cyndy Ishida authored
-
Aart Bik authored
-
Petr Hosek authored
Many baremetal applications use asserts.
-
Joseph Huber authored
Summary: One recurring problem we have with the OpenMP libraries is that they are potentially conflicting with ones found on the system, this occurs when there are two copies and one is used for linking that it not attached to the correspoding clang compiler. LLVM already uses target specific directories for this, like with libc++, which are always searched first. This patch changes the install directory to be `lib/x86_64-unknown-linux-gnu` for example. Notable changes would be that users will need to change their LD_LIBRARY_PATH settings optionally, or use default rt-rpath options. This should fix problems were users are linking the wrong versions of static libraries
-
Joe Nash authored
When using the vim syntax for mir, an error occurs in nvim when opening multiple .mir buffers. delcommand HiLink in the mir syntax file to avoid the issue. To reproduce: Open an .mir file, for example llvm/test/Codegen/X86/expand-post-ra-pseudo.mir Open another mir file from within nvim, for example peephole.mir ``` Error detected while processing function 335[30]..<SNR>43_callback[25]..function 335[30]..<SNR>43_callback: line 23: Vim(command):E174: Command already exists: add ! to replace it: HiLink hi def link <args> ```
-
Nick Desaulniers authored
It's meant to be included multiple times! Maybe use a NOLINT rule to suppress clang-tidy's llvm-header-guard lint warning.
-
Jon Roelofs authored
A symbol with an `N_ALT_ENTRY` attribute may be defined in the middle of a subsection, so it is reasonable to opt them out of the `.cfi_{start,end}proc` nesting check. Fixes: https://github.com/llvm/llvm-project/issues/82261 -
Jordan Rupprecht authored
The goal here is to remove the third_party/Python/module tree, which LLDB tests only use to `import pexpect`. This package is available on `pip`, and I believe should not be hard to obtain. However, in case it isn't easily available, deleting the tree right now could cause disruption. This introduces a `LLDB_TEST_USE_VENDOR_PACKAGES` cmake param that can be enabled, and the tests will continue loading that tree. By default, it is enabled, meaning there's really no change here. A followup change will disable it by default once all known build bots are updated to include this package. When disabled, an eager cmake check runs that makes sure `pexpect` is available before waiting for the test to fail in an obscure way. Later, this option will go away, and when it does, we can delete the tree too. Ideally this is not disruptive, and we can remove it in a week or two.
-
Nick Desaulniers authored
Towards the goal of getting `ninja libc-lint` back to green, fix the numerous instances of: warning: header guard does not follow preferred style [llvm-header-guard] This is because many of our header guards start with `__LLVM` rather than `LLVM`. To filter just these warnings: $ ninja -k2000 libc-lint 2>&1 | grep llvm-header-guard To automatically apply fixits: $ find libc/src libc/include libc/test -name \*.h | \ xargs -n1 -I {} clang-tidy {} -p build/compile_commands.json \ -checks='-*,llvm-header-guard' --fix --quiet Some manual cleanup is still necessary as headers that were missing header guards outright will have them inserted before the license block (we prefer them after). -
Fangrui Song authored
-
Aart Bik authored
This operation is mainly used for testing and debugging purposes but provides a very convenient way to quickly inspect the contents of a sparse tensor (all components over all stored levels). Example: [ [ 1, 0, 2, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 3, 4, 0, 5, 0, 0 ] when stored sparse as DCSC prints as ---- Sparse Tensor ---- nse = 5 pos[0] : ( 0, 4, ) crd[0] : ( 0, 2, 3, 5, ) pos[1] : ( 0, 1, 3, 4, 5, ) crd[1] : ( 0, 0, 3, 3, 3, ) values : ( 1, 2, 3, 4, 5, ) ----
-
David Green authored
Including commutative tests.
-
Nikolas Klauser authored
This reduces the include time of `<atomic>` from 135ms to 88ms.
-
ChiaHungDuan authored
This reverts commit 056d62be. Fixed the number of bytes copied in moveNToArray()
-
Zequan Wu authored
[lldb-dap] Deduplicate watchpoints starting at the same address on SetDataBreakpointsRequest. (#83192) If a SetDataBreakpointsRequest contains a list data breakpoints which have duplicate starting addresses, the current behaviour is returning `{verified: true}` to both watchpoints with duplicated starting addresses. This confuses the client and what actually happens in lldb is the second one overwrite the first one. This fixes it by letting the last watchpoint at given address have `{verified: true}` and all previous watchpoints at the same address should have `{verfied: false}` at response. -
Marius Brehler authored
This adds operations for the logical operators AND, NOT and OR.
-
Nikolas Klauser authored
This significantly simplifies the implementation.
-
Paul Kirth authored
The pass itself checks whether to apply the optimization based on the minsize attribute, so there isn't much functional benefit to preventing the pass from being added. Gating the pass gets added to the pass pipeline complicates the interaction with -enable-dfa-jump-thread, as well. Reviewers: aeubanks Reviewed By: aeubanks Pull Request: https://github.com/llvm/llvm-project/pull/83318
-
Benoit Jacob authored
This lowering was not correctly handling the case where saturation of the mantissa results in an increase of the exponent value. The new code borrows, with credit, the idea from https://github.com/pytorch/pytorch/blob/e1502c0cdbfd17548c612f25d5a65b1e4b86224d/c10/util/BFloat16.h#L60-L79 and adds comments to explain the magic trick going on here and why it's correct. Hat tip to its original author, whom I believe to be @Maratyszcza. A testcase was also requiring a tie to be broken upwards in a case where "to nearest-even" required going downward. The fact that it used to pass suggests that there was another bug in the old code.
-
Arthur Eubanks authored
If a gep has only one phi as one of its operands and the remaining indexes are constant, we can unfold `gep ptr, (phi idx1, idx2)` to `phi ((gep ptr, idx1), (gep ptr, idx2))`. Take care not to unfold recursive phis. Followup to #80983.
-
Patrick Dougherty authored
Currently `add_lit_target` sets the `USES_TERMINAL` CMake option. When using Ninja, this forces all lit testsuite targets into the single-threaded `console` pool. This PR adds a new option `LLVM_PARALLEL_LIT` which drops the `USES_TERMINAL` flag, allowing Ninja to run them in parallel. The default setting (`LLVM_PARALLEL_LIT=OFF`) retains the existing behavior of serial testsuite execution.
-
Simon Pilgrim authored
sitofp - if we only demand the signbit, then we can try to use the source integer uitofp - signbit is guaranteed to be zero Noticed while reviewing #82290
-
Kevin Frei authored
In order to make tooling around dwarf health easier, I've added an `--verify-json` option to `llvm-dwarfdump --verify` that will spit out error summary data with counts to a JSON file. I've added the same capability to `llvm-gsymutil` in a [different PR.](https://github.com/llvm/llvm-project/pull/81763 ) The format of the json is: ``` json { "error-categories": { "<first category description>": {"count": 1234}, "<next category description>": {"count":4321} }, "error-count": 5555 } ``` for a clean run: ``` json { "error-categories": {}, "error-count": 0 } ``` --------- Co-authored-by:
Kevin Frei <freik@meta.com>
-
Slava Zakharin authored
Changed the lowering to call Norm2DimReal16 for REAL(16). Added the corresponding entry point to FortranFloat128Math, which required some restructuring in the related templates.
-
Aart Bik authored
Since the vector.print str provides no punctuation control, it is slightly more flexible to let the client of this operation decide whether there should be a trailing newline. This allows for printing like vector.print str "nse = " vector.print %nse : index as nse = 42
-
Nilanjana Basu authored
Recent set of changes (PR #67725) in loop interleaving algorithm caused removal of the loop trip count threshold for allowing interleaving. Therefore configuration option interleave-small-loop-scalar-reduction is no longer needed.
-
Cyndy Ishida authored
Appeases bots.
-
LLVM GN Syncbot authored
-
Alexandros Lamprineas authored
Before this patch all of the 'target', 'target_version' and 'target_clones' attributes were sharing a common mangling logic across different targets. However we would like to differenciate this logic, therefore I have moved the default path to ABIInfo and provided overrides for AArch64. This way we can resolve feature aliases without affecting the name mangling. The PR #80540 demonstrates a motivating case.
-