- Feb 23, 2022
-
-
Rainer Orth authored
Instead of the GNU extension `SHF_GNU_RETAIN`, Solaris provides equivalent functionality with `SHF_SUNW_NODISCARD`. This patch implements the necessary support. Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`. Differential Revision: https://reviews.llvm.org/D107955
-
Nikita Popov authored
Rather than queuing up actions, have one function that does the log2() fold in the obvious way, but with a flag that allows us to check whether the fold will succeed without actually performing it.
-
Aaron Ballman authored
-
Sanjay Patel authored
In D111530, I suggested that we add some relatively basic pattern-matching folds for shifts and funnel shifts and avoid a more specialized solution if possible. We can start by implementing at least one of these in IR because it's easier to write the code and verify with Alive2: https://alive2.llvm.org/ce/z/qHpmNn This will need to be adapted/extended for SDAG to handle the motivating bug ( #49541 ) because the patterns only appear later with that example (added some tests: bb850d42) This can be extended within InstSimplify to handle cases where we 'and' with a shift too (in that case, kill the funnel shift). We could also handle patterns where the shift and funnel shift directions are inverted, but I think it's better to canonicalize that instead to avoid pattern-match case explosion. Differential Revision: https://reviews.llvm.org/D120253
-
Aaron Ballman authored
-
Jez Ng authored
This mirrors the code structure in `lld/ELF`. It also paves the way for an upcoming diff where I templatize things. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D120376
-
Jez Ng authored
This mirrors the code organization in `lld/ELF`. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D120378
-
Stanislav Gatev authored
This reverts commit 169e1aba. It also fixes an incorrect assumption in `initGlobalVars`.
-
Nikita Popov authored
What we're really doing here is converting Op0 udiv Op1 into Op0 lshr log2(Op1), so phrase it in that way. Actually pushing the lshr into the log2(Op1) expression should be seen as a separate transform.
-
Pavel Labath authored
-
Jan Svoboda authored
This patch enables inferring framework modules in explicit builds in all contexts. Until now, inferring framework modules only worked with `-fimplicit-module-maps` due to this block of code: ``` // HeaderSearch::loadFrameworkModule case LMM_InvalidModuleMap: // Try to infer a module map from the framework directory. if (HSOpts->ImplicitModuleMaps) ModMap.inferFrameworkModule(Dir, IsSystem, /*Parent=*/nullptr); break; ``` Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D113880 -
Timm Bäder authored
The triple goes after the gcc version, not before. Also add the /backward version. Differential Revision: https://reviews.llvm.org/D120251
-
serge-sans-paille authored
As a follow-up to eb4c8608 Should fix http://45.33.8.238/win/53749/step_4.txt Related to https://reviews.llvm.org/D120195
-
Pavel Labath authored
The class is using an incredibly elaborate setup to create and destroy an NSAutoreleasePool object. We can do it in a much simpler way by making those calls inside our thread startup function. The only effect of this patch is that the pool gets released at the end of the ThreadCreateTrampoline function, instead of slightly later, when pthreads begin thread-specific cleanup. However, the key destruction order is unspecified, so nothing should be relying on that. I didn't find a specific reason for why this would have to be done that way in git history. It seems that before D5198, this was thread-specific keys were the only way an os implementation (in Host::ThreadCreated) could attach some value to a thread. Differential Revision: https://reviews.llvm.org/D120322
-
Pavel Labath authored
Accept a function object instead of a raw pointer. This avoids a bunch of boilerplate typically needed to pass arguments to the thread functions. Differential Revision: https://reviews.llvm.org/D120321
-
Thomas Preud'homme authored
-
Aaron Ballman authored
-
Joseph Huber authored
-
Simon Atanasyan authored
LLVM tools do not emit `DT_MIPS_XHASH` dynamic table tag. But now `llvm-objdump` and `llvm-readelf` recognize this tag and print it. Fixes https://github.com/llvm/llvm-project/issues/53996
-
Anton Afanasyev authored
This reverts commit f84d732f. Breakage of "sanitizer-x86_64-linux-fast"
-
Tim Northover authored
We were producing invalid instructions like "ubfx w0, w0, #20, #16".
-
Sven van Haastregt authored
Until now, subgroup builtins are available with `opencl-c.h` when at least one of `cl_intel_subgroups`, `cl_khr_subgroups`, or `__opencl_c_subgroups` is defined. With `-fdeclare-opencl-builtins`, subgroup builtins are conditionalized on `cl_khr_subgroups` only. Align `-fdeclare-opencl-builtins` to `opencl-c.h` by introducing the internal `__opencl_subgroup_builtins` macro. Differential Revision: https://reviews.llvm.org/D120254
-
Nikita Popov authored
This function only works on the RHS operand.
-
Balazs Benics authored
This reverts commit 2acead35. Let's try `REQUIRES: asserts`.
-
Balazs Benics authored
This reverts commit d16c5f41. Let's try `REQUIRES: asserts`.
-
Dawid Jurczak authored
Before this change without any good reason Lexer::LangOpts is sometimes accessed by getter and another time read directly in Lexer functions. Since getLangOpts is a bit more verbose prefer direct access to LangOpts member when possible. Differential Revision: https://reviews.llvm.org/D120333
-
Nikita Popov authored
This is the same special logic we apply for SPF signed clamps when computing the number of sign bits, just for intrinsics. This just uses the same logic as the select case, but there's multiple directions this could be improved in: We could also use the num sign bits from the clamped value, we could do this during constant range calculation, and there's probably unsigned analogues for the constant range case at least.
-
Nikita Popov authored
Add intrinsic versions of existing SPF tests.
-
iains authored
This switches the testcase committed for initial C++20 modules import tracking to use split-file rather than preprocessor directives. Differential Revision: https://reviews.llvm.org/D120352
-
Alex Bradbury authored
[RISCV] Avoid infinite loop between DAGCombiner::visitMUL and RISCVISelLowering::transformAddImmMulImm See https://github.com/llvm/llvm-project/issues/53831 for a full discussion. The basic issue is that DAGCombiner::visitMUL and RISCVISelLowering;:transformAddImmMullImm get stuck in a loop, as the current checks in transformAddImmMulImm aren't sufficient to avoid all cases where DAGCombiner::isMulAddWithConstProfitable might trigger a transformation. This patch makes transformAddImmMulImm bail out if C0 (the constant used for multiplication) has more than one use. Differential Revision: https://reviews.llvm.org/D120332
-
Anton Afanasyev authored
Expand `TruncInstCombine` to handle loops by adding `phi` nodes to expression graph. Reviewed by: RKSimon, lebedev.ri Differential Revision: https://reviews.llvm.org/D109817
-
Nikita Popov authored
We were handling sub of umax, but not the conjugated umin case. https://alive2.llvm.org/ce/z/4fdZfy https://alive2.llvm.org/ce/z/BhUQBM
-
Nikita Popov authored
We should be converting these into usub.sat.
-
Valery Pykhtin authored
add –allow-unused-prefixes. This test has two runs that differ in what functions are left after the inliner, for example: barney exists on OLDPM path but don’t exist on NEWPM path. I restored prefixes this test had had after automatic checks were introduced for this test. For now there are no checks left for ALL_NEWPM path, but the behavior seem to change over time so I added –allow-unused-prefixes to ease following check updates. Renamed %tmp => %temp IR values to avoid update warning. Differential revision: https://reviews.llvm.org/D120207
-
Stanislav Gatev authored
This reverts commit 7ea103de.
-
Iain Sandoe authored
It is useful to be able to visualise the C++20 modules content of a PCM file both for inspection and for testing. In particular, when adding more module types to support C++20 Partitions and Header Units, we would like to be able to confirm that the output PCM has the intended structure. The existing scheme for dumping data is restricted to the content of the AST file control block, which does not include structural data beyond imports. The change here makes use of the AST unit that is set up by BeginSourceFile to query for the information on the primary and sub-modules. We can then inspect each of these in turn, accounting for Global, Private, Imported and Exported modules/fragments and then showing the sub-stucture of the main module(s). The disadvantage of this mechanism is that it has no easy method to control the granularity of the output. Perhaps more detailed inspection would be better handled by a stand-alone module inspection tool. Differential Revision: https://reviews.llvm.org/D119823
-
LLVM GN Syncbot authored
-
Simon Pilgrim authored
The pointers are used immediately, so assert the cast is correct instead of returning nullptr
-
Andrzej Warzynski authored
Currently, the driver generates the tables with "run-time type information for derived types" only when specific actions are run. However, the corresponding data might be required by the subsequent compilation stages (e.g. lowering, code-gen) and should be generated unconditionally. Note that this is only possible once the semantic checks have been run. Note that when generating these tables, extra semantic errors might be generated. The driver will always report these and in most cases such semantic errors will cause the driver to exit immediately. The only exception are actions inheriting from `PrescanAndSemaDebugAction`. Currently, there's only one such action: `DebugDumpAllAction` (corresponds to `-fdebug-dump-all` command-line flag). I've updated the comments for this action to clarify this. This change will mostly affect lowering, which currently is only available for most basic examples (e.g. empty programs). I wasn't able to find a working case that would demonstrate the new behaviour. I hope that this change is straightforward enough and am submitting it without a test. Differential Revision: https://reviews.llvm.org/D120051
-
Alexey Lapshin authored
libtool uses file names to name members of an static library. Files, located in different directories and having matching name, would have the same name inside an archive. This is not a problem for ld, but may be a problem for ar. This patch renames files from ObjCopy library to avoid names clashing. See https://reviews.llvm.org/D88827#3335814 Differential Revision: https://reviews.llvm.org/D120345
-