platform/upstream/llvm.git
4 years ago[NFC][InstCombine] sub-of-negatible.ll: some more test cases
Roman Lebedev [Tue, 21 Apr 2020 17:13:57 +0000 (20:13 +0300)]
[NFC][InstCombine] sub-of-negatible.ll: some more test cases

4 years ago[libc++] Do not enable assertions in the dylib in the Apple cache
Louis Dionne [Tue, 21 Apr 2020 17:11:03 +0000 (13:11 -0400)]
[libc++] Do not enable assertions in the dylib in the Apple cache

It turns out that all this time, we've actually been building without
assertions enabled in the dylib. This commit updates the Apple CMake
cache to make it consistent with reality.

4 years ago[libc] Revert "Propagate entrypoint deps to downstream targets."
Siva Chandra Reddy [Tue, 21 Apr 2020 17:09:25 +0000 (10:09 -0700)]
[libc] Revert "Propagate entrypoint deps to downstream targets."

This reverts commit 20cb440ea210597bf223505604bb5f2220a067c6 as the
target llvmlibc seems to be failing on the bots.

4 years ago[MC][PGO][PGSO] Cleanup unused MBFI in AsmPrinter
Ana Pazos [Tue, 21 Apr 2020 16:38:04 +0000 (09:38 -0700)]
[MC][PGO][PGSO] Cleanup unused MBFI in AsmPrinter

Summary:
Machine Block Frequency Info (MBFI) is being computed but unused in AsmPrinter.

MBFI computation was introduced with PGO change D71149 and then its use was
removed in D71106. No need to keep computing it.

Reviewers: MaskRay, jyknight, skan, yamauchi, davidxl, efriedma, huihuiz

Reviewed By: MaskRay, skan, yamauchi

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[libc++] Re-enable warnings in the new format
Louis Dionne [Mon, 20 Apr 2020 15:33:29 +0000 (11:33 -0400)]
[libc++] Re-enable warnings in the new format

When the new libc++ test format was enabled, warnings were accidentally
dropped cause they were not part of the %{compile_flags} substitution.
This commit adds them back, however `-Werror` is only used for non-verify
tests (cause it doesn't make sense for verify tests).

This commit is a re-application of 20fd62438004, which was reverted in
5ec6fdb0580b because it broke the C++03 bot. This failure should have
been fixed in b4fb705e77aa.

4 years agoFix an unused-variable warning in Release mode.
Benjamin Kramer [Tue, 21 Apr 2020 16:59:19 +0000 (18:59 +0200)]
Fix an unused-variable warning in Release mode.

4 years ago[libc] Propagate entrypoint deps to downstream targets.
Siva Chandra Reddy [Sat, 18 Apr 2020 06:14:54 +0000 (23:14 -0700)]
[libc] Propagate entrypoint deps to downstream targets.

Deps are recrusively evaluated at the place they are needed. With this
change, one does not have to list recursive deps of entrypoints when
listing test targets. One will still have to explicitly list all
entrypoint objects when setting up an "add_entrypoint_library" target.

Reviewers: abrachet

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

4 years ago[XRay] Change xray_instr_map sled addresses from absolute to PC relative for x86-64
Fangrui Song [Tue, 14 Apr 2020 05:28:16 +0000 (22:28 -0700)]
[XRay] Change xray_instr_map sled addresses from absolute to PC relative for x86-64

xray_instr_map contains absolute addresses of sleds, which are relocated
by `R_*_RELATIVE` when linked in -pie or -shared mode.

By making these addresses relative to PC, we can avoid the dynamic
relocations and remove the SHF_WRITE flag from xray_instr_map.  We can
thus save VM pages containg xray_instr_map (because they are not
modified).

This patch changes x86-64 and bumps the sled version to 2. Subsequent
changes will change powerpc64le and AArch64.

Reviewed By: dberris, ianlevesque

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

4 years ago[InstCombine] add tests for logic-of-icmps; NFC
Sanjay Patel [Tue, 21 Apr 2020 16:24:18 +0000 (12:24 -0400)]
[InstCombine] add tests for logic-of-icmps; NFC

These are mostly replicated from D78430 (instsimplify).
If we implement more general transforms for instcombine,
then we probably don't need to add that complexity to instsimplify.

4 years ago[libc] [NFC] Split the CMake rules into multiple files.
Siva Chandra Reddy [Sat, 18 Apr 2020 01:42:40 +0000 (18:42 -0700)]
[libc] [NFC] Split the CMake rules into multiple files.

Summary:
The single file was getting too long to be convenient to navigate. This
patch splits it up two into 4 files one each for header rules,
object rules, library rules, and test rules.

Reviewers: abrachet, alexshap

Subscribers: mgorny, tschuett, libc-commits

Tags: #libc-project

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

4 years ago[Attributor] Use a pointer value type for the OpcodeInstMap
Johannes Doerfert [Fri, 17 Apr 2020 01:00:19 +0000 (20:00 -0500)]
[Attributor] Use a pointer value type for the OpcodeInstMap

This reduces memory consumption and the need to copy complex data
structures repeatedly.

No functional change is intended.

---

Single run of the Attributor module and then CGSCC pass (oldPM)
for SPASS/clause.c (~10k LLVM-IR loc):

Before:
```
calls to allocation functions: 490390 (320725/s)
temporary memory allocations: 84601 (55330/s)
peak heap memory consumption: 41.70MB
peak RSS (including heaptrack overhead): 131.18MB
total memory leaked: 269.04KB
```

After:
```
calls to allocation functions: 489359 (301144/s)
temporary memory allocations: 82983 (51066/s)
peak heap memory consumption: 36.76MB
peak RSS (including heaptrack overhead): 126.48MB
total memory leaked: 269.04KB
```

Difference:
```
calls to allocation functions: -1031 (-10739/s)
temporary memory allocations: -1618 (-16854/s)
peak heap memory consumption: -4.94MB
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

---

4 years ago[Attributor] Use a pointer value type for the QueryMap
Johannes Doerfert [Fri, 17 Apr 2020 00:49:03 +0000 (19:49 -0500)]
[Attributor] Use a pointer value type for the QueryMap

This reduces memory consumption and the need to copy complex data
structures repeatedly.

No functional change is intended.

---

Single run of the Attributor module and then CGSCC pass (oldPM)
for SPASS/clause.c (~10k LLVM-IR loc):

Before:
```
calls to allocation functions: 596180 (374484/s)
temporary memory allocations: 84979 (53378/s)
peak heap memory consumption: 52.14MB
peak RSS (including heaptrack overhead): 139.79MB
total memory leaked: 269.04KB
```

After:
```
calls to allocation functions: 489200 (303285/s)
temporary memory allocations: 83406 (51708/s)
peak heap memory consumption: 41.70MB
peak RSS (including heaptrack overhead): 131.76MB
total memory leaked: 269.04KB
```

Difference:
```
calls to allocation functions: -106980 (-5094285/s)
temporary memory allocations: -1573 (-74904/s)
peak heap memory consumption: -10.44MB
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

---

4 years ago[Attributor] Use a pointer value type for the access kind -> accesses map
Johannes Doerfert [Fri, 17 Apr 2020 00:28:06 +0000 (19:28 -0500)]
[Attributor] Use a pointer value type for the access kind -> accesses map

This reduces memory consumption and the need to copy complex data
structures repeatedly.

No functional change is intended.

---

Single run of the Attributor module and then CGSCC pass (oldPM)
for SPASS/clause.c (~10k LLVM-IR loc):

Before:
```
calls to allocation functions: 616219 (381559/s)
temporary memory allocations: 83294 (51575/s)
peak heap memory consumption: 72.15MB
peak RSS (including heaptrack overhead): 160.04MB
total memory leaked: 269.04KB
```

After:
```
calls to allocation functions: 595004 (357145/s)
temporary memory allocations: 83840 (50324/s)
peak heap memory consumption: 52.14MB
peak RSS (including heaptrack overhead): 138.32MB
total memory leaked: 269.04KB
```

Difference:
```
calls to allocation functions: -21215 (-415980/s)
temporary memory allocations: 546 (10705/s)
peak heap memory consumption: -20.01MB
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

---

4 years ago[Attributor] Pass the Attributor to the AbstractAttribute constructors
Johannes Doerfert [Fri, 17 Apr 2020 23:24:49 +0000 (18:24 -0500)]
[Attributor] Pass the Attributor to the AbstractAttribute constructors

AbstractAttribute::initialize is used to initialize the deduction and
the object we do not always call it. To make sure we have the option to
initialize the object even if initialize is not called we pass the
Attributor to AbstractAttribute constructors now.

4 years ago[Attributor] Use a pointer value type for the AAMap
Johannes Doerfert [Thu, 16 Apr 2020 23:23:01 +0000 (18:23 -0500)]
[Attributor] Use a pointer value type for the AAMap

This reduces memory consumption and the need to copy complex data
structures repeatedly.

No functional change is intended.

---

Single run of the Attributor module and then CGSCC pass (oldPM)
for SPASS/clause.c (~10k LLVM-IR loc):

Before:
```
calls to allocation functions: 613353 (376521/s)
temporary memory allocations: 83636 (51341/s)
peak heap memory consumption: 75.64MB
peak RSS (including heaptrack overhead): 162.97MB
total memory leaked: 269.04KB
```

After:
```
calls to allocation functions: 616575 (349929/s)
temporary memory allocations: 83650 (47474/s)
peak heap memory consumption: 72.15MB
peak RSS (including heaptrack overhead): 159.81MB
total memory leaked: 269.04KB
```

Difference:
```
calls to allocation functions: 3222 (24225/s)
temporary memory allocations: 14 (105/s)
peak heap memory consumption: -3.49MB
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

---

4 years ago[mlir] [linalg] Specify alignment during promotion.
Pierre Oechsel [Tue, 21 Apr 2020 16:12:11 +0000 (18:12 +0200)]
[mlir] [linalg] Specify alignment during promotion.

The buffer allocated by a promotion can be subject to other transformations afterward. For example it could be vectorized, in which case it is needed to ensure that this buffer is memory-aligned.

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

4 years ago[mlir][Linalg] Create a named batch_matmul op and pipe it through.
Nicolas Vasilache [Sat, 18 Apr 2020 04:04:35 +0000 (00:04 -0400)]
[mlir][Linalg] Create a named batch_matmul op and pipe it through.

This revision is the first in a set of improvements that aim at allowing
more generalized named Linalg op generation from a mathematical
specification.

This revision allows creating a new op and checks that the parser,
printer and verifier are hooked up properly.

This opened up a few design points that will be addressed in the future:
1. A named linalg op has a static region builder instead of an
explicitly parsed region. This is not currently compatible with
assemblyFormat so a custom parser / printer are needed.
2. The convention for structured ops and tensor return values needs to
evolve to allow tensor-land and buffer land specifications to agree
3. ReferenceIndexingMaps and referenceIterators will need to become
static to allow building attributes at parse time.
4. Error messages will be improved once we have 3. and we pretty print
in custom form.

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

4 years ago[PowerPC][Future] Add offsets to PC Relative relocations.
Stefan Pintilie [Tue, 21 Apr 2020 16:08:19 +0000 (11:08 -0500)]
[PowerPC][Future] Add offsets to PC Relative relocations.

This is an optimization that applies to global addresses and
allows for the following transformation:
Convert this:

paddi r3, 0, symbol@PCREL, 1
ld r4, 8(r3)

To this:

pld r4, symbol@PCREL+8(0), 1

An instruction is saved and the linker can do the addition when
the symbol is resolved.

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

4 years ago[PowerPC] Add a new test case expand-isel-liveness.mir
Kang Zhang [Tue, 21 Apr 2020 16:00:34 +0000 (16:00 +0000)]
[PowerPC] Add a new test case expand-isel-liveness.mir

4 years ago[lldb/Test] Decode stdout and stderr in case it contains Unicode.
Jonas Devlieghere [Tue, 21 Apr 2020 15:25:44 +0000 (08:25 -0700)]
[lldb/Test] Decode stdout and stderr in case it contains Unicode.

Lit's to_string will just return the string when it's a `str` instance,
which in Python 2 can still contain UTF-8 characters.

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

4 years ago[InlineSpiller] simplify insertReload() NFC
Nick Desaulniers [Tue, 21 Apr 2020 15:25:18 +0000 (08:25 -0700)]
[InlineSpiller] simplify insertReload() NFC

Summary:
The repeated use of std::next() on a MachineBasicBlock::iterator was
clever, but we only need to reconstruct the iterator post creation of
the spill instruction.

This helps simplifying where we plan to place the spill, as discussed in
D77849.

From here, we can simplify the code a little by flipping the return code
of a helper.

Reviewers: efriedma

Reviewed By: efriedma

Subscribers: qcolombet, hiraditya, llvm-commits, srhines

Tags: #llvm

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

4 years ago[AMDGPU] Remove selectSGPRVectorRegClassID. NFC.
Jay Foad [Tue, 21 Apr 2020 12:34:23 +0000 (13:34 +0100)]
[AMDGPU] Remove selectSGPRVectorRegClassID. NFC.

This was yet another function that had to be updated whenever you added
a new register class. Remove it by refactoring its only caller to use
standard helper functions from SIRegisterInfo.

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

4 years ago[ELF] Keep local symbols when both --emit-relocs and --discard-all are specified
Fangrui Song [Fri, 17 Apr 2020 17:29:25 +0000 (10:29 -0700)]
[ELF] Keep local symbols when both --emit-relocs and --discard-all are specified

This fixes a bug as exposed by D77807.

Add tests for {--emit-relocs,-r} x {--discard-locals,--discard-all}. They add coverage for previously undertested cases:

* STT_SECTION associated to GCed sections (`gc`)
* STT_SECTION associated to retained sections (`text`)
* STT_SECTION associated to non-SHF_ALLOC sections (`.comment`)
* STB_LOCAL in GCed sections (`unused_gc`)

Reviewed By: grimar, ikudrin

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

4 years ago[libc++] Fix warnings with Clang in C++03
Louis Dionne [Tue, 21 Apr 2020 15:02:29 +0000 (11:02 -0400)]
[libc++] Fix warnings with Clang in C++03

4 years ago[PowerPC][AIX][NFC] Fix use of FileCheck variable in lit test.
Sean Fertile [Tue, 21 Apr 2020 14:36:45 +0000 (10:36 -0400)]
[PowerPC][AIX][NFC] Fix use of  FileCheck variable in lit test.

4 years ago[ELF] Fix "TLS attribute mismatch" false positives for STT_NOTYPE undefined symbols
Fangrui Song [Sat, 18 Apr 2020 22:04:44 +0000 (15:04 -0700)]
[ELF] Fix "TLS attribute mismatch" false positives for STT_NOTYPE undefined symbols

D13550 added the diagnostic to address/work around a crash.
The rule was refined by D19836 (test/ELF/tls-archive.s) to exclude Lazy symbols.

https://bugs.llvm.org/show_bug.cgi?id=45598 reported another case where the current logic has a false positive:

Bitcode does not record undefined module-level inline assembly symbols
(`IRSymtab.cpp:Builder::addSymbol`). Such an undefined symbol does not
have the FB_tls bit and lld will not consider it STT_TLS. When the symbol is
later replaced by a STT_TLS Defined, lld will error "TLS attribute mismatch".

This patch fixes this false positive by allowing a STT_NOTYPE undefined
symbol to be replaced by a STT_TLS.

Considered alternative:

Moving the diagnostics to scanRelocs() can improve the diagnostics (PR36049)
but that requires a fair amount of refactoring. We will need more
RelExpr members. It requires more thoughts whether it is worthwhile.

See `test/ELF/tls-mismatch.s` for behavior differences. We will fail to
diagnose a likely runtime bug (STT_NOTYPE non-TLS relocation referencing
a TLS definition). This is probably acceptable because compiler
generated code sets symbol types properly.

Reviewed By: grimar, psmith

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

4 years ago[ELF][test] Reorganize "TLS attribute mismatch" tests
Fangrui Song [Sat, 18 Apr 2020 23:05:49 +0000 (16:05 -0700)]
[ELF][test] Reorganize "TLS attribute mismatch" tests

4 years ago[DWARFDebugLine] Check for errors when parsing v2 file/dir lists
Pavel Labath [Tue, 24 Mar 2020 14:49:54 +0000 (15:49 +0100)]
[DWARFDebugLine] Check for errors when parsing v2 file/dir lists

Summary:
Without this we could silently accept an invalid prologue because the
default DataExtractor behavior is to return an empty string when
reaching the end of file. And empty string is also used to terminate
these lists.

This makes the parsing code slightly more complicated, but this
complexity will go away once the parser starts working with truncating
data extractors. The reason I am doing it this way is because without
this, the truncation would regress the quality of error messages (right
now, we produce bad error messages only near EOF, but truncation would
make everything behave as if it was near EOF).

Reviewers: dblaikie, probinson, jhenderson

Subscribers: hiraditya, MaskRay, llvm-commits

Tags: #llvm

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

4 years ago[mlir][NFC] Fix typo in the standalone dialect README.
Jean-Michel Gorius [Tue, 21 Apr 2020 14:54:01 +0000 (16:54 +0200)]
[mlir][NFC] Fix typo in the standalone dialect README.

4 years ago[DWARFDataExtractor] Add a "truncating" constructor
Pavel Labath [Mon, 23 Mar 2020 13:20:08 +0000 (14:20 +0100)]
[DWARFDataExtractor] Add a "truncating" constructor

Summary:
This constructor allows us to create a new DWARFDataExtractor which will
only present a subrange of an entire debug section. Since debug sections
typically consist of multiple contributions, it is expected that one
will create a new data extractor for each contribution in order to
avoid unexpectedly running off into the next one.

This is very useful for unifying the flows for detecting parse errors.
Without it, the code needs to consider two very different scenarios:
1. If there is another contribution after the current one, the
   DataExtractor functions will just start reading from there. This is
   detectable by comparing the current offset against the known
   end-of-contribution offset.
2. If this is the last contribution, the data extractor will just start
   returning zeroes (or other default values). This situation can *not*
   be detected by checking the parsing offset, as this will not be
   advanced in case of errors.

Using a truncated data extractor simplifies the code (and reduces
cognitive load) by making these two cases behave identically -- a
running off the end of a contribution will _always_ produce an EOF error
(if one uses error-aware parsing methods) or return default values.

Reviewers: dblaikie, probinson, jhenderson, ikudrin

Subscribers: aprantl, llvm-commits

Tags: #llvm

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

4 years ago[AArch64][NFC] One more intrinsic test.
Pavel Iliin [Tue, 21 Apr 2020 12:55:22 +0000 (13:55 +0100)]
[AArch64][NFC] One more intrinsic test.

4 years agoX86ISelLowering.cpp - clang-format to fix col80 limit. NFC.
Simon Pilgrim [Tue, 21 Apr 2020 14:18:06 +0000 (15:18 +0100)]
X86ISelLowering.cpp - clang-format to fix col80 limit. NFC.

4 years ago[InstCombine] improve types/names for logic-of-icmp helper function; NFC
Sanjay Patel [Tue, 21 Apr 2020 14:11:53 +0000 (10:11 -0400)]
[InstCombine] improve types/names for logic-of-icmp helper function; NFC

4 years agoSHA1.h - remove unnecessary ArrayRef.h/StringRef.h includes. NFC.
Simon Pilgrim [Tue, 21 Apr 2020 14:12:05 +0000 (15:12 +0100)]
SHA1.h - remove unnecessary ArrayRef.h/StringRef.h includes. NFC.
By moving the update(StringRef) wrapper into SHA1.cpp we can depend just on system headers.

4 years ago[clangd] Bump VSCode version number to allow republish (icon-only change).
Sam McCall [Tue, 21 Apr 2020 14:09:20 +0000 (16:09 +0200)]
[clangd] Bump VSCode version number to allow republish (icon-only change).

4 years ago[VPlan] Make various tryTo* helpers private and mark as const (NFC).
Florian Hahn [Thu, 16 Apr 2020 09:43:09 +0000 (10:43 +0100)]
[VPlan] Make various tryTo* helpers private and mark as const (NFC).

The individual tryTo* helpers do not need to be public. Also, the
builder contained two consecutive public: sections, which is not
necessary. Moved the remaining public methods after the constructor.

Also make some of the tryTo* helpers const.

Reviewers: gilr, rengolin, Ayal, hsaito

Reviewed by: gilr

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

4 years ago[InstCombine] improve types/names for logic-of-icmp helper functions; NFC
Sanjay Patel [Tue, 21 Apr 2020 13:17:40 +0000 (09:17 -0400)]
[InstCombine] improve types/names for logic-of-icmp helper functions; NFC

4 years ago[yaml2obj] - Verify that sections are sorted by their file offsets when creating...
Georgii Rymar [Fri, 17 Apr 2020 12:06:04 +0000 (15:06 +0300)]
[yaml2obj] - Verify that sections are sorted by their file offsets when creating segments.

This validates that sections listed for a segment in the YAML
declaration are ordered by their file offsets.

It might help to simplify the file size computation, but also
is useful by itself as helps to avoid issues in test cases and
to maintain their readability.

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

4 years agoLet targets adjust physical output- and anti-deps
Fraser Cormack [Fri, 17 Apr 2020 15:48:59 +0000 (16:48 +0100)]
Let targets adjust physical output- and anti-deps

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

4 years ago[Dexter] Fix failing clang-opt-bisect sub tool test
Tom Weaver [Tue, 21 Apr 2020 12:40:02 +0000 (13:40 +0100)]
[Dexter] Fix failing clang-opt-bisect sub tool test

  Fixes a mismatch in expected arguments passed to run_debugger_subprocess

  Fix for:
    https://reviews.llvm.org/D76926
    rG9cf9710bb0d61cb5c27c6e780af6a182cb162bfb

4 years ago[Flang][test] Don't set PATH in flang/test/Semantics/common.sh
Rainer Orth [Tue, 21 Apr 2020 12:32:57 +0000 (14:32 +0200)]
[Flang][test] Don't set PATH in flang/test/Semantics/common.sh

Currently, many `Flang :: Semantics` tests FAIL on Solaris.  The failure
mode is always the same:

  actual at 67: Name in ALLOCATE statement must be a variable name
  expect at 67: ERROR: Name in ALLOCATE statement must be a variable name

It turns out the issue is twofold here:

- The awk script embedded in `flang/test/Semantics/common.sh` uses a string
  value for `FS`, which isn't supported by traditional awk as documented in
  the GNU autoconf manual.

- Even though /usr/gnu/bin (with gawk installed as awk) is in my build
  environment's `PATH`, still /bin/awk is used

Although the proper fix would probably be to avoid the unportability, it's
easy to work around it for now.  `common.sh` above is the only script in
the whole tree that for unknown reasons overrides `PATH` to
`/usr/bin:/bin`, unnecessarily creating this mess in the first place.  Just
removing that setting easily avoids the issue.

Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.

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

4 years ago[clangd] Add icon to VSCode extension, and fix URLs
Sam McCall [Tue, 21 Apr 2020 11:40:36 +0000 (13:40 +0200)]
[clangd] Add icon to VSCode extension, and fix URLs

4 years ago[AArch64][SVE] Add addressing mode for contiguous loads & stores
Kerry McLaughlin [Tue, 21 Apr 2020 10:47:24 +0000 (11:47 +0100)]
[AArch64][SVE] Add addressing mode for contiguous loads & stores

Summary:
This patch adds the register + register addressing mode for
SVE contiguous load and store intrinsics (LD1 & ST1)

Reviewers: sdesmalen, fpetrogalli, efriedma, rengolin

Reviewed By: fpetrogalli

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, cfe-commits, llvm-commits

Tags: #llvm

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

4 years agoTGLexer.h - add missing <vector> include.
Simon Pilgrim [Tue, 21 Apr 2020 10:56:49 +0000 (11:56 +0100)]
TGLexer.h - add missing <vector> include.
Looks like we are implicitly depending on <vector> but not all machines will include it.

4 years ago[mlir] [linalg] Fix transform-patterns test.
Pierre Oechsel [Tue, 21 Apr 2020 10:51:35 +0000 (12:51 +0200)]
[mlir] [linalg] Fix transform-patterns test.

Unfortunately FileCheck ignores directives with whitespace between the directive and the colon (`CHECK  :` for example), thus most of the directives of this test were ignored.

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

4 years agoAttempting fix buildbot
Sam Parker [Tue, 21 Apr 2020 10:41:16 +0000 (11:41 +0100)]
Attempting fix buildbot

getUserCost is faulting for some builders.

4 years agoTGParser.h - cleanup includes and forward declarations. NFC.
Simon Pilgrim [Mon, 20 Apr 2020 16:51:22 +0000 (17:51 +0100)]
TGParser.h - cleanup includes and forward declarations. NFC.
Replace Twine.h/SourceMgr.h includes with forward declarations and include in TGParser.cpp
Remove forward declarations we already have to include in Record.h

4 years agoTGLexer.h - cleanup includes and forward declarations. NFC.
Simon Pilgrim [Mon, 20 Apr 2020 16:47:54 +0000 (17:47 +0100)]
TGLexer.h - cleanup includes and forward declarations. NFC.
Replace ArrayRef.h with a forward declaration and include in ArrayRef.cpp
Remove SMLoc forward declaration as we already have to include SMLoc.h

4 years agoAliasAnalysisSummary.h - cleanup includes and forward declarations. NFC.
Simon Pilgrim [Mon, 20 Apr 2020 16:44:18 +0000 (17:44 +0100)]
AliasAnalysisSummary.h - cleanup includes and forward declarations. NFC.
Push InstrTypes.h include down to AliasAnalysisSummary.cpp

4 years ago[mlir][SCCP] Add support for propagating constants across inter-region control flow.
River Riddle [Tue, 21 Apr 2020 09:54:14 +0000 (02:54 -0700)]
[mlir][SCCP] Add support for propagating constants across inter-region control flow.

This is possible by adding two new ControlFlowInterface additions:

- A new interface, RegionBranchOpInterface
This interface allows for region holding operations to describe how control flows between regions. This interface initially contains two methods:

* getSuccessorEntryOperands
Returns the operands of this operation used as the entry arguments when entering the region at `index`, which was specified as a successor by `getSuccessorRegions`. when entering. These operands should correspond 1-1 with the successor inputs specified in `getSuccessorRegions`, and may be a subset of the entry arguments for that region.

*  getSuccessorRegions
Returns the viable successors of a region, or the possible successor when branching from the parent op. This allows for describing which regions may be executed when entering an operation, and which regions are executed after having executed another region of the parent op. For example, a structured loop operation may always enter into the loop body region. The loop body region may branch back to itself, or exit to the operation.

- A trait, ReturnLike
This trait signals that a terminator exits a region and forwards all of its operands as "exiting" values.

These additions allow for performing more general dataflow analysis in the presence of region holding operations.

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

4 years ago[mlir][Transforms] Add pass to perform sparse conditional constant propagation
River Riddle [Tue, 21 Apr 2020 09:54:05 +0000 (02:54 -0700)]
[mlir][Transforms] Add pass to perform sparse conditional constant propagation

This revision adds the initial pass for performing SCCP generically in MLIR. SCCP is an algorithm for propagating constants across control flow, and optimistically assumes all values to be constant unless proven otherwise. It currently supports branching control, with support for regions and inter-procedural propagation being added in followups.

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

4 years ago[clangd] Change field name to prevent shadowing
Kadir Cetinkaya [Tue, 21 Apr 2020 09:52:28 +0000 (11:52 +0200)]
[clangd] Change field name to prevent shadowing

4 years ago[mlir] [linalg] Only promote selected buffers.
Pierre Oechsel [Tue, 21 Apr 2020 09:43:28 +0000 (11:43 +0200)]
[mlir] [linalg] Only promote selected buffers.

The promotion transformation is promoting all input and output buffers of the transformed op. The user might want to only promote some of these buffers.

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

4 years ago[VE] Create a TargetInfo header. NFC
Kazushi (Jam) Marukawa [Tue, 21 Apr 2020 09:42:03 +0000 (11:42 +0200)]
[VE] Create a TargetInfo header.  NFC

Summary:
Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header in
order to follow other architectures.

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

4 years ago[clangd] Fix windows buildbots for #import statements
Kadir Cetinkaya [Tue, 21 Apr 2020 08:55:52 +0000 (10:55 +0200)]
[clangd] Fix windows buildbots for #import statements

4 years ago[AST] dont invaliate VarDecl when the initializer contains errors.
Haojian Wu [Tue, 21 Apr 2020 07:57:06 +0000 (09:57 +0200)]
[AST] dont invaliate VarDecl when the initializer contains errors.

Summary:
This patch contains 2 separate changes:
1) the initializer of a variable should play no part in decl "invalid" bit;
2) preserve the invalid initializer via recovery exprs;

With 1), we will regress the diagnostics (one big regression is that we loose
the "selected 'begin' function with iterator type" diagnostic in for-range stmt;
but with 2) together, we don't have regressions (the new diagnostics seems to be
improved).

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[SVEIntrinsicOpts] NFC: Remove unused isReinterpretFromBool for no-assert builds
Sander de Smalen [Mon, 20 Apr 2020 20:24:38 +0000 (21:24 +0100)]
[SVEIntrinsicOpts] NFC: Remove unused isReinterpretFromBool for no-assert builds

isReinterpretFromBool's only use is in an assert, which causes a warning that the
function is defined but not used in no-assert builds.

4 years ago[gn build] Port 2214b9076f1
LLVM GN Syncbot [Tue, 21 Apr 2020 08:34:22 +0000 (08:34 +0000)]
[gn build] Port 2214b9076f1

4 years ago[clangd] Make signatureHelp work with stale preambles
Kadir Cetinkaya [Thu, 2 Apr 2020 08:53:23 +0000 (10:53 +0200)]
[clangd] Make signatureHelp work with stale preambles

Summary:
This is achieved by calculating newly added includes and implicitly
parsing them as if they were part of the main file.

This also gets rid of the need for consistent preamble reads.

Reviewers: sammccall

Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, mgrang, arphaman, jfb, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[clangd] Store ppdirective in Inclusion
Kadir Cetinkaya [Wed, 15 Apr 2020 20:00:19 +0000 (22:00 +0200)]
[clangd] Store ppdirective in Inclusion

Summary:
This will enable PreamblePatching proposed in D77392 craft a more
informed patch.

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[TTI] Remove getOperationCost
Sam Parker [Thu, 9 Apr 2020 06:41:18 +0000 (07:41 +0100)]
[TTI] Remove getOperationCost

This API call has been used recently with, a very valid, expectation
that it would do something useful but it doesn't actually query any
backend information. So, remove this method and merge its
functionality into getUserCost. As well as that, also use
getCastInstrCost to get a proper cost from the backend for the
concerned instructions though we only currently return the answer if
it's considered free. The default implementation now also checks
int/ptr conversions too, as well as truncs and bitcasts.

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

4 years ago[AST] Suppress the spammy "attempt to use a deleted fucntion" diagnostic.
Haojian Wu [Tue, 21 Apr 2020 07:18:37 +0000 (09:18 +0200)]
[AST] Suppress the spammy "attempt to use a deleted fucntion" diagnostic.

Summary:
This patch fixes the regression diagnostic, which was introduced in
https://reviews.llvm.org/D77395.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: rsmith, adamcz, cfe-commits

Tags: #clang

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

4 years ago[ARM][ParallelDSP] Handle squaring multiplies
Sam Parker [Mon, 20 Apr 2020 14:04:03 +0000 (15:04 +0100)]
[ARM][ParallelDSP] Handle squaring multiplies

The logic in ARMParallelDSP is setup to merge two 16-bits loads into
a 32-bit load and feed them into the smlads. This requires that four
loads are combined for the four inputs, but there wasn't actually a
check for this.

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

4 years ago[DenseMap] Don't capture the BucketEnd pointer before an operation that might change...
Craig Topper [Tue, 21 Apr 2020 07:00:33 +0000 (00:00 -0700)]
[DenseMap] Don't capture the BucketEnd pointer before an operation that might change the number of buckets.

This code was added in 887efa51c1e0e43ca684ed78b92dbc3a0720881b to
fix reverse iteration.

The call to InsertIntoBucket/InsertIntoBucketWithLookup can change
the number of buckets which will invalidate the BucketEnd. So
don't cache it and calculate it when creating the iterator.

4 years ago[CallSite removal][Instrumentation] Use CallBase instead of CallSite in AddressSaniti...
Craig Topper [Tue, 21 Apr 2020 04:34:35 +0000 (21:34 -0700)]
[CallSite removal][Instrumentation] Use CallBase instead of CallSite in AddressSanitizer/DataFlowSanitizer/MemorySanitizer. NFC

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

4 years ago[LICM][NFC] Reorder checks to speed up things slightly
Max Kazantsev [Tue, 21 Apr 2020 04:25:38 +0000 (11:25 +0700)]
[LICM][NFC] Reorder checks to speed up things slightly

Side effect check is made faster than potentially heavy other checks.

4 years ago[Local] Update getOrEnforceKnownAlignment/getKnownAlignment to use Align/MaybeAlign.
Craig Topper [Tue, 21 Apr 2020 03:32:05 +0000 (20:32 -0700)]
[Local] Update getOrEnforceKnownAlignment/getKnownAlignment to use Align/MaybeAlign.

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

4 years ago[OpenMPOpt] Make the combination of `ident_t*` deterministic
Johannes Doerfert [Mon, 20 Apr 2020 23:25:24 +0000 (18:25 -0500)]
[OpenMPOpt] Make the combination of `ident_t*` deterministic

Before we kept the first applicable `ident_t*` during deduplication of
runtime calls. The problem is that "first" is dependent on the iteration
order of a DenseMap. Since the proper solution, which is to combine the
information from all `ident_t*`, should be deterministic on its own, we
will not try to make the iteration order deterministic. Instead, we will
create a fresh `ident_t*` if there is not a unique existing `ident_t*`
to pick.

4 years ago[OpenMPOpt] Use a pointer value type in map
Johannes Doerfert [Mon, 20 Apr 2020 23:15:08 +0000 (18:15 -0500)]
[OpenMPOpt] Use a pointer value type in map

The value type was a set before which can easily lead to excessive
memory usage and copying. We use a pointer to a vector instead now.

4 years ago[OpenMPOpt] Make the SCC a vector to ensure deterministic results
Johannes Doerfert [Mon, 20 Apr 2020 22:51:38 +0000 (17:51 -0500)]
[OpenMPOpt] Make the SCC a vector to ensure deterministic results

4 years agoPR45535: Check for variables with non-trivial destruction when
Richard Smith [Tue, 21 Apr 2020 04:14:41 +0000 (21:14 -0700)]
PR45535: Check for variables with non-trivial destruction when
determining whether a statement expression has side-effects.

4 years agoPR45534: don't ignore unmodeled side-effects when constant-evaluating a call to __bui...
Richard Smith [Tue, 21 Apr 2020 02:27:39 +0000 (19:27 -0700)]
PR45534: don't ignore unmodeled side-effects when constant-evaluating a call to __builtin_constant_p.

Such side-effects should result in the call evaluating to 'false', even
if we can still determine what value the argument expression will
evaluate to.

4 years agoReland D76675 [llvm-objcopy] Match GNU behaviour regarding file symbols
Fangrui Song [Tue, 24 Mar 2020 07:38:48 +0000 (15:38 +0800)]
Reland D76675 [llvm-objcopy] Match GNU behaviour regarding file symbols

Don't error on Config.KeepFileSymbols for COFF and Mach-O.

Original description:

GNU objcopy removes STT_FILE symbols for strip-debug operations, and
keeps them for --discard-all operation. Match their behaviour for
llvm-objcopy.

Bug: https://github.com/android/ndk/issues/1212

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

4 years agoRevert "[llvm-objcopy] Match GNU behaviour regarding file symbols"
Yi Kong [Tue, 21 Apr 2020 04:04:01 +0000 (12:04 +0800)]
Revert "[llvm-objcopy] Match GNU behaviour regarding file symbols"

This reverts commit 7c65e88d0bc85ff2732a4e23c397ff842b97b828.

Broke non ELF targets.

4 years ago[llvm-objcopy] Match GNU behaviour regarding file symbols
Yi Kong [Tue, 24 Mar 2020 07:38:48 +0000 (15:38 +0800)]
[llvm-objcopy] Match GNU behaviour regarding file symbols

GNU objcopy removes STT_FILE symbols for strip-debug operations, and
keeps them for --discard-all operation. Match their behaviour for
llvm-objcopy.

Bug: https://github.com/android/ndk/issues/1212

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

4 years ago[MC][NFC] Use camelCase style for functions in MCObjectStreamer
Shengchen Kan [Tue, 21 Apr 2020 02:28:13 +0000 (19:28 -0700)]
[MC][NFC] Use camelCase style for functions in MCObjectStreamer

4 years ago[MC][Bugfix] Remove redundant parameter for relaxInstruction
Shengchen Kan [Fri, 17 Apr 2020 12:26:26 +0000 (20:26 +0800)]
[MC][Bugfix] Remove redundant parameter for relaxInstruction

Summary:
Before this patch, `relaxInstruction` takes three arguments, the first
argument refers to the instruction before relaxation and the third
argument is the output instruction after relaxation. There are two quite
strange things:
  1) The first argument's type is `const MCInst &`, the third
  argument's type is `MCInst &`, but they may be aliased to the same
  variable
  2) The backends of ARM, AMDGPU, RISC-V, Hexagon assume that the third
  argument is a fresh uninitialized `MCInst` even if `relaxInstruction`
  may be called like `relaxInstruction(Relaxed, STI, Relaxed)` in a
  loop.

In this patch, we drop the thrid argument, and let `relaxInstruction`
directly modify the given instruction. Also, this patch fixes the bug https://bugs.llvm.org/show_bug.cgi?id=45580, which is introduced by D77851, and
breaks the assumption of ARM, AMDGPU, RISC-V, Hexagon.

Reviewers: Razer6, MaskRay, jyknight, asb, luismarques, enderby, rtaylor, colinl, bcain

Reviewed By: Razer6, MaskRay, bcain

Subscribers: bcain, nickdesaulniers, nathanchance, wuzish, annita.zhang, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, tpr, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, llvm-commits

Tags: #llvm

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

4 years agoBPF: fix a CORE optimization bug
Yonghong Song [Sun, 19 Apr 2020 22:19:06 +0000 (15:19 -0700)]
BPF: fix a CORE optimization bug

For the test case in this patch like below
  struct t { int a; } __attribute__((preserve_access_index));
  int foo(void *);
  int test(struct t *arg) {
      long param[1];
      param[0] = (long)&arg->a;
      return foo(param);
  }

The IR right before BPF SimplifyPatchable phase:
  %1:gpr = LD_imm64 @"llvm.t:0:0$0:0"
  %2:gpr = LDD killed %1:gpr, 0
  %3:gpr = ADD_rr %0:gpr(tied-def 0), killed %2:gpr
  STD killed %3:gpr, %stack.0.param, 0
After SimplifyPatchable phase, the incorrect IR is generated:
  %1:gpr = LD_imm64 @"llvm.t:0:0$0:0"
  %3:gpr = ADD_rr %0:gpr(tied-def 0), killed %1:gpr
  CORE_MEM killed %3:gpr, 306, %0:gpr, @"llvm.t:0:0$0:0"

Note that CORE_MEM pseudo op is introduced to encode
memory operations related to CORE. In the above, we intend
to check whether we have a store like
   *(%3:gpr + 0) = ...
and if this is the case, we could replace it with
   *(%0:gpr + @"llvm.t:0:0$0:0"_ = ...

Unfortunately, in the above, IR for the store is
   *(%stack.0.param + 0) = %3:gpr
and transformation should not happen.

Note that we won't have problem if the actual CORE
dereference (arg->a) happens.

This patch fixed the problem by skip CORE optimization if
the use of ADD_rr result is not the base address of the store
operation.

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

4 years ago[llvm][NFC][CallSite] Remove CallSite from ArgumentPromotion
Mircea Trofin [Tue, 21 Apr 2020 01:14:13 +0000 (18:14 -0700)]
[llvm][NFC][CallSite] Remove CallSite from ArgumentPromotion

Reviewers: dblaikie, craig.topper

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[Attributor] Use the BumpPtrAllocator in InformationCache as well
Johannes Doerfert [Thu, 16 Apr 2020 22:54:40 +0000 (17:54 -0500)]
[Attributor] Use the BumpPtrAllocator in InformationCache as well

We now also use the BumpPtrAllocator from the Attributor in the
InformationCache. The lifetime of objects in either is pretty much the
same and it should result in consistently good performance regardless of
the allocator.

Doing so requires to call more constructors manually but so far that
does not seem to be problematic or messy.

---

Single run of the Attributor module and then CGSCC pass (oldPM)
for SPASS/clause.c (~10k LLVM-IR loc):

Before:
```
calls to allocation functions: 615359 (368257/s)
temporary memory allocations: 83315 (49859/s)
peak heap memory consumption: 75.64MB
peak RSS (including heaptrack overhead): 163.43MB
total memory leaked: 269.04KB
```

After:
```
calls to allocation functions: 613042 (359555/s)
temporary memory allocations: 83322 (48869/s)
peak heap memory consumption: 75.64MB
peak RSS (including heaptrack overhead): 162.92MB
total memory leaked: 269.04KB
```

Difference:
```
calls to allocation functions: -2317 (-68147/s)
temporary memory allocations: 7 (205/s)
peak heap memory consumption: 2.23KB
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

---

4 years ago[Attributor] Partially disable three tests to unblock the windows bot
Johannes Doerfert [Tue, 21 Apr 2020 02:11:02 +0000 (21:11 -0500)]
[Attributor] Partially disable three tests to unblock the windows bot

The windows bot reported a crash [0] which seems to not happen on other
platforms. We disable the old pass manager cgscc runs while this is
under investigation.

[0]
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23151

4 years agoUnbreak ASan runtime in the simulators.
Dan Liew [Tue, 21 Apr 2020 00:22:35 +0000 (17:22 -0700)]
Unbreak ASan runtime in the simulators.

Summary:
861b69faee5df8d4e13ef316c7474a10e4069e81 (rdar://problem/58789439) while
fixing symbolization for TSan completely broke ASan's runtime for the
simulators.

The problem with the previous patch is that the memory passed to
`putenv()` was poisoned and when passed to `putenv()` it tripped
an interceptor for `strchr()` which saw the memory was poisoned and
raised an ASan issue.

The memory was poisoned because `AtosSymbolizerProcess` objects
are created using ASan's internal allocator. Memory from this
allocator gets poisoned with `kAsanInternalHeapMagic`.

To workaround this, this patch makes the memory for the environment
variable entry a global variable that isn't poisoned.

This pass also adds a `DCHECK(getenv(K_ATOS_ENV_VAR))` because the
following DCHECK would crash because `internal_strcmp()` doesn't
work on nullptr.

rdar://problem/62067724

Reviewers: kubamracek, yln

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers

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

4 years ago[MC][NFC] Use camelCase style for function EmitInstToData
Shengchen Kan [Mon, 20 Apr 2020 09:53:00 +0000 (02:53 -0700)]
[MC][NFC] Use camelCase style for function EmitInstToData

4 years ago[llvm][NFC][CallSite] Remove CallSite from CoroEarly
Mircea Trofin [Mon, 20 Apr 2020 19:56:36 +0000 (12:56 -0700)]
[llvm][NFC][CallSite] Remove CallSite from CoroEarly

Reviewers: dblaikie, craig.topper

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years agoFix DenseMap iterator asserts when shouldReverseIterate==true
Chris Bieneman [Mon, 20 Apr 2020 23:28:37 +0000 (18:28 -0500)]
Fix DenseMap iterator asserts when shouldReverseIterate==true

This patch gets the asserts working correctly when LLVM_REVERSE_ITERATION=On by fixing the iterators returned by the DenseMap::find* methods so that they return well-formed iterators that work with reverse iteration, and satisfy the assertions.

4 years agoRecommit: DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deseri...
David Blaikie [Tue, 21 Apr 2020 00:23:47 +0000 (17:23 -0700)]
Recommit: DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization

Recommits c51b45e32ef7f35c11891f60871aa9c2c04cd991
Reverted in b350c666ab65b7585bc58301b03d2b46dc6b0504 due to some
(Google-internal) regressions I cannot reproduce... (so we'll see if
they reproduce this time around)

4 years ago[mlir] Fix getTypes() support for result ranges.
River Riddle [Tue, 21 Apr 2020 00:13:55 +0000 (17:13 -0700)]
[mlir] Fix getTypes() support for result ranges.

4 years ago[dfsan] Fix a bug in strcasecmp() and strncasecmp(): Compare the lowercase versions...
Sam Kerner [Tue, 21 Apr 2020 00:13:00 +0000 (17:13 -0700)]
[dfsan] Fix a bug in strcasecmp() and strncasecmp(): Compare the lowercase versions of the characters when choosing a return value.

Summary:
Resolves this bug:

  https://bugs.llvm.org/show_bug.cgi?id=38369

Reviewers: morehouse, pcc

Reviewed By: morehouse

Subscribers: #sanitizers

Tags: #sanitizers

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

4 years agoFix inlining multi-block callees with type conversion.
Sean Silva [Sat, 18 Apr 2020 03:14:41 +0000 (20:14 -0700)]
Fix inlining multi-block callees with type conversion.

The previous code result a mismatch between block argument types and
predecessor successor args when a type conversion was needed in a
multiblock case. It was assuming the replaced result types matched the
region result types.

Also, slighly improve the debug output from the inliner.

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

4 years ago[llvm-objcopy][MachO] Copy LC_ENCRYPT_INFO/LC_ENCRYPT_INFO_64 load commands
Alexander Shaposhnikov [Mon, 20 Apr 2020 23:33:18 +0000 (16:33 -0700)]
[llvm-objcopy][MachO] Copy LC_ENCRYPT_INFO/LC_ENCRYPT_INFO_64 load commands

Copy LC_ENCRYPT_INFO/LC_ENCRYPT_INFO_64 load commands.

Test plan: make check-all

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

4 years ago[AArch64][NFC] More intrinsic tests.
Pavel Iliin [Mon, 20 Apr 2020 22:54:04 +0000 (23:54 +0100)]
[AArch64][NFC] More intrinsic tests.

4 years agoUpdate LLVMOps for CreateShuffleVector deprecation and rework
Eric Christopher [Mon, 20 Apr 2020 22:25:47 +0000 (15:25 -0700)]
Update LLVMOps for CreateShuffleVector deprecation and rework
creation string.

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

4 years agoFixing bot breakage
Chris Bieneman [Mon, 20 Apr 2020 22:43:28 +0000 (17:43 -0500)]
Fixing bot breakage

This should resolve the failures from 31282d399b7.

4 years agoFix LLVM_REVERSE_ITERATION
Chris Bieneman [Mon, 20 Apr 2020 21:50:20 +0000 (16:50 -0500)]
Fix LLVM_REVERSE_ITERATION

A recent change (4e86e5eedc6), broke `LLVM_REVERSE_ITERATION` for DenseMaps by adding an assert. It is valid to de-reference and increment one step behind `End` when reverse iteration is enabled because `End` is actually the start of the pointer bucket.

4 years agoNew pass to make internal linkage symbol names unique.
Sriraman Tallam [Mon, 20 Apr 2020 21:41:30 +0000 (14:41 -0700)]
New pass to make internal linkage symbol names unique.

With clang option -funique-internal-linkage-symbols, symbols with
internal linkage get names with the module hash appended.

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

4 years ago[SVE] Remove calls to getBitWidth from PowerPC
Christopher Tetreault [Mon, 20 Apr 2020 21:09:41 +0000 (14:09 -0700)]
[SVE] Remove calls to getBitWidth from PowerPC

Reviewers: efriedma, sdesmalen, hfinkel, david-arm, fpetrogalli

Reviewed By: efriedma, fpetrogalli

Subscribers: wuzish, nemanjai, tschuett, hiraditya, kbarton, rkruppe, psnobl, shchenz, llvm-commits

Tags: #llvm

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

4 years ago[SVE] Remove calls to getBitWidth from mips
Christopher Tetreault [Mon, 20 Apr 2020 20:58:02 +0000 (13:58 -0700)]
[SVE] Remove calls to getBitWidth from mips

Reviewers: efriedma, ahatanak, sdesmalen, c-rhodes, david-arm

Reviewed By: efriedma

Subscribers: dexonsmith, sdardis, arichardson, tschuett, hiraditya, jrtc27, atanasyan, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[ARM] MVE and scalar postinc mir tests. NFC
David Green [Mon, 20 Apr 2020 18:53:53 +0000 (19:53 +0100)]
[ARM] MVE and scalar postinc mir tests. NFC

4 years agoRevert "[AMDGPU] Set the CostPerUse value for vgpr registers."
Piotr Sobczak [Mon, 20 Apr 2020 20:01:24 +0000 (22:01 +0200)]
Revert "[AMDGPU] Set the CostPerUse value for vgpr registers."

This reverts commit 728b878de689e4921ca7f864ed3036f9b2c53853.

D76417 has caused vgpr count to go up significantly in real-world
graphics content.

4 years agoRevert "[libc++] Re-enable warnings in the new format"
Louis Dionne [Mon, 20 Apr 2020 20:42:53 +0000 (16:42 -0400)]
Revert "[libc++] Re-enable warnings in the new format"

This reverts commit 20fd62438004, which broke the C++03 build bot.
I'll have another stab at this after fixing those failures.