Commit Graph

341425 Commits

Author SHA1 Message Date
Haojian Wu bdbdf74822 [clang][AST] Add an AST matcher for deducedTemplateSpeializationType.
Summary:
misc-unused-using clang-tidy check needs this matcher to fix a false
positive of C++17 deduced class template types.

Reviewers: gribozavr2

Reviewed By: gribozavr2

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73869
2020-02-03 12:11:44 +01:00
Simon Pilgrim ae5d3e8c51 Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. 2020-02-03 11:09:08 +00:00
Raphael Isemann 46e5603c8a Reland "[llvm] Add a way to speed up the speed in which BumpPtrAllocator increases slab sizes""
Disable the red zone in the unit test allocator to fix the test errors in sanitizer builds.
The red zone changed the amount of allocated bytes which made the test fail as it
checked the number of allocated bytes of the allocator.
2020-02-03 12:06:15 +01:00
Martin Storsjö eb5ee9275d [LLDB] Add missing declarations for linking to psapi
This fixes building for mingw with BUILD_SHARED_LIBS. In static builds,
the psapi dependency gets linked in transitively from Support, but
when linking Support dynamically, it's revealed that these components
also need linking against psapi.

Differential Revision: https://reviews.llvm.org/D73839
2020-02-03 12:59:11 +02:00
Clement Courbet 082dccac90 [llvm-exegesis] Restrict the range of allowable rounding countrols.
Summary:
It turns out that CUR_DIRECTION is just an internal placeholder, not an actual
valid encoded value.

Reviewers: gchatelet

Subscribers: tschuett, mstojanovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73343
2020-02-03 11:53:27 +01:00
Alexander Belyaev 3dcc1fc61b [MLIR][Linalg] Lower linalg.generic to ploops.
Differential Revision: https://reviews.llvm.org/D73684
2020-02-03 11:52:23 +01:00
Dmitri Gribenko 7b6e49a2f0 Fixed a -Wunused-variable warning in no-assertion builds 2020-02-03 11:49:11 +01:00
Hans Wennborg f00ab188f4 Make quick-append.test resilient to running in paths with '1.o' in the name 2020-02-03 11:35:24 +01:00
Sam McCall 6b15a3d722 [clangd] TUScheduler::run() (i.e. workspace/symbol) counts towards concurrent threads
This seems to just be an oversight.
2020-02-03 11:32:33 +01:00
Sam McCall b79cb54712 [clangd] Refactor TUScheduler options into a struct. NFC 2020-02-03 11:20:48 +01:00
Raphael Isemann da1fb2bed8 Revert "[llvm] Add a way to speed up the speed in which BumpPtrAllocator increases slab sizes"
This reverts commit b848b510a8 as the unit tests
fail on the sanitizer bots:
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/unittests/Support/AllocatorTest.cpp:145: Failure
      Expected: SlabSize
      Which is: 4096
To be equal to: Alloc.getTotalMemory()
      Which is: 4097
2020-02-03 11:10:50 +01:00
Raphael Isemann 0afdc7bed8 Revert "[lldb] Increase the rate at which ConstString's memory allocator scales the memory chunks it allocates"
This reverts commit 500c324fa1 because its parent commit
b848b510a8 is failing on the sanitizer bots.
2020-02-03 11:09:45 +01:00
Sergej Jaskiewicz 1a7e688b0b Revert "[libcxx] Force-cache LIBCXX_CXX_ABI_LIBRARY_PATH"
This reverts commit 41f4dfd63e.

It broke standalone libc++ builds, which now try to use libc++abi from the wrong directory, instead of system instance.

(cherry picked from commit 3573526c0286c9461f0459be1a4592b2214594e7)
2020-02-03 11:03:58 +01:00
Guillaume Chatelet 75d9994a51 Fix broken invariant
Summary:
A Copy with a source that is zeros is the same as a Set of zeros.
This fixes the invariant that SrcAlign should always be non-null.

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73791
2020-02-03 11:01:05 +01:00
Raphael Isemann 500c324fa1 [lldb] Increase the rate at which ConstString's memory allocator scales the memory chunks it allocates
Summary:
We currently do far more malloc calls than necessary in the ConstString BumpPtrAllocator. This is due to the 256 BumpPtrAllocators
our ConstString implementation uses internally which end up all just receiving a small share of the total allocated memory
and therefore keep allocating memory in small chunks for far too long. This patch fixes this by increasing the rate at which we increase the
memory chunk size so that our collection of BumpPtrAllocators behaves in total similar to a single BumpPtrAllocator.

Reviewers: llunak

Reviewed By: llunak

Subscribers: abidh, JDevlieghere, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71699
2020-02-03 10:59:35 +01:00
Clement Courbet 5b2c5e261f [llvm-exegesis] Add pfm counters for Zen2 (znver2).
Summary: There are no counters for individual ports, but this is already
enough to find a lot of issues in the current model (upcoming patch).

Reviewers: dblaikie, gchatelet

Subscribers: hiraditya, tschuett, RKSimon, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72032
2020-02-03 10:57:41 +01:00
Jay Foad 97d9a76afc [AMDGPU] Don't remove short branches over kills
Summary:
D68092 introduced a new SIRemoveShortExecBranches optimization pass and
broke some graphics shaders. The problem is that it was removing
branches over KILL pseudo instructions, and the fix is to explicitly
check for that in mustRetainExeczBranch.

Reviewers: critson, arsenm, nhaehnle, cdevadas, hakzsam

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73771
2020-02-03 09:26:52 +00:00
Stephan Herhut 283b5e733d [MLIR] Make gpu.launch implicitly capture uses of values defined above.
Summary:
In the original design, gpu.launch required explicit capture of uses
and passing them as operands to the gpu.launch operation. This was
motivated by infrastructure restrictions rather than design. This
change lifts the requirement and removes the concept of kernel
arguments from gpu.launch. Instead, the kernel outlining
transformation now does the explicit capturing.

This is a breaking change for users of gpu.launch.

Differential Revision: https://reviews.llvm.org/D73769
2020-02-03 10:08:48 +01:00
Sam Parker 2663a25fad [JumpThreading] Half the duplicate threshold at Oz
Duplicating instructions can lead to code size increases but using
a threshold of 3 is good for reducing code size.

Differential Revision: https://reviews.llvm.org/D72916
2020-02-03 08:40:20 +00:00
Kazuaki Ishizaki 549588698f [mlir] NFC: Fix trivial typo in comment
Summary: Also, an exercise to merge this into the master myself after a reviewer gives LGTM.

Reviewers: nicolasvasilache, mehdi_amini

Reviewed By: mehdi_amini

Subscribers: Joonsoo, merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73432
2020-02-03 17:39:56 +09:00
Raphael Isemann b848b510a8 [llvm] Add a way to speed up the speed in which BumpPtrAllocator increases slab sizes
Summary:
In D68549 we noticed that our BumpPtrAllocator we use for LLDB's ConstString implementation is growing its slabs at
a rate that is too slow for our use case. It causes that we spend a lot of time calling `malloc` for all the tiny slabs that our
ConstString BumpPtrAllocators create. We also can't just increase the slab size in the ConstString implementation
(which is what D68549 originally did) as this really increased the amount of (mostly unused) allocated memory
in any process using ConstString.

This patch adds a template argument for the BumpPtrAllocatorImpl that allows specifying a faster rate at which the
BumpPtrAllocator increases the slab size. This allows LLDB to specify a faster rate at which the slabs grow which
should keep both memory consumption and time spent calling malloc low.

Reviewers: george.karpenkov, chandlerc, NoQ

Subscribers: NoQ, llvm-commits, llunak

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71654
2020-02-03 09:11:38 +01:00
Martin Storsjö f867c8e81f [PM][CGSCC] Add parentheses to avoid a GCC warning. NFC.
This avoids a warning about "suggest parentheses around && within ||".
2020-02-03 09:55:02 +02:00
Martin Storsjö 09dc884eb2 [libcxxabi] Fix layout of __cxa_exception for win64
Win64 isn't LP64, it's LLP64, but there's no __LLP64__ predefined -
just check _WIN64 in addition to __LP64__.

This fixes compilation after static asserts about the struct layout
were added in f2a436058f.

Differential Revision: https://reviews.llvm.org/D73838
2020-02-03 09:55:02 +02:00
Martin Storsjö 2dc45bf392 [OpenMP] Fix GCC warnings. NFC.
Remove an extra semicolon, and add llvm_unreachable to avoid warnings
about control reaching the end of a non-void function.
2020-02-03 09:55:02 +02:00
Martin Storsjö 534aeb0b78 [LLDB] Fix GCC warnings about extra semicolon. NFC. 2020-02-03 09:55:02 +02:00
Martin Probst dc04c54fc1 clang-format: [JS] document InsertTrailingCommas.
Summary: In release notes and the regular docs.

Reviewers: MyDeveloperDay

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73768
2020-02-03 08:51:52 +01:00
Johannes Doerfert 5cc5fce4b0 [Attributor][FIX] Try to resolve non-determinism problem for now
There seems to be another instance of non-determinism which causes the
 number of iterations to be either 1 or 3 for one benchmark, depending
 on the system. This needs to be investigated and resolved. In the
 meantime we do not verify the number of iterations for this benchmark.
2020-02-03 00:47:29 -06:00
Johannes Doerfert 26d02b0f28 [Attributor] AANoRecurse check all call sites for `norecurse`
If all call sites are in `norecurse` functions we can derive `norecurse`
as the ReversePostOrderFunctionAttrsPass does. This should make
ReversePostOrderFunctionAttrsLegacyPass obsolete once the Attributor is
enabled.

Reviewed By: uenoku

Differential Revision: https://reviews.llvm.org/D72017
2020-02-02 23:57:17 -06:00
Johannes Doerfert 368f7ee7a5 [Attributor] Propagate known information from `checkForAllCallSites`
If we know that all call sites have been processed we can derive an
early fixpoint. The use in this patch is likely not to trigger right now
but a follow up patch will make use of it.

Reviewed By: uenoku, baziotis

Differential Revision: https://reviews.llvm.org/D72016
2020-02-02 23:57:17 -06:00
Fangrui Song 3ecba396e9 [Driver][test] Change %itanium_abi_triple to generic ELF
x86_64-windows and darwin default to PIC. They don't use PIE.
2020-02-02 21:46:48 -08:00
Igor Kudrin afb41e3e07 [DebugInfo] Remove an unused method DWARFUnit::getDWARF5HeaderSize(). NFC.
The method was initially added for DWARFVerifier::verifyUnitHeader() but
its results were never actually used.

Differential Revision: https://reviews.llvm.org/D73773
2020-02-03 12:42:03 +07:00
Craig Topper cf20fde1d1 [X86] Remove a couple unnecessary calls to ConvertCmpIfNecessary.
We only need to call this on floating point comparisons. In this
case these are known to be integer compares. One of them even
has a SUB opcode instead of CMP.
2020-02-02 21:36:51 -08:00
Johannes Doerfert 0137745308 [PM][CGSCC] Add a helper to update the call graph from SCC passes
With this patch new trivial edges can be added to an SCC in a CGSCC
pass via the updateCGAndAnalysisManagerForCGSCCPass method. It shares
almost all the code with the existing
updateCGAndAnalysisManagerForFunctionPass method but it implements the
first step towards the TODOs.

This was initially part of D70927.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D72025
2020-02-02 23:32:18 -06:00
Juneyoung Lee 578d2e2cb1 [llvm-extract] Add -keep-const-init commandline option
Summary:
This adds -keep-const-init option to llvm-extract which preserves initializers of
used global constants.

For example:

```
$ cat a.ll
@g = constant i32 0
define i32 @f() {
  %v = load i32, i32* @g
  ret i32 %v
}

$ llvm-extract --func=f a.ll -S -o -
@g = external constant i32
define i32 @f() { .. }

$ llvm-extract --func=f a.ll -keep-const-init -S -o -
@g = constant i32 0
define i32 @f() { .. }
```

This option is useful in checking whether a function that uses a constant global is optimized correctly.

Reviewers: jsji, MaskRay, david2050

Reviewed By: MaskRay

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73833
2020-02-03 14:30:28 +09:00
LLVM GN Syncbot 47f309d963 [gn build] Port c953409ff8 2020-02-03 05:24:55 +00:00
Johannes Doerfert 342357c568 [Inliner][NoAlias] Use call site attributes too
If we had `noalias` on an argument the inliner created alias scope
metadata already. However, the call site `noalias` annotation was not
considered. Since the Attributor can derive such call site `noalias`
annotation we should treat them the same as argument annotations.

Reviewed By: hfinkel

Differential Revision: https://reviews.llvm.org/D73528
2020-02-02 23:21:29 -06:00
Johannes Doerfert c953409ff8 [OpenMP][Part 1] Reusable OpenMP context/traits handling
This is the first of multiple parts to make OpenMP context/trait
handling reusable and generic. This patch was originally part of D71830
but with the unit tests it can be tested independently.

This patch implements an almost complete handling of OpenMP
contexts/traits such that we can reuse most of the logic in Flang
through the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.

All but construct SIMD specifiers, e.g., inbranch, and the device ISA
selector are define in llvm/lib/Frontend/OpenMP/OMPKinds.def. From
these definitions we generate the enum classes TraitSet,
TraitSelector, and TraitProperty as well as conversion and helper
functions in llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}.

The OpenMP context is now an explicit object (see `struct OMPContext`).
This is in anticipation of construct traits that need to be tracked. The
OpenMP context, as well as the VariantMatchInfo, are basically made up
of a set of active or respectively required traits, e.g., 'host', and an
ordered container of constructs which allows duplication. Matching and
scoring is kept as generic as possible to allow easy extension in the
future.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D71847
2020-02-02 23:18:25 -06:00
Fangrui Song 7eeb901528 [Driver] Fix fsemantic-interposition.c for Windows and Darwin 2020-02-02 20:55:24 -08:00
Fangrui Song aed488e3a4 [Driver] Move -fsemantic-interposition decision from cc1 to driver
And add test/Driver/fsemantic-interposition.c
2020-02-02 20:45:29 -08:00
Shengchen Kan db7d2ab03d [NFC] Fix helptext for opt/llc after https://reviews.llvm.org/D68411
Remove "cl::value_desc("jcc, fused, jmp, call, ret, indirect"),", which
makes the option+it's cl::value_desc too long in all of help.
2020-02-03 12:31:42 +08:00
Saleem Abdulrasool a43bf80788 build: attempt to repair the build
The change in 9b84dabc5f uses a newer
syntax which not all the builders support.  Use an explicit `OR` over
the languages instead to repair the builders.
2020-02-02 16:18:00 -08:00
Nathan James d24d8af320 Fixed typo in CTE release notes failing build 2020-02-02 21:51:34 +00:00
Nathan James 8a68c40a1b [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto
Summary: Adds an option called `AddConstToQualified` to readability-qualified-auto to toggle adding const to the auto typed pointers and references. By default its enabled but in the LLVM module its disabled.

Reviewers: aaron.ballman, alexfh, JonasToth, hokein, sammccall

Reviewed By: aaron.ballman

Subscribers: Quuxplusone, merge_guards_bot, lebedev.ri, xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D73548
2020-02-02 21:27:25 +00:00
Nathan James efcd09cea9 [clang-tidy] Fix false positive for cppcoreguidelines-init-variables
Summary: Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44746 | False positive for cppcoreguidelines-init-variables in range based for loop in template function ]]

Reviewers: aaron.ballman, alexfh, hokein, JonasToth, gribozavr2

Reviewed By: aaron.ballman

Subscribers: merge_guards_bot, xazax.hun, wuzish, nemanjai, kbarton, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D73843
2020-02-02 21:26:29 +00:00
Craig Topper ee85415dbb [X86] Use MVT::f80 for the result type of the FLD used to convert from SSE register to X87 register in FP_TO_INTHelper. 2020-02-02 13:24:37 -08:00
Saleem Abdulrasool 9b84dabc5f build: only pass -UNDEBUG when compiling C/C++
This patch limits adding -UNDEBUG to C and C++ files so that projects
can include files compiled with compilers that don't recognize this
argument (Swift e.g.).

add_definitions does not expand generators, hence the change from
add_definitions to add_compile_options.

Patch by Evan Wilde!
2020-02-02 13:19:23 -08:00
Nicolas Vasilache 34cd354ea9 [mlir][Linalg][doc] Add Design Document for the Linalg Dialect
Summary: This revision adds a Rationale for the Linalg Dialect

Reviewers: rriddle, mehdi_amini, ftynse, albertcohen

Reviewed By: albertcohen

Subscribers: merge_guards_bot, jfb, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73595
2020-02-02 14:55:35 -05:00
Nicolas Vasilache ff50c8dcef Revert "[mlir][Linalg][doc] Add Design Document for the Linalg Dialect"
This reverts commit 1d58a7c82f.
2020-02-02 14:55:35 -05:00
Craig Topper 246262671f [X86] Cleanup the lrint/llrint/lround/llround tests a bit.
We don't need tests for truncating the result. There's nothing
special about those truncates.

We can test llrint/llround for 64-bit and 32-bit targets in the same file.
Same with lrint/lround with i32 result result. lrint/lround with
64-bit result should only occur on a 64-bit target.

Add some missing tests for f80 conversions.
2020-02-02 11:01:05 -08:00
LLVM GN Syncbot 928090f5fe [gn build] Port a7bbe45a3e 2020-02-02 18:45:50 +00:00