platform/upstream/llvm.git
4 years agoAdd a folder for division by one.
Phoenix Meadowlark [Mon, 27 Apr 2020 19:59:16 +0000 (19:59 +0000)]
Add a folder for division by one.

- Adds a folder for integer division by one with the `divi_signed` and `divi_unsigned` ops.
- Creates tests for scalar and tensor versions of these ops.
- Modifies the test in `parallel-loop-collapsing.mlir` so that it doesn't assume division by one will be in the output.

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

4 years ago[llvm-objcopy][MachO] Avoid accidental invalid relocations in tests
Alexander Shaposhnikov [Mon, 27 Apr 2020 06:46:49 +0000 (23:46 -0700)]
[llvm-objcopy][MachO] Avoid accidental invalid relocations in tests

Until recently yaml2obj didn't properly support relocations for MachO.
This behavior resulted in binaries having invalid relocations.
In this diff we adjust the existing tests as follows:
for the tests which don't actually look at any relocations they are removed,
for the tests which essentially depend on relocations they are fixed.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D78898

4 years agoDon't crash on duplicate keys in dictionary attrs.
Sean Silva [Mon, 27 Apr 2020 22:21:52 +0000 (15:21 -0700)]
Don't crash on duplicate keys in dictionary attrs.

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

4 years agoFix up a clang-tidy nit about using empty rather than size == 0.
Eric Christopher [Mon, 27 Apr 2020 22:22:17 +0000 (15:22 -0700)]
Fix up a clang-tidy nit about using empty rather than size == 0.

4 years ago[libcxx][docs][dfsan] Fix rst rendering related typos
Zola Bridges [Mon, 27 Apr 2020 19:28:23 +0000 (12:28 -0700)]
[libcxx][docs][dfsan] Fix rst rendering related typos

* Fix the code block disappearance problem by adding a new line
* Fix the typo where I forgot a space

Reviewed By: ldionne

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

4 years ago[AsmPrinter] Fix emission of non-standard integer constants for BE targets
LemonBoy [Mon, 27 Apr 2020 21:56:30 +0000 (14:56 -0700)]
[AsmPrinter] Fix emission of non-standard integer constants for BE targets

The code assumed that zero-extending the integer constant to the
designated alloc size would be fine even for BE targets, but that's not
the case as that pulls in zeros from the MSB side while we actually
expect the padding zeros to go after the LSB.

I've changed the codepath handling the constant integers to use the
store size for both small(er than u64) and big constants and then add
zero padding right after that.

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

4 years ago[SLP] add test for partially vectorized bswap (PR39538); NFC
Sanjay Patel [Mon, 27 Apr 2020 21:28:41 +0000 (17:28 -0400)]
[SLP] add test for partially vectorized bswap (PR39538); NFC

4 years ago[X86][CostModel] Update truncate costs for some narrow vector cases to match their...
Craig Topper [Mon, 27 Apr 2020 19:26:10 +0000 (12:26 -0700)]
[X86][CostModel] Update truncate costs for some narrow vector cases to match their wider version.

This updates v4i16->v4i8 with sse2 to match v8i16->v8i8.
Update v2i16->v2i8 and v4i16->v4i8 with sse 4.1 to match v8i16->v8i8.

4 years agofix D78849 for g++ < 7.1
Nick Desaulniers [Mon, 27 Apr 2020 20:46:56 +0000 (13:46 -0700)]
fix D78849 for g++ < 7.1

Summary:
Looks like g++ < 7.1 has a bug resolving calls to member functions without
`this->` in lamdas with `auto` types.  It looks like multiple build bots are
using g++-5.

https://stackoverflow.com/questions/32097759/calling-this-member-function-from-generic-lambda-clang-vs-gcc
https://godbolt.org/z/MiaRt-

Reviewers: MaskRay, efriedma, jyknight, craig.topper, rsmith

Reviewed By: rsmith

Subscribers: hiraditya, llvm-commits, srhines

Tags: #llvm

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

4 years ago[hip] Remove test using `hip_pinned_shadow` attribute. NFC.
Michael Liao [Mon, 27 Apr 2020 20:44:59 +0000 (16:44 -0400)]
[hip] Remove test using `hip_pinned_shadow` attribute. NFC.

4 years agoADT: SmallVector size/capacity use word-size integers when elements are small
Andrew Browne [Sat, 25 Apr 2020 02:26:11 +0000 (19:26 -0700)]
ADT: SmallVector size/capacity use word-size integers when elements are small

SmallVector currently uses 32bit integers for size and capacity to reduce
sizeof(SmallVector). This limits the number of elements to UINT32_MAX.

For a SmallVector<char>, this limits the SmallVector size to only 4GB.
Buffering bitcode output uses SmallVector<char>, but needs >4GB output.

This changes SmallVector size and capacity to conditionally use word-size
integers if the element type is small (<4 bytes). For larger elements types,
the vector size can reach ~16GB with 32bit size.

Making this conditional on the element type provides both the smaller
sizeof(SmallVector) for larger types which are unlikely to grow so large,
and supports larger capacities for smaller element types.

This recommit fixes the same template being instantiated twice on platforms
where uintptr_t is the same as uint32_t.

4 years ago[libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON
Han Zhu [Mon, 27 Apr 2020 20:36:52 +0000 (13:36 -0700)]
[libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

When LIBCLANG_BUILD_STATIC=ON and LLVM_ENABLE_PIC=ON, PIC version of
libclang.a and libclang.so are built as expected. However libclang.a is
not installed. Looking at the macro llvm_add_library(), when both SHARED
and STATIC are set, it renames the static library to ${name}_static and
then adds it to targets. But when add_clang_library() calls install, it
only checks if ${name} is in targets.

To work around this issue, loop through both ${name} and ${name}_static
and install both of them if they're in targets. This is still correct if
only shared or static library is built. In those cases, only ${name} is
added to targets and cmake install will generate the right install
script depending on the library's type.

Test Plan:
cmake with LIBCLANG_BUILD_STATIC=ON and then ninja install, from master
and this diff. Compare the result directory trees. Confirm that only
difference is the added libclang.a.

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

4 years ago[lld-macho] Add support for emitting dylibs with a single symbol
Jez Ng [Mon, 27 Apr 2020 20:28:53 +0000 (13:28 -0700)]
[lld-macho] Add support for emitting dylibs with a single symbol

Summary:
Add logic for emitting the correct set of load commands and segments
when `-dylib` is passed.

I haven't gotten to implementing a real export trie yet, so we can only
emit a single symbol, but it's enough to replace the YAML test files
introduced in D76252.

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

4 years ago[lld-macho] Add basic symbol table output
Jez Ng [Mon, 27 Apr 2020 20:28:49 +0000 (13:28 -0700)]
[lld-macho] Add basic symbol table output

This diff implements basic support for writing a symbol table.

- Attributes are loosely supported for extern symbols and not at all for
  other types

Immediate future work will involve implementing section merging.

Initial version by Kellie Medlin <kelliem@fb.com>

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

4 years ago[SveEmitter] Add builtins for svlen
Sander de Smalen [Mon, 27 Apr 2020 20:16:17 +0000 (21:16 +0100)]
[SveEmitter] Add builtins for svlen

The svlen builtins return the number of elements in a vector
and are implemented using `llvm.vscale`.

Reviewed By: efriedma

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

4 years agoThread safety analysis: Reword warning after D72635
Aaron Puchert [Mon, 27 Apr 2020 20:20:12 +0000 (22:20 +0200)]
Thread safety analysis: Reword warning after D72635

We allow arbitrary names for capabilities now, and the name didn't play
a role for this anyway.

4 years ago[lldb/Dataformatter] Add support for CoreFoundation Dictionaries and Sets.
Med Ismail Bennani [Fri, 17 Apr 2020 19:43:41 +0000 (21:43 +0200)]
[lldb/Dataformatter] Add support for CoreFoundation Dictionaries and Sets.

This patch improves data formatting for CoreFoundation containers:
CFDictionary and CFSet.

These data formatters make the containers and their children appear in Xcode's
variables view (and on the command line) without having to expand the
data structure.

Previous implementation only supported showing the container's element count.

```
(lldb) frame var dict
(__NSCFDictionary *) dict = 0x00000001004062b0 2 key/value pairs

(lldb) frame var set
(__NSCFSet *) set = 0x0000000100406330 2 elements
```
Now the variable can be dereferenced to dispaly the container's children:

```
(lldb) frame var *dict
(__NSCFDictionary) *dict = {
  [0] = {
    key = 0x0000000100004050 @"123"
    value = 0x0000000100004090 @"456"
  }
  [1] = {
    key = 0x0000000100004030 @"abc"
    value = 0x0000000100004070 @"def"
  }
}

(lldb) frame var *set
(__NSCFSet) *set = {
  [0] = 0x0000000100004050 @"123"
  [1] = 0x0000000100004030 @"abc"
}
```

rdar://39882287

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
4 years ago[libc++][test] Disable test for extension that's unsupportable in C++20
Casey Carter [Mon, 27 Apr 2020 16:55:00 +0000 (09:55 -0700)]
[libc++][test] Disable test for extension that's unsupportable in C++20

Defining the nested types `reference` and `iterator_concept` of `reverse_iterator<I>` necessarily requires `I` to be complete in C++20. These tests that verify that `std::map<int, X>::reverse_iterator` can be instantiated when `X` is incomplete are going to have a bad time.

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

4 years ago[mlir][SCCP] Add support for propagating across symbol based calls
River Riddle [Mon, 27 Apr 2020 19:58:23 +0000 (12:58 -0700)]
[mlir][SCCP] Add support for propagating across symbol based calls

This revision adds support for propagating constants across symbol-based callgraph edges. It uses the existing Call/CallableOpInterfaces to detect the dataflow edges, and propagates constants through arguments and out of returns.

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

4 years ago[mlir][Symbol] Change Symbol from a Trait into an OpInterface.
River Riddle [Mon, 27 Apr 2020 19:57:32 +0000 (12:57 -0700)]
[mlir][Symbol] Change Symbol from a Trait into an OpInterface.

This provides a much cleaner interface into Symbols, and allows for users to start injecting op-specific information. For example, derived op can now inject when a symbol can be discarded if use_empty. This would let us drop unused external functions, which generally have public visibility.

This revision also adds a new `extraTraitClassDeclaration` field to ODS OpInterface to allow for injecting declarations into the trait class that gets attached to the operations.

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

4 years ago[SLP] refactor load-combine logic; NFC
Sanjay Patel [Mon, 27 Apr 2020 20:01:01 +0000 (16:01 -0400)]
[SLP] refactor load-combine logic; NFC

We may want to identify sequences that are not
reductions, but still qualify as load-combines
in the back-end, so make most of the body a
helper function.

4 years ago[lld-macho] Extend SyntheticSections to cover all segment load commands
Jez Ng [Mon, 27 Apr 2020 19:50:59 +0000 (12:50 -0700)]
[lld-macho] Extend SyntheticSections to cover all segment load commands

Previously, the special segments `__PAGEZERO` and `__LINKEDIT` were
implemented as special LoadCommands. This diff implements them using
special sections instead which have an `isHidden()` attribute. We do not
emit section headers for hidden sections, but we use their addresses and
file offsets to determine that of their containing segments. In addition
to allowing us to share more segment-related code, this refactor is also
important for the next step of emitting dylibs:

1) dylibs don't have segments like __PAGEZERO, so we need an easy way of
   omitting them w/o messing up segment indices
2) Unlike the kernel, which is happy to run an executable with
   out-of-order segments, dyld requires dylibs to have their segment
   load commands arranged in increasing address order. The refactor
   makes it easier to implement sorting of sections and segments.

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

4 years ago[PowerPC][Future] Remove "unskipableSimplifyCode()" in PPCMIPeephole.cpp
Victor Huang [Mon, 27 Apr 2020 19:23:39 +0000 (14:23 -0500)]
[PowerPC][Future] Remove "unskipableSimplifyCode()" in PPCMIPeephole.cpp

"unskipableSimplifyCode()" was added to handle unsafe BL8_NOTOC instruction
when TOC was not completely removed. The function is not needed after confirming
TOC pointer is not used in a function that uses PC-Relative addressing.

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

4 years ago[InstCombine] add tests for set/clear masked bits; NFC
Sanjay Patel [Sun, 26 Apr 2020 15:49:47 +0000 (11:49 -0400)]
[InstCombine] add tests for set/clear masked bits; NFC

4 years ago[MLIR] Add getBody() method to SingleImplicitBlockTerminator op trait.
Alexander Belyaev [Mon, 27 Apr 2020 19:46:35 +0000 (21:46 +0200)]
[MLIR] Add getBody() method to SingleImplicitBlockTerminator op trait.

Many ops with this trait have `getBody()` and `getBodyBuilder()` methods defined in `extraClassDeclaration` in tablegen. `getBody()` implementation is the same accross all these ops, but `getBodyBuilder()` can return builders with varying insertion points set. In this PR, `getBody()` is moved into `SingleImplicitBlockTerminator` struct and `getBodyBuilder()` is replaced with `OpBuilder::atBlock(End|Terminator)(op.getBody);`.

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

4 years agoRecommit "Generate Callee Saved Register (CSR) related cfi directives
Wei Mi [Thu, 13 Feb 2020 17:23:27 +0000 (09:23 -0800)]
Recommit "Generate Callee Saved Register (CSR) related cfi directives
like .cfi_restore"

Insert .cfi_offset/.cfi_register when IncomingCSRSaved of current block
is larger than OutgoingCSRSaved of its previous block.

Original commit message:
https://reviews.llvm.org/D42848 only handled CFA related cfi directives but
didn't handle CSR related cfi. The patch adds the CSR part. Basically it reuses
the framework created in D42848. For each basicblock, the patch tracks which
CSR set have been saved at its CFG predecessors's exits, and compare the CSR
set with the set at its previous basicblock's exit (The previous block is the
block laid before the current block). If the saved CSR set at its previous
basicblock's exit is larger, .cfi_restore will be inserted.

The patch also generates proper .cfi_restore in epilogue to make sure the
saved CSR set is consistent for the incoming edges of each block.

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

4 years ago[clang-format] NFC clang-format the clang-format sources
mydeveloperday [Mon, 27 Apr 2020 19:41:01 +0000 (20:41 +0100)]
[clang-format] NFC clang-format the clang-format sources

Summary: In recent patches the clang-format code has become un-formatted, correct this before making additional changes

Reviewers: mitchell-stellar, sylvestre.ledru, Abpostelnicu, Wawha, jbcoe

Reviewed By: sylvestre.ledru, Abpostelnicu, jbcoe

Subscribers: cfe-commits

Tags: #clang, #clang-format

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

4 years agomake sure to not warn about unused macros from -D
Luboš Luňák [Sun, 2 Feb 2020 11:15:40 +0000 (12:15 +0100)]
make sure to not warn about unused macros from -D

If a PCH is used for compilation, SourceManager::isInMainFile()
returns true even for the "<built-in>" predefines area. Using -D
only for the TU compilation may trigger -Wunused-macros for it.
It is admitedly a bit fishy to set a macro only for a TU and not
for the PCH, but this works fine if the PCH does not use the macro
(I couldn't find a statement on this for Clang, but GCC explicitly
allows this in the docs).

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

4 years ago[MachineVerifier] retrofit iterators with range for. NFC
Nick Desaulniers [Mon, 27 Apr 2020 18:50:06 +0000 (11:50 -0700)]
[MachineVerifier] retrofit iterators with range for. NFC

Summary:
Reviewing failures identified in D78586, I was finding the identifiers
for these iterators hard to read.

Reviewers: efriedma, MaskRay, jyknight

Reviewed By: MaskRay

Subscribers: hiraditya, llvm-commits, srhines

Tags: #llvm

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

4 years ago[X86][CostModel] Update costs for vector truncate with avx512f/avx512bw.
Craig Topper [Mon, 27 Apr 2020 18:53:41 +0000 (11:53 -0700)]
[X86][CostModel] Update costs for vector truncate with avx512f/avx512bw.

All avx512 truncate instructions except vXi64->vXi32 are 2 uops
on port 5. So raise their costs to 2. Except when we have an
earlier faster sequence like pshufb for 128 bit input vectors.

Add a lower cost of 3 v16i16->v16i8 with avx512f where we can
extend to v16i32 then truncate. And a cost of 2 for avx512bw with
and without avx512vl. There we can use vpmovwb with either a ymm
or zmm input. Both of these beat masking, splitting, and using
packuswb which is our avx/avx2 codegen.

4 years ago[xray] Preserve x8 in trampoline on AArch64
Ian Levesque [Tue, 21 Apr 2020 22:44:19 +0000 (18:44 -0400)]
[xray] Preserve x8 in trampoline on AArch64

Summary: Fixes an ABI violation in the trampoline code for AArch64 that causes the indirect result register to get overwritten if the XRay handler function is complex enough to use it.

Reviewers: MaskRay, dberris, johnislarry

Subscribers: kristof.beyls, danielkiss, #sanitizers

Tags: #sanitizers

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

4 years ago[GlobalISel] Remove debug locations when emitting constants.
Davide Italiano [Mon, 27 Apr 2020 18:24:36 +0000 (11:24 -0700)]
[GlobalISel] Remove debug locations when emitting constants.

The tl;dr story is that this causes jumps in the emitted line
tables, even at `-O0`. We could at some point consider more fancy
solutions to preserve locations, but it doesn't seem to be worth
the effort for now.

<rdar://problem/62460788>

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

4 years ago[llvm-objcopy] Don't specialize the all zero p_paddr case
Fangrui Song [Fri, 24 Apr 2020 03:47:52 +0000 (20:47 -0700)]
[llvm-objcopy] Don't specialize the all zero p_paddr case

Spotted by https://reviews.llvm.org/D74755#1998673

> it looks like OrderedSegments in the function is only used to set the physical address to the virtual address when there are no physical addresses set amongst these sections.

I believe this behavior was copied from https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=6ffd79000b45e77b3625143932ffbf781b6aecab (2008-05)
The commit was made for some corner cases of very old linkers.
This special rule does not seem useful and remove it can allow us to
delete a large chunk of code.

Reviewed By: jhenderson, jakehehrlich

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

4 years agoStrip -showIncludes in getClangStripDependencyFileAdjuster()
Arthur Eubanks [Mon, 27 Apr 2020 16:14:11 +0000 (09:14 -0700)]
Strip -showIncludes in getClangStripDependencyFileAdjuster()

Summary:
Follow-up to https://reviews.llvm.org/D78836.

Also consolidate some test cases.

Reviewers: thakis

Subscribers: cfe-commits

Tags: #clang

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

4 years agoremove temporary logging again now that things are figured out
Nico Weber [Mon, 27 Apr 2020 18:00:25 +0000 (14:00 -0400)]
remove temporary logging again now that things are figured out

4 years ago[lld] Support --lto-emit-asm and --plugin-opt=emit-asm
Hongtao Yu [Wed, 1 Apr 2020 17:01:23 +0000 (10:01 -0700)]
[lld] Support --lto-emit-asm and --plugin-opt=emit-asm

Summary: The switch --plugin-opt=emit-asm can be used with the gold linker to dump the final assembly code generated by LTO in a user-friendly way. Unfortunately it doesn't work with lld. I'm hooking it up with lld. With that switch, lld emits assembly code into the output file (specified by -o) and if there are multiple input files, each of their assembly code will be emitted into a separate file named by suffixing the output file name with a unique number, respectively. The linking then stops after generating those assembly files.

Reviewers: espindola, wenlei, tejohnson, MaskRay, grimar

Reviewed By: tejohnson, MaskRay, grimar

Subscribers: pcc, emaste, inglorion, arichardson, hiraditya, MaskRay, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

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

4 years agoAdd a comment to TarWriterTest.LongFilename
Nico Weber [Mon, 27 Apr 2020 17:58:53 +0000 (13:58 -0400)]
Add a comment to TarWriterTest.LongFilename

4 years ago[PowerPC][Future] Implement PC Relative Tail Calls
Stefan Pintilie [Fri, 24 Apr 2020 02:04:11 +0000 (21:04 -0500)]
[PowerPC][Future] Implement PC Relative Tail Calls

Tail Calls were initially disabled for PC Relative code because it was not safe
to make certain assumptions about the tail calls (namely that all compiled
functions no longer used the TOC pointer in R2). However, once all of the
TOC pointer references have been removed it is safe to tail call everything
that was tail called prior to the PC relative additions as well as a number of
new cases.
For example, it is now possible to tail call indirect functions as there is no
need to save and restore the TOC pointer for indirect functions if the caller
is marked as may clobber R2 (st_other=1). For the same reason it is now also
possible to tail call functions that are external.

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

4 years ago[X86][SSE] Regenerate oddsubvector.ll test checks
Simon Pilgrim [Mon, 27 Apr 2020 16:59:10 +0000 (17:59 +0100)]
[X86][SSE] Regenerate oddsubvector.ll test checks

Fixes some missed address symbol regexs

4 years ago[JITLink] Fix endianness bug fedd32e2fa36.
Lang Hames [Mon, 27 Apr 2020 17:23:47 +0000 (10:23 -0700)]
[JITLink] Fix endianness bug fedd32e2fa36.

The ByteSwap_NN functions return their result rather than modifying their
argument in-place, so we need to write the result back to CPUType here.

4 years ago[libc++] Properly handle --no-execute in the new format
Louis Dionne [Mon, 27 Apr 2020 17:37:00 +0000 (13:37 -0400)]
[libc++] Properly handle --no-execute in the new format

If --no-execute is passed, we shouldn't report XFAIL tests as passing,
or they will be considered to XPASS.

4 years agoReland D78945 TarWriter: Only use 137 of the 155 prefix bytes.
Fangrui Song [Mon, 27 Apr 2020 17:00:23 +0000 (13:00 -0400)]
Reland D78945 TarWriter: Only use 137 of the 155 prefix bytes.

With a fix to unittests/Support/TarWriterTest.cpp

This makes lld's --reproduce output more compatible with tar 1.13 and
before.  This is a very old version of tar, but it's the version in
both gnuwin and unxutils, and the cost for supporting them are very
low, so we might as well just do that.

https://bugs.chromium.org/p/chromium/issues/detail?id=1073524#c21
and onward has more details.

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

4 years ago[X86][CostModel] Improve costs for fp_to_uint/fp_to_sint for vXi8/vXi16/v2i32 results.
Craig Topper [Mon, 27 Apr 2020 17:11:02 +0000 (10:11 -0700)]
[X86][CostModel] Improve costs for fp_to_uint/fp_to_sint for vXi8/vXi16/v2i32 results.

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

4 years agoRevert "TarWriter: Only use 137 of the 155 prefix bytes."
Nico Weber [Mon, 27 Apr 2020 17:34:04 +0000 (13:34 -0400)]
Revert "TarWriter: Only use 137 of the 155 prefix bytes."

This reverts commit 90d6ed144c1352e393556a799e79da6ec3a5fab9.
Breaks check-llvm. Revert while I investigate.

4 years agoFix a memory link problem in SampleProfTest.cpp.
Wei Mi [Mon, 27 Apr 2020 17:31:25 +0000 (10:31 -0700)]
Fix a memory link problem in SampleProfTest.cpp.

4 years agoFix test without built AMDGPU
Matt Arsenault [Mon, 27 Apr 2020 17:31:49 +0000 (13:31 -0400)]
Fix test without built AMDGPU

4 years ago[mlir][spirv] Fix SPIR-V translation registration
Lei Zhang [Mon, 27 Apr 2020 15:31:24 +0000 (11:31 -0400)]
[mlir][spirv] Fix SPIR-V translation registration

'From' and 'To' should be reversed. And now we must explicitly
call the registration function given that MLIR moved away from
static registration.

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

4 years ago[lldb] Fix windows build break from 18e96a31
Pavel Labath [Mon, 27 Apr 2020 17:22:20 +0000 (19:22 +0200)]
[lldb] Fix windows build break from 18e96a31

4 years ago[mlir][linalg] Fix crash in tileAndFuseLinalgOpToParallelLoopsAndSetMarker
Lei Zhang [Mon, 27 Apr 2020 15:47:39 +0000 (11:47 -0400)]
[mlir][linalg] Fix crash in tileAndFuseLinalgOpToParallelLoopsAndSetMarker

Instead of using llvm_unreachable to guard against fusing linalg.conv,
reject fusing linalg.conv in isFusableInto.

tileLinalgOpImpl is a templated function now and it can operate on
loop.parellel. So we should avoid calling into getForInductionVarOwner
which always assumes loop.for.

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

4 years agoFix test/Misc/warning-flags.c after 5c03beefa720bddb3e3f53c595a76bce7ad50f37
Fangrui Song [Mon, 27 Apr 2020 17:18:39 +0000 (10:18 -0700)]
Fix test/Misc/warning-flags.c after 5c03beefa720bddb3e3f53c595a76bce7ad50f37

4 years ago[Polly] Fix long loop due to unsigned warparound.
Michael Kruse [Mon, 27 Apr 2020 17:08:07 +0000 (12:08 -0500)]
[Polly] Fix long loop due to unsigned warparound.

After the update to ISL to isl-0.22.1-87-gfee05a13 and its change of
isl_*_dim returning -1 instead of 0, the -1 got wrapped-around to
UINT_MAX because Polly often uses 'unsigned' type to represent
dimensions, as ISL did before this patch. This may happen in normal
executions after an out-of-quota.

Fix by catching the error-case earlier.

4 years agoTarWriter: Only use 137 of the 155 prefix bytes.
Nico Weber [Mon, 27 Apr 2020 17:00:23 +0000 (13:00 -0400)]
TarWriter: Only use 137 of the 155 prefix bytes.

This makes lld's --reproduce output more compatible with tar 1.13 and
before.  This is a very old version of tar, but it's the version in
both gnuwin and unxutils, and the cost for supporting them are very
low, so we might as well just do that.

https://bugs.chromium.org/p/chromium/issues/detail?id=1073524#c21
and onward has more details.

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

4 years ago[libc++] Quote path to the Python executable in ShTest
Louis Dionne [Mon, 27 Apr 2020 17:06:24 +0000 (13:06 -0400)]
[libc++] Quote path to the Python executable in ShTest

This is an attempt to unbreak this test on Windows, where paths contain
backslashes that are interpreted as escape characters unless quoted.

4 years ago[Matrix] Add draft specification for matrix support in Clang.
Florian Hahn [Mon, 27 Apr 2020 15:48:55 +0000 (16:48 +0100)]
[Matrix] Add draft specification for matrix support in Clang.

This patch documents the planned matrix support in Clang, based on the
draft specification discussed on cfe-dev in the 'Matrix Support in
Clang' thread.

Latest draft spec sent to cfe-dev: http://lists.llvm.org/pipermail/cfe-dev/2020-February/064742.html
Discussion thread January: http://lists.llvm.org/pipermail/cfe-dev/2020-January/064206.html
Discussion thread March: http://lists.llvm.org/pipermail/cfe-dev/2020-March/064834.html

Reviewers: rsmith, anemet, Bigcheese, dexonsmith, rjmccall

Reviewed By: rjmccall

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

4 years ago[flang][NFC] Fix gcc 9 warning in omp combined construct checks.
David Truby [Mon, 27 Apr 2020 16:56:41 +0000 (17:56 +0100)]
[flang][NFC] Fix gcc 9 warning in omp combined construct checks.

4 years ago[llvm-objdump] Print target address with evaluateMemoryOperandAddress()
Fangrui Song [Thu, 23 Apr 2020 23:06:07 +0000 (16:06 -0700)]
[llvm-objdump] Print target address with evaluateMemoryOperandAddress()

D63847 added `MCInstrAnalysis::evaluateMemoryOperandAddress()`. This patch
leverages the feature to print the target addresses for evaluable instructions.

```
-400a: movl 4080(%rip), %eax
+400a: movl 4080(%rip), %eax  # 5000 <data1>
```

This patch also deletes `MIA->isCall(Inst) || MIA->isUnconditionalBranch(Inst) || MIA->isConditionalBranch(Inst)`
which is used to guard `MCInstrAnalysis::evaluateBranch()`

Reviewed By: jhenderson, skan

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

4 years agoclang: Allow backend unsupported warnings
Matt Arsenault [Wed, 22 Apr 2020 21:17:59 +0000 (17:17 -0400)]
clang: Allow backend unsupported warnings

Currently this asserts on anything other than errors. In one
workaround scenario, AMDGPU emits DiagnosticInfoUnsupported as a
warning for functions that can't be correctly codegened, but should
never be executed.

4 years ago[llvm][NFC] Add an explicit 'ComputeFullInlineCost' API
Mircea Trofin [Thu, 23 Apr 2020 17:04:48 +0000 (10:04 -0700)]
[llvm][NFC] Add an explicit 'ComputeFullInlineCost' API

Summary:
Added getInliningCostEstimate, which is essentially what getInlineCost
computes if passed default inlining params, and  non-null ORE or
InlineParams::ComputeFullInlineCost.

Reviewers: davidxl, eraman, jdoerfert

Subscribers: hiraditya, haicheng, llvm-commits

Tags: #llvm

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

4 years ago[AMDGPU] Remove odd blank line in debug output.
Jay Foad [Mon, 27 Apr 2020 16:10:30 +0000 (17:10 +0100)]
[AMDGPU] Remove odd blank line in debug output.

4 years ago[ProfileSummary] Add partial profile annotation on IR.
Wei Mi [Tue, 21 Apr 2020 21:32:28 +0000 (14:32 -0700)]
[ProfileSummary] Add partial profile annotation on IR.

Profile and profile summary are usually read only once and then annotated
on IR. The profile summary metadata on IR should include the value of the
newly added partial profile flag, so that compilation phase like thinlto
postlink can get the full set of profile information.

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

4 years ago[lldb/unittests] Skip IPv6 test on systems which don't have IPv6 configured
Pavel Labath [Mon, 27 Apr 2020 15:15:36 +0000 (17:15 +0200)]
[lldb/unittests] Skip IPv6 test on systems which don't have IPv6 configured

Sadly IPv6 is still not present anywhere. The test was attempting to
detect&skip such hosts, but the way it did that (essentially, by calling
getaddrinfo) meant that it only detected hosts which have IPv6 support
completely compiled out. It did not do anything about hosts which have
it compiled in, but lack runtime configuration even for the ::1 loopback
address.

This patch changes the detection logic to use a new method. It does it
by attempting to bind a socket to the appropriate loopback address. That
should ensure the hosts loopback interface is fully set up. In an effort
to avoid silently skipping the test on too many hosts, the test is
fairly strict about the kind of error it expects in these cases -- it
will only skip the test when receiving EADDRNOTAVAIL. If we find other
error codes that can be reasonably returned in these situations, we can
add more of them.

The (small) change in TCPSocket.cpp is to ensure that the code correctly
propagates the error received from the OS.

4 years ago[mlir][doc] Add missing ` that breaks rendering
Lei Zhang [Mon, 27 Apr 2020 15:24:15 +0000 (11:24 -0400)]
[mlir][doc] Add missing ` that breaks rendering

4 years ago[mlir][VectorOps] Extend VectorTransfer lowering to n-D memref with minor identity map
Nicolas Vasilache [Mon, 27 Apr 2020 13:40:28 +0000 (09:40 -0400)]
[mlir][VectorOps] Extend VectorTransfer lowering to n-D memref with minor identity map

Summary: This revision extends the lowering of vector transfers to work with n-D memref and 1-D vector where the permutation map is an identity on the most minor dimensions (1 for now).

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

4 years ago[libc++abi] Assume that libcxx is checked out in the Apple build script
Louis Dionne [Mon, 27 Apr 2020 15:18:24 +0000 (11:18 -0400)]
[libc++abi] Assume that libcxx is checked out in the Apple build script

Instead of using the libc++ headers provided alongside the toolchain,
use those in the sibling libcxx directory that we know is checked out.
Before the days of the monorepo, we couldn't assume that the libc++
repository was present when building libcxxabi. Since we can now make
that assumption, it's always better to use the version of libc++ that
is in lockstep with libc++abi, to avoid subtle bugs.

4 years ago[CodeGen] Use SPLAT_VECTOR for zeroinitialiser with scalable types
David Sherwood [Mon, 27 Apr 2020 15:05:08 +0000 (16:05 +0100)]
[CodeGen] Use SPLAT_VECTOR for zeroinitialiser with scalable types

Adding tests that I forgot to add as part of a previous change:

https://reviews.llvm.org/D78636

4 years ago[MLIR][NFC] Organize the ordering in LLVM.h
Tres Popp [Mon, 27 Apr 2020 10:11:27 +0000 (12:11 +0200)]
[MLIR][NFC] Organize the ordering in LLVM.h

Summary:
Order classes by purpose and alphabetically to make it slightly easier
to read through the file.

Reviewers: ftynse!

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, Kayjukh, llvm-commits

Tags: #llvm

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

4 years agoFix the check for regparm in FunctionType::ExtInfo
Momchil Velikov [Mon, 27 Apr 2020 14:18:06 +0000 (15:18 +0100)]
Fix the check for regparm in FunctionType::ExtInfo

`getHasRegParm()` was working under the assumption that the RegParm
bits are the last field, which is no longer true, after adding the
`NoCfCheck` and `CmseNSCall` fields.

This causes a spurious "regparm 0" attribute to appear when a function
type is declared with either `__attribute__((nocf_check))` or
`__attribute__((cmse_nonsecure_call))`.

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

4 years ago[CodeGen] Use SPLAT_VECTOR for zeroinitialiser with scalable types
David Sherwood [Mon, 27 Apr 2020 14:25:23 +0000 (15:25 +0100)]
[CodeGen] Use SPLAT_VECTOR for zeroinitialiser with scalable types

Summary:
When generating code for the LLVM IR zeroinitialiser operation, if
the vector type is scalable we should be using SPLAT_VECTOR instead
of BUILD_VECTOR.

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

4 years agoRevert "recommit c77a4078e01033aa2206c31a579d217c8a07569b"
Dmitri Gribenko [Mon, 27 Apr 2020 14:41:35 +0000 (16:41 +0200)]
Revert "recommit c77a4078e01033aa2206c31a579d217c8a07569b"

This reverts commit b46b1a916d44216f0c70de55ae2123eb9de69027. It broke
overload resolution for operator 'new' -- see reproducer in
https://reviews.llvm.org/D77954.

4 years ago[ARM] Allow fma in tail predicated loops
David Green [Mon, 27 Apr 2020 10:17:11 +0000 (11:17 +0100)]
[ARM] Allow fma in tail predicated loops

There are some intrinsics like this that currently block tail
predication, but should be fine. This allows fma through, as the one
that I ran into. There may be others that need the same treatment but
I've only done this one here.

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

4 years ago[lldb][cmake] Move the remove_module_flags call to the right place in debugserver...
Raphael Isemann [Mon, 27 Apr 2020 14:03:37 +0000 (16:03 +0200)]
[lldb][cmake] Move the remove_module_flags call to the right place in debugserver's CMakeLists

This code should always be executed, not just when building the debugserver
on its own. Fixes the modules build when building LLVM+LLDB together.

4 years ago[libc++] Create a small DSL for defining Lit features and parameters
Louis Dionne [Fri, 17 Apr 2020 13:19:49 +0000 (09:19 -0400)]
[libc++] Create a small DSL for defining Lit features and parameters

This allows defining Lit features that can be enabled or disabled based
on compiler support, and parameters that are passed on the command line.

The main benefits are:
- Feature detection is entirely based on the substitutions provided in
  the TestingConfig object, which is simpler and decouples it from the
  complicated compiler emulation infrastructure.
- The syntax is declarative, which makes it easy to see what features
  and parameters are accepted by the test suite. This is significantly
  less entangled than the current config.py logic.
- Since feature detection is based on substitutions, it works really
  well on top of the new format, and custom Lit configurations can be
  created easily without being based on `config.py`.

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

4 years ago[lldb] Remove NativeProcessDarwin
Pavel Labath [Mon, 27 Apr 2020 13:22:05 +0000 (15:22 +0200)]
[lldb] Remove NativeProcessDarwin

this is dead and non-functional code that hasn't been touched (modulo
refactors) since it was checked in (as an "NFC, with no review and
tests) in 2016.

Anyone interested in adding darwin support to lldb-server can look this
up in git history.

4 years ago[lld][macho] Fix implicit dependency on DenseMap.h include
Simon Pilgrim [Mon, 27 Apr 2020 13:05:29 +0000 (14:05 +0100)]
[lld][macho] Fix implicit dependency on DenseMap.h include

It was depending on CachedHashString.h providing the include.

4 years agoRevert "[gn build] (manually) merge 811c0c9eb46"
Nico Weber [Mon, 27 Apr 2020 13:00:21 +0000 (09:00 -0400)]
Revert "[gn build] (manually) merge 811c0c9eb46"

This reverts commit b160e9e5394ca1f52a94b5f44c3610567b7bb420.
811c0c9eb46 was reverted in 96717125e852.

4 years ago[lldb] Adjust TestExec code to be closer to real world code
Raphael Isemann [Mon, 27 Apr 2020 12:38:32 +0000 (14:38 +0200)]
[lldb] Adjust TestExec code to be closer to real world code

Summary:
For some reason the TestExec test on the macOS bots randomly fails with this error:
```
output: * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x108e66000)
  * frame #0: 0x0000000108e66000
[...]
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/API/functionalities/exec/TestExec.py", line 25, in test_hitting_exec
    self.do_test(False)
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/API/functionalities/exec/TestExec.py", line 113, in do_test
    "Stopped at breakpoint in exec'ed process.")
AssertionError: False is not True : Stopped at breakpoint in exec'ed process.
Config=x86_64-/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/clang-11
```

I don't know why the test program is failing and I couldn't reproduce this problem on my own.
This patch is a stab in the dark that just tries to make the test code more similar to code which
we would expect in a user program to make whatever part of macOS happy that is currently
not liking our code.

The actual changes are:
* We pass in argv[0] that is describing otherprog path instead of the current argv[0].
* We pass in a non-null envp (which anyway doesn't seem to be allowed on macOS man page).

Reviewers: labath, JDevlieghere

Reviewed By: labath

Subscribers: abidh, lldb-commits

Tags: #lldb

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

4 years agoCachedHashString.h - remove unnecessary includes. NFC.
Simon Pilgrim [Sun, 26 Apr 2020 21:21:11 +0000 (22:21 +0100)]
CachedHashString.h - remove unnecessary includes. NFC.
We don't need the full DenseMap.h just DenseMapInfo.h

4 years ago[opt] PassPrinters.h - remove unused includes + forward declarations. NFC.
Simon Pilgrim [Sun, 26 Apr 2020 21:18:50 +0000 (22:18 +0100)]
[opt] PassPrinters.h - remove unused includes + forward declarations. NFC.

4 years ago[opt] NewPMDriver.h - remove unused LLVMContext forward declaration. NFC.
Simon Pilgrim [Sun, 26 Apr 2020 21:16:29 +0000 (22:16 +0100)]
[opt] NewPMDriver.h - remove unused LLVMContext forward declaration. NFC.

4 years agoRevert "[analyzer] On-demand parsing capability for CTU"
Dmitri Gribenko [Mon, 27 Apr 2020 12:24:34 +0000 (14:24 +0200)]
Revert "[analyzer] On-demand parsing capability for CTU"

This reverts commit 811c0c9eb462d1fef6ab6908aab7881e5c4f5fbf. It broke
multiple buildbots.

4 years ago[clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName
Matthias Gehre [Sun, 12 Apr 2020 18:06:31 +0000 (20:06 +0200)]
[clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName

Summary:
Before this PR, `modernize-use-using` would transform the typedef in
```
template <int A>
struct InjectedClassName {
  typedef InjectedClassName b;
};
```
into `using b = InjectedClassName<A>;` and
```
template <int>
struct InjectedClassNameWithUnnamedArgument {
  typedef InjectedClassNameWithUnnamedArgument b;
};
```
into `using b = InjectedClassNameWithUnnamedArgument<>;`.
The first fixit is surprising because its different than the code
before, but the second fixit doesn't even compile.

This PR adds an option to the TypePrinter to print InjectedClassNameType without
template parameters (i.e. as written).

Reviewers: aaron.ballman, alexfh, hokein, njames93

Subscribers: xazax.hun, cfe-commits

Tags: #clang

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

4 years ago[clang] Remove NFC overload in ASTImporterTest
Raphael Isemann [Mon, 27 Apr 2020 12:10:36 +0000 (14:10 +0200)]
[clang] Remove NFC overload in ASTImporterTest

This overload is just an artifact from the original version of the patch, but
doesn't have any functional purpose.

4 years ago[mlir] Fixed warning related to unused variable in Liveness.
Marcel Koester [Mon, 27 Apr 2020 10:22:24 +0000 (12:22 +0200)]
[mlir] Fixed warning related to unused variable in Liveness.

The latest changes of the Liveness analysis caused a warning related to an
unused variable. This commit solves this warning.

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

4 years agoFix modules build after introduction of PassSupport.h include check
Raphael Isemann [Mon, 27 Apr 2020 11:51:22 +0000 (13:51 +0200)]
Fix modules build after introduction of PassSupport.h include check

D78815 added a check that ensures that PassSupport.h and PassAnalysisSupport.h
aren't included directly. However, as compiling this header into a module will
try to parse it with a clean preprocessor state, this check is also triggered
there. The check seems to make sense and it seems that compiling this header
into its own module is a mistake, so this patch makes those two headers
textual in the modulemap.

4 years ago[X86][SSE] getFauxShuffle - account for PEXTW/PEXTB implicit zero-extension
Simon Pilgrim [Mon, 27 Apr 2020 11:46:38 +0000 (12:46 +0100)]
[X86][SSE] getFauxShuffle - account for PEXTW/PEXTB implicit zero-extension

The insert(truncate/extend(extract(vec0,c0)),vec1,c1) case in rGacbc5ede99 wasn't combining the 'mineltsize' with the src vector elt size which may be smaller due to implicit extension during extraction.

Reduced from test case provided by @mstorsjo

4 years ago[NFC][CostModel] Refactor getCastInstrCost
Sam Parker [Mon, 27 Apr 2020 11:41:30 +0000 (12:41 +0100)]
[NFC][CostModel] Refactor getCastInstrCost

Move ZExt/SExt load handling into the BasicTTI switch statement.

4 years ago[flang] Semantic checks for OpenMP combined constructs.
David Truby [Thu, 9 Apr 2020 17:54:28 +0000 (18:54 +0100)]
[flang] Semantic checks for OpenMP combined constructs.

Summary:
This includes a refactor of the existing combined construct checks
that were present, as well as adding the remaining combined constructs
that had not been implemented yet.

Reviewers: jdoerfert

Subscribers: yaxunl, guansong, llvm-commits

Tags: #llvm

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

4 years ago[flang] Fix handling of files without terminating newlines.
David Truby [Tue, 21 Apr 2020 18:45:43 +0000 (19:45 +0100)]
[flang] Fix handling of files without terminating newlines.

Reviewers: sscalpone

Subscribers: llvm-commits

Tags: #llvm

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

4 years ago[ASTImporter] Also import overwritten file buffers
Raphael Isemann [Mon, 27 Apr 2020 08:06:56 +0000 (10:06 +0200)]
[ASTImporter] Also import overwritten file buffers

Summary:
Overwritten file buffers are at the moment ignored when importing and
instead only the underlying file buffer is imported.

This patch fixes this by not going to the underlying file entry if the file has
an overwritten buffer.

Reviewers: martong, a.sidorin, shafik

Reviewed By: martong, shafik

Subscribers: rnkovacs

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

4 years ago[SveEmitter] IsInsertOp1SVALL and builtins for svqdec[bhwd] and svqinc[bhwd]
Sander de Smalen [Sun, 26 Apr 2020 11:47:17 +0000 (12:47 +0100)]
[SveEmitter] IsInsertOp1SVALL and builtins for svqdec[bhwd] and svqinc[bhwd]

Some ACLE builtins leave out the argument to specify the predicate
pattern, which is expected to be expanded to an SV_ALL pattern.

This patch adds the flag IsInsertOp1SVALL to insert SV_ALL as the
second operand.

Reviewers: efriedma, SjoerdMeijer

Reviewed By: SjoerdMeijer

Tags: #clang

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

4 years ago[gn build] (manually) merge 811c0c9eb46
Nico Weber [Mon, 27 Apr 2020 10:39:33 +0000 (06:39 -0400)]
[gn build] (manually) merge 811c0c9eb46

4 years ago[Analyzer] Include typedef statements in CFG build.
Balázs Kéri [Mon, 27 Apr 2020 07:45:38 +0000 (09:45 +0200)]
[Analyzer] Include typedef statements in CFG build.

Summary:
Array size expressions in typedef statements with a VLA
(variable-length array) are handled from now as in plain
(non-typedef) VLA declarations.
Type-aliases with VLA are handled too
(but main focus is on C code).

Reviewers: Szelethus, aaron.ballman, NoQ, xazax.hun

Reviewed By: aaron.ballman, xazax.hun

Subscribers: rnkovacs, NoQ, efriedma, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits

Tags: #clang

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

4 years agoAdd the gsl::Pointer/gsl::Owner combo to ArrayRef and SmallVector so it can diagnose...
Benjamin Kramer [Mon, 27 Apr 2020 10:31:07 +0000 (12:31 +0200)]
Add the gsl::Pointer/gsl::Owner combo to ArrayRef and SmallVector so it can diagnose this common combo.

4 years ago[mlir] Extended Alloc and Dealloc operations with memory-effect traits.
Julian Gross [Wed, 22 Apr 2020 09:22:43 +0000 (11:22 +0200)]
[mlir] Extended Alloc and Dealloc operations with memory-effect traits.

Extended standard Alloc and Dealloc operations with memory-effect traits.

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

4 years ago[NFC] UnifyLoopExits: correctly skip expensive checks
Sameer Sahasrabuddhe [Mon, 27 Apr 2020 09:40:35 +0000 (15:10 +0530)]
[NFC] UnifyLoopExits: correctly skip expensive checks

4 years ago[MLIR] Propagate input side effect information
Tres Popp [Thu, 23 Apr 2020 16:13:44 +0000 (18:13 +0200)]
[MLIR] Propagate input side effect information

Summary:
Previously operations like std.load created methods for obtaining their
effects but did not inherit from the SideEffect interfaces when their
parameters were decorated with the information. The resulting situation
was that passes had no information on the SideEffects of std.load/store
and had to treat them more cautiously. This adds the inheritance
information when creating the methods.

As a side effect, many tests are modified, as they were using std.load
for testing and this oepration would be folded away as part of pattern
rewriting. Tests are modified to use store or to reutn the result of the
std.load.

Reviewers: mravishankar, antiagainst, nicolasvasilache, herhut, aartbik, ftynse!

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, bader, grosul1, frgossen, Kayjukh, llvm-commits

Tags: #llvm

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

4 years ago[flang][docs] Doxygen support in flang.
sameeran joshi [Mon, 27 Apr 2020 09:22:36 +0000 (14:52 +0530)]
[flang][docs] Doxygen support in flang.

    Summary:
    Added support for doxygen-style documentation generation from source code.
    Added -DLLVM_ENABLE_DOXYGEN=ON -DFLANG_INCLUDE_DOCS=ON flags to cmake.
    Added the target doxygen-flang for building doxygen
    Updated README.txt

    Reviewers: DavidTruby, richard.barton.arm, sscalpone,  mehdi_amini, jdoerfert

    Reviewed By: DavidTruby, richard.barton.arm, sscalpone

    Previous review: https://github.com/flang-compiler/f18/pull/1065

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

4 years ago[analyzer] On-demand parsing capability for CTU
Endre Fülöp [Mon, 27 Apr 2020 08:13:34 +0000 (10:13 +0200)]
[analyzer] On-demand parsing capability for CTU

Summary:
Add an option to enable on-demand parsing of needed ASTs during CTU analysis.
Two options are introduced. CTUOnDemandParsing enables the feature, and
CTUOnDemandParsingDatabase specifies the path to a compilation database, which
has all the necessary information to generate the ASTs.

Reviewers: martong, balazske, Szelethus, xazax.hun

Subscribers: ormris, mgorny, whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, steakhal, cfe-commits

Tags: #clang

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

4 years ago[ARM] Replace hasNoSchedulingInfo with UnsupportedFeatures in the A57 schedule
David Green [Mon, 27 Apr 2020 08:19:06 +0000 (09:19 +0100)]
[ARM] Replace hasNoSchedulingInfo with UnsupportedFeatures in the A57 schedule

hasNoSchedulingInfo should be used for Pseudo's and other instructions
that are never expected to be scheduled. This removes the flag from new
ARM instructions, instead fixing the A57 schedule by marking the related
architecture features as unsupported.

4 years ago[ARM] Only produce qadd8b under hasV6Ops
David Green [Sun, 26 Apr 2020 20:58:58 +0000 (21:58 +0100)]
[ARM] Only produce qadd8b under hasV6Ops

When compiling for a arm5te cpu from clang, the +dsp attribute is set.
This meant we could try and generate qadd8 instructions where we would
end up having no pattern. I've changed the condition here to be hasV6Ops
&& hasDSP, which is what other parts of ARMISelLowering seem to use for
similar instructions.

Fixed PR45677.

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