Commit Graph

356678 Commits

Author SHA1 Message Date
Fangrui Song 336e1f03d1 [Driver] Omit -mthread-model posix which is the CC1 default 2020-06-07 12:27:11 -07:00
Fangrui Song e3200dab60 [gcov] Support .gcno/.gcda in gcov 8, 9 or 10 compatible formats 2020-06-07 11:27:49 -07:00
Benjamin Kramer 02e35832c3 [Driver] Simplify code. NFCI. 2020-06-07 20:18:14 +02:00
AK 96458fc510 Add cl::ZeroOrMore to get around build system issues
It is quite common to get multiple instances of optimization flags while building.
The following optimizations does not have cl::ZeroOrMore which causes errors during the build.

Reviewers: alexbdv,spop

Differential Revision: https://reviews.llvm.org/D81187
2020-06-07 10:15:18 -07:00
Kang Zhang c3f5ceefb8 [NFC][PowerPC] Add a new case to test ctrloop for fp128 2020-06-07 16:35:32 +00:00
Fangrui Song b2ffe940b0 [gcov] Fix instrprof-gcov-__gcov_flush-terminate.test 2020-06-07 09:31:52 -07:00
Simon Pilgrim 175fc4023a CFG.h - reduce includes to forward declarations. NFC. 2020-06-07 17:25:35 +01:00
Benjamin Kramer 98626f78ae Unbreak the build 2020-06-07 18:17:21 +02:00
Benjamin Kramer 27e0077dcf Try to make msvc crash less
llvm-project\clang\lib\Driver\Types.cpp(44): fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'msc1.cpp', line 1518)
2020-06-07 18:07:07 +02:00
Simon Pilgrim f6cb987d50 DomTreeUpdater.h - refine includes. NFC.
We don't need any of its defs or many of its includes inside PostDominators.h - so split it and reduce the frontend load.
2020-06-07 16:57:48 +01:00
Fangrui Song bfce849d83 [gcov][test] Delete UNSUPPORTED: host-byteorder-big-endian from test/profile tests
It seems that after dc52ce424b, all big-endian problems have been fixed.

01899bb4e4 seems to have fixed XFAIL: * of
profile/instrprof-gcov-__gcov_flush-terminate.test

This essentially reverts commit 5a9b792d72 and
93d5ae3af1.
2020-06-07 08:42:57 -07:00
Benjamin Kramer c0c6a12775 Put back definitions. We're still not C++17 :/ 2020-06-07 17:41:02 +02:00
Benjamin Kramer 5a098086f9 Put compilation phases from Types.def into a bit set
This avoids a global constructor and is a bit more efficient for
"contained" queries. No functionality change intended.
2020-06-07 17:22:44 +02:00
Benjamin Kramer 0c3df70fad Remove global std::string. StringRef is sufficient. NFC. 2020-06-07 17:22:44 +02:00
Shawn Landden 53a4bfa803 [AArch64] add test for large popcount; NFC 2020-06-07 19:20:33 +04:00
Sanjay Patel ad19b9cead [Docs] fix typos for llvm-mca; NFC 2020-06-07 11:14:24 -04:00
Simon Pilgrim 3a28ae091b [X86][SSE] combineSetCCMOVMSK - add initial support for allof patterns.
Handle MOVMSK 'allof' comparisons (X86ISD::SUB X, AllBitsMask) as well as 'anyof' patterns.

This allows us to handle these patterns in the MOVMSK(BITCAST(X)) pattern to fix PR37087.
2020-06-07 16:10:13 +01:00
Fangrui Song dc52ce424b [llvm-cov] Fix gcov version detection on big-endian 2020-06-07 08:07:32 -07:00
Xing GUO a68601b3fa [ObjectYAML][test] Address comments in D80203
This patch addresses comments in [D80203](https://reviews.llvm.org/D80203?vs=on&id=266415&whitespace=ignore-most#2062287)

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D80862
2020-06-07 22:55:33 +08:00
Xing GUO d527690103 [DWARFYAML][debug_ranges] Fix inappropriate assertion. NFC. 2020-06-07 22:45:52 +08:00
Alexander Belyaev e80617df89 [MLIR] Lower shape.num_elements -> shape.reduce.
Differential Revision: https://reviews.llvm.org/D81279
2020-06-07 16:39:21 +02:00
Alexander Belyaev 50f68c1e33 [mlir] Add verifier for `shape.yield`.
Differential Revision: https://reviews.llvm.org/D81262
2020-06-07 15:40:11 +02:00
Sanjay Patel 2552f65183 [InstCombine] fold mask op into casted shift (PR46013)
https://rise4fun.com/Alive/Qply8

  Pre: C2 == (-1 u>> zext(C1))
  %a = ashr %x, C1
  %s = sext %a to i16
  %r = and i16 %s, C2
    =>
  %s2 = sext %x to i16
  %r = lshr i16 %s2, zext(C1)

https://bugs.llvm.org/show_bug.cgi?id=46013
2020-06-07 09:33:18 -04:00
Sanjay Patel c6719d0b47 [InstCombine] add tests for bitmask of casted shift; NFC (PR46013) 2020-06-07 09:33:18 -04:00
Ties Stuij 5945e9799e [clang][BFloat] Add reinterpret cast intrinsics
Summary:
This patch is part of a series implementing the Bfloat16 extension of the
Armv8.6-a architecture, as detailed here:

https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/arm-architecture-developments-armv8-6-a

The bfloat type, and its properties is specified in the Arm C language
extension specification:

https://developer.arm.com/docs/ihi0055/d/procedure-call-standard-for-the-arm-64-bit-architecture

Subscribers: kristof.beyls, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

The following people contributed to this patch:

- Luke Cheeseman
- Alexandros Lamprineas
- Luke Geeson
- Ties Stuij
2020-06-07 14:32:37 +01:00
Simon Pilgrim 1c2d2c88b4 AlignmentFromAssumptions.h - reduce includes to forward declarations. NFC. 2020-06-07 13:51:48 +01:00
Simon Pilgrim 6602e4ca4b MemorySSAUpdater.h - reduce includes to forward declarations. NFC. 2020-06-07 13:16:31 +01:00
Simon Pilgrim 3642d38823 DependenceAnalysis.h - reduce AliasAnalysis.h include to forward declaration. NFC.
This requires the replacement of legacy class AliasAnalysis usages with AAResults (which it typedefs to anyhow)
2020-06-07 12:47:37 +01:00
Simon Pilgrim b296fd2024 MustExecute.h - remove unnecessary Instruction.h include. NFC.
We already have the Instruction forward declaration.
2020-06-07 12:10:50 +01:00
Simon Pilgrim 91591ec424 ObjCARCAnalysisUtils.h - remove unused LLVMContext.h include. NFC. 2020-06-07 11:48:46 +01:00
Simon Pilgrim 1e9d2f908e OrderedInstructions.h - reduce includes to forward declarations. NFC. 2020-06-07 11:44:43 +01:00
Simon Pilgrim 52d6950c47 [X86][SSE] Extend ICMP(MOVMSK(BITCAST(X))) tests to allof patterns as well as the existing noneof/anyof patterns. 2020-06-07 11:44:43 +01:00
Simon Pilgrim 0741b75ad5 [X86][SSE] Attempt to widen MOVMSK vector input if the signbits are splatted.
As shown on PR37087, if we have a MOVMSK(BICAST(X)) from a wider vector, then by using MOVMSK from the wider type (32/64-bit elements) we can improve the chances of further combines with SimplifyDemandedBits/Elts and on some targets (skylake) can be more efficient.
2020-06-07 11:44:43 +01:00
Florian Hahn 4affc444b4 [Matrix] Implement * binary operator for MatrixType.
This patch implements the * binary operator for values of
MatrixType. It adds support for matrix * matrix, scalar * matrix and
matrix * scalar.

For the matrix, matrix case, the number of columns of the first operand
must match the number of rows of the second. For the scalar,matrix variants,
the element type of the matrix must match the scalar type.

Reviewers: rjmccall, anemet, Bigcheese, rsmith, martong

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D76794
2020-06-07 11:11:27 +01:00
Jaroslav Sevcik 1beffc1888 Support build-ids of other sizes than 16 in UUID::SetFromStringRef
SBTarget::AddModule currently handles the UUID parameter in a very
weird way: UUIDs with more than 16 bytes are trimmed to 16 bytes. On
the other hand, shorter-than-16-bytes UUIDs are completely ignored. In
this patch, we change the parsing code to handle UUIDs of arbitrary
size.

To support arbitrary size UUIDs in SBTarget::AddModule, this patch
changes UUID::SetFromStringRef to parse UUIDs of arbitrary length. We
subtly change the semantics of SetFromStringRef - SetFromStringRef now
only succeeds if the entire input is consumed to prevent some
prefix-parsing confusion. This is up for discussion, but I believe
this is more consistent - we always return false for invalid UUIDs
rather than sometimes truncating to a valid prefix. Also, all the
call-sites except the API and interpreter seem to expect to consume
the entire input.

This also adds tests for adding existing modules 4-, 16-, and 20-byte
build-ids. Finally, we took the liberty of testing the minidump
scenario we care about - removing placeholder module from minidump and
replacing it with the real module.

Reviewed By: labath, friss

Differential Revision: https://reviews.llvm.org/D80755
2020-06-07 10:03:41 +00:00
Simon Pilgrim bd67d68ca1 [X86][SSE] Add MOVMSK tests where we're using a more narrow vector elements than necessary
First step towards fixing PR37087
2020-06-07 10:48:11 +01:00
Xing GUO 288025494e [ObjectYAML][DWARF] Support emitting .debug_ranges section in ELFYAML.
This patch enables yaml2elf to emit the .debug_ranges section.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D81217
2020-06-07 15:47:47 +08:00
Fangrui Song e664d0543f [gcov] Improve tests and lower the minimum supported version to gcov 3.4
global-ctor.ll no longer checks what it intended to check
(@_GLOBAL__sub_I_global-ctor.ll needs a !dbg to work).
Rewrite it.

gcov 3.4 and gcov 4.2 use the same format, thus we can lower the version
requirement to 3.4
2020-06-06 23:11:32 -07:00
Fangrui Song 693ff89f47 [gcov] Delete unneeded code 2020-06-06 20:36:46 -07:00
James Y Knight 748d92b4d3 Simplify MachineVerifier's block-successor verification.
There's two properties we want to verify:

1. That the successors returned by analyzeBranch are in the CFG
   successor list, and
2. That there are no extraneous successors are in the CFG successor
   list.

The previous implementation mostly accomplished this, but in a very
convoluted manner.

Differential Revision: https://reviews.llvm.org/D79793
2020-06-06 22:30:51 -04:00
James Y Knight 1978309db1 MachineBasicBlock::updateTerminator now requires an explicit layout successor.
Previously, it tried to infer the correct destination block from the
successor list, but this is a rather tricky propspect, given the
existence of successors that occur mid-block, such as invoke, and
potentially in the future, callbr/INLINEASM_BR. (INLINEASM_BR, in
particular would be problematic, because its successor blocks are not
distinct from "normal" successors, as EHPads are.)

Instead, require the caller to pass in the expected fallthrough
successor explicitly. In most callers, the correct block is
immediately clear. But, in MachineBlockPlacement, we do need to record
the original ordering, before starting to reorder blocks.

Unfortunately, the goal of decoupling the behavior of end-of-block
jumps from the successor list has not been fully accomplished in this
patch, as there is currently no other way to determine whether a block
is intended to fall-through, or end as unreachable. Further work is
needed there.

Differential Revision: https://reviews.llvm.org/D79605
2020-06-06 22:30:51 -04:00
Ben Shi 4b6f0ea66c [RISCV] Fix a typo in RISCVISelLowering.cpp
The 9th parameter of "static bool CC_RISCV(...)" is isFixed, not isRet.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D81333
2020-06-06 18:41:00 -07:00
Mike Edwards 972a73a347 [LIT] NFC adding max-failures option to lit documentation.
Differential Revision: https://reviews.llvm.org/D81337
2020-06-06 18:26:45 -07:00
Craig Topper 095dceefa3 [X86] Correct some isel patterns for v1i1 KNOT/KANDN/KXNOR.
The KNOT pattern was missing. The others were
looking for a v1i1 -1 instead of a vector all ones.
2020-06-06 17:25:56 -07:00
Douglas Yung 059ba74bb6 Revert "[codeview] Put !heapallocsite on calls to operator new"
This reverts commit 672ed53860.

This commit is hitting an assertion failure across multiple bots in the test:
Profile-<arch> :: instrprof-gcov-multithread_fork.test

Failing bots include:
http://lab.llvm.org:8011/builders/llvm-avr-linux/builds/2205
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/builds/8967
http://lab.llvm.org:8011/builders/clang-cmake-armv7-full/builds/10789
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/27750
http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/16751
2020-06-06 23:30:46 +00:00
Jan Kratochvil 8fc1e307f9 [lldb] [nfc] Fix comment in testcase DW_TAG_variable-DW_AT_const_value.s 2020-06-06 23:31:30 +02:00
Fangrui Song 398694d7c5 [gcov] Delete `XFAIL: host-byteorder-big-endian` for test/Transforms/GCOVProfiling/{exit-block.ll,function-numbering.ll} 2020-06-06 11:59:31 -07:00
LLVM GN Syncbot b264edcce8 [gn build] Port 8422bc9efc 2020-06-06 18:22:19 +00:00
Yaxun (Sam) Liu 8422bc9efc recommit "[HIP] Add default header and include path"
recommit 11d06b9511 with
fix for lit tests.
2020-06-06 14:21:22 -04:00
Fangrui Song cdd683b516 [gcov] Support big-endian .gcno and simplify version handling in .gcda 2020-06-06 11:01:47 -07:00