platform/upstream/llvm.git
3 years ago[AArch64] Add vector compare/select cost-model tests.
Florian Hahn [Fri, 23 Oct 2020 18:42:16 +0000 (19:42 +0100)]
[AArch64] Add vector compare/select cost-model tests.

3 years ago[lldb] Move copying of files into reproducer out of process
Jonas Devlieghere [Fri, 23 Oct 2020 19:31:33 +0000 (12:31 -0700)]
[lldb] Move copying of files into reproducer out of process

For performance reasons the reproducers don't copy the files captured by
the file collector eagerly, but wait until the reproducer needs to be
generated.

This is a problematic when LLDB crashes and we have to do all this
signal-unsafe work in the signal handler. This patch uses a similar
trick to clang, which has the driver invoke a new cc1 instance to do all
this work out-of-process.

This patch moves the writing of the mapping file as well as copying over
the reproducers into a separate process spawned when lldb crashes.

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

3 years ago[libc++] Clean up unused CI files
Louis Dionne [Fri, 23 Oct 2020 19:20:35 +0000 (15:20 -0400)]
[libc++] Clean up unused CI files

Those were useful during CI experimentation, but are not used anymore.

3 years ago[mlir][vector] Add folder for ExtractStridedSliceOp
Thomas Raoux [Fri, 23 Oct 2020 19:07:25 +0000 (12:07 -0700)]
[mlir][vector] Add folder for ExtractStridedSliceOp

Add folder for the case where ExtractStridedSliceOp source comes from a chain
of InsertStridedSliceOp. Also add a folder for the trivial case where the
ExtractStridedSliceOp is a no-op.

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

3 years agoUnconditionally #include <future>
Geoffrey Martin-Noble [Fri, 23 Oct 2020 19:15:38 +0000 (19:15 +0000)]
Unconditionally #include <future>

This unbreaks building with `LLVM_ENABLE_THREADS=0`. Since
https://github.com/llvm/llvm-project/commit/069919c9ba33 usage of
`std::promise` is not guarded by `LLVM_ENABLE_THREADS`, so this header
must be unconditionally included.

Reviewed By: lhames

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

3 years ago[libc++] Refactor the run-buildbot script to make it more modular, and run the benchmarks
Louis Dionne [Fri, 23 Oct 2020 14:02:14 +0000 (10:02 -0400)]
[libc++] Refactor the run-buildbot script to make it more modular, and run the benchmarks

As a fly-by fix, unbreak the benchmarks on Apple platforms.

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

3 years ago[mlir][vector] Add folding for ExtractOp with ShapeCastOp source
Thomas Raoux [Fri, 23 Oct 2020 18:53:38 +0000 (11:53 -0700)]
[mlir][vector] Add folding for ExtractOp with ShapeCastOp source

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

3 years ago[gn build] Add missing comma
Arthur Eubanks [Fri, 23 Oct 2020 19:01:23 +0000 (12:01 -0700)]
[gn build] Add missing comma

3 years agoSourceManager: Simplify by inlining what remains of ComputeLineNumbers, NFC
Duncan P. N. Exon Smith [Thu, 22 Oct 2020 02:31:15 +0000 (22:31 -0400)]
SourceManager: Simplify by inlining what remains of ComputeLineNumbers, NFC

Use `LineOffsetMapping:get` directly and remove/inline the helper
`ComputeLineNumbers`, simplifying the callers.

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

3 years ago[IR] add fn attr for no_stack_protector; prevent inlining on mismatch
Nick Desaulniers [Fri, 23 Oct 2020 18:41:17 +0000 (11:41 -0700)]
[IR] add fn attr for no_stack_protector; prevent inlining on mismatch

It's currently ambiguous in IR whether the source language explicitly
did not want a stack a stack protector (in C, via function attribute
no_stack_protector) or doesn't care for any given function.

It's common for code that manipulates the stack via inline assembly or
that has to set up its own stack canary (such as the Linux kernel) would
like to avoid stack protectors in certain functions. In this case, we've
been bitten by numerous bugs where a callee with a stack protector is
inlined into an __attribute__((__no_stack_protector__)) caller, which
generally breaks the caller's assumptions about not having a stack
protector. LTO exacerbates the issue.

While developers can avoid this by putting all no_stack_protector
functions in one translation unit together and compiling those with
-fno-stack-protector, it's generally not very ergonomic or as
ergonomic as a function attribute, and still doesn't work for LTO. See also:
https://lore.kernel.org/linux-pm/20200915172658.1432732-1-rkir@google.com/
https://lore.kernel.org/lkml/20200918201436.2932360-30-samitolvanen@google.com/T/#u

Typically, when inlining a callee into a caller, the caller will be
upgraded in its level of stack protection (see adjustCallerSSPLevel()).
By adding an explicit attribute in the IR when the function attribute is
used in the source language, we can now identify such cases and prevent
inlining.  Block inlining when the callee and caller differ in the case that one
contains `nossp` when the other has `ssp`, `sspstrong`, or `sspreq`.

Fixes pr/47479.

Reviewed By: void

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

3 years ago[lldb] Fix use of undefined type 'lldb_private::UtilityFunction'
Jonas Devlieghere [Fri, 23 Oct 2020 18:46:45 +0000 (11:46 -0700)]
[lldb] Fix use of undefined type 'lldb_private::UtilityFunction'

We were returning the default constructed unique_pointer from
TypeSystem.h for which the compiler does not have a definition. Move the
implementation into the cpp file.

3 years ago[AIX] Let alloca return 16 bytes alignment
Xiangling Liao [Fri, 23 Oct 2020 18:09:14 +0000 (14:09 -0400)]
[AIX] Let alloca return 16 bytes alignment

On AIX, to support vector types, which should always be 16 bytes aligned,
we set alloca to return 16 bytes aligned memory space.

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

3 years ago[AMDGPU] Fixed isLegalRegOperand() with physregs
Stanislav Mekhanoshin [Fri, 23 Oct 2020 18:06:18 +0000 (11:06 -0700)]
[AMDGPU] Fixed isLegalRegOperand() with physregs

This does not change anything at the moment, but needed for
D89170. In that change I am probing a physical SGPR to see if
it is legal. RC is SReg_32, but DRC for scratch instructions
is SReg_32_XEXEC_HI and test fails.

That is sufficient just to check if DRC contains a register
here in case of physreg. Physregs also do not use subregs
so the subreg handling below is irrelevant for these.

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

3 years ago[AIX][cmake] Adjust management of `-G` for linking
Hubert Tong [Fri, 23 Oct 2020 18:25:22 +0000 (14:25 -0400)]
[AIX][cmake] Adjust management of `-G` for linking

The change in 0ba98433971f changed the behaviour of the build when
using an XL build compiler because `-G` is not a pure linker option:
it also implies `-shared`. This was accounted for in the base CMake
configuration, so an analysis of the change from 0ba98433971f in
relation to a build using Clang (where `-shared` is introduced by CMake)
would not identify the issue. This patch resolves this particular issue
by adding `-shared` alongside `-Wl,-G`.

At the same time, the investigation reveals that several aspects of the
various build configurations are not operating in the manner originally
intended.

The other issue related to the `-G` linker option in the build is that
the removal of it (to avoid unnecessary use of run-time linking) is not
effective for the build using the Clang compiler. This patch addresses
this by adjusting the regular expressions used to remove the broadly-
applied `-G`.

Finally, the issue of specifying the export list with `-Wl,` instead of
a compiler option is flagged with a FIXME comment.

Reviewed By: daltenty, amyk

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

3 years ago[MemProf] XFAIL test on avr until issue can be debugged
Teresa Johnson [Fri, 23 Oct 2020 18:28:11 +0000 (11:28 -0700)]
[MemProf] XFAIL test on avr until issue can be debugged

For unknown reasons, this test started failing only on the
llvm-avr-linux bot after 5c20d7db9f2791367b9311130eb44afecb16829c:
http://lab.llvm.org:8011/#/builders/112/builds/365

The error message is not helpful, and I have an email out to the bot
owner to help with debugging. XFAIL it on avr for now.

3 years ago[BasicAA] Add additional phi cycle test (NFC)
Nikita Popov [Fri, 23 Oct 2020 18:30:27 +0000 (20:30 +0200)]
[BasicAA] Add additional phi cycle test (NFC)

This is a variation of the BatchAA problem that also applies
without BatchAA. We may have a cached result from earlier in
the same query.

3 years ago[NFC] Use [MC]Register in RegAllocGreedy
Mircea Trofin [Thu, 22 Oct 2020 17:30:30 +0000 (10:30 -0700)]
[NFC] Use [MC]Register in RegAllocGreedy

This was initiated from the uses of MCRegUnitIterator, so while likely
not exhaustive, it's a step forward.

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

3 years ago[PowerPC] Add intrinsics for MMA
Baptiste Saleil [Tue, 13 Oct 2020 19:19:15 +0000 (14:19 -0500)]
[PowerPC] Add intrinsics for MMA

This patch adds support for MMA intrinsics.

Authored by: Baptiste Saleil

Reviewed By: #powerpc, bsaleil, amyk

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

3 years ago[PhiValues] Use SetVector to avoid non-determinism
Nikita Popov [Thu, 22 Oct 2020 21:49:08 +0000 (23:49 +0200)]
[PhiValues] Use SetVector to avoid non-determinism

I'm not sure whether this can cause actual non-determinism in the
compiler output, but at least it causes non-determinism in the
statistics collected by BasicAA.

Use SetVector to have a predictable iteration order.

3 years ago[mlir] Add FuncOp::eraseResults
Sean Silva [Fri, 23 Oct 2020 01:56:53 +0000 (18:56 -0700)]
[mlir] Add FuncOp::eraseResults

I just found I needed this in an upcoming patch, and it seems generally
useful to have.

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

3 years ago[ELF] Don't error on R_PPC64_REL24/R_PPC64_REL24_NOTOC referencing __tls_get_addr...
Fangrui Song [Fri, 23 Oct 2020 17:37:24 +0000 (10:37 -0700)]
[ELF] Don't error on R_PPC64_REL24/R_PPC64_REL24_NOTOC referencing __tls_get_addr for missing R_PPC64_TLSGD/R_PPC64_TLSLD

This partially reverts D85994.

In glibc, elf/dl-sym.c calls the raw `__tls_get_addr` by specifying the
tls_index parameter. Such a call does not have a pairing R_PPC64_TLSGD/R_PPC64_TLSLD.
This is legitimate. Since we cannot distinguish the benign case from cases due
to toolchain issues, we have to be permissive.

Acked by Stefan Pintilie

3 years ago[MLInliner] Disable always inliner in bounds tests
Mircea Trofin [Fri, 23 Oct 2020 17:20:12 +0000 (10:20 -0700)]
[MLInliner] Disable always inliner in bounds tests

That changes the threshold calculation.

3 years agoSourceManager: Make LastLineNoContentCache and ContentCache::SourceLineCache mutable...
Duncan P. N. Exon Smith [Wed, 21 Oct 2020 21:48:28 +0000 (17:48 -0400)]
SourceManager: Make LastLineNoContentCache and ContentCache::SourceLineCache mutable, NFC

Avoid some noisy `const_cast`s by making `ContentCache::SourceLineCache`
and `SourceManager::LastLineNoContentCache` both mutable.

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

3 years ago[AArch64][GlobalISel] Introduce a new post-isel optimization pass.
Amara Emerson [Wed, 14 Oct 2020 06:41:32 +0000 (23:41 -0700)]
[AArch64][GlobalISel] Introduce a new post-isel optimization pass.

There are two optimizations here:

1. Consider the following code:
 FCMPSrr %0, %1, implicit-def $nzcv
 %sel1:gpr32 = CSELWr %_, %_, 12, implicit $nzcv
 %sub:gpr32 = SUBSWrr %_, %_, implicit-def $nzcv
 FCMPSrr %0, %1, implicit-def $nzcv
 %sel2:gpr32 = CSELWr %_, %_, 12, implicit $nzcv
This kind of code where we have 2 FCMPs each feeding a CSEL can happen
when we have a single IR fcmp being used by two selects. During selection,
to ensure that there can be no clobbering of nzcv between the fcmp and the
csel, we have to generate an fcmp immediately before each csel is
selected.

However, often we can essentially CSE these together later in MachineCSE.
This doesn't work though if there are unrelated flag-setting instructions
in between the two FCMPs. In this case, the SUBS defines NZCV
but it doesn't have any users, being overwritten by the second FCMP.

Our solution here is to try to convert flag setting operations between
a interval of identical FCMPs, so that CSE will be able to eliminate one.

2. SelectionDAG imported patterns for arithmetic ops currently select the
flag-setting ops for CSE reasons, and add the implicit-def $nzcv operand
to those instructions. However if those impdef operands are not marked as
dead, the peephole optimizations are not able to optimize them into non-flag
setting variants. The optimization here is to find these dead imp-defs and
mark them as such.

This pass is only enabled when optimizations are enabled.

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

3 years ago[gn build] Port dbbc4f4e226
LLVM GN Syncbot [Fri, 23 Oct 2020 17:06:41 +0000 (17:06 +0000)]
[gn build] Port dbbc4f4e226

3 years ago[CUDA] Extract CUDA version from cuda.h if version.txt is not found
Artem Belevich [Tue, 20 Oct 2020 22:11:38 +0000 (15:11 -0700)]
[CUDA] Extract CUDA version from cuda.h if version.txt is not found

If CUDA version can not be determined based on version.txt file, attempt to find
CUDA_VERSION macro in cuda.h.

This is a follow-up to D89752,

Differntial Revision: https://reviews.llvm.org/D89832

3 years ago[CUDA] Improve clang's ability to detect recent CUDA versions.
Artem Belevich [Mon, 19 Oct 2020 23:41:51 +0000 (16:41 -0700)]
[CUDA] Improve clang's ability to detect recent CUDA versions.

CUDA-11.1 does not carry version.txt which causes clang to assume that it's
CUDA-7.0, which used to be the only CUDA version w/o version.txt.

In order to tell CUDA-7.0 apart from the new versions, clang now probes for the
presence of libdevice.10.bc which is not present in the old CUDA versions.

This should keep Clang working for CUDA-11.1.

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

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

3 years ago[lldb] Redesign Target::GetUtilityFunctionForLanguage API
Jonas Devlieghere [Fri, 23 Oct 2020 16:26:11 +0000 (09:26 -0700)]
[lldb] Redesign Target::GetUtilityFunctionForLanguage API

This patch redesigns the Target::GetUtilityFunctionForLanguage API:

 - Use a unique_ptr instead of a raw pointer for the return type.
 - Wrap the result in an llvm::Expected instead of using a Status object as an I/O parameter.
 - Combine the action of "getting" and "installing" the UtilityFunction as they always get called together.
 - Pass std::strings instead of const char* and std::move them where appropriate.

There's more room for improvement but I think this tackles the most
prevalent issues with the current API.

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

3 years agoThese compiler-rt tests should be UNSUPPORTED instead of XFAIL.
Alex Orlov [Fri, 23 Oct 2020 16:57:18 +0000 (20:57 +0400)]
These compiler-rt tests should be UNSUPPORTED instead of XFAIL.

These compiler-rt tests should be UNSUPPORTED instead of XFAIL, which seems to be the real intent of the authors.

Reviewed By: vvereschaka

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

3 years agoSourceManager: Encapsulate line number mapping into SrcMgr::LineOffsetMapping
Duncan P. N. Exon Smith [Wed, 21 Oct 2020 21:32:43 +0000 (17:32 -0400)]
SourceManager: Encapsulate line number mapping into SrcMgr::LineOffsetMapping

Put the guts of `ComputeLineNumbers` into `LineOffsetMapping::get` and
`LineOffsetMapping::LineOffsetMapping`.  As a drive-by, store the number
of lines directly in the bump-ptr-allocated array.

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

3 years agoRevert "[CGSCC] Detect devirtualization in more cases"
Arthur Eubanks [Fri, 23 Oct 2020 16:53:52 +0000 (09:53 -0700)]
Revert "[CGSCC] Detect devirtualization in more cases"

This reverts commit 3024fe5b55ed72633915f613bd5e2826583c396f.

Causes major compile time regressions:
https://llvm-compile-time-tracker.com/compare.php?from=3b8d8954bf2c192502d757019b9fe434864068e9&to=3024fe5b55ed72633915f613bd5e2826583c396f&stat=instructions

3 years agoAdded utility to launch tests on a target remotely.
Alex Orlov [Fri, 23 Oct 2020 16:49:00 +0000 (20:49 +0400)]
Added utility to launch tests on a target remotely.

Runs an executable on a remote host.
This is meant to be used as an executor when running the LLVM and the Libraries tests on a target.

Reviewed By: vvereschaka

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

3 years agoRe-apply "[JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation"
Lang Hames [Fri, 23 Oct 2020 06:24:40 +0000 (23:24 -0700)]
Re-apply "[JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation"

This re-applies e2fceec2fd1 with fixes. Apparently we already *do* support
relaxation for ELF, so we need to make sure the test case allocates a slab at
a fixed address, and that the R_X86_64_REX_GOTPCRELX test references an external
that is guaranteed to be out of range.

3 years ago[AArch64][SVE] Fix umin/umax lowering to handle out of range imm.
Huihui Zhang [Fri, 23 Oct 2020 16:29:43 +0000 (09:29 -0700)]
[AArch64][SVE] Fix umin/umax lowering to handle out of range imm.

Immediate must be in an integer range [0,255] for umin/umax instruction.
Extend pattern matching helper SelectSVEArithImm() to take in value type
bitwidth when checking immediate value is in range or not.

Reviewed By: sdesmalen

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

3 years agoSourceManager: Clarify that FileInfo always has a ContentCache, NFC
Duncan P. N. Exon Smith [Fri, 16 Oct 2020 14:21:50 +0000 (10:21 -0400)]
SourceManager: Clarify that FileInfo always has a ContentCache, NFC

It turns out that `FileInfo` *always* has a ContentCache. Clarify that
in the code:
- Update the private version of `SourceManager::createFileID` to take a
  `ContentCache&` instead of `ContentCache*`, and rename it to
  `createFileIDImpl` for clarity.
- Change `FileInfo::getContentCache` to return a reference.

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

3 years ago[PowerPC] Fix the Predicates for enabling pcrelative-memops and PLXVP/PSTXVP definitions
Victor Huang [Fri, 23 Oct 2020 16:31:05 +0000 (11:31 -0500)]
[PowerPC] Fix the Predicates for enabling pcrelative-memops and PLXVP/PSTXVP definitions

In this patch, Predicates fix added for the following:
* disable prefix-instrs will disable pcrelative-memops
* set two predicates PairedVectorMemops and PrefixInstrs for PLXVP/PSTXVP definitions

Differential Revision: https://reviews.llvm.org/D89727
Reviewed by: amyk, steven.zhang

3 years ago[gn build] Port 00255f41929
LLVM GN Syncbot [Fri, 23 Oct 2020 16:19:55 +0000 (16:19 +0000)]
[gn build] Port 00255f41929

3 years ago[AMDGPU] Fix access beyond the end of the basic block in execMayBeModifiedBeforeAnyUse.
vpykhtin [Wed, 14 Oct 2020 11:47:18 +0000 (14:47 +0300)]
[AMDGPU] Fix access beyond the end of the basic block in execMayBeModifiedBeforeAnyUse.

I was wrong in thinking that MRI.use_instructions return unique instructions and mislead Jay in his previous patch D64393.

First loop counted more instructions than it was in reality and the second loop went beyond the basic block with that counter.

I used Jay's previous code that relied on MRI.use_operands to constrain the number of instructions to check among.
modifiesRegister is inlined to reduce the number of passes over instruction operands and added assert on BB end boundary.

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

3 years ago[clangd] Fix remote-server build and add it to check-clangd
Kadir Cetinkaya [Fri, 23 Oct 2020 14:36:52 +0000 (16:36 +0200)]
[clangd] Fix remote-server build and add it to check-clangd

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

3 years ago[WebAssembly] Implementation of (most) table instructions
Paulo Matos [Fri, 23 Oct 2020 15:36:06 +0000 (08:36 -0700)]
[WebAssembly] Implementation of (most) table instructions

Implementation of instructions table.get, table.set, table.grow,
table.size, table.fill, table.copy.

Missing instructions are table.init and elem.drop as they deal with
element sections which are not yet implemented.

Added more tests to tables.s

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

3 years ago[flang][OpenMP] Upstream lowering of OpenMP `Flush` construct
Sourabh Singh Tomar [Fri, 23 Oct 2020 14:59:12 +0000 (20:29 +0530)]
[flang][OpenMP] Upstream lowering of OpenMP `Flush` construct

Note: This patch reflects the work that can be upstreamed from PR's(merged):

- https://github.com/flang-compiler/f18-llvm-project/pull/476

Reviewed By: kiranchandramohan, clementval

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

3 years ago[DebugInstrRef] Handle DBG_INSTR_REFs use-before-defs in LiveDebugValues
Jeremy Morse [Fri, 23 Oct 2020 13:53:15 +0000 (14:53 +0100)]
[DebugInstrRef] Handle DBG_INSTR_REFs use-before-defs in LiveDebugValues

Deciding where to place debugging instructions when normal instructions
sink between blocks is difficult -- see PR44117. Dealing with this with
instruction-referencing variable locations is simple: we just tolerate
DBG_INSTR_REFs referring to values that haven't been computed yet. This
patch adds support into InstrRefBasedLDV to record when a variable value
appears in the middle of a block, and should have a DBG_VALUE added when it
appears (a debug use before def).

While described simply, this relies heavily on the value-propagation
algorithm in InstrRefBasedLDV. The implementation doesn't attempt to verify
the location of a value unless something non-trivial occurs to merge
variable values in vlocJoin. This means that a variable with a value that
has no location can retain it across all control flow (including loops).
It's only when another debug instruction specifies a different variable
value that we have to check, and find there's no location.

This property means that if a machine value is defined in a block dominated
by a DBG_INSTR_REF that refers to it, all the successor blocks can
automatically find a location for that value (if it's not clobbered). Thus
in a sense, InstrRefBasedLDV is already supporting and implementing
use-before-defs. This patch allows us to specify a variable location in the
block where it's defined.

When loading live-in variable locations, TransferTracker currently discards
those where it can't find a location for the variable value. However, we
can tell from the machine value number whether the value is defined in this
block. If it is, add it to a set of use-before-def records. Then, once the
relevant instruction has been processed, emit a DBG_VALUE immediately after
it.

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

3 years ago[AMDGPU] Add simplification/combines for llvm.amdgcn.fma.legacy
Jay Foad [Fri, 23 Oct 2020 11:52:14 +0000 (12:52 +0100)]
[AMDGPU] Add simplification/combines for llvm.amdgcn.fma.legacy

This follows on from D89558 which added the new intrinsic and D88955
which added similar combines for llvm.amdgcn.fmul.legacy.

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

3 years agoRevert "[Statepoints] Allow deopt GC pointer on VReg if gc-live bundle is empty."
Denis Antrushin [Fri, 23 Oct 2020 14:55:06 +0000 (21:55 +0700)]
Revert "[Statepoints] Allow deopt GC pointer on VReg if gc-live bundle is empty."

Downstream testing revealed some problems with this patch.
Reverting while investigating.
This reverts commit 2b96dcebfae65485859d956954f10f409abaae79.

3 years agoCfgInterface: rename interface() to getInterface()
Nicolai Hähnle [Fri, 23 Oct 2020 14:49:34 +0000 (16:49 +0200)]
CfgInterface: rename interface() to getInterface()

Apparently there are some Microsoft headers which
`#define interface struct`. This method is only used
in pending changes so far.

Change-Id: Ic68fe8e1958ec9b015f817ee218431f4146b888a

3 years ago[flang][OpenMP] Upstream lowering of `ParallelOp` clauses
Sourabh Singh Tomar [Tue, 20 Oct 2020 06:38:27 +0000 (12:08 +0530)]
[flang][OpenMP] Upstream lowering of `ParallelOp` clauses

Note: This patch reflects the work that can be upstreamed from PR's(merged):

1. https://github.com/flang-compiler/f18-llvm-project/pull/456
2. https://github.com/flang-compiler/f18-llvm-project/pull/485

Also replaced TODO with new TODO.

Reviewed By: kiranchandramohan

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

3 years ago[InstCombine] Add i8 bitreverse by multiplication test patterns
Simon Pilgrim [Fri, 23 Oct 2020 14:39:37 +0000 (15:39 +0100)]
[InstCombine] Add i8 bitreverse by multiplication test patterns

Pulled from bit twiddling hacks webpage

3 years ago[InstCombine] Add 8/16/32/64 bitreverse test coverage
Simon Pilgrim [Fri, 23 Oct 2020 14:29:41 +0000 (15:29 +0100)]
[InstCombine] Add 8/16/32/64 bitreverse test coverage

Use typical codegen for the traditional pairwise lgN bitreverse algorithm

3 years ago[InstCombine] Add initial bitreverse test coverage
Simon Pilgrim [Fri, 23 Oct 2020 13:31:18 +0000 (14:31 +0100)]
[InstCombine] Add initial bitreverse test coverage

3 years ago[TableGen] Change !getop and !setop to !getdagop and !setdagop.
Paul C. Anagnostopoulos [Tue, 20 Oct 2020 17:50:49 +0000 (13:50 -0400)]
[TableGen] Change !getop and !setop to !getdagop and !setdagop.

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

3 years agoAMDGPU: Don't query for TII in TII
Matt Arsenault [Thu, 22 Oct 2020 22:20:19 +0000 (18:20 -0400)]
AMDGPU: Don't query for TII in TII

3 years agoAMDGPU: Increase branch size estimate with offset bug
Matt Arsenault [Fri, 23 Oct 2020 00:08:59 +0000 (20:08 -0400)]
AMDGPU: Increase branch size estimate with offset bug

This will be relaxed to insert a nop if the offset hits the bad value,
so over estimate branch instruction sizes.

3 years ago[flang][openacc] Fix semantic check for wait and atomic directives
Valentin Clement [Fri, 23 Oct 2020 14:31:33 +0000 (10:31 -0400)]
[flang][openacc] Fix semantic check for wait and atomic directives

wait and atomic directives are represented by OpenACCWaitConstruct, OpenACCAtmicConstruct in the parser. Those contrsuct were
not taken into account in the semantic check so far.

Reviewed By: kiranchandramohan

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

3 years agoExport TemplateArgumentMatcher so clients defining custom matchers don't need to...
David Van Cleve [Fri, 23 Oct 2020 14:01:58 +0000 (16:01 +0200)]
Export TemplateArgumentMatcher so clients defining custom matchers don't need to use the internal namespace

This change adds another export, `using TemplateArgumentMatcher = internal::Matcher<TemplateArgument>;`, to the collection of exports that put instantiations of the `clang::ast_matchers::internal::Matcher` into the `clang::ast_matchers` namespace. This makes it possible to define custom TemplateArgument matchers without reaching into the `internal` namespace.

Reviewed By: klimek

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

3 years ago[MLIR] Fix bad merge with buffer alias analysis.
Frederik Gossen [Fri, 23 Oct 2020 14:10:10 +0000 (14:10 +0000)]
[MLIR] Fix bad merge with buffer alias analysis.

3 years ago[llvm-mca] Extend cortex-a57 memory instructions test
Evgeny Leviant [Fri, 23 Oct 2020 14:02:20 +0000 (17:02 +0300)]
[llvm-mca] Extend cortex-a57 memory instructions test

Patch adds few/load store instructions which have custom sched
classes in cortex-a57 model.

3 years ago[DebugInstrRef] Convert DBG_INSTR_REFs into variable locations
Jeremy Morse [Fri, 23 Oct 2020 13:06:39 +0000 (14:06 +0100)]
[DebugInstrRef] Convert DBG_INSTR_REFs into variable locations

Handle DBG_INSTR_REF instructions in LiveDebugValues, to determine and
propagate variable locations. The logic is fairly straight forwards:
Collect a map of debug-instruction-number to the machine value numbers
generated in the first walk through the function. When building the
variable value transfer function and we see a DBG_INSTR_REF, look up the
instruction it refers to, and pick the machine value number it generates,
That's it; the rest of LiveDebugValues continues as normal.

Awkwardly, there are two kinds of instruction numbering happening here: the
offset into the block (which is how machine value numbers are determined),
and the numbers that we label instructions with when generating
DBG_INSTR_REFs.

I've also restructured the TransferTracker redefVar code a little, to
separate some DBG_VALUE specific operations into its own method. The
changes around redefVar should be largely NFC, while allowing
DBG_INSTR_REFs to specify a value number rather than just a location.

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

3 years ago[gn build] port 48e4b0f (__config_site revert)
Nico Weber [Fri, 23 Oct 2020 13:44:56 +0000 (09:44 -0400)]
[gn build] port 48e4b0f (__config_site revert)

This reverts commit b3ca53e14274642274be8fe7db8b43dc3c146366.
This reverts commit 8b7dac81d378c339d3e55f6f51cd0c42803903ad.
This reverts commit 37c030f81a9fdd7a7e1b6fa5407b277c1ab1afa1.

3 years ago[runtimes] Revert the libc++ __config_site change
Louis Dionne [Fri, 23 Oct 2020 13:32:50 +0000 (09:32 -0400)]
[runtimes] Revert the libc++ __config_site change

This is a massive revert of the following commits (from most revent to oldest):

2b9b7b5775a1d8fcd7aa5abaa8fc0bc303434f1a.
529ac33197f6408952ae995075ac5e2dc5287e81
28270234f1478047e35879f4ba8838b47edfcc14
69c2087283cf7b17ca75f69daebf4ffc158b754a
b5aa67446e01bd277727b05710a42e69ac41e74b
5d796645d6c8cadeb003715c33e231a8ba05b6de

After checking-in the __config_site change, a lot of things started breaking
due to widespread reliance on various aspects of libc++'s build, notably the
fact that we can include the headers from the source tree, but also reliance
on various "internal" CMake variables used by the runtimes build and compiler-rt.

These were unintended consequences of the change, and after two days, we
still haven't restored all the bots to being green. Instead, now that I
understand what specific areas this will blow up in, I should be able to
chop up the patch into smaller ones that are easier to digest.

See https://reviews.llvm.org/D89041 for more details on this adventure.

3 years ago[LSR] ignore profitable chain when reg num is not major cost.
Chen Zheng [Wed, 21 Oct 2020 03:25:27 +0000 (23:25 -0400)]
[LSR] ignore profitable chain when reg num is not major cost.

Reviewed By: samparker

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

3 years ago[clangd] Drop version from remote index proto names, fix clangd-index-server
Sam McCall [Fri, 23 Oct 2020 13:26:24 +0000 (15:26 +0200)]
[clangd] Drop version from remote index proto names, fix clangd-index-server

We only need to version these messages if they actually diverge.
Unlike the service, the namespace name isn't part of the wire format.

clangd-index-server was broken by 81e5f298c431555d809f898c196945ca879c1150
as the namespace names weren't updated there, this fixes it (by adding
them for the service, and not requiring them elsewhere).

3 years ago[PowerPC][LLD] Support for PC Relative TLS for Local Dynamic
Stefan Pintilie [Fri, 23 Oct 2020 13:22:00 +0000 (08:22 -0500)]
[PowerPC][LLD] Support for PC Relative TLS for Local Dynamic

Add support to LLD for PC Relative Thread Local Storage for Local Dynamic.
This patch adds support for two relocations: R_PPC64_GOT_TLSLD_PCREL34 and
R_PPC64_DTPREL34.

The Local Dynamic code is:
```
pla r3, x@got@tlsld@pcrel        R_PPC64_GOT_TLSLD_PCREL34
bl __tls_get_addr@notoc(x@tlsld) R_PPC64_TLSLD
                                 R_PPC64_REL24_NOTOC
...
paddi r9, r3, x@dtprel           R_PPC64_DTPREL34
```

After relaxation to Local Exec:
```
paddi r3, r13, 0x1000
nop
...
paddi r9, r3, x@dtprel          R_PPC64_DTPREL34
```

Reviewed By: NeHuang, sfertile

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

3 years ago[MLIR] Extract buffer alias analysis for reuse
Frederik Gossen [Fri, 23 Oct 2020 13:20:31 +0000 (13:20 +0000)]
[MLIR] Extract buffer alias analysis for reuse

Extract buffer alias analysis from buffer placement.

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

3 years ago[clang] Split remote index service definition into a separate file.
Sam McCall [Fri, 23 Oct 2020 12:20:57 +0000 (14:20 +0200)]
[clang] Split remote index service definition into a separate file.

This allows it to have a separate namespace (grpc versioned service) without
putting versioning info on all of the other protos (before we need it).

clang-index-server is still broken (from 81e5f298c431555).

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

3 years ago[ValueTracking] add range limits for cttz
Sanjay Patel [Fri, 23 Oct 2020 12:32:58 +0000 (08:32 -0400)]
[ValueTracking] add range limits for cttz

As discussed in D89952,
instcombine can sometimes find a way to reduce similar patterns,
but it is incomplete.
InstSimplify uses the computeConstantRange() ValueTracking analysis
via simplifyICmpWithConstant(), so we just need to fill in the max
value of cttz to process any "icmp pred cttz(X), C" pattern (the
min value is initialized to zero automatically).

https://alive2.llvm.org/ce/z/Z_SLWZ

Follow-up to D89976.

3 years ago[ValueTracking] add range limits for ctlz
Sanjay Patel [Fri, 23 Oct 2020 12:29:27 +0000 (08:29 -0400)]
[ValueTracking] add range limits for ctlz

As discussed in D89952,
instcombine can sometimes find a way to reduce similar patterns,
but it is incomplete.
InstSimplify uses the computeConstantRange() ValueTracking analysis
via simplifyICmpWithConstant(), so we just need to fill in the max
value of ctlz to process any "icmp pred ctlz(X), C" pattern (the
min value is initialized to zero automatically).

Follow-up to D89976.

3 years ago[InstSimplify] add tests for cttz constant range; NFC
Sanjay Patel [Fri, 23 Oct 2020 12:24:17 +0000 (08:24 -0400)]
[InstSimplify] add tests for cttz constant range; NFC

This is a search-and-replace of f6cb7f3

3 years ago[InstSimplify] add tests for ctlz constant range; NFC
Sanjay Patel [Fri, 23 Oct 2020 12:21:55 +0000 (08:21 -0400)]
[InstSimplify] add tests for ctlz constant range; NFC

This is a search-and-replace of f6cb7f3.

3 years ago[clangd] NFC: Add using directives to avoid spelling out llvm::sys::path
Kirill Bobyrev [Fri, 23 Oct 2020 12:37:46 +0000 (14:37 +0200)]
[clangd] NFC: Add using directives to avoid spelling out llvm::sys::path

`llvm::sys::path` is used a lot in the remote index marshalling code. We can save space by avoiding spelling it out explicitly for most functions and times.

Reviewed By: kadircet

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

3 years ago[CMake] Fix hardcoding of protobuf output basename. NFC
Sam McCall [Fri, 23 Oct 2020 12:06:45 +0000 (14:06 +0200)]
[CMake] Fix hardcoding of protobuf output basename. NFC

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

3 years ago[CMake] generate_grpc_protos -> generate_protos(... GRPC). NFC
Sam McCall [Fri, 23 Oct 2020 11:50:31 +0000 (13:50 +0200)]
[CMake] generate_grpc_protos -> generate_protos(... GRPC). NFC

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

3 years ago[clangd] Migrate to proto2 syntax
Kirill Bobyrev [Fri, 23 Oct 2020 12:26:49 +0000 (14:26 +0200)]
[clangd] Migrate to proto2 syntax

This allows us to check whether enum field is actually sent over the wire or missing.

Reviewed By: sammccall

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

3 years ago[clang-tidy] Fix redefinition of module in the same module.modulemap file
Dmitry Polukhin [Wed, 21 Oct 2020 10:25:49 +0000 (11:25 +0100)]
[clang-tidy] Fix redefinition of module in the same module.modulemap file

In memory VFS cannot handle aceesssing the same file with different paths.
This diff just stops using VFS for modulemap files.

Fixes PR47839

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

3 years ago[ValueTracking] add range limits for ctpop
Sanjay Patel [Fri, 23 Oct 2020 12:16:36 +0000 (08:16 -0400)]
[ValueTracking] add range limits for ctpop

As discussed in D89952,
instcombine can sometimes find a way to reduce similar patterns,
but it is incomplete.
InstSimplify uses the computeConstantRange() ValueTracking analysis
via simplifyICmpWithConstant(), so we just need to fill in the max
value of ctpop to process any "icmp pred ctpop(X), C" pattern (the
min value is initialized to zero automatically).

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

3 years ago[mlir] Expose affine expression to C API
zhanghb97 [Wed, 21 Oct 2020 07:32:01 +0000 (15:32 +0800)]
[mlir] Expose affine expression to C API

This patch provides C API for MLIR affine expression.
- Implement C API for methods of AffineExpr class.
- Implement C API for methods of derived classes (AffineBinaryOpExpr, AffineDimExpr, AffineSymbolExpr, and AffineConstantExpr).

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

3 years ago[InstCombine] matchBSwapOrBitReverse - expose bswap/bitreverse matching flags.
Simon Pilgrim [Fri, 23 Oct 2020 11:32:32 +0000 (12:32 +0100)]
[InstCombine] matchBSwapOrBitReverse - expose bswap/bitreverse matching flags.

matchBSwapOrBitReverse was hardcoded to just match bswaps - we're going to need to expose the ability to match bitreverse as well, so make this part of the function call.

3 years ago[InstCombine] Rename InstCombinerImpl::matchBSwap to matchBSwapOrBitReverse. NFCI.
Simon Pilgrim [Fri, 23 Oct 2020 11:19:18 +0000 (12:19 +0100)]
[InstCombine] Rename InstCombinerImpl::matchBSwap to matchBSwapOrBitReverse. NFCI.

This matches bswap and bitreverse intrinsics, so we should make that clear in the function name.

3 years ago[X86] lowerShuffleWithPERMV - use MVT::changeTypeToInteger helper. NFCI.
Simon Pilgrim [Fri, 23 Oct 2020 11:14:19 +0000 (12:14 +0100)]
[X86] lowerShuffleWithPERMV - use MVT::changeTypeToInteger helper. NFCI.

3 years ago[ARM][SchedModels] Convert IsR1P0AndLaterPred to MCSchedPredicate. NFC
Evgeny Leviant [Fri, 23 Oct 2020 11:27:49 +0000 (14:27 +0300)]
[ARM][SchedModels] Convert IsR1P0AndLaterPred to MCSchedPredicate. NFC

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

3 years ago[AArch64] Implement getIntrinsicInstrCost, handle min/max intrinsics.
Florian Hahn [Fri, 23 Oct 2020 08:00:20 +0000 (09:00 +0100)]
[AArch64] Implement getIntrinsicInstrCost, handle min/max intrinsics.

This patch adds a specialized implementation of getIntrinsicInstrCost
and add initial cost-modeling for min/max vector intrinsics.

AArch64 NEON support umin/smin/umax/smax for vectors
<8 x i8>, <16 x i8>, <4 x i16>, <8 x i16>, <2 x i32> and <4 x i32>.
Notably, it does not support vectors with i64 elements.

This change by itself should have very little impact on codegen, but in
follow-up patches I plan to teach the vectorizers to consider using
those intrinsics on platforms where it is profitable, e.g. because there
is no general 'select'-like instruction.

The current cost returned should be better for throughput, latency and size.

Reviewed By: dmgreen

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

3 years ago[lldb] Split out NetBSD/x86 watchpoint impl for unification
Michał Górny [Thu, 22 Oct 2020 12:18:36 +0000 (14:18 +0200)]
[lldb] Split out NetBSD/x86 watchpoint impl for unification

Split the current NetBSD watchpoint implementation for x86 into Utility,
and revamp it to improve readability.  This code is meant to be used
as a common class for all x86 watchpoint implementation, particularly
these on FreeBSD and Linux.

The code uses global watchpoint enable bits, as required by the NetBSD
kernel.  If it ever becomes necessary for any platform to use local
enable bits instead, this can be trivially abstracted out.

The code also postpones clearing DR6 until a new different watchpoint
is being set in place of the old one.  This is necessary since LLDB
repeatedly reenables watchpoints on all threads, by clearing
and restoring them.  When DR6 is cleared as a part of that, then pending
events on other threads can no longer be associated with watchpoints
correctly.

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

3 years ago[DebugInstrRef] NFC: Separate collection of machine/variable values
Jeremy Morse [Fri, 23 Oct 2020 10:06:51 +0000 (11:06 +0100)]
[DebugInstrRef] NFC: Separate collection of machine/variable values

This patch adjusts _when_ something happens in LiveDebugValues /
InstrRefBasedLDV, to make it more amenable to dealing with DBG_INSTR_REF
instructions. There's no functional change.

In the current InstrRefBasedLDV implementation, we collect the machine
value-number transfer function for blocks at the same time as the
variable-value transfer function. After solving machine value numbers, the
variable-value transfer function is updated so that DBG_VALUEs of live-in
registers have the correct value. The same would need to be done for
DBG_INSTR_REFs, to connect instruction-references with machine value
numbers.

Rather than writing more code for that, this patch separates the two: we
collect the (machine-value-number) transfer function and solve for
machine value numbers, then step through the MachineInstrs again collecting
the variable value transfer function. This simplifies things for the new
few patches.

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

3 years ago[MLIR] Added PromoteBuffersToStackPass to convert heap- to stack-based allocations.
Julian Gross [Mon, 19 Oct 2020 11:49:06 +0000 (13:49 +0200)]
[MLIR] Added PromoteBuffersToStackPass to convert heap- to stack-based allocations.

Added optimization pass to convert heap-based allocs to stack-based allocas in
buffer placement. Added the corresponding test file.

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

3 years ago[mlir] Fix exiting OpPatternRewriteDriver::simplifyLocally after first iteration...
Christian Sigg [Fri, 23 Oct 2020 06:29:22 +0000 (08:29 +0200)]
[mlir] Fix exiting OpPatternRewriteDriver::simplifyLocally after first iteration that didn't change the op.

Before this change, we would run `maxIterations` if the first iteration changed the op.
After this change, we exit the loop as soon as an iteration hasn't changed the op.
Assuming that we have reached a fixed point when an iteration doesn't change the op, this doesn't affect correctness.

Reviewed By: rriddle

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

3 years ago[mem2reg] Remove dbg.values describing contents of dead allocas
OCHyams [Fri, 23 Oct 2020 04:44:13 +0000 (04:44 +0000)]
[mem2reg] Remove dbg.values describing contents of dead allocas

This patch copies @vsk's fix to instcombine from D85555 over to mem2reg. The
motivation and rationale are exactly the same: When mem2reg removes an alloca,
it erases the dbg.{addr,declare} instructions which refer to the alloca. It
would be better to instead remove all debug intrinsics which describe the
contents of the dead alloca, namely all dbg.value(<dead alloca>, ...,
DW_OP_deref)'s.

As far as I can tell, prior to D80264 these `dbg.value+deref`s would have been
silently dropped instead of being made `undef`, so we're just returning to
previous behaviour with these patches.

Testing:
`llvm-lit llvm/test` and `ninja check-clang` gave no unexpected failures. Added
3 tests, each of which covers a dbg.value deletion path in mem2reg:
  mem2reg-promote-alloca-1.ll
  mem2reg-promote-alloca-2.ll
  mem2reg-promote-alloca-3.ll
The first is based on the dexter test inlining.c from D89543. This patch also
improves the debugging experience for loop.c from D89543, which suffers
similarly after arg promotion instead of inlining.

3 years ago[lld][ELF][test] Add additional test coverage for LTO
James Henderson [Tue, 20 Oct 2020 09:07:27 +0000 (10:07 +0100)]
[lld][ELF][test] Add additional test coverage for LTO

These are all inspired by existing test coverage we have in an internal
testsuite.

Reviewed by: grimar, MaskRay

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

3 years ago[AMDGPU] Add simplification/combines for llvm.amdgcn.fmul.legacy
Jay Foad [Tue, 6 Oct 2020 14:49:04 +0000 (15:49 +0100)]
[AMDGPU] Add simplification/combines for llvm.amdgcn.fmul.legacy

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

3 years ago[SVE]Clarify TypeSize comparisons in llvm/lib/Transforms
Caroline Concatto [Fri, 16 Oct 2020 08:21:28 +0000 (09:21 +0100)]
[SVE]Clarify TypeSize comparisons in llvm/lib/Transforms

Use isKnownXY comparators when one of the operands can be with
scalable vectors or getFixedSize() for all the other cases.

This patch also does bug fixes for getPrimitiveSizeInBits by using
getFixedSize() near the places with the TypeSize comparison.

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

3 years ago[llvm-mca] Add test for cortex-a57 NEON instructions
Evgeny Leviant [Fri, 23 Oct 2020 07:55:54 +0000 (10:55 +0300)]
[llvm-mca] Add test for cortex-a57 NEON instructions

3 years ago[ARM][SchedModels] Let ldm* instruction scheduling use MCSchedPredicate
Evgeny Leviant [Fri, 23 Oct 2020 07:33:20 +0000 (10:33 +0300)]
[ARM][SchedModels] Let ldm* instruction scheduling use MCSchedPredicate

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

3 years ago[DebugInfo] Clear subreg in setDebugValueUndef()
David Stenberg [Thu, 22 Oct 2020 15:24:30 +0000 (17:24 +0200)]
[DebugInfo] Clear subreg in setDebugValueUndef()

When switching the register debug operands to $noreg in
setupDebugValueUndef() also clear the sub-register indices for virtual
registers. This is done when marking DBG_VALUEs undef in other cases,
e.g. in LiveDebugVariables. I have not found any cases where leaving the
sub-register index causes any issues, and the indices would eventually
get dropped when LiveDebugVariables reinserted the undef DBG_VALUEs
after register scheduling, but if nothing else it looked a bit weird in
printouts to have sub-register indices on $noreg, and I don't think the
sub-register index holds any meaningful information at that point.

I have not been able to find any source-level reproducer for this with
an upstream target, so I have just added an instrumented machine-sink
test.

Reviewed By: djtodoro, jmorse

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

3 years ago[llvm-objcopy][NFC] Extract arg parsing logic into a helper function
Keith Smiley [Fri, 23 Oct 2020 06:13:49 +0000 (23:13 -0700)]
[llvm-objcopy][NFC] Extract arg parsing logic into a helper function

This diff refactors the code which determines the tool type based on
how llvm-objcopy is invoked (objcopy vs strip vs bitcode-strip vs install-name-tool).
NFC.

Test plan: make check-all

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

3 years agoRevert "[JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation."
Lang Hames [Fri, 23 Oct 2020 06:21:29 +0000 (23:21 -0700)]
Revert "[JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation."

This reverts commit e2fceec2fd15b7b74617816ddd87f456c42bbc45.

This commit broke one of the bots. Reverting while I investigate.

3 years ago[JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation.
Lang Hames [Fri, 23 Oct 2020 05:42:03 +0000 (22:42 -0700)]
[JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation.

No support for relaxation yet -- this will always use the GOT entry.

3 years ago[SCEV][NFC] Cache symbolic max exit count
Max Kazantsev [Fri, 23 Oct 2020 05:05:37 +0000 (12:05 +0700)]
[SCEV][NFC] Cache symbolic max exit count

We want to have a caching version of symbolic BE exit count
rather than recompute it every time we need it.

Differential Revision: https://reviews.llvm.org/D89954
Reviewed By: nikic, efriedma

3 years ago[lldb] Fix bug instroduced by a00acbab45b0
Jonas Devlieghere [Fri, 23 Oct 2020 05:15:58 +0000 (22:15 -0700)]
[lldb] Fix bug instroduced by a00acbab45b0

g_expression_prefix, as the name implies, must be perfixed, not
suffixed.

3 years ago[runtimes] Do not set XXX_STANDALONE_BUILD for libc++/abi/unwind
Louis Dionne [Fri, 23 Oct 2020 02:09:43 +0000 (22:09 -0400)]
[runtimes] Do not set XXX_STANDALONE_BUILD for libc++/abi/unwind

The runtimes build was lying to the various runtimes builds by setting
XXX_STANDALONE_BUILD=ON when they are really not being built standalone.
Only COMPILER_RT_STANDALONE_BUILD appears to be necessary, but setting it
for the other runtimes actually breaks everything.

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

3 years ago[lldb] Fix missing initialization in UtilityFunction ctor (NFC)
Jonas Devlieghere [Fri, 23 Oct 2020 04:10:33 +0000 (21:10 -0700)]
[lldb] Fix missing initialization in UtilityFunction ctor (NFC)

The UtilityFunction ctor was dropping the text argument. Probably for
that reason ClangUtilityFunction was setting the parent's member
directly instead of deferring to the parent ctor. Also change the
signatures to take strings which are std::moved in place.

3 years ago[IR] Merge metadata manipulation code into Value
Serge Pavlov [Fri, 13 Sep 2019 17:21:24 +0000 (00:21 +0700)]
[IR] Merge metadata manipulation code into Value

Now there are two main classes in Value hierarchy, which support metadata,
these are Instruction and GlobalObject. They implement different APIs for
metadata manipulation, which however overlap. This change moves metadata
manipulation code into Value, so descendant classes can use this code for
their operations on metadata.

No functional changes intended.

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

3 years agoDebugInfo: Hash DIE referevences (DW_OP_convert) when computing Split DWARF signatures
David Blaikie [Fri, 23 Oct 2020 03:08:54 +0000 (20:08 -0700)]
DebugInfo: Hash DIE referevences (DW_OP_convert) when computing Split DWARF signatures