platform/upstream/llvm.git
4 years ago[mlir][Standard] Allow select to use an i1 for vector and tensor values
River Riddle [Thu, 23 Apr 2020 11:40:42 +0000 (04:40 -0700)]
[mlir][Standard] Allow select to use an i1 for vector and tensor values

It currently requires that the condition match the shape of the selected value, but this is only really useful for things like masks. This revision allows for the use of i1 to mean that all of the vector/tensor is selected. This also matches the behavior of LLVM select. A benefit of this change is that transformations that want to generate selects, like those on the CFG, don't have to special case vector/tensor. Previously the only way to generate  a select from an i1 was to use a splat, but that doesn't support dynamically shaped/unranked tensors.

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

4 years ago[mlir][Standard] Add support for canonicalizing branches to passthrough blocks
River Riddle [Thu, 23 Apr 2020 11:40:33 +0000 (04:40 -0700)]
[mlir][Standard] Add support for canonicalizing branches to passthrough blocks

This revision adds support for canonicalizing the following:

```
   br ^bb1
 ^bb1
   br ^bbN(...)

 br ^bbN(...)
```

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

4 years ago[mlir][Standard] Add a canonicalization to simplify cond_br when the successors are...
River Riddle [Thu, 23 Apr 2020 11:40:25 +0000 (04:40 -0700)]
[mlir][Standard] Add a canonicalization to simplify cond_br when the successors are identical

This revision adds support for canonicalizing the following:

```
cond_br %cond, ^bb1(A, ..., N), ^bb1(A, ..., N)

br ^bb1(A, ..., N)
```

 If the operands to the successor are different and the cond_br is the only predecessor, we emit selects for the branch operands.

```
cond_br %cond, ^bb1(A), ^bb1(B)

%select = select %cond, A, B
br ^bb1(%select)
```

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

4 years ago[mlir][Standard] Add canonicalization for collapsing pass through cond_br successors.
River Riddle [Thu, 23 Apr 2020 11:40:16 +0000 (04:40 -0700)]
[mlir][Standard] Add canonicalization for collapsing pass through cond_br successors.

This revision adds support for the following canonicalization:

```
   cond_br %cond, ^bb1, ^bb2
 ^bb1
   br ^bbN(...)
 ^bb2
   br ^bbK(...)

   cond_br %cond, ^bbN(...), ^bbK(...)
```

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

4 years ago[VPlan] Remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 11:33:57 +0000 (12:33 +0100)]
[VPlan] Remove unused forward declarations. NFC.
Move VPlan.h include from VPlanVerifier.h down to VPlanVerifier.cpp

4 years ago[AMDGPU] Use RegClass helper functions in getRegForInlineAsmConstraint.
Jay Foad [Tue, 21 Apr 2020 16:15:10 +0000 (17:15 +0100)]
[AMDGPU] Use RegClass helper functions in getRegForInlineAsmConstraint.

This avoids more long lists of register classes that have to be updated
every time we add a new one. NFC.

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

4 years ago[CaptureTracking] Replace hardcoded constant to option. NFC.
Serguei Katkov [Wed, 22 Apr 2020 08:50:04 +0000 (15:50 +0700)]
[CaptureTracking] Replace hardcoded constant to option. NFC.

The motivation is to be able to play with the option and change if it is required.

Reviewers: fedor.sergeev, apilipenko, rnk, jdoerfert
Reviewed By: fedor.sergeev
Subscribers: hiraditya, dantrushin, llvm-commits
Differential Revision: https://reviews.llvm.org/D78624

4 years ago[VPlan] Add & use VPValue operands for VPWidenRecipe (NFC).
Florian Hahn [Thu, 23 Apr 2020 10:55:00 +0000 (11:55 +0100)]
[VPlan] Add & use VPValue operands for VPWidenRecipe (NFC).

This patch adds VPValue version of the instruction operands to
VPWidenRecipe and uses them during code-generation.

Similar to D76373 this reduces ingredient def-use usage by ILV as
a step towards full VPlan-based def-use relations.

Reviewers: rengolin, Ayal, gilr

Reviewed By: gilr

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

4 years ago[AMDGPU] Use SGPR instead of SReg classes
Jay Foad [Wed, 22 Apr 2020 10:08:08 +0000 (11:08 +0100)]
[AMDGPU] Use SGPR instead of SReg classes

12994a70cf7 did this for 128-bit classes:

    SGPR_128 only includes the real allocatable SGPRs, and SReg_128 adds
    the additional non-allocatable TTMP registers. There's no point in
    allocating SReg_128 vregs. This shrinks the size of the classes
    regalloc needs to consider, which is usually good.

This patch extends it to all classes > 64 bits, for consistency.

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

4 years ago[lldb] Fix typo in breakpoint set -r description
Raphael Isemann [Thu, 23 Apr 2020 10:06:27 +0000 (12:06 +0200)]
[lldb] Fix typo in breakpoint set -r description

4 years ago[AArch64] Define ACLE FP conversion intrinsics with more specific predicate.
Sander de Smalen [Thu, 23 Apr 2020 09:53:23 +0000 (10:53 +0100)]
[AArch64] Define ACLE FP conversion intrinsics with more specific predicate.

This patch changes the FP conversion intrinsics to take a predicate
that matches the number of lanes for the vector with the widest element
type as opposed to using <vscale x 16 x i1>.

For example:
```<vscale x 4 x float> @llvm.aarch64.sve.fcvt.f32f16(<vscale x 4 x float>, <vscale x 4 x i1>, <vscale x 8 x half>)```
now uses <vscale x 4 x i1> instead of <vscale x 16 x i1>

And similar for:
```<vscale x 4 x float> @llvm.aarch64.sve.fcvt.f32f64(<vscale x 4 x float>, <vscale x 2 x i1>, <vscale x 2 x double>)```
where the predicate now matches the wider type, so <vscale x 2 x i1>.

Reviewers: efriedma, SjoerdMeijer, paulwalker-arm, rengolin

Reviewed By: efriedma

Tags: #clang

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

4 years ago[SveEmitter] Add builtins for FP conversions
Sander de Smalen [Thu, 23 Apr 2020 09:45:13 +0000 (10:45 +0100)]
[SveEmitter] Add builtins for FP conversions

This adds the flag IsOverloadCvt which tells CGBulitin to use
the result type and the type of the last operand as the
overloaded types for the LLVM IR intrinsic.

This also adds the flag IsFPConvert, which is needed to avoid
converting the predicate of the operation from svbool_t to
a predicate with fewer lanes, as the LLVM IR intrinsics use
the <vscale x 16 x i1> as the predicate.

Reviewers: SjoerdMeijer, efriedma

Reviewed By: efriedma

Tags: #clang

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

4 years ago[dexter] Require python >= 3.6
Djordje Todorovic [Thu, 23 Apr 2020 07:49:02 +0000 (09:49 +0200)]
[dexter] Require python >= 3.6

The documentation says we need python >= 3.6. Running it with an older
version, we get verbose output from python interpreter.
This patch fixes that as:

  $ python2 dexter.py list-debuggers
  You need python 3.6 or later to run DExTer

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

4 years ago[obj2yaml] - Zero initialize program headers. NFCI.
Georgii Rymar [Wed, 22 Apr 2020 11:50:58 +0000 (14:50 +0300)]
[obj2yaml] - Zero initialize program headers. NFCI.

It allows to simplify the current code and also
might help for the code around.

It is also consistent with what we do for another headers,
e.g. section headers, elf file header etc.

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

4 years ago[mlir] NFC: fix broken links in doc of operation definitions
Kazuaki Ishizaki [Thu, 23 Apr 2020 09:36:03 +0000 (18:36 +0900)]
[mlir] NFC: fix broken links in doc of operation definitions

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

4 years ago[clang-tidy] Add option to use alpha checkers from clang-analyzer when using `run...
Andi-Bogdan Postelnicu [Fri, 10 Apr 2020 16:25:31 +0000 (19:25 +0300)]
[clang-tidy] Add option to use alpha checkers from clang-analyzer when using `run-clang-tidy.py`

Summary: Add option to use alpha checkers from clang-analyzer when using `run-clang-tidy.py`.

Reviewers: JonasToth

Subscribers: xazax.hun, baloghadamsoftware, a.sidorin, Szelethus, donat.nagy, dkrupp, Charusso, ASDenysPetrov, cfe-commits

Tags: #clang

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

4 years ago[AArch64][GlobalISel] Set the current debug loc when missing in some cases.
Amara Emerson [Thu, 23 Apr 2020 08:34:57 +0000 (01:34 -0700)]
[AArch64][GlobalISel] Set the current debug loc when missing in some cases.

4 years ago[MLIR] Lower GenericAtomicRMWOp to llvm.cmpxchg.
Alexander Belyaev [Wed, 22 Apr 2020 15:23:38 +0000 (17:23 +0200)]
[MLIR] Lower GenericAtomicRMWOp to llvm.cmpxchg.

Summary:
Lowering is pretty much a copy of AtomicRMWOp -> llvm.cmpxchg
pattern.

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

4 years agoRevert "clang-format: support aligned nested conditionals formatting"
Haojian Wu [Thu, 23 Apr 2020 07:25:01 +0000 (09:25 +0200)]
Revert "clang-format: support aligned nested conditionals formatting"

This reverts 3d61b1120e8267aa39f4c9a33d618dbaec4ec6fa5daa25fd7a184524759b6ad065a8bd7e95aa149a

The clang-format test (FormatTest.ConfigurableUseOfTab) is failing in the buildbot:

http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/31811/steps/ninja%20check%201/logs/stdio

4 years ago[ArgumentPromotion] Remove unnecessary getScalarType() before casting to PointerType...
Craig Topper [Thu, 23 Apr 2020 05:21:54 +0000 (22:21 -0700)]
[ArgumentPromotion] Remove unnecessary getScalarType() before casting to PointerType. NFC

I don't believe this pass deals with vectors of pointers. I think
this getScalarType() was added during a mechanical opaque pointer
change of the interface to GetElementPtrInst::getIndexedType.

4 years ago[mlir] NFC: Fix trivial typo under Dialects
Kazuaki Ishizaki [Thu, 23 Apr 2020 05:28:16 +0000 (14:28 +0900)]
[mlir] NFC: Fix trivial typo under Dialects

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

4 years ago[llvm] NFC: Fix trivial typo in rst and td files
Kazuaki Ishizaki [Thu, 23 Apr 2020 05:26:07 +0000 (14:26 +0900)]
[llvm] NFC: Fix trivial typo in rst and td files

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

4 years agoRevert "[NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec."
Puyan Lotfi [Thu, 23 Apr 2020 04:05:08 +0000 (00:05 -0400)]
Revert "[NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec."

This reverts commit 2aa044ed088ae41461ad7029c055014df6c60976.

Reverting due to bot failure in lldb.

4 years ago[NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.
Puyan Lotfi [Wed, 22 Apr 2020 21:32:20 +0000 (17:32 -0400)]
[NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

This is a code clean up of the PropertyAttributeKind and
ObjCPropertyAttributeKind enums in ObjCPropertyDecl and ObjCDeclSpec that are
exactly identical. This non-functional change consolidates these enums
into one. The changes are to many files across clang (and comments in LLVM) so
that everything refers to the new consolidated enum in DeclObjCCommon.h.

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

4 years agoIsolate zero_whitespace parser test into its own file.
Sean Silva [Thu, 23 Apr 2020 02:56:59 +0000 (19:56 -0700)]
Isolate zero_whitespace parser test into its own file.

Summary:
This test is in a different file because it contains a literal NUL
character, which causes various tools to treat it as a binary file.
Hence it is useful to have this test kept in a separate, rarely-changing
file.

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

4 years ago[GISel]: Relax opcode checking at the top level to enable CSE
Aditya Nandakumar [Thu, 23 Apr 2020 00:15:00 +0000 (17:15 -0700)]
[GISel]: Relax opcode checking at the top level to enable CSE

Loosen the restriction on what kinds of opcodes can be CSEd as
targets may want to CSE some generic target specific pseudos.
NFC as far as this change is concerned as CSEConfig still pretty much is
a subset of this check.

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

4 years ago[NFC] Correct typo in comment after D76038
Aaron Puchert [Thu, 23 Apr 2020 00:26:02 +0000 (02:26 +0200)]
[NFC] Correct typo in comment after D76038

4 years ago[AArch64CollectLOH] Debug insts should not break LOH collection [14/14]
Vedant Kumar [Fri, 17 Apr 2020 23:01:25 +0000 (16:01 -0700)]
[AArch64CollectLOH] Debug insts should not break LOH collection [14/14]

Fix an issue where the presence of debug instructions could break
collection of linker optimization hints.

4 years ago[AArch64PreLegalizerCombiner] Fix debug invariance issue in matchFConstantToConstant...
Vedant Kumar [Thu, 16 Apr 2020 22:03:31 +0000 (15:03 -0700)]
[AArch64PreLegalizerCombiner] Fix debug invariance issue in matchFConstantToConstant [13/14]

Fix an issue where the FConstantToConstant combine could fail if debug
instructions were present.

4 years ago[AArch64LoadStoreOptimizer] Skip debug insts during pattern matching [12/14]
Vedant Kumar [Sat, 18 Apr 2020 01:11:46 +0000 (18:11 -0700)]
[AArch64LoadStoreOptimizer] Skip debug insts during pattern matching [12/14]

Do not count the presence of debug insts against the limit set by
LdStLimit, and allow the optimizer to find matching insts by skipping
over debug insts.

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

4 years ago[AArch64ConditionOptimizer] Fix missed optimization due to debug insts [11/14]
Vedant Kumar [Thu, 16 Apr 2020 00:49:53 +0000 (17:49 -0700)]
[AArch64ConditionOptimizer] Fix missed optimization due to debug insts [11/14]

Summary:
The findSuitableCompare method can fail if debug instructions are
present in the MBB -- fix this by using helpers to skip over debug
insts.

Reviewers: aemerson, paquette

Subscribers: kristof.beyls, hiraditya, danielkiss, aprantl, llvm-commits

Tags: #llvm

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

4 years ago[AArch64CondBrTuning] Ignore debug insts when scanning for NZCV clobbers [10/14]
Vedant Kumar [Thu, 16 Apr 2020 00:40:26 +0000 (17:40 -0700)]
[AArch64CondBrTuning] Ignore debug insts when scanning for NZCV clobbers [10/14]

Summary:
This fixes several instances in which condbr optimization was missed
due to a debug instruction appearing as a bogus NZCV clobber.

Reviewers: aemerson, paquette

Subscribers: kristof.beyls, hiraditya, jfb, danielkiss, aprantl, llvm-commits

Tags: #llvm

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

4 years ago[AArch64] Clean up assorted usage of hasOneUse/use_instructions [9/14]
Vedant Kumar [Thu, 16 Apr 2020 00:10:53 +0000 (17:10 -0700)]
[AArch64] Clean up assorted usage of hasOneUse/use_instructions [9/14]

Summary:
Use the variants of these APIs which skip over debug instructions. This
is mostly a cleanup, but it does fix a debug-variance issue which causes
addsub-shifted.ll and addsub_ext.ll to fail when debug info is inserted
by -mir-debugify.

Reviewers: aemerson, paquette

Subscribers: kristof.beyls, hiraditya, jfb, danielkiss, llvm-commits, aprantl

Tags: #llvm

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

4 years ago[AArch64ConditionalCompares] Ignore debug insts in findConvertibleCompare [8/14]
Vedant Kumar [Tue, 14 Apr 2020 21:27:48 +0000 (14:27 -0700)]
[AArch64ConditionalCompares] Ignore debug insts in findConvertibleCompare [8/14]

Summary:
Fix an issue where the presence of debug info could disable the ccmp
optimization due to findConvertibleCompare failing too early (the error
is "Can't create ccmp with multiple uses", where the "use" is a
DBG_VALUE inst).

Depends on D78151.

Reviewers: t.p.northover, paquette, aemerson

Subscribers: kristof.beyls, hiraditya, danielkiss, aprantl, llvm-commits

Tags: #llvm

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

4 years ago[AArch64InstrInfo] Ignore debug insts in areCFlagsAccessedBetweenInstrs [7/14]
Vedant Kumar [Tue, 14 Apr 2020 21:50:03 +0000 (14:50 -0700)]
[AArch64InstrInfo] Ignore debug insts in areCFlagsAccessedBetweenInstrs [7/14]

Summary:
Fix an issue where the presence of debug info could disable a peephole
optimization due to areCFlagsAccessedBetweenInstrs returning the wrong
result.

In test/CodeGen/AArch64/arm64-csel.ll, the issue was found in the
function @foo5, in which the first compare could successfully be
optimized but not the second.

Reviewers: t.p.northover, eastig, paquette

Subscribers: kristof.beyls, hiraditya, danielkiss, aprantl, dsanders, llvm-commits

Tags: #llvm

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

4 years ago[AArch64InstrInfo] Ignore debug insts in canInstrSubstituteCmpInstr [6/14]
Vedant Kumar [Thu, 16 Apr 2020 00:54:46 +0000 (17:54 -0700)]
[AArch64InstrInfo] Ignore debug insts in canInstrSubstituteCmpInstr [6/14]

Summary:
Fix an issue where the presence of debug info could disable a peephole
optimization in optimizeCompareInstr due to canInstrSubstituteCmpInstr
returning the wrong result.

Depends on D78137.

Reviewers: t.p.northover, eastig, paquette

Subscribers: kristof.beyls, hiraditya, danielkiss, aprantl, llvm-commits, dsanders

Tags: #llvm

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

4 years ago[GIsel][LegalizerHelper] Account for debug insts when creating mem libcalls [5/14]
Vedant Kumar [Thu, 16 Apr 2020 22:23:57 +0000 (15:23 -0700)]
[GIsel][LegalizerHelper] Account for debug insts when creating mem libcalls [5/14]

Summary:
While lowering memory intrinsics, GIsel attempts to form a tail call to
a library routine.

There might be a DBG_LABEL or something after the intrinsic call,
though: in that case, GIsel should still be able to form the tail call,
and should also delete the debug insts after the tail call as the
transform makes them invalid.

Reviewers: dsanders, aemerson

Subscribers: hiraditya, aprantl, llvm-commits

Tags: #llvm

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

4 years ago[GIsel][CombinerHelper] Fix for missed ElideBrByInvertingCond/CombineIndexedLoadStore...
Vedant Kumar [Wed, 15 Apr 2020 23:32:25 +0000 (16:32 -0700)]
[GIsel][CombinerHelper] Fix for missed ElideBrByInvertingCond/CombineIndexedLoadStore combines [4/14]

Summary:
Fix an issue which could result in ElideBrByInvertingCond or
CombineIndexedLoadStore being missed when debug info is present. In both
cases the fix is s/hasOneUse/hasOneNonDbgUse/.

Reviewers: aemerson, dsanders

Subscribers: hiraditya, aprantl, llvm-commits

Tags: #llvm

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

4 years ago[GIsel][CombinerHelper] Don't consider debug insts in dominance queries [3/14]
Vedant Kumar [Wed, 15 Apr 2020 23:01:31 +0000 (16:01 -0700)]
[GIsel][CombinerHelper] Don't consider debug insts in dominance queries [3/14]

Summary:
This fixes several issues where the presence of debug instructions could
disable certain combines, due to dominance queries finding uses/defs that
don't actually exist.

Reviewers: dsanders, fhahn, paquette, aemerson

Subscribers: hiraditya, arphaman, aprantl, llvm-commits

Tags: #llvm

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

4 years ago[GISel][RegBankSelect] Hide assertion failure from LLT::getScalarSizeInBits [2/14]
Vedant Kumar [Tue, 14 Apr 2020 18:35:25 +0000 (11:35 -0700)]
[GISel][RegBankSelect] Hide assertion failure from LLT::getScalarSizeInBits [2/14]

Summary:
It looks like RegBankSelect can try to assign a bank based on a
DBG_VALUE instead of ignoring it. This eventually leads to an assert
in AArch64RegisterBankInfo::getInstrMapping because there is some info
missing from the DBG_VALUE MachineOperand (I see: `Assertion failed:
(RawData != 0 && "Invalid Type"), function getScalarSizeInBits`).

I'm not 100% sure it's safe to insert DBG_VALUE instructions right
before RegBankSelect (that's what -debugify-and-strip-all-safe is
doing). Any advice appreciated.

Depends on D78135.

Reviewers: ab, qcolombet, dsanders, aprantl

Subscribers: kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[MachineBasicBlock] Add helpers for skipping debug instructions [1/14]
Vedant Kumar [Thu, 16 Apr 2020 00:54:39 +0000 (17:54 -0700)]
[MachineBasicBlock] Add helpers for skipping debug instructions [1/14]

Summary:
These helpers are exercised by follow-up commits in this patch series,
which is all about removing CodeGen differences with vs. without debug
info in the AArch64 backend.

Reviewers: fhahn, aprantl, jpaquette, paquette

Subscribers: kristof.beyls, llvm-commits

Tags: #llvm

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

4 years ago[ARM] Mark some tests as not safe for -debugify-and-strip-all, NFC
Vedant Kumar [Tue, 14 Apr 2020 23:02:25 +0000 (16:02 -0700)]
[ARM] Mark some tests as not safe for -debugify-and-strip-all, NFC

These tests contain debug instructions which get checked, so we can't
insert synthetic debug info and expect the tests to pass.

The rest of the ARM backend tests appear to be fair game.

4 years ago[Debugify] Do not require named metadata to be present when stripping
Vedant Kumar [Sat, 18 Apr 2020 00:53:14 +0000 (17:53 -0700)]
[Debugify] Do not require named metadata to be present when stripping

This allows -mir-strip-debug to be run without -debugify having run
before.

4 years ago[MachineDebugify] Insert synthetic DBG_VALUE instructions
Vedant Kumar [Mon, 13 Apr 2020 23:15:37 +0000 (16:15 -0700)]
[MachineDebugify] Insert synthetic DBG_VALUE instructions

Summary:
Teach MachineDebugify how to insert DBG_VALUE instructions.  This can
help find bugs causing CodeGen differences when debug info is present.
DBG_VALUE instructions are only emitted when -debugify-level is set to
locations+variables.

There is essentially no attempt made to match up DBG_VALUE register
operands with the local variables they ought to correspond to. I'm not
sure how to improve the situation. In some cases (MachineMemOperand?)
it's possible to find the IR instruction a MachineInstr corresponds to,
but in general this seems to call for "undoing" the work done by ISel.

Reviewers: dsanders, aprantl

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[lldb/Target] Avoid race between Communication::Disconnect calls.
Jonas Devlieghere [Wed, 22 Apr 2020 23:51:56 +0000 (16:51 -0700)]
[lldb/Target] Avoid race between Communication::Disconnect calls.

Avoid a race between the Disconnect call in `Communication::ReadThread`
and the one in `Process::ShouldBroadcastEvent` by reordering the calls
to Disconnect and StopReadThread in `Process::ShouldBroadcastEvent`.

In D77295 Pavel suggested that that might explain the broken pipe I was
seeing. Indeed, changing the order resolved the issue.

4 years agoRevert "get rid of PythonInteger::GetInteger()"
Muhammad Omair Javaid [Wed, 22 Apr 2020 23:35:30 +0000 (04:35 +0500)]
Revert "get rid of PythonInteger::GetInteger()"

This reverts commit 7375212172951d2fc283c81d03c1a8588c3280c6.

This causes multiple test failures on LLDB AArch64 Linux buildbot.
http://lab.llvm.org:8011/builders/lldb-aarch64-ubuntu/builds/3695

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

4 years agoAdd a policy to enable computing SchedDFSResult.
Mark Lacey [Mon, 30 Mar 2020 19:52:14 +0000 (12:52 -0700)]
Add a policy to enable computing SchedDFSResult.

Summary:
Make GenericScheduler compute SchedDFSResult on initialization if
the policy is set. This makes it possible to create classes
that extend GenericScheduler and rely on the results of SchedDFSResult,
e.g. to perform subtree scheduling.

NFC unless the policy is set.

Subscribers: MatzeB, hiraditya, javed.absar, llvm-commits

Tags: #llvm

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

4 years ago[ValueTracking] Let analyses assume a value cannot be partially poison
Juneyoung Lee [Wed, 22 Apr 2020 23:08:16 +0000 (08:08 +0900)]
[ValueTracking] Let analyses assume a value cannot be partially poison

Summary:
This is RFC for fixes in poison-related functions of ValueTracking.
These functions assume that a value can be poison bitwisely, but the semantics
of bitwise poison is not clear at the moment.
Allowing a value to have bitwise poison adds complexity to reasoning about
correctness of optimizations.

This patch makes the analysis functions simply assume that a value is
either fully poison or not, which has been used to understand the correctness
of a few previous optimizations.
The bitwise poison semantics seems to be only used by these functions as well.

In terms of implementation, using value-wise poison concept makes existing
functions do more precise analysis, which is what this patch contains.

Reviewers: spatel, lebedev.ri, jdoerfert, reames, nikic, nlopes, regehr

Reviewed By: nikic

Subscribers: fhahn, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[llvm-objcopy][MachO] Add missing license header
Alexander Shaposhnikov [Wed, 22 Apr 2020 23:05:07 +0000 (16:05 -0700)]
[llvm-objcopy][MachO] Add missing license header

Add missing license header to Object.cpp.
NFC.

4 years agoRevert "RFC: [ValueTracking] Let analyses assume a value cannot be partially poison"
Juneyoung Lee [Wed, 22 Apr 2020 23:06:53 +0000 (08:06 +0900)]
Revert "RFC: [ValueTracking] Let analyses assume a value cannot be partially poison"

This reverts commit 80faa8c3af856df93faf909f21cdcc397bed068f.

4 years agoRFC: [ValueTracking] Let analyses assume a value cannot be partially poison
Juneyoung Lee [Mon, 20 Apr 2020 15:35:45 +0000 (00:35 +0900)]
RFC: [ValueTracking] Let analyses assume a value cannot be partially poison

Summary:
This is RFC for fixes in poison-related functions of ValueTracking.
These functions assume that a value can be poison bitwisely, but the semantics
of bitwise poison is not clear at the moment.
Allowing a value to have bitwise poison adds complexity to reasoning about
correctness of optimizations.

This patch makes the analysis functions simply assume that a value is
either fully poison or not, which has been used to understand the correctness
of a few previous optimizations.
The bitwise poison semantics seems to be only used by these functions as well.

In terms of implementation, using value-wise poison concept makes existing
functions do more precise analysis, which is what this patch contains.

Reviewers: spatel, lebedev.ri, jdoerfert, reames, nikic, nlopes, regehr

Reviewed By: nikic

Subscribers: fhahn, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[llvm-objcopy][MachO] Fix n_sect field
Alexander Shaposhnikov [Wed, 22 Apr 2020 22:37:17 +0000 (15:37 -0700)]
[llvm-objcopy][MachO] Fix n_sect field

This tiny change is a follow-up to the previous commit f34fdbcf996a
where the update of n_sect was missing.

Test plan: make check-all

4 years ago[CMAKE] Provide default location for llvm-lit for out-of-tree users.
Stephen Neuendorffer [Mon, 30 Mar 2020 22:32:01 +0000 (15:32 -0700)]
[CMAKE] Provide default location for llvm-lit for out-of-tree users.

Several external build users contain some heuristics for finding llvm-lit.
There are several cases we need to worry about:
- External builds against a build tree (with LLVM_BUILD_UTILS)
- External builds against an install tree (with LLMV_BUILD_UTIL
  and LLVM_INSTALL_UTILS)
- External builds against some location which doesn't have an
  llvm-lit, but llvm-lit is available through some other means, such
  as an available source tree, or a packager provided llvm-lit.

For the third case, LLVM_EXTERNAL_LIT suffices, but in other cases
there's no standard way to find llvm-lit.  It seems like each user
cooks their own heuristics:

- clang tries to look in the LLVM source tree, and failing that falls
  back to looking for a packaged llvm-lit.
- libcxx tries to look in the LLVM source tree, which might come from
  llvm-config or be explicitly specified.

This patch is a first stop to solving this by providing a default location
for llvm-lit using LLVM_DEFAULT_EXTERNAL_LIT.  The expectation is that
future patches can clean up users like clang and libcxx to rely
on this mechanism for out-of-tree builds.

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

4 years ago[TimeProfiler] Emit clock synchronization point
Sergej Jaskiewicz [Thu, 16 Apr 2020 14:37:25 +0000 (17:37 +0300)]
[TimeProfiler] Emit clock synchronization point

Time profiler emits relative timestamps for events (the number of
microseconds passed since the start of the current process).

This patch allows combining events from different processes while
preserving their relative timing by emitting a new attribute
"beginningOfTime". This attribute contains the system time that
corresponds to the zero timestamp of the time profiler.

This has at least two use cases:

- Build systems can use this to merge time traces from multiple compiler
  invocations and generate statistics for the whole build. Tools like
  ClangBuildAnalyzer could also leverage this feature.

- Compilers that use LLVM as their backend by invoking llc/opt in
  a child process. If such a compiler supports generating time traces
  of its own events, it could merge those events with LLVM-specific
  events received from llc/opt, and produce a more complete time trace.

A proof-of-concept script that merges multiple logs that
contain a synchronization point into one log:
https://github.com/broadwaylamb/merge_trace_events

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

4 years ago[libc++] Make sure we assume merged typeinfo names on Apple
Louis Dionne [Wed, 22 Apr 2020 21:16:47 +0000 (17:16 -0400)]
[libc++] Make sure we assume merged typeinfo names on Apple

The introduction of LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT changed
the default from =1 (assuming merged typeinfos) to =0 (not assuming
merged typeinfos) on all platforms where at least one other __config_site
macro is defined.

This commit explicitly enables the assumption of merged typeinfo names
on Apple platform to restore the previous behavior, at least until the
underlying issue has been fixed.

4 years ago[llvm-objcopy][MachO] Make --remove-section clean up dead symbols
Alexander Shaposhnikov [Wed, 22 Apr 2020 21:26:28 +0000 (14:26 -0700)]
[llvm-objcopy][MachO] Make --remove-section clean up dead symbols

Make --remove-section clean up dead symbols, return an Error if it can't be safely done.

Test plan: make check-all

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

4 years ago[MachineOutliner] Teach outliner to set live-ins
Eli Friedman [Wed, 22 Apr 2020 00:40:41 +0000 (17:40 -0700)]
[MachineOutliner] Teach outliner to set live-ins

Preserving liveness can be useful even late in the pipeline, if we're
doing substantial optimization work afterwards. (See, for example,
D76065.) Teach MachineOutliner how to correctly set live-ins on the
basic block in outlined functions.

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

4 years ago[JITLink] Fix edge removal iterator invalidation.
Lang Hames [Wed, 22 Apr 2020 17:18:44 +0000 (10:18 -0700)]
[JITLink] Fix edge removal iterator invalidation.

This patch changes Block::removeEdge to return a valid iterator to the new next
element, and uses this to update the edge removal algorithm in
LinkGraph::splitBlock.

4 years ago[JITLink] Read MachO Header CPU field only in jitLink_MachO.
Lang Hames [Tue, 21 Apr 2020 23:50:19 +0000 (16:50 -0700)]
[JITLink] Read MachO Header CPU field only in jitLink_MachO.

It's the only field we need in this function.

4 years ago[TimeProfiler] Emit real process ID and thread names
Sergej Jaskiewicz [Thu, 16 Apr 2020 13:31:00 +0000 (16:31 +0300)]
[TimeProfiler] Emit real process ID and thread names

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

4 years ago[SCCP] Drop unnecessary early exit for ExtractValueInst.
Florian Hahn [Wed, 22 Apr 2020 21:00:51 +0000 (22:00 +0100)]
[SCCP] Drop unnecessary early exit for ExtractValueInst.

visitExtractValueInst uses mergeInValue, so it already can handle
constant ranges. Initially the early exit was using isOverdefined to
keep things as NFC during the initial move to ValueLatticeElement.
As the function already supports constant ranges, it can just use
ValueState[&I].isOverdefined.

Reviewers: efriedma, mssimpso, davide

Reviewed By: efriedma

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

4 years ago[SveEmitter] Add builtins for svwhilerw/svwhilewr
Sander de Smalen [Wed, 22 Apr 2020 20:49:18 +0000 (21:49 +0100)]
[SveEmitter] Add builtins for svwhilerw/svwhilewr

This also adds the IsOverloadWhileRW flag which tells CGBuiltin to use
the result predicate type and the first pointer type as the
overloaded types for the LLVM IR intrinsic.

Reviewers: SjoerdMeijer, efriedma

Reviewed By: efriedma

Tags: #clang

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

4 years ago[SveEmitter] Add builtins for svwhile
Sander de Smalen [Wed, 22 Apr 2020 15:45:52 +0000 (16:45 +0100)]
[SveEmitter] Add builtins for svwhile

This also adds the IsOverloadWhile flag which tells CGBuiltin to use
both the default type (predicate) and the type of the second operand
(scalar) as the overloaded types for the LLMV IR intrinsic.

Reviewers: SjoerdMeijer, efriedma, rovka

Reviewed By: efriedma

Tags: #clang

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

4 years agoPR45000: Let Sema::SubstParmVarDecl handle default args of lambdas in initializers
Aaron Puchert [Wed, 22 Apr 2020 18:05:36 +0000 (20:05 +0200)]
PR45000: Let Sema::SubstParmVarDecl handle default args of lambdas in initializers

Summary:
We extend the behavior for local functions and methods of local classes
to lambdas in variable initializers. The initializer is not a separate
scope, but we treat it as such.

We also remove the (faulty) instantiation of default arguments in
TreeTransform::TransformLambdaExpr, because it doesn't do proper
initialization, and if it did, we would do it twice (and thus also emit
eventual errors twice).

Reviewed By: rsmith

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

4 years ago[libc++/abi] Provide an option to turn on forgiving dynamic_cast when building libc...
Louis Dionne [Wed, 22 Apr 2020 20:17:58 +0000 (16:17 -0400)]
[libc++/abi] Provide an option to turn on forgiving dynamic_cast when building libc++abi

Instead of the ad-hoc #define _LIBCXX_DYNAMIC_FALLBACK, provide an option
to enable the setting when building libc++abi. Also use the occasion to
rename the option to something slightly more descriptive.

Note that in the future, it would be great to simply remove this option
altogether. However, in the meantime, it seems better to have it be an
official option than something ad-hoc.

4 years ago[PowerPC][Future] Initial support for PCRel addressing to get block address
Victor Huang [Wed, 22 Apr 2020 20:01:29 +0000 (15:01 -0500)]
[PowerPC][Future] Initial support for PCRel addressing to get block address

Add initial support for PCRelative addressing to get block address
instead of using TOC.

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

4 years ago[docs] Fix :option: links
Jon Roelofs [Wed, 22 Apr 2020 19:59:57 +0000 (13:59 -0600)]
[docs] Fix :option: links

4 years ago[libc++abi] NFC: Use "" instead of <> to include __cxxabi_config.h
Louis Dionne [Wed, 22 Apr 2020 19:52:26 +0000 (15:52 -0400)]
[libc++abi] NFC: Use "" instead of <> to include __cxxabi_config.h

This is more consistent with how __cxxabi_config.h is included in other
files in libcxxabi/src.

4 years ago[builtins] Add void prototype to unprototyped functions
Ayke van Laethem [Wed, 22 Apr 2020 14:41:23 +0000 (16:41 +0200)]
[builtins] Add void prototype to unprototyped functions

This patch replaces () prototypes with (void) prototypes.

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

4 years ago[ELF] For relative paths in INPUT() and GROUP(), search the directory of the current...
Fangrui Song [Thu, 9 Apr 2020 04:45:21 +0000 (21:45 -0700)]
[ELF] For relative paths in INPUT() and GROUP(), search the directory of the current linker script before searching other paths

For a relative path in INPUT() or GROUP(), this patch changes the search order by adding the directory of the current linker script.
The new search order (consistent with GNU ld >= 2.35 regarding the new test `test/ELF/input-relative.s`):

1. the directory of the current linker script (GNU ld from Binutils 2.35 onwards; https://sourceware.org/bugzilla/show_bug.cgi?id=25806)
2. the current working directory
3. library paths (-L)

This behavior makes it convenient to replace a .so or .a with a linker script with additional input. For example, glibc

```
% cat /usr/lib/x86_64-linux-gnu/libm.a
/* GNU ld script
*/
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( /usr/lib/x86_64-linux-gnu/libm-2.29.a /usr/lib/x86_64-linux-gnu/libmvec.a )
```

could be simplified as `GROUP(libm-2.29.a libmvec.a)`.

Another example is to make libc++.a a linker script:
```
INPUT(libc++.a.1 libc++abi.a)
```

Note, -l is not affected.

Reviewed By: psmith

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

4 years ago[libc++] Don't try to include <Block.h> when not available
Louis Dionne [Wed, 22 Apr 2020 19:22:03 +0000 (15:22 -0400)]
[libc++] Don't try to include <Block.h> when not available

4 years ago[CallSite removal][ValueTracking] Use CallBase instead of ImmutableCallSite for getIn...
Craig Topper [Wed, 22 Apr 2020 17:48:09 +0000 (10:48 -0700)]
[CallSite removal][ValueTracking] Use CallBase instead of ImmutableCallSite for getIntrinsicForCallSite. NFC

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

4 years ago[clang] Make sure argument expansion locations are correct in presence of predefined...
Kadir Cetinkaya [Wed, 22 Apr 2020 14:37:27 +0000 (16:37 +0200)]
[clang] Make sure argument expansion locations are correct in presence of predefined buffer

Summary:
Macro argument expansion logic relies on skipping file IDs that created
as a result of an include. Unfortunately it fails to do that for
predefined buffer since it doesn't have a valid insertion location.

As a result of that any file ID created for an include inside the
predefined buffers breaks the traversal logic in
SourceManager::computeMacroArgsCache.

To fix this issue we first record number of created FIDs for predefined
buffer, and then skip them explicitly in source manager.

Another solution would be to just give predefined buffers a valid source
location, but it is unclear where that should be..

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[clangd] Fix a crash for accessing a null template decl returned by findExplicitRefer...
Haojian Wu [Wed, 22 Apr 2020 11:33:02 +0000 (13:33 +0200)]
[clangd] Fix a crash for accessing a null template decl returned by findExplicitReferences.

Summary: Fixes https://github.com/clangd/clangd/issues/347.

Reviewers: kadircet

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

Tags: #clang

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

4 years ago[llvm][MIRVRegNamer] Avoid collisions across jump table indices.
Puyan Lotfi [Sun, 12 Apr 2020 05:09:08 +0000 (22:09 -0700)]
[llvm][MIRVRegNamer] Avoid collisions across jump table indices.

Hash Jump Table Indices uniquely within a basic block for MIR
Canonicalizer / MIR VReg Renamer passes.

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

4 years ago[libc++] Add support for blocks in std::function
Louis Dionne [Wed, 22 Apr 2020 17:58:17 +0000 (13:58 -0400)]
[libc++] Add support for blocks in std::function

rdar://14390808

4 years ago[docs] Document lit's --timeout=N flag
Jon Roelofs [Wed, 22 Apr 2020 18:56:22 +0000 (12:56 -0600)]
[docs] Document lit's --timeout=N flag

4 years ago[ObjectYAML][MachO] Add support for relocations
Alexander Shaposhnikov [Wed, 22 Apr 2020 18:50:55 +0000 (11:50 -0700)]
[ObjectYAML][MachO] Add support for relocations

Add support for relocations for MachO to ObjectYAML / yaml2obj / obj2yaml.

Test plan: make check-all

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

4 years agoRename warning identifiers from cxx2a to cxx20; NFC.
Aaron Ballman [Wed, 22 Apr 2020 18:28:15 +0000 (14:28 -0400)]
Rename warning identifiers from cxx2a to cxx20; NFC.

4 years ago[libc++] Update the cache for building libc++/libc++abi on Apple
Louis Dionne [Wed, 22 Apr 2020 17:54:36 +0000 (13:54 -0400)]
[libc++] Update the cache for building libc++/libc++abi on Apple

4 years ago[clangd] go-to-def on names in comments etc that are used nearby.
Sam McCall [Mon, 2 Mar 2020 21:45:25 +0000 (22:45 +0100)]
[clangd] go-to-def on names in comments etc that are used nearby.

Summary:
This is intended as a companion to (and is inspired by) D72874 which attempts to
resolve these cases using the index.
The intent is we'd try this strategy after the AST-based approach but before the
index-based (I think local usages would be more reliable than index matches).

Reviewers: nridge

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

Tags: #clang

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

4 years agoscudo: Change the macro used to check whether we're targeting the platform.
Peter Collingbourne [Tue, 21 Apr 2020 22:30:50 +0000 (15:30 -0700)]
scudo: Change the macro used to check whether we're targeting the platform.

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

4 years ago[Lanai] Remove unused forward declarations. NFC.
Simon Pilgrim [Wed, 22 Apr 2020 15:36:02 +0000 (16:36 +0100)]
[Lanai] Remove unused forward declarations. NFC.

4 years ago[Hexagon] Remove unused forward declarations. NFC.
Simon Pilgrim [Wed, 22 Apr 2020 15:35:19 +0000 (16:35 +0100)]
[Hexagon] Remove unused forward declarations. NFC.

4 years ago[AVR] Remove unused forward declarations. NFC.
Simon Pilgrim [Wed, 22 Apr 2020 14:53:06 +0000 (15:53 +0100)]
[AVR] Remove unused forward declarations. NFC.

4 years agoBPFMCTargetDesc.h - remove unused raw_ostream forward declaration. NFC.
Simon Pilgrim [Wed, 22 Apr 2020 14:52:19 +0000 (15:52 +0100)]
BPFMCTargetDesc.h - remove unused raw_ostream forward declaration. NFC.

4 years ago[Docs] Fixed formatting in release notes, NFC
Mikhail Maltsev [Wed, 22 Apr 2020 17:25:22 +0000 (18:25 +0100)]
[Docs] Fixed formatting in release notes, NFC

4 years ago[ARM] Replace arm vendor with none. NFC
David Green [Wed, 22 Apr 2020 15:33:11 +0000 (16:33 +0100)]
[ARM] Replace arm vendor with none. NFC

4 years ago[PowerPC][Future] Remove redundant r2 save and restore for indirect call
Victor Huang [Wed, 22 Apr 2020 15:55:34 +0000 (10:55 -0500)]
[PowerPC][Future] Remove redundant r2 save and restore for indirect call

Currently an indirect call produces the following sequence on PCRelative mode:

extern void function( );
extern void (*ptrfunc) ( );

void g() {
    ptrfunc=function;
}

void f() {
    (*ptrfunc) ( );
}

Producing

paddi 3, 0, .LC0@PCREL, 1
ld 3, 0(3)
std 2, 24(1)
ld 12, 0(3)
mtctr 12
bctrl
ld 2, 24(1)

Though the caller does not use or preserve r2, it is still saved and restored
across a function call. This patch is added to remove these redundant save and
restores for indirect calls.

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

4 years agoUpdate go bindings for 2dea3f129878e929e5d1f00b91a622eb1ec8be4e
Benjamin Kramer [Wed, 22 Apr 2020 17:02:01 +0000 (19:02 +0200)]
Update go bindings for 2dea3f129878e929e5d1f00b91a622eb1ec8be4e

4 years ago[Hexagon] Silence warning
Benjamin Kramer [Wed, 22 Apr 2020 16:57:08 +0000 (18:57 +0200)]
[Hexagon] Silence warning

llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp:296:11: warning: enumeration value 'ScalableVectorTyID' not handled in switch [-Wswitch]
  switch (Ty->getTypeID()) {
          ^

4 years ago[mlir][vulkan-runner] Add support for integer types.
Denis Khalikov [Mon, 20 Apr 2020 20:31:24 +0000 (23:31 +0300)]
[mlir][vulkan-runner] Add support for integer types.

Summary:
Add support for memrefs with element type as integer type
and simple test.

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

4 years ago[lldb/Host] Remove TaskPool and replace its uses with llvm::ThreadPool
Jonas Devlieghere [Wed, 22 Apr 2020 15:48:31 +0000 (08:48 -0700)]
[lldb/Host] Remove TaskPool and replace its uses with llvm::ThreadPool

Remove LLDB's TaskPool and replace its uses with LLVM's ThreadPool.

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

4 years ago[OpenMP][FIX] Do not use InaccessibleMemOrArgMemOnly for barrier and flush
Johannes Doerfert [Wed, 22 Apr 2020 15:17:32 +0000 (10:17 -0500)]
[OpenMP][FIX] Do not use InaccessibleMemOrArgMemOnly for barrier and flush

This was reported as PR45635, committed first as
72a9e7c926f4e32f209e528ec407fe526da5587e, reverted by
188f5cde9635a29a3f20ee2a73abd02890a752c7, and now recommitted with the
test change.

4 years ago[SVE] Add new VectorType subclasses
Christopher Tetreault [Wed, 22 Apr 2020 15:02:02 +0000 (08:02 -0700)]
[SVE] Add new VectorType subclasses

Summary:
Introduce new types for fixed width and scalable vectors.

Does not remove getNumElements yet so as to not break code during transition
period.

Reviewers: deadalnix, efriedma, sdesmalen, craig.topper, huntergr

Reviewed By: sdesmalen

Subscribers: jholewinski, arsenm, jvesely, nhaehnle, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, liufengdb, kerbowa, Joonsoo, grosul1, frgossen, lldb-commits, tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm, #lldb

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

4 years ago[ARM][MC][Thumb] Recommit: Revert relocation for some pc-relative fixups.
Mark Murray [Mon, 20 Apr 2020 15:21:46 +0000 (16:21 +0100)]
[ARM][MC][Thumb] Recommit: Revert relocation for some pc-relative fixups.

Summary:
This commit recommits the reversion of https://reviews.llvm.org/D75039.

Concensus appears to be in favour of assembly-time resolution of
these ADR and LDR relocations, in line with GNU. The previous
backout broke many lld tests, now fixed by Peter Smith in
61bccda9d9d920c72f49025f11e8601daeb096ec.

Reviewers: psmith

Subscribers: kristof.beyls, hiraditya, danielkiss, llvm-commits

Tags: #llvm

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

4 years ago[PowerPC][Future] Initial support for PCRel addressing for jump tables.
Victor Huang [Wed, 22 Apr 2020 15:45:01 +0000 (10:45 -0500)]
[PowerPC][Future] Initial support for PCRel addressing for jump tables.

Add initial support for PC Relative addressing to get jump table base
address instead of using TOC.

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

4 years ago[SveEmitter] Add IsOverloadNone flag and builtins for svpfalse and svcnt[bhwd]_pat
Sander de Smalen [Wed, 22 Apr 2020 14:00:01 +0000 (15:00 +0100)]
[SveEmitter] Add IsOverloadNone flag and builtins for svpfalse and svcnt[bhwd]_pat

Add the IsOverloadNone flag to tell CGBuiltin that it does not have
an overloaded type. This is used for e.g. svpfalse which does
not take any arguments and always returns a svbool_t.

This patch also adds builtins for svcntb_pat, svcnth_pat, svcntw_pat
and svcntd_pat, as those don't require custom codegen.

Reviewers: SjoerdMeijer, efriedma, rovka

Reviewed By: efriedma

Tags: #clang

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

4 years ago[llvm][NFC][CallSite] Remove CallSite from a few trivial locations
Mircea Trofin [Wed, 22 Apr 2020 04:56:04 +0000 (21:56 -0700)]
[llvm][NFC][CallSite] Remove CallSite from a few trivial locations

Summary: Implementation details and internal (to module) APIs.

Reviewers: craig.topper, dblaikie

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years agoRevert "[OpenMP][FIX] Do not use InaccessibleMemOrArgMemOnly for barrier and flush"
Johannes Doerfert [Wed, 22 Apr 2020 15:36:23 +0000 (10:36 -0500)]
Revert "[OpenMP][FIX] Do not use InaccessibleMemOrArgMemOnly for barrier and flush"

Forgot to include test changes :(

This reverts commit 72a9e7c926f4e32f209e528ec407fe526da5587e.