Commit Graph

395763 Commits

Author SHA1 Message Date
Roman Lebedev 9d179ee331
[NFC][InstCombine] Add tests for umax reduction w/ i1 element type (PR51259) 2021-08-02 23:02:22 +03:00
Roman Lebedev 0c13798056
[InstCombine] `vector_reduce_umin(?ext(<n x i1>))` --> `?ext(vector_reduce_and(<n x i1>))` (PR51259)
Alive2 agrees:
https://alive2.llvm.org/ce/z/XxUScW (self)
https://alive2.llvm.org/ce/z/3usTF- (zext)
https://alive2.llvm.org/ce/z/GVxwQz (sext)

We already handle `vector_reduce_and(<n x i1>)`,
so let's just combine into the already-handled pattern
and let the existing fold do the rest.
2021-08-02 23:02:22 +03:00
Roman Lebedev 7888cfe7ef
[NFC][InstCombine] Add tests for umin reduction w/ i1 element type (PR51259) 2021-08-02 23:02:22 +03:00
Simon Pilgrim 317d70ea91 [SLP][X86] Add fmuladd test coverage 2021-08-02 20:59:12 +01:00
Philip Reames 76940577e4 [unroll] Move multiple exit costing into consumer pass [NFC]
This aligns the multiple exit costing with all the other cost decisions.  Note that UnrollAndJam, which is the only other caller of the original home of this code, unconditionally bails out of multiple exit loops.
2021-08-02 12:46:23 -07:00
Alex Lorenz f575f37182 [clang][darwin] Add support for the -mtargetos= option to the driver
The new -mtargetos= option is a replacement for the existing, OS-specific options
like -miphoneos-version-min=. This allows us to introduce support for new darwin OSes
easier as they won't require the use of a new option. The older options will be
deprecated and the use of the new option will be encouraged instead.

Differential Revision: https://reviews.llvm.org/D106316
2021-08-02 12:45:40 -07:00
Eric Leese 437e37dd55 [nfc] [lldb] Support moving support files instead of copy
Split from D100299.

Reviewed By: jankratochvil

Differential Revision: https://reviews.llvm.org/D107165
2021-08-02 21:43:34 +02:00
Nikita Popov 380b8a603c [DFAJumpThreading] Use SmallPtrSet for Visited (NFC)
This set is only used for contains checks, so there is no need to
use std::set.
2021-08-02 21:30:25 +02:00
Hedin Garca 2ab18d57d7 [libc] Add differential and performance targets for sqrtf
Comparing the runtime of the sqrt functions from LLVM libc with the system libc:
|function       |perf - LLVM libc          |perf - MSVCRT
|sqrtf - Windows|44.05 sec (44051715500 ns)| 417.84 sec (417843359900 ns) = 6.96 mins

|function       |perf - LLVM libc          |perf - glibc
|sqrtf - Linux  |30.48 sec (30479458632 ns)|43.72 sec (43716901527 ns)

By running the differential test:
|function       |diff
|sqrtf - Windows|0 differing results
|sqrtf - Linux  |0 differing results

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D107229
2021-08-02 19:29:48 +00:00
Nikita Popov 3f7aea1a37 [DFAJumpThreading] Use insert return value (NFC)
Rather than find + insert. Also use range based for loop.
2021-08-02 21:21:21 +02:00
Eugene Zhulenev b537c5b414 [mlir] Async: clone constants into async.execute functions and parallel compute functions
Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D107007
2021-08-02 12:17:41 -07:00
Nikita Popov 84602f98c6 [DFAJumpThreading] Remove unnecessary includes (NFC)
This file uses neither unordered_map nor unordered_set.
2021-08-02 21:13:30 +02:00
Nikita Popov e97524cba2 [DFAJumpThreading] Mark DT as preserved in LegacyPM
It is marked as preserved in NewPM, but not LegacyPM.
2021-08-02 21:13:30 +02:00
Eric Leese ea9706626c [test] [lldb] Use filename instead of index in test
In some environments this test could fail if start.S has its own DWARF
CompileUnit or similar are included before the DWARF CompileUnit for the
file.

This change makes the test independent of the index of the compile unit,
instead checking the filename.

Reviewed By: herhut, jankratochvil

Differential Revision: https://reviews.llvm.org/D107300
2021-08-02 21:12:57 +02:00
Roman Lebedev 469793efa7
[InstCombine] `vector_reduce_mul(?ext(<n x i1>))` --> `zext(vector_reduce_and(<n x i1>))` (PR51259)
Alive2 agrees:
https://alive2.llvm.org/ce/z/PDansB (self)
https://alive2.llvm.org/ce/z/55D-Xc (zext)
https://alive2.llvm.org/ce/z/LxG3-r (sext)

We already handle `vector_reduce_and(<n x i1>)`,
so let's just combine into the already-handled pattern
and let the existing fold do the rest.
2021-08-02 21:57:51 +03:00
Roman Lebedev 8baea41570
[NFC][InstCombine] Add tests for mul reduction w/ i1 element type (PR51259) 2021-08-02 21:57:51 +03:00
Philip Reames 9016beaa24 [unrollruntime] Pull out a helper function for readability and eventual reuse [nfc] 2021-08-02 11:47:27 -07:00
Jon Chesterfield 0c3dafd9ed Add Johannes to CODE_OWNERS for openmp offloading
Agreed on llvm-dev in May 2021
2021-08-02 19:45:47 +01:00
Andrzej Warzynski ad2e830fe2 [flang][nfc] Add a regression test for #50993
https://bugs.llvm.org/show_bug.cgi?id=50993 was effectively fixed in
https://reviews.llvm.org/D106727. This patch adds a regression
test specifically for the use case reported in 50993.

Differential Revision: https://reviews.llvm.org/D107260
2021-08-02 18:21:23 +00:00
Paulo Matos 245f2ee647 Revert "[WebAssembly] Add new pass to lower int/ptr conversions of reftypes"
This reverts commit ce1c59dea6.
2021-08-02 20:12:25 +02:00
Nico Weber 82dc463bb3 [lldb] Get rid of HAVE_SIGACTION
The .cpp file uses SIGNAL_POLLING_UNSUPPORTED to guard the call
to sigaction, so use it in the .h file too. (LLVM also calls
sigaction without a guard on non-Windows.)

No behavior change.

Differential Revision: https://reviews.llvm.org/D107255
2021-08-02 20:11:35 +02:00
Nico Weber 3555880f10 [gn build] (manually) port 5c2b48fdb0 2021-08-02 20:10:04 +02:00
Scott Linder 635c5ba45b [AMDGPU][HIP] Switch default DWARF version to 5
Another attempt at changing this default, now that tooling has greater
support for DWARF 5.

Differential Revision: https://reviews.llvm.org/D107190
2021-08-02 18:04:01 +00:00
Philip Reames ebc4c4e3b0 [unroll] Add clarifying comment
The option to not preserve LCSSA is in fact not tested at all in upstream.  I was tempted to just remove the code entirely, but realized I didn't need to for my actual goal.
2021-08-02 10:44:56 -07:00
peter klausler c4a65434d8 [flang] Symbol representation for dummy SubprogramDetails
Dummy procedures can be defined as subprograms with explicit
interfaces, e.g.

  subroutine subr(dummy)
    interface
      subroutine dummy(x)
        real :: x
      end subroutine
    end interface
    ! ...
  end subroutine

but the symbol table had no means of marking such symbols as dummy
arguments, so predicates like IsDummy(dummy) would fail.  Add an
isDummy_ flag to SubprogramNameDetails, analogous to the corresponding
flag in EntityDetails, and set/test it as needed.

Differential Revision: https://reviews.llvm.org/D106697
2021-08-02 10:44:27 -07:00
Alexander Yermolovich 5a865b0b1e [DWARF] Don't process .debug_info relocations for DWO Context
When we build with split dwarf in single mode the .o files that contain both "normal" debug sections and dwo sections, along with relocaiton sections for "normal" debug sections.
When we create DWARF context in DWARFObjInMemory we process relocations and store them in the map for .debug_info, etc section.
For DWO Context we also do it for non dwo dwarf sections. Which I believe is not necessary. This leads to a lot of memory being wasted. We observed 70GB extra memory being used.

I went with context sensitive approach, flag is passed in. I am not sure if it's always safe not to process relocations for regular debug sections if Obj contains .dwo sections.
If it is alternatvie might be just to scan, in constructor, sections and if there are .dwo sections not to process regular debug ones.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D106624
2021-08-02 10:41:47 -07:00
Paulo Matos ce1c59dea6 [WebAssembly] Add new pass to lower int/ptr conversions of reftypes
Add new pass LowerRefTypesIntPtrConv to generate trap
instruction for an inttoptr and ptrtoint of a reference type instead
of erroring, since calling these instructions on non-integral pointers
has been since allowed (see ac81cb7e6).

Differential Revision: https://reviews.llvm.org/D107102
2021-08-02 19:40:00 +02:00
Florian Hahn bb725c9803
[VPlan] Use defined and ops VPValues to print VPInterleaveRecipe.
This patch updates VPInterleaveRecipe::print to print the actual defined
VPValues for load groups and the store VPValue operands for store
groups.

The IR references may become outdated while transforming the VPlan and
the defined and stored VPValues always are up-to-date.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D107223
2021-08-02 18:36:36 +01:00
Chris Lattner 07548b8324 [PatternRewriter] Disable copy/assign operators.
We had a [bad bug](69655864ee) over in CIRCT
caused by accidentally passing around PatternRewriter
by value.  There is no reason to support copy/assignment
of the pattern rewriter, so disable it.

Differential Revision: https://reviews.llvm.org/D107232
2021-08-02 10:26:33 -07:00
Roman Lebedev 1e801439be
[InstCombine] `xor` reduction w/ i1 elt type is a parity check
For i1 element type, `xor` and `add` are interchangeable
(https://alive2.llvm.org/ce/z/e77hhQ), so we should treat it just like
an `add` reduction and consistently transform them both:
https://alive2.llvm.org/ce/z/MjCm5W (self)
https://alive2.llvm.org/ce/z/kgqF4M (skipped zext)
https://alive2.llvm.org/ce/z/pgy3HP (skipped sext)

Though, let's emit the IR that is similar to the one we produce for
`vector_reduce_add(<n x i1>)`.

See https://bugs.llvm.org/show_bug.cgi?id=51259
2021-08-02 20:21:37 +03:00
Roman Lebedev f6c44cdd37
[NFC][InstCombine] Add tests for xor reductions on i1 elt type (PR51259) 2021-08-02 20:21:37 +03:00
Arthur Eubanks 8490a7d908 Add script to bisect over files in an rsp file
This is mostly intended to be used to find which file contains a miscompile.

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D107184
2021-08-02 10:17:13 -07:00
Thomas Lively 417e500668 [WebAssembly] Compute known bits for SIMD bitmask intrinsics
This optimizes out the mask when the result of a bitmask is interpreted as an i8
or i16 value. Resolves PR50507.

Differential Revision: https://reviews.llvm.org/D107103
2021-08-02 09:52:34 -07:00
peter klausler bab86463df [flang] Fix IsSimplyContiguous() for the case of a pointer component
The result expression for the analysis of a Component is not (longer)
valid in the expression traversal framework used by IsSimplyContiguousHelper
now that it has a tri-state result.  Fix so that any result of
analyzing the component symbol is required to be true, not just
present.

Differential Revision: https://reviews.llvm.org/D106693
2021-08-02 09:43:43 -07:00
Saleem Abdulrasool d6d0b6559e unwind: repair register restoration for OR1K
Currently, OR1K architecture put the program counter at offset 0x128 of
the current `or1k_thread_state_t`. However, the PC is restored after
updating the thread pointer in `r3`, which causes the PC to be fetched
incorrectly.

This patch swaps the order of restoration of `r9` and `r3`, such that
the PC is restored to `r9` using the current thread state.

Patch by Oi Chee Cheung!

Reviewed By: whitequark, compnerd

Differential Revision: https://reviews.llvm.org/D107042
2021-08-02 16:36:37 +00:00
Valeriy Savchenko 9e02f58780 [analyzer] Highlight arrows for currently selected event
In some cases, when the execution path of the diagnostic
goes back and forth, arrows can overlap and create a mess.
Dimming arrows that are not relevant at the moment, solves this issue.
They are still visible, but don't draw too much attention.

Differential Revision: https://reviews.llvm.org/D92928
2021-08-02 19:15:01 +03:00
Valeriy Savchenko 97bcafa28d [analyzer] Add control flow arrows to the analyzer's HTML reports
This commit adds a very first version of this feature.
It is off by default and has to be turned on by checking the
corresponding box.  For this reason, HTML reports still keep
control notes (aka grey bubbles).

Further on, we plan on attaching arrows to events and having all arrows
not related to a currently selected event barely visible.  This will
help with reports where control flow goes back and forth (eg in loops).
Right now, it can get pretty crammed with all the arrows.

Differential Revision: https://reviews.llvm.org/D92639
2021-08-02 19:15:00 +03:00
Sjoerd Meijer ea23f7fce5 [AArch64] Add shufflevector concat codegen tests. NFC. 2021-08-02 16:15:11 +01:00
Kazu Hirata d4a3ad70d5 [ADT] Remove PointerUnionTypeSelector (NFC)
The last use was removed on May 17, 2019 in commit
9b92875bbd.
2021-08-02 08:07:25 -07:00
Benjamin Kramer 1f04d8ed2e [tsan] Complete renaming kMaxSid to kThreadSlotCount
This was missing from 5c2b48fdb0
2021-08-02 16:52:29 +02:00
Pushpinder Singh 713a5d12cd [OpenMP][AMDGCN] Initial math headers support
With this patch, OpenMP on AMDGCN will use the math functions
provided by ROCm ocml library. Linking device code to the ocml will be
done in the next patch.

Reviewed By: JonChesterfield, jdoerfert, scchan

Differential Revision: https://reviews.llvm.org/D104904
2021-08-02 14:38:52 +00:00
Marshall Clow c4cd573b32 Change code owner of libc++ from Marshall to Louis 2021-08-02 06:57:43 -07:00
Simon Pilgrim f10d4cfc23 [VectorCombine] Fix PR30986 poison test case
Thanks @xbolva00!
2021-08-02 14:16:32 +01:00
Hans Wennborg 12dc13b73c prfchwintrin.h: Make _m_prefetchw take a pointer to volatile (PR49124)
For some reason, Microsoft declares _m_prefetch to take a const void*,
but _m_prefetchw to take a /volatile/ const void*.

Do the same for compatibility.

Differential revision: https://reviews.llvm.org/D106790
2021-08-02 15:16:04 +02:00
David Green c423a586a7 [ARM] Remove setPreservesCFG from ARMBlockPlacement
As of 2829391840 it no longer preserves the CFG, needing to
split blocks in order to add DLS instructions.
2021-08-02 14:15:45 +01:00
Justas Janickas b13fc7311e [OpenCL] __cpp_threadsafe_static_init is by default undefined in OpenCL mode.
Definition of `__cpp_threadsafe_static_init` macro is controlled by
language option Opts.ThreadsafeStatics. This patch sets language
option to false by default in OpenCL mode, resulting in macro
`__cpp_threadsafe_static_init` being undefined. Default value can be
overridden using command line option -fthreadsafe-statics.

Change is supposed to address portability because not all OpenCL
vendors support thread safe implementation of static initialization.

Fixes llvm.org/PR48012

Differential Revision: https://reviews.llvm.org/D107163
2021-08-02 14:10:15 +01:00
Florian Mayer cd2387b56d [hwasan] Commit missed REQUIRES: stable-runtime.
Differential Revision: https://reviews.llvm.org/D107268
2021-08-02 13:58:11 +01:00
Irina Dobrescu b01417d3c5 [AArch64] Optimise min/max lowering in ISel
Differential Revision: https://reviews.llvm.org/D106561
2021-08-02 13:40:21 +01:00
Justas Janickas 9988ab3989 [clang][NFC] Typo fixes. Test commit.
Fixed spelling of word "whether"
2021-08-02 13:25:08 +01:00
Kunwar Shaanjeet Singh Grover 7eeaa782c4 [MLIR] FlatAffineConstraints: Fixed bug where some divisions were not being detected
This patch fixes a bug in the existing implementation of detectAsFloorDiv,
where floordivs with numerator with non-zero constant term and floordivs with
numerator only consisting of a constant term were not being detected.

Reviewed By: vinayaka-polymage

Differential Revision: https://reviews.llvm.org/D107214
2021-08-02 17:51:48 +05:30