Commit Graph

366427 Commits

Author SHA1 Message Date
sameeran joshi fe395aecd9 [Flang] Add GettingInvolved documentation page and sidebar.
Adds a new GettingInvolved page to documentation which provides details about
mailing list, chats and calls.

Adds a sidebar page which provides common links on
all documentation pages.
The links include:
-  Getting Started
-  Getting Involved
-  Github Repository
-  Bug Reports
-  Code Review

Depends on https://reviews.llvm.org/D87242

Reviewed By: richard.barton.arm

Differential Revision: https://reviews.llvm.org/D87270
2020-09-15 18:43:59 +05:30
Florian Hahn db22e70d01 [ConstraintSolver] Add isConditionImplied helper.
This patch adds a isConditionImplied function that
takes a constraint and returns true if the constraint
is implied by the current constraints in the system.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D84545
2020-09-15 13:50:11 +01:00
Felix Berger 98e07b5596 Restrict UnnecessaryCopyInitialization check to variables initialized from free functions without arguments
This restriction avoids cases where an alias is returned to an argument and
which could lead to to a false positive change.
2020-09-15 08:46:04 -04:00
Louis Dionne da104444fa [libc++] Allow building without threads in standalone builds
Setting _LIBCPP_HAS_NO_THREADS is needed when building libcxxabi without
threads in standalone mode. This is useful when target WASM. Otherwise,
you get an error like "No thread API" when building libcxxabi.

It would be better to link against a properly-configured libc++ headers
CMake target when building libc++abi instead, but we don't generate such
targets yet.

Thanks to Matthew Bauer for the patch.

Differential Revision: https://reviews.llvm.org/D60743
2020-09-15 08:44:48 -04:00
Simon Pilgrim 50d2a5d4c7 LoopCacheAnalysis.h - remove unnecessary includes. NFCI.
More remaining dependencies down to LoopCacheAnalysis.cpp
2020-09-15 13:34:35 +01:00
Simon Pilgrim 796c805269 ProvenanceAnalysis.h - remove unnecessary AliasAnalysis.h include. NFCI.
Forward declare AAResults instead of the (old) AliasAnalysis type.
2020-09-15 13:34:35 +01:00
Simon Pilgrim 6d40f35c9f AliasSetTracker.cpp - remove unnecessary includes. NFCI.
These are all directly included in AliasSetTracker.h
2020-09-15 13:34:34 +01:00
Sjoerd Meijer 635b87511e [ARM][MVE] Tail-predication: use unsigned SCEV ranges for tripcount
Loop tripcount expressions have a positive range, so use unsigned SCEV ranges
for them.

Differential Revision: https://reviews.llvm.org/D87608
2020-09-15 13:23:02 +01:00
Bjorn Pettersson aa8be5aeea [Scalarizer] Avoid changing name of non-instructions
The "takeName" logic in ScalarizerVisitor::gather did not consider
that the value vector could refer to non-instructions, such as
global variables. This patch make sure that we avoid changing the
name of a value if it isn't an instruction.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D87685
2020-09-15 14:15:50 +02:00
Pavel Labath af3789a188 [lldb] Improve qemu interop for aarch64
qemu calls the "fp" and "lr" registers via their generic names
(x29/x30). This mismatch manifested itself as not being able to unwind
or display values of some local variables.
2020-09-15 13:32:08 +02:00
Pavel Labath 0a2213c6eb [lldb/cmake] Fix testing support library dependencies
lldbUtilityHelpers does not depend on lldbSymbolHelpers. Remove that
dependency, and add direct lldbSymbolHelpers dependencies where needed.
2020-09-15 13:32:08 +02:00
Hans Wennborg a21387c654 Revert "RegAllocFast: Record internal state based on register units"
This seems to have caused incorrect register allocation in some cases,
breaking tests in the Zig standard library (PR47278).

As discussed on the bug, revert back to green for now.

> Record internal state based on register units. This is often more
> efficient as there are typically fewer register units to update
> compared to iterating over all the aliases of a register.
>
> Original patch by Matthias Braun, but I've been rebasing and fixing it
> for almost 2 years and fixed a few bugs causing intermediate failures
> to make this patch independent of the changes in
> https://reviews.llvm.org/D52010.

This reverts commit 66251f7e1d, and
follow-ups 931a68f26b
and 0671a4c508. It also adjust some
test expectations.
2020-09-15 13:25:41 +02:00
Simon Pilgrim 6c1f2a34fb SpillPlacement.cpp - remove unnecessary includes. NFCI.
These are all directly included in SpillPlacement.h
2020-09-15 12:18:24 +01:00
Simon Pilgrim 1abb4461ea StatepointLowering.cpp - remove unnecessary includes. NFCI.
These are all directly included in StatepointLowering.h
2020-09-15 12:18:23 +01:00
Simon Pilgrim bee79cdcc6 SelectionDAGBuilder.h - remove unnecessary includes. NFCI.
Reduce to forward declarations and move implicit dependencies down to the cpp files.
2020-09-15 12:18:22 +01:00
Florian Hahn cd4edf94cd Recommit "[ConstraintSystem] Add helpers to deal with linear constraints."
This patch recommits "[ConstraintSystem] Add helpers to deal with linear constraints."
(it reverts the revert commit 8da6ae4ce1).

The reason for the revert was using __builtin_multiply_overflow, which
is not available for all compilers. The patch has been updated to use
MulOverflow from MathExtras.h
2020-09-15 12:07:26 +01:00
Alex Zinenko 967c7b6936 [mlir] check for failures when packing function sigunatures in std->llvm conversion
When packing function results into a structure during the standard-to-llvm
dialect conversion, do not assume the conversion was successful and propagate
nullptr as error state.

Fixes PR45184.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D87605
2020-09-15 12:30:44 +02:00
Jakub Lichman c20852300a [mlir][integration_test] Linalg Conv folder renamed to CPU
Changing directory name to reflect naming convention discussed here:
https://llvm.discourse.group/t/vectorops-rfc-add-suite-of-integration-tests-for-vector-dialect-operations/1213

Differential Revision: https://reviews.llvm.org/D87678
2020-09-15 10:28:20 +00:00
Benjamin Kramer b768546fe0 Revert "[InstCombine] Simplify select operand based on equality condition"
This reverts commit cfff88c03c. Sends
instcombine into an infinite loop.

```
define i1 @foo(i32 %arg, i32 %arg1) {
bb:
  %tmp = udiv i32 %arg, %arg1
  %tmp2 = mul nsw i32 %tmp, %arg1
  %tmp3 = icmp eq i32 %tmp2, %arg
  %tmp4 = select i1 %tmp3, i32 %tmp, i32 undef
  %tmp5 = icmp sgt i32 %tmp4, 255
  ret i1 %tmp5
}
```
2020-09-15 12:22:47 +02:00
Simon Pilgrim 9eab73fa17 [X86] Update SSE/AVX integer MINMAX intrinsics to emit llvm.smax.* etc. (PR46851)
We're now getting close to having the necessary analysis/combines etc. for the new generic llvm smax/smin/umax/umin intrinsics.

This patch updates the SSE/AVX integer MINMAX intrinsics to emit the generic equivalents instead of the icmp+select code pattern.

Differential Revision: https://reviews.llvm.org/D87603
2020-09-15 11:19:08 +01:00
Meera Nakrani 1119bf95be [ARM] Corrected condition in isSaturatingConditional
Fixed a small error in an if condition to prevent usat/ssat being generated if (upper constant + 1) is not a
power of 2.
2020-09-15 10:14:30 +00:00
Qiu Chaofan 2508ef014e [SelectionDAG] Remove unused FP constant in getNegatedExpression
960cbc53 immediately removes nodes that won't be used to avoid
compilation time explosion. This patch adds the removal to constants to
fix PR47517.

Reviewed By: RKSimon, steven.zhang

Differential Revision: https://reviews.llvm.org/D87614
2020-09-15 17:59:10 +08:00
Simon Pilgrim 5f13d6c1ee [Transforms][Coroutines] Add missing header path to CMakeLists.txt
Helps Visual Studio check include dependencies.
2020-09-15 10:37:25 +01:00
Sjoerd Meijer b4b1b84106 [MVE] fix typo in llvm debug message. NFC. 2020-09-15 10:13:54 +01:00
Simon Pilgrim fc446935d7 [X86] detectAVGPattern - accept non-pow2 vectors by padding.
Drop the pow2 vector limitation for AVG generation by padding the vector to the next pow2, creating the PAVG nodes and then extracting the final subvector.

Fixes some poor codegen that has been annoying me for years.....
2020-09-15 10:07:03 +01:00
Georgii Rymar bccd2ec3e2 [llvm-readobj/elf] - Simplify and refine the implementation which dumps .stack_sizes
Our implementation of stack sizes section dumping heavily uses `ELFObjectFile<ELFT>`,
while the rest of the code uses `ELFFile<ELFT>`.

That APIs are very different. `ELFObjectFile<ELFT>` is very generic
and has `SectionRef`, `RelocationRef`, `SymbolRef` and other generic concepts.
The `ELFFile<ELFT>` class works directly with `Elf_Shdr`, `Elf_Rel[a]`, `Elf_Sym` etc,
what is probably much cleaner for ELF dumper.

Also, `ELFObjectFile<ELFT>` API does not always provide a way to check
for possible errors. E.g. the implementation of `symbol_end()` does not verify the `sh_size`:

```
template <class ELFT>
basic_symbol_iterator ELFObjectFile<ELFT>::symbol_end() const {
  const Elf_Shdr *SymTab = DotSymtabSec;
  if (!SymTab)
    return symbol_begin();
  DataRefImpl Sym = toDRI(SymTab, SymTab->sh_size / sizeof(Elf_Sym));
  return basic_symbol_iterator(SymbolRef(Sym, this));
}
```
There are many other examples which makes me thing we might win from
switching to `ELFFile<ELFT>` API, where we heavily validate an input data already.

This patch is the first step in this direction. I've converted the large portion of the code
to use `ELFFile<ELFT>`.

Differential revision: https://reviews.llvm.org/D87362
2020-09-15 11:57:00 +03:00
Petr Hosek 58938b544b [NFC][DebugInfo] Use consistent regex group spelling
This is a follow up to c1f2fb5184.
2020-09-15 01:49:42 -07:00
Georgii Rymar 4845531fa8 [lib/Object] - Refine interface of ELFFile<ELFT>. NFCI.
`ELFFile<ELFT>` has many methods that take pointers,
though they assume that arguments are never null and
hence could take references instead.

This patch performs such clean-up.

Differential revision: https://reviews.llvm.org/D87385
2020-09-15 11:38:31 +03:00
Petar Avramovic 9b4fa85434 GlobalISel/IRTranslator resetTargetOptions based on function attributes
Update TargetMachine.Options with function attributes before we start
to generate MIR instructions. This allows access to correct function
attributes via TargetMachine.Options (it used to access attributes of
the function that was translated first).
This affects some existing tests with "no-nans-fp-math" attribute.
Follow-up on D87456.

Differential Revision: https://reviews.llvm.org/D87511
2020-09-15 10:26:09 +02:00
Sjoerd Meijer 487412988c [MVE] Rename of tests making them consistent with tail-predication tests. NFC. 2020-09-15 09:24:22 +01:00
Hans Wennborg 7b58eb50d9 [Support] Make building with snmalloc work
Differential revision: https://reviews.llvm.org/D87471
2020-09-15 10:10:33 +02:00
Petr Hosek c1f2fb5184 [DebugInfo] Support both forward and backward slashes in tests
This addresses test failure revealed by 042c235068.
2020-09-15 00:59:58 -07:00
Han Seoul-Oh e15996b5c6 [doc] Fix broken link 2020-09-15 09:58:08 +02:00
David Sherwood 69cccb3189 [SVE] Fix isLoadInvariantInLoop for scalable vectors
I've amended the isLoadInvariantInLoop function to bail out for
scalable vectors for now since the invariant.start intrinsic is only
ever generated by the clang frontend for thread locals or struct
and class constructors, neither of which support sizeless types.
In addition, the intrinsic itself does not currently support the
concept of a scaled size, which makes it impossible to compare
the sizes of different scalable objects, e.g. <vscale x 32 x i8>
and <vscale x 16 x i8>.

Added new tests here:

  Transforms/LICM/AArch64/sve-load-hoist.ll
  Transforms/LICM/hoisting.ll

Differential Revision: https://reviews.llvm.org/D87227
2020-09-15 08:30:19 +01:00
Vitaly Buka 943b0c8bff [NFC][Asan] Remove chunk pointer from metadata
kAllocBegMagic should be enough.
kAllocBegMagic is already set for the Secondary allocations.
kAllocBegMagic is good enough for the Primary, but it's even safer for
the Secondary allocator as all allocated block are from mmap.

Depends on D87646.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D87647
2020-09-15 00:22:24 -07:00
Chris Hamilton 86ccf4f728 [NFC] Test commit 2020-09-15 02:20:04 -05:00
Vitaly Buka 4540d3baad [NFC][Asan] Return uptr as before D87646 2020-09-15 00:16:55 -07:00
Vitaly Buka 08507d83be [Asan] Cleanup kAllocBegMagic setup
Make it atomic.
Wrap it into class.
Set it late after chunk is initialized.
Reset it soon when the chunk is still valid.

Depends on D87645.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D87646
2020-09-15 00:12:24 -07:00
Vitaly Buka a61bb7f098 [NFC][Asan] Reorder bitfields
Depends on D87644.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D87645
2020-09-15 00:08:01 -07:00
Chris Hamilton c8ddf27ddb Revert "[Sema] Address-space sensitive index check for unbounded arrays"
This reverts commit da55e9ba12.

Build bots uncovered coverage gap in testing.  Change not ready.
2020-09-15 01:57:29 -05:00
Vitaly Buka cad961bb24 [NFC][Asan] Remove from_memalign and rz_log
Before D87643 they where used to optimize UsedSize(). Which was
called frequently from leak scanner.
It was also used for calls from QuarantineCallback
but we have heavy get_allocator().Deallocate call there anyway.

Depends on D87643.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D87644
2020-09-14 23:54:54 -07:00
Vitaly Buka d74e1f3a51 [NFC][Asan] Don't use MetaData for size
Now we have enough space in the ChunkHeader.
45 bit is enough for kMaxAllowedMallocSize.

Depends on D87642.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D87643
2020-09-14 23:54:07 -07:00
Craig Topper c6aadd2b72 [X86] Pre-commit test cases for D87593
The memory operand for these is incorrect.
2020-09-14 23:52:19 -07:00
Vitaly Buka 3023f057d8 [NFC][lsan][fuzzer] Relax fuzzer-leak.test
With lsan we can't guarantee to catch leak on the same iteration.
2020-09-14 23:50:52 -07:00
Mateusz Mikuła e71cda21d7 [Windows][Polly] Disable LLVMPolly module for all compilers on Windows
Before this patch, the cmake disabled loadable modules when compiling
with Visual Studio. However, the reason for this is a limitation of the
Windows DLLs, thus this restriction should apply to any compiler for the
Windows platform, such as MinGW, Cygwin, icc, etc.

Differential Revision: https://reviews.llvm.org/D87524
2020-09-15 09:12:38 +03:00
Mateusz Mikuła 61e0b2b4c5 [LLD] Allow configuring default ld.lld backend
The motivation for this is ld.lld --help targeting MinGW which
currently prints help for the ELF backend unless -m i386pe{,p} is
added. This confuses build systems that grep through linker help to
find supported flags.

This matches LD from Binutils which always prints help for MinGW
when configured to target it.

After this change, the backend can still be overridden to any
supported ELF/MinGW target by using correct -m <arch>.

Differential Revision: https://reviews.llvm.org/D87418
2020-09-15 08:50:02 +03:00
Martin Storsjö 7b416c5e36 [llvm-readobj] [ARMWinEH] Print ARM64 packed unwind info
In addition to printing the individual fields, synthesize and
print the corresponding prolog for the unwind info (in reverse
order, to match how it's printed for non-packed unwind info).

Differential Revision: https://reviews.llvm.org/D87370
2020-09-15 08:50:02 +03:00
Davide Italiano 26c293c23d [BinaryFormat/MachO] Add a missing constant.
Reference:
https://opensource.apple.com/source/cctools/cctools-949.0.1/include/mach-o/loader.h.auto.html
2020-09-14 22:30:54 -07:00
Igor Kudrin a845ebd633 [DebugInfo] Make offsets of dwarf units 64-bit (19/19).
In the case of LTO, several DWARF units can be emitted in one section.
For an extremely large application, they may exceed the limit of 4GiB
for 32-bit offsets. As it is now possible to emit 64-bit debugging info,
the patch enables storing the larger offsets.

Differential Revision: https://reviews.llvm.org/D87026
2020-09-15 12:23:32 +07:00
Igor Kudrin 8c19ac23bd [DebugInfo] Make the offset of string pool entries 64-bit (18/19).
The string pool is shared among several units in the case of LTO,
and it potentially can exceed the limit of 4GiB for an extremely
large application. As it is now possible to emit 64-bit debugging
info, the limitation can be removed.

Differential Revision: https://reviews.llvm.org/D87025
2020-09-15 12:23:32 +07:00