Commit Graph

414485 Commits

Author SHA1 Message Date
Arthur Eubanks 15ba588d6d [test] Migrate '-analyze -cost-model' to '-passes=print<cost-model>' 2022-02-09 15:42:16 -08:00
Lang Hames 9b25d868f4 [ORC] Make LLJIT's destructor virtual.
This allows LLLazyJIT instances to be safely owned by unique_ptr<LLJIT>s.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D119064
2022-02-10 10:23:02 +11:00
Arthur Eubanks 27e0c6670a [gn build] Port 76cad51b 2022-02-09 15:16:05 -08:00
Jameson Nash 76cad51ba7 replace clang LLVM_ENABLE_PLUGINS -> CLANG_PLUGIN_SUPPORT in tests
Ensure CLANG_PLUGIN_SUPPORT is compatible with llvm_add_library.
Fixes an issue noted in D111100.

Differential Revision: https://reviews.llvm.org/D119199
2022-02-09 17:31:34 -05:00
Reid Kleckner b5a592a8e2 [DAG] Remove pointless std::function wrapper, NFC 2022-02-09 14:30:43 -08:00
Mathieu Fehr cf4f97c812 [mlir] Add classes to define new TypeIDs at runtime
TypeIDAllocator enables the allocation of new TypeIDs at runtime,
that are unique during the lifetime of the allocator.

NonMovableTypeIDOwner is a class used to define a new TypeID for each instance
of a class, using the instance address. This class cannot be copied or moved.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D104534
2022-02-09 23:24:49 +01:00
Daniel Thornburgh 694f384553 [Debuginfod] Flag-determine debuginfod lookups in llvm-symbolizer.
This change adds a pair of flags controlling whether llvm-symbolizer
attempts debuginfod lookups. Lookups are attempted if --debuginfod is
passed and disabled if --no-debuginfod is passed.

The default behavior is made more nuanced: debuginfod lookups are now
only attempted if an HTTP client is compiled in and at least one backing
debuginfod URL was configured via environment variable. Previously,
debuginfod lookups would always be attempted, even if there were no
chance that they could succeed.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D118665
2022-02-09 22:20:54 +00:00
Aaron Ballman 7de7161304 Use functions with prototypes when appropriate; NFC
A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,

  void func();

becomes

  void func(void);

This is the sixth batch of tests being updated (there are a significant
number of other tests left to be updated).
2022-02-09 17:16:10 -05:00
Fangrui Song f8701a30f6 [Symbolize] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after D118633 2022-02-09 14:08:47 -08:00
Casey Carter 009791e0db [libcxx][test] optional's comparisons with optional are not portably constrained
so use them as concept test cases only with libc++.

Differential Revision: https://reviews.llvm.org/D116884
2022-02-09 14:00:24 -08:00
Reid Kleckner f63c150187 Revert "[DagCombine] Increase depth by number of operands to avoid a pathological compile time."
Appears to be causing check-llvm to fail

This reverts commit 49ab760090.
2022-02-09 13:55:40 -08:00
Fangrui Song 528f4628c4 [DWARFLinker] Include llvm/MC/MCSubtargetInfo.h 2022-02-09 13:49:45 -08:00
Philip Reames d334fec140 [SCEV] Make SCEVUnionPredicate externally immutable [NFC]
This is the last major stepping stone before being able to allocate the node via the folding set allocator.  That will in turn allow more general SCEV predicate expression trees.
2022-02-09 13:47:28 -08:00
Marek Kurdej a7b5e5b413 [clang-format] Fix formatting of macro definitions with a leading comment.
Fixes https://github.com/llvm/llvm-project/issues/43206.

Reviewed By: HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D118924
2022-02-09 22:39:59 +01:00
Marek Kurdej a77c67f939 [clang-format] Fix formatting of the array form of delete.
Fixes https://github.com/llvm/llvm-project/issues/53576.

There was an inconsistency in formatting of delete expressions.

Before:
```
delete (void*)a;
delete[](void*) a;
```

After this patch:
```
delete (void*)a;
delete[] (void*)a;
```

Reviewed By: HazardyKnusperkeks, owenpan

Differential Revision: https://reviews.llvm.org/D119117
2022-02-09 22:36:13 +01:00
Alina Sbirlea 49ab760090 [DagCombine] Increase depth by number of operands to avoid a pathological compile time.
We're hitting a pathological compile-time case, profiled to be in
DagCombiner::visitTokenFactor and many inserts into a SmallPtrSet.
It looks like one of the paths around findBetterNeighborChains is not
capped and leads to this.

This patch resolves the issue. Looking for feedback if this solution
looks reasonable.

Differential Revision: https://reviews.llvm.org/D118877
2022-02-09 13:31:28 -08:00
Med Ismail Bennani 9a9bf12c4a [lldb/crashlog] Fix arm64 register parsing on crashlog.py
This patch fixes the register parser for arm64 crashlogs.

Compared to x86_64 crashlogs, the arm64 crashlogs nests the general
purpose registers into a separate dictionary within `thread_state`
dictionary. It uses the dictionary key as the the register number.

Differential Revision: https://reviews.llvm.org/D119168

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-09 13:28:20 -08:00
Med Ismail Bennani d327108d17 [lldb/test] Split Scripted Process test in multiple tests (NFC)
This splits the scripted process tests to be able to run in parallel
since some of test functions can take a very long time to run.

This also disables debug info testing.

Differential Revision: https://reviews.llvm.org/D118513

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-09 13:28:20 -08:00
Med Ismail Bennani f5e5074c40 [lldb/test] Fix TestScriptedProcess.py timeout on x86_64
This patch fixes a timeout issue on the ScriptedProcess test that was
happening on intel platforms. The timeout was due to a misreporting of
the StopInfo in the ScriptedThread that caused the ScriptedProcess to
never stop.

To solve this, this patch changes the way a ScriptedThread reports its
stop reason by making it more architecture specific. In order to do so,
this patch also refactors the ScriptedProcess & ScriptedThread
initializer methods to provide an easy access to the target architecture.

Differential Revision: https://reviews.llvm.org/D118484

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-09 13:28:20 -08:00
Zequan Wu 48d889079a [LLDB][NativePDB] fix that FindSymbolScope never finds scope of a symbol if it doesn't open a scope 2022-02-09 13:20:45 -08:00
Florian Hahn 79d60b93b4
[ConstraintElimination] Skip floating point compares. (NFC)
The solver only supports integer conditions. Adding floating point
compares to the worklist only adds extra work. Just skip them.
2022-02-09 21:16:49 +00:00
Marek Kurdej e329b5866f [clang-format] Honour "// clang-format off" when using QualifierOrder.
Fixes https://github.com/llvm/llvm-project/issues/53643.

Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan

Differential Revision: https://reviews.llvm.org/D119218
2022-02-09 22:15:20 +01:00
Philip Reames e6d9bab558 [SCEV] Remove a direct call to SCEVUnionPredicate::add [NFC] 2022-02-09 13:04:12 -08:00
Rainer Orth 9159675535 [MLIR][Presburger] Disambiguate call to floor
While testing LLVM 14.0.0 rc1 on Solaris, compilation of `FAIL`ed with

  /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/Analysis/Presburger/Utils.cpp: In lambda function:
  /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/Analysis/Presburger/Utils.cpp:48:58: error: call of overloaded ‘floor(int64_t)’ is ambiguous
     48 |                  [gcd](int64_t &n) { return floor(n / gcd); });
        |                                                          ^
  ...
  /usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.3.0/include-fixed/iso/math_iso.h:201:21:
note: candidate: ‘long double std::floor(long double)’
    201 |  inline long double floor(long double __X) { return __floorl(__X); }
        |                     ^~~~~
  /usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.3.0/include-fixed/iso/math_iso.h:165:15:
note: candidate: ‘float std::floor(float)’
    165 |  inline float floor(float __X) { return __floorf(__X); }
        |               ^~~~~
  /usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.3.0/include-fixed/iso/math_iso.h:78:15:
note: candidate: ‘double std::floor(double)’
     78 | extern double floor __P((double));
        |               ^~~~~

The same issue had already occured in the past, cf. D108750
<https://reviews.llvm.org/D108750>, and the solution is the same: cast the
`floor` arg to `double`.

Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.

Differential Revision: https://reviews.llvm.org/D119324
2022-02-09 22:01:55 +01:00
Martin Storsjö dfa5ab7b2b [libunwind] Avoid a warning in 32 bit builds. NFC.
The warning was introduced with the recently merged SPARCv9
support in 2b9554b885.

The cast matches the existing surrounding cases.

Differential Revision: https://reviews.llvm.org/D119353
2022-02-09 23:00:46 +02:00
Rainer Orth d2215e79ac [mlir][sparse] Rename index_t to index_type again
While testing LLVM 14.0.0 rc1 on Solaris, I ran into a compile failure:

                   from /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp:22:
  /usr/include/sys/types.h:103:16: error: conflicting declaration ‘typedef short int index_t’
    103 | typedef short  index_t;
        |                ^~~~~~~
  In file included from
/var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp:17:
  /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/include/mlir/ExecutionEngine/SparseTensorUtils.h:26:7:
note: previous declaration as ‘using index_t = uint64_t’
     26 | using index_t = uint64_t;
        |       ^~~~~~~

The same issue had already occured in the past and fixed in D72619
<https://reviews.llvm.org/D72619>.  More detailed explanation can also be
found there.

Tested on `amd64-pc-solaris2.11` and `sparcv9-solaris2.11`.

Differential Revision: https://reviews.llvm.org/D119323
2022-02-09 21:59:52 +01:00
Philip Reames d39f4ac494 [SCEV] Unwind SCEVUnionPredicate from getPredicatedBackedgeTakenCount [NFC]
For those curious, the whole reason for tracking the predicate set seperately as opposed to just immediately registering the dependencies appears to be allowing the printing code to print a result without changing the PSE state.  It's slightly questionable if this justifies the complexity, but since we can preserve it with local ugliness, I did so.
2022-02-09 12:55:40 -08:00
Guillaume Chatelet d2c5954662 [libc] undefined reference in LibcTest.cpp
GCC complains about undefined reference in LibcTest.cpp and indeed the wrong version of the template has been explicitly instanciated.
This is necessary to get llvm-libc compile with GCC.

Mentionning D119002 here for navigability.

Differential Revision: https://reviews.llvm.org/D119242
2022-02-09 20:45:56 +00:00
Peter Steinfeld 6cd417bfd8 [flang] Upstream runtime changes for inquiry intrinsics
This change adds runtime routines and tests for LBOUND when passed a DIM argument, SIZE, and UBOUND when not passed a DIM argument.

Associated changes for lowering have already been merged into fir-dev.

Differential Revision: https://reviews.llvm.org/D119360
2022-02-09 12:42:36 -08:00
Joseph Huber 9582f09690 [Libomptarget] Increase stack size for bug49779 test
The 'bug49779.cpp' test has been failing recently. This is because the
runtime is sufficiently complex when using nested parallelism without
optimizations that the CUDA tools cannot statically determine the stack
size. Because of this the kernel can exceed the thread stack size and
crash. Work around this using the 'LIBOMPTARGET_STACK_SIZE' environment
variable and add an FAQ entry for this situation.

Fixes #53670

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D119357
2022-02-09 15:37:23 -05:00
Craig Topper c45c1b130b [RISCV] Teach RISCVDAGToDAGISel::selectShiftMask to replace sub from constant with neg.
If the shift amount is (sub C, X) where C is 0 modulo the size of
the shift, we can replace it with neg or negw.

Similar is is done for AArch64 and X86.

Reviewed By: khchen

Differential Revision: https://reviews.llvm.org/D119089
2022-02-09 12:33:01 -08:00
Saurabh Jha 0ed0a8e2f0 [mlir] Use sparse-compiler pass in sparse benchmark
This patch uses sparse-compiler option in mlir sparse tensor benchmark

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D118579
2022-02-09 20:16:47 +00:00
Philip Reames aa845d7a24 [SCEV] Remove conversion to SCEVUnionPredicate in ExitNotTakenInfo [NFC]
This removes one of the places where we mutate an existing union predicate.
2022-02-09 12:10:23 -08:00
Sanjay Patel f2f5e9f878 [InstCombine] improve test name and cleanup; NFC
The last test was intended to be a negative test with D114272,
but a more general fold can reduce it, so that is renamed.

These are all single-block tests, so remove the unnecessary labels.
2022-02-09 15:08:43 -05:00
David Green b55d4c2ad8 Revert "[LV] Remove `LoopVectorizationCostModel::useEmulatedMaskMemRefHack()`"
This reverts commit 77a0da926c as we've
received multiple reports of this significantly impacting performance,
in ways that don't seem to just be target specific cost models going
wrong. I would offer some reproducers, but the test changes here seem to
be full of them!

Reverting for now and hopefully we can remove the "hack" more carefully
as we go.
2022-02-09 20:02:54 +00:00
Alexander Yermolovich 1be6ccfc02 [DWARF][codegen] Fix for Aranges when split inlining is present
When we enable -fsplit-dwarf-inlining we end up with two entries
in .debug_aranges for each CU. Because it processes Skeleton CU
inline information and DWO CU.

Furthermore address calculations were incorrect because we were processing sections in Skeleton CU.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D118857
2022-02-09 11:51:43 -08:00
Craig Topper 09629215c2 [RISCV] Add a really basic cost model for SK_Splice.
While testing scalable vectors I found that if we generate a
vector splice intrinsic and run the code through the loop unroller,
we'll crash due to an invalid cost.

This adds a basic cost based on the 2 slide instructions used by the
lowering in D119303.

We probably need to factor LMUL into this, but that's true for
arithmetic instructions too. So I've ignored for the moment.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D119316
2022-02-09 11:43:31 -08:00
Andy Yankovsky e0f2375b52 [lldb] Disable failing test on Windows
Test was introduced in https://reviews.llvm.org/D113498.
2022-02-09 20:40:50 +01:00
Fangrui Song eda1de4b1d [MC] clang-format llvm/MC/MCContext.h. NFC
People get clang-format lints when changing declarations in the large block,
e.g. ef736a1c39 Cleanup LLVMMC headers.
Just format it to reduce hassle in the future.
2022-02-09 11:38:28 -08:00
Craig Topper 279b3b8179 [RISCV][VP] Lower VP_FMA to RVV instructions.
We already had FMA_VL node, but we didn't have masked patterns.
I have not added the fneg variations. I'll do those after I add
llvm.vp.fneg.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D119196
2022-02-09 11:33:12 -08:00
Erich Keane 8073da0bee [NFC] Fix sign-compare warning in GrammarBNF thanks to int promotion 2022-02-09 11:25:58 -08:00
Craig Topper 63e711549c [RISCV] Lower VP_FNEG to RVV instructions
Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D119269
2022-02-09 10:56:39 -08:00
Fangrui Song 4631cba10b [ELF][docs] Remove ignore -dc from ld.lld.1 2022-02-09 10:38:36 -08:00
Fangrui Song ce45c95694 [ELF] Remove obscure -dp and GNU ld incompatible --[no-]define-common, ignore -d/-dc
https://maskray.me/blog/2022-02-06-all-about-common-symbols#no-define-common

In GNU ld, -dc only affects -r links and causes COMMON symbols to be allocated.
--no-define-common is defined to make COMMON symbols undefined for -shared.
AIUI --no-define-common is a workaround around glibc 2.1 time and not really useful.

gold confuses --define-common with -d/FORCE_COMMON_ALLOCATION and implements
--define-common with -d semantics. Its --no-define-common is incompatible with
GNU ld.

In ld.lld, b2a23cf3c0 fixed the default -r
behavior for COMMON symbols but ported the incompatible gold
--[no-]define-common. To the best of my knowledge, no project uses -dp
--[no-]define-common. So just remove these options.

-d/-dc are used by the following projects:

* grub grub-core/genmod.sh.in uses -Wl,-r,-d (https://lists.gnu.org/archive/html/grub-devel/2022-02/msg00088.html)
* FreeBSD crunchgen uses -Wl,-dc (https://reviews.freebsd.org/D34215)

A no-op implementation works for them. Only when a program inspects relocatable
output by itself and does not recognize COMMON symbols, there may be a problem.
This is an extremely unlikely case.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D119108
2022-02-09 10:35:53 -08:00
Philip Reames 83f895d952 [SCEV] Add interface for constructing generic SCEVComparePredicate [NFC} 2022-02-09 10:29:04 -08:00
Florian Hahn b71eed7e8f
[ConstraintElimination] Remove redundant lookup (NFC). 2022-02-09 18:00:03 +00:00
Matthias Springer 69f7647158 [mlir][GPU] Add ShuffleOp builder for constant offset/width
Differential Revision: https://reviews.llvm.org/D119345
2022-02-10 02:55:44 +09:00
LLVM GN Syncbot e92ff1b4fa [gn build] Port f1984b1433 2022-02-09 17:34:07 +00:00
LLVM GN Syncbot 990996bf8b [gn build] Port 46a6f5ae14 2022-02-09 17:34:06 +00:00
Florian Hahn 902db4ec1c
[ConstraintElimination] Move some definitions closer to uses (NFC). 2022-02-09 17:29:49 +00:00