platform/upstream/llvm.git
4 years ago[AArch64][FIX] FPR16_lo for f16 indexed patterns.
Pavel Iliin [Thu, 23 Apr 2020 21:03:42 +0000 (22:03 +0100)]
[AArch64][FIX] FPR16_lo for f16 indexed patterns.

4 years ago[SVE] Remove VectorType::isScalable()
Christopher Tetreault [Thu, 23 Apr 2020 22:11:04 +0000 (15:11 -0700)]
[SVE] Remove VectorType::isScalable()

Summary:
* This is a property of the instance of VectorType. If
isa<ScalableVectorType>(T) is true, then T->isScalable() would have
returned true and vice-versa. Most code that checks this function uses
the result to bail out if a vector is a scalable vector. This code will
be cleaner if it just calls isa<ScalableVectorType>(T)

Reviewers: efriedma, craig.topper, huntergr, sdesmalen

Reviewed By: sdesmalen

Subscribers: tschuett, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[CallSite removal][ValueTracking] Replace CallSite with CallBase. NFC"
Craig Topper [Thu, 23 Apr 2020 21:22:14 +0000 (14:22 -0700)]
[CallSite removal][ValueTracking] Replace CallSite with CallBase. NFC"

4 years ago[ASTImporter] Fix handling of not defined FromRecord in ImportContext(...)
shafik [Thu, 23 Apr 2020 22:16:34 +0000 (15:16 -0700)]
[ASTImporter] Fix handling of not defined FromRecord in ImportContext(...)

In ImportContext(…) we may call into CompleteDecl(…) which if FromRecrord is not
defined will start the definition of a ToRecord but from what I can tell at least
one of the paths though here don't ensure we complete the definition.
For a RecordDecl this can be problematic since this means we won’t import base
classes and we won’t have any of the methods or types we inherit from these bases.

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

4 years ago[libc] Surround get_start_args_addr in __llvm_libc namespace.
Paula Toth [Thu, 23 Apr 2020 22:09:40 +0000 (15:09 -0700)]
[libc] Surround get_start_args_addr in __llvm_libc namespace.

Summary: Caught by libc-tidy from patch D77281.

Reviewers: sivachandra

Reviewed By: sivachandra

Subscribers: tschuett, libc-commits

Tags: #libc-project

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

4 years ago[llvm] [CodeGen] Fixed vector halving bug for masked load
aartbik [Thu, 23 Apr 2020 18:28:34 +0000 (11:28 -0700)]
[llvm] [CodeGen] Fixed vector halving bug for masked load

Summary:
Given a VL=14 that is enveloped by a proper VL=16, splitting the
masked load using the enveloping halving VL=8/8 should yields
should eventually yield V=8/5. This fixes various assert failures
in getHalfNumVectorElementsVT() and IncrementMemoryAddress().

Note, I suspect similar fixes will be needed for other masked
operations, but for now I send out a fix for masked load only.

Bugzilla issue 45563
https://bugs.llvm.org/show_bug.cgi?id=45563

Reviewers: craig.topper, mehdi_amini, nicolasvasilache

Reviewed By: craig.topper

Subscribers: hiraditya, dmgreen, llvm-commits

Tags: #llvm

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

4 years ago[llvm] [X86] Processed test with update_llc_test_checks
aartbik [Thu, 23 Apr 2020 18:41:58 +0000 (11:41 -0700)]
[llvm] [X86] Processed test with update_llc_test_checks

Summary:
As requested in another review for a similar regression test,
I updated this test with the same utility.

Reviewers: dmgreen, craig.topper, mehdi_amini, nicolasvasilache

Reviewed By: craig.topper

Subscribers: llvm-commits

Tags: #llvm

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

4 years ago[flang] Compute sizes and offsets for symbols
Tim Keith [Wed, 22 Apr 2020 22:39:24 +0000 (15:39 -0700)]
[flang] Compute sizes and offsets for symbols

Summary:
Add size and offset properties to symbols, representing their byte size
and offset within their enclosing scope.

Add size and align properties to scopes so that they are available for
scopes representing derived types.

Add ComputeOffsets pass over the symbol table to fill in those fields.

Compute descriptor size based on rank and length parameters. Extract
DerivedTypeSpec::NumLengthParameters from DynamicType::RequiresDescriptor
to share the code.

Add Scope::GetSymbols to get symbols in canonical order.
compute-offsets.cpp and mod-file.cpp both need to process symbols in the
order in which they are declared. Move the collecting of those symbols
into Scope so that it can be shared.

Add symbol size and offset to output of `-fdebug-dump-symbols` and use
that in some tests.

Still to do:
- make size and alignment rules configurable based on target
- use offsets to check EQUIVALENCE statements

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

4 years agoMake "#pragma clang attribute" support uninitialized attribute.
Jian Cai [Thu, 23 Apr 2020 19:11:50 +0000 (12:11 -0700)]
Make "#pragma clang attribute" support uninitialized attribute.

Summary:
When using -ftrivial-auto-var-init=* options to initiate automatic
variables in a file, to disable initialization on some variables,
currently we have to manually annotate the variables with uninitialized
attribute, such as

int dont_initialize_me __attribute((uninitialized));

Making pragma clang attribute to support this attribute would make
annotating variables much easier, and could be particular useful for
bisection efforts, e.g.

void use(void*);

void buggy() {
    int arr[256];
    int boom;
    float bam;
    struct { int oops; } oops;
    union { int oof; float aaaaa; } oof;

    use(&arr);
    use(&boom);
    use(&bam);
    use(&oops);
    use(&oof);
}

Reviewers: jfb, rjmccall, aaron.ballman

Reviewed By: jfb, aaron.ballman

Subscribers: aaron.ballman, george.burgess.iv, dexonsmith, MaskRay, phosek, hubert.reinterpretcast, gbiv, manojgupta, llozano, srhines, cfe-commits

Tags: #clang

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

4 years ago[NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.
Puyan Lotfi [Thu, 23 Apr 2020 06:20:56 +0000 (02:20 -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.

2nd Landing Attempt...

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

4 years ago[x86] add tests for FP->int->FP with different FP types; NFC
Sanjay Patel [Thu, 23 Apr 2020 20:47:32 +0000 (16:47 -0400)]
[x86] add tests for FP->int->FP with different FP types; NFC

4 years ago[SVE] Remove calls to isScalable from Hexagon
Christopher Tetreault [Thu, 23 Apr 2020 20:53:31 +0000 (13:53 -0700)]
[SVE] Remove calls to isScalable from Hexagon

Reviewers: efriedma, sdesmalen, kparzysz, colinl

Reviewed By: kparzysz

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[InstCombine] Negator: don't negate multi-use `sub`
Roman Lebedev [Thu, 23 Apr 2020 18:07:23 +0000 (21:07 +0300)]
[InstCombine] Negator: don't negate multi-use `sub`

While we can do that, it doesn't increase instruction count,
if the old `sub` sticks around then the transform is not only
not a unlikely win, but a likely regression, since we likely
now extended live range and use count of both of the `sub` operands,
as opposed to just the result of `sub`.

As Kostya Serebryany notes in post-commit review in
https://reviews.llvm.org/D68408#1998112
this indeed can degrade final assembly,
increase register pressure, and spilling.

This isn't what we want here,
so at least for now let's guard it with an use check.

4 years ago[SVE] Remove calls to isScalable from Transforms
Christopher Tetreault [Thu, 23 Apr 2020 20:30:30 +0000 (13:30 -0700)]
[SVE] Remove calls to isScalable from Transforms

Reviewers: efriedma, chandlerc, reames, aprantl, sdesmalen

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[mlir][Linalg] Add support for fusing linalg.tensor_reshape with
MaheshRavishankar [Thu, 23 Apr 2020 20:41:02 +0000 (13:41 -0700)]
[mlir][Linalg] Add support for fusing linalg.tensor_reshape with
linalg.generic operations.

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

4 years ago[mlir][Linalg] NFC: Refactor fusion on tensors to enable extending
MaheshRavishankar [Thu, 23 Apr 2020 20:40:55 +0000 (13:40 -0700)]
[mlir][Linalg] NFC: Refactor fusion on tensors to enable extending
it to fusing different kinds of linalg operations on tensors.

The implementation of fusion on tensor was initially planned for just
GenericOps (and maybe IndexedGenericOps). With addition of
linalg.tensor_reshape, and potentially other such non-structured ops,
refactor the existing implementation to allow easier specification of
fusion between different linalg operations on tensors.

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

4 years ago[SVE] Remove isScalable from Bitcode
Christopher Tetreault [Thu, 23 Apr 2020 20:10:17 +0000 (13:10 -0700)]
[SVE] Remove isScalable from Bitcode

Reviewers: efriedma, dexonsmith, tejohnson, sdesmalen

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[libcxx] Add FILE_DEPENDENCIES line to the func.blocks.sh.cpp test
Sergej Jaskiewicz [Thu, 23 Apr 2020 20:17:57 +0000 (23:17 +0300)]
[libcxx] Add FILE_DEPENDENCIES line to the func.blocks.sh.cpp test

This should fix the bots that use ssh.py to execute tests

4 years ago[SVE] Remove calls to isScalable from AARCH64
Christopher Tetreault [Thu, 23 Apr 2020 20:00:59 +0000 (13:00 -0700)]
[SVE] Remove calls to isScalable from AARCH64

Reviewers: efriedma, sdesmalen, t.p.northover, mcrosier

Reviewed By: efriedma

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

Tags: #llvm

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

4 years ago[AMDGPU] Avoid hard-coded line numbers in error message checks
Jay Foad [Thu, 23 Apr 2020 14:32:27 +0000 (15:32 +0100)]
[AMDGPU] Avoid hard-coded line numbers in error message checks

This makes it easier for us to maintain downstream changes to some of
these tests. NFC.

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

4 years ago[SVE] Remove calls to isScalable from CodeGen
Christopher Tetreault [Thu, 23 Apr 2020 19:45:34 +0000 (12:45 -0700)]
[SVE] Remove calls to isScalable from CodeGen

Reviewers: efriedma, sdesmalen, stoklund, sunfish

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[SVE] Remove calls to VectorType::isScalable from analysis
Christopher Tetreault [Thu, 23 Apr 2020 19:19:54 +0000 (12:19 -0700)]
[SVE] Remove calls to VectorType::isScalable from analysis

Reviewers: efriedma, sdesmalen, chandlerc, sunfish

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years agoAMDGPU: Fix inlining logic for denormals
Matt Arsenault [Wed, 22 Apr 2020 21:17:46 +0000 (17:17 -0400)]
AMDGPU: Fix inlining logic for denormals

This was backwards from intended and missing a test. We perhaps should
just ignored the FP mode here, since it shouldn't be legal to mix code
with different default modes in the absence of strictfp.

4 years agoAMDGPU: Change pre-gfx9 implementation of fcanonicalize to mul
Matt Arsenault [Wed, 22 Apr 2020 21:34:10 +0000 (17:34 -0400)]
AMDGPU: Change pre-gfx9 implementation of fcanonicalize to mul

If f32 denormals were enabled pre-gfx9, we would still try to
implement this with v_max_f32. Pre-gfx9, these instructions ignored
the denormal mode and did not flush. Switch to the multiply form for
f32 as a workaround which should always work in any case.

This fixes conformance failures when the library implementation of
fmin/fmax were accidentally not inlined, forcing the assumption of no
flushing on targets where denormals are not enabled by default. This
is a workaround, since really we should not be mixing code with
different FP mode expectations, but prefer the lowering that will work
in any mode.

Now this will always use max to implement canonicalize on gfx9+. This
is only really beneficial for f64. For f32/f16 it's a neutral choice
(and worse in terms of code size in 1 case), but possibly worse for
the compiler since it does add an extra register use operand. Leave
this change for later.

4 years ago[llvm-objcopy][MachO] Copy LC_LOAD_WEAK_DYLIB load commands
Alexander Shaposhnikov [Thu, 23 Apr 2020 18:37:39 +0000 (11:37 -0700)]
[llvm-objcopy][MachO] Copy LC_LOAD_WEAK_DYLIB load commands

LC_LOAD_WEAK_DYLIB is analogous to LC_LOAD_DYLIB and doesn't require any special handling.

Test plan: make check-all

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

4 years agoAMDGPU/GlobalISel: Add new baseline checks for canonicalize
Matt Arsenault [Thu, 23 Apr 2020 13:45:54 +0000 (09:45 -0400)]
AMDGPU/GlobalISel: Add new baseline checks for canonicalize

4 years ago[SVE] Remove calls to isScalable from IR
Christopher Tetreault [Thu, 23 Apr 2020 17:58:37 +0000 (10:58 -0700)]
[SVE] Remove calls to isScalable from IR

Reviewers: efriedma, sdesmalen, dexonsmith, dblaikie

Reviewed By: sdesmalen

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[X86][SSE] Add SSE2 extract-concat tests
Simon Pilgrim [Thu, 23 Apr 2020 18:20:54 +0000 (19:20 +0100)]
[X86][SSE] Add SSE2 extract-concat tests

Check pre-SSE41 codegen where we have less PEXTR*/PINSR* instructions

4 years ago[libc] Link mpfr and gmp wrapper to the libcMPFRWrapper.
Siva Chandra Reddy [Thu, 23 Apr 2020 17:57:28 +0000 (10:57 -0700)]
[libc] Link mpfr and gmp wrapper to the libcMPFRWrapper.

This will fix building the wrapper shared library when
BUILD_SHARED_LIBS is ON.

Reviewers: PaulkaToast

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

4 years ago[libc++] Update scripts to build libc++/libc++abi for Apple
Louis Dionne [Thu, 23 Apr 2020 17:53:14 +0000 (13:53 -0400)]
[libc++] Update scripts to build libc++/libc++abi for Apple

Also, make sure we test them.

4 years ago[mlir][EDSC] Hotfix - Provide impl for `negate`
Nicolas Vasilache [Thu, 23 Apr 2020 18:10:24 +0000 (14:10 -0400)]
[mlir][EDSC] Hotfix - Provide impl for `negate`

367229e100eca714276253bf95a0dd3d084a9624 retired ValueHandle but
mistakenly removed the implementation for `negate` which was not
tested and would result in linking errors.

This revision adds the implementation back and provides a test.

4 years ago[mlir/Quant] Allows to use 32 bits storage type
Feng Liu [Wed, 22 Apr 2020 21:14:29 +0000 (14:14 -0700)]
[mlir/Quant] Allows to use 32 bits storage type

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

4 years ago[llvm][NFC] Factor out cost-model independent inling decision
Mircea Trofin [Thu, 23 Apr 2020 16:14:08 +0000 (09:14 -0700)]
[llvm][NFC] Factor out cost-model independent inling decision

Summary:
llvm::getInlineCost starts off by determining whether inlining should
happen or not because of user directives or easily determinable
unviability. This CL refactors this functionality as a reusable API.

Reviewers: davidxl, eraman

Reviewed By: davidxl, eraman

Subscribers: hiraditya, haicheng, llvm-commits

Tags: #llvm

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

4 years ago[SVE] Make VectorType::getNumElements() complain for scalable vectors
Christopher Tetreault [Thu, 23 Apr 2020 16:52:49 +0000 (09:52 -0700)]
[SVE] Make VectorType::getNumElements() complain for scalable vectors

Summary:
Piggy-back off of TypeSize's STRICT_FIXED_SIZE_VECTORS flag and:
- if it is defined, assert that the vector is not scalable
- if it is not defined, complain if the vector is scalable

Reviewers: efriedma, sdesmalen, c-rhodes

Reviewed By: sdesmalen

Subscribers: hiraditya, mgorny, tschuett, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[llvm][NFC][CallSite] Removed CallSite from few implementation details
Mircea Trofin [Thu, 23 Apr 2020 16:15:04 +0000 (09:15 -0700)]
[llvm][NFC][CallSite] Removed CallSite from few implementation details

Reviewers: dblaikie, craig.topper

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[DirectoryWatcher] Do not use FSEvents on non-macOS platforms
Vedant Kumar [Thu, 23 Apr 2020 17:20:01 +0000 (10:20 -0700)]
[DirectoryWatcher] Do not use FSEvents on non-macOS platforms

The FSEvents APIs are available on iOS6+: however, the DirectoryWatcher
code isn't wired up to really use FSEvents on embedded platforms.

I've duplicated code from DirectoryWatcher-not-implemented.cpp here and
used TargetConditionals instead of adding cmakery to check try_compile;
I couldn't get that to work properly.

4 years agoMachineBasicBlock: Avoid copy in skipDebugInstructions{Forward,Backward}, NFC
Vedant Kumar [Thu, 23 Apr 2020 16:48:47 +0000 (09:48 -0700)]
MachineBasicBlock: Avoid copy in skipDebugInstructions{Forward,Backward}, NFC

4 years ago[analyzer] Consider array subscripts to be interesting lvalues.
Valeriy Savchenko [Thu, 23 Apr 2020 15:32:10 +0000 (18:32 +0300)]
[analyzer] Consider array subscripts to be interesting lvalues.

Static analyzer has a mechanism of clearing redundant nodes when
analysis hits a certain threshold with a number of nodes in exploded
graph (default is 1000). It is similar to GC and aims removing nodes
not useful for analysis. Unfortunately nodes corresponding to array
subscript expressions (that actively participate in data propagation)
get removed during the cleanup. This might prevent the analyzer from
generating useful notes about where it thinks the data came from.

This fix is pretty much consistent with the way analysis works
already. Lvalue "interestingness" stands for the analyzer's
possibility of tracking values through them.

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

4 years ago[mlir][StandardToSPIRV] Fix test cases where DCE removes all the code.
MaheshRavishankar [Thu, 23 Apr 2020 16:44:23 +0000 (09:44 -0700)]
[mlir][StandardToSPIRV] Fix test cases where DCE removes all the code.

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

4 years agoX86MCTargetDesc.h - replace FormattedStream.h include with forward declaration. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 16:05:43 +0000 (17:05 +0100)]
X86MCTargetDesc.h - replace FormattedStream.h include with forward declaration. NFC.

4 years agoX86TargetObjectFile.h - remove unnecessary TargetLoweringObjectFile.h include. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 16:02:19 +0000 (17:02 +0100)]
X86TargetObjectFile.h - remove unnecessary TargetLoweringObjectFile.h include. NFC.
We already include TargetLoweringObjectFileImpl.h which includes it and we only use its types as part of TargetLoweringObjectFile* overridden methods.

4 years agoRename a shadowed variable causing build failure on gcc<5.5
Vedant Kumar [Thu, 23 Apr 2020 16:23:21 +0000 (09:23 -0700)]
Rename a shadowed variable causing build failure on gcc<5.5

See discussion here: https://reviews.llvm.org/D78265

4 years ago[flang] Remove unused variable
Tim Keith [Thu, 23 Apr 2020 16:14:58 +0000 (09:14 -0700)]
[flang] Remove unused variable

Reviewers: sscalpone, jdoerfert, DavidTruby

Reviewed By: sscalpone

Subscribers: llvm-commits

Tags: #flang, #llvm

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

4 years agoRevert "[LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order"
Peter Smith [Thu, 23 Apr 2020 15:58:50 +0000 (16:58 +0100)]
Revert "[LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order"

This reverts commit f969c2aa657e28633ece63a5430e551f0b8beb98.

There are some msan buildbot failures sanitzer-x86_64-linux-fast that
I need to investigate.

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

4 years ago[RISCV] Remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 15:21:18 +0000 (16:21 +0100)]
[RISCV] Remove unused forward declarations. NFC.

4 years ago[WebAssembly] Remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 15:19:37 +0000 (16:19 +0100)]
[WebAssembly] Remove unused forward declarations. NFC.

4 years ago[XCore] Remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 15:17:45 +0000 (16:17 +0100)]
[XCore] Remove unused forward declarations. NFC.

4 years ago[NVPTX] Remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 15:08:16 +0000 (16:08 +0100)]
[NVPTX] Remove unused forward declarations. NFC.

4 years ago[Sparc] Remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 14:15:38 +0000 (15:15 +0100)]
[Sparc] Remove unused forward declarations. NFC.

4 years ago[flang][NFC] Refactor derived type instantiation
Tim Keith [Wed, 22 Apr 2020 22:26:29 +0000 (15:26 -0700)]
[flang][NFC] Refactor derived type instantiation

Summary:
Move InstantiateComponent and InstantiateIntrinsicType from symbol.cpp
to type.cpp as that is where they are called.

Put both in InstantiateHelper class to better isolate them.
Add CreateDerivedTypeSpec in InstantiateHelper.

Add non-const forms for AsIntrinsic and AsDerived to avoid const_cast.

No functional changes.

Reviewers: DavidTruby, klausler, PeteSteinfeld, jdoerfert

Reviewed By: klausler

Subscribers: llvm-commits

Tags: #flang, #llvm

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

4 years ago[Hexagon] Add missing live-in registers in some codegen tests
Krzysztof Parzyszek [Thu, 23 Apr 2020 14:39:43 +0000 (09:39 -0500)]
[Hexagon] Add missing live-in registers in some codegen tests

4 years ago[PowerPC][Future] Add missing changes for PC Realtive addressing
Victor Huang [Thu, 23 Apr 2020 15:24:38 +0000 (10:24 -0500)]
[PowerPC][Future] Add missing changes for PC Realtive addressing

1. Use Subtarget.isUsingPCRelativeCalls() in LowerConstantPool to
check if using PCRelative addressing.

2. Change MO_GOT_FLAG = 32 to MO_GOT_FLAG = 8 in PPC.h to use
consecutive bits.

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

4 years ago[llvm][NFC][CallSite] Remove CallSite from TypeMetadataUtils & related
Mircea Trofin [Wed, 22 Apr 2020 20:19:15 +0000 (13:19 -0700)]
[llvm][NFC][CallSite] Remove CallSite from TypeMetadataUtils & related

Reviewers: craig.topper, dblaikie

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[mlir][EDSC] Retire ValueHandle
Nicolas Vasilache [Thu, 23 Apr 2020 15:00:03 +0000 (11:00 -0400)]
[mlir][EDSC] Retire ValueHandle

The EDSC discussion [thread](https://llvm.discourse.group/t/evolving-builder-apis-based-on-lessons-learned-from-edsc/879) points out that ValueHandle has become an unnecessary level of abstraction since MLIR switch from `Value *` to `Value` everywhere.

This revision removes this level of indirection.

4 years ago[lldb] Make RNBSocketTest compile again after socket modernization
Raphael Isemann [Thu, 23 Apr 2020 14:58:49 +0000 (16:58 +0200)]
[lldb] Make RNBSocketTest compile again after socket modernization

Commit c9e6b7010c6998b6 changed the API but didn't update this
macOS-specific test.

4 years ago[LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order
Peter Smith [Sat, 18 Apr 2020 09:09:06 +0000 (10:09 +0100)]
[LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order

The contents of the .ARM.exidx section must be ordered by SHF_LINK_ORDER
rules. We don't need to know the precise address for this order, but we
do need to know the relative order of sections. We have been using the
sectionIndex for this purpose, this works when the OutputSection order
has a monotonically increasing virtual address, but it is possible to
write a linker script with non-monotonically increasing virtual address.
For these cases we need to evaluate the base address of the OutputSection
so that we can order the .ARM.exidx sections properly.

This change moves the finalisation of .ARM.exidx till after the first
call to AssignAddresses. This permits us to sort on virtual address which
is linker script safe. It also permits a fix for part of pr44824 where
we generate .ARM.exidx section for the vector table when that table is so
far away it is out of range of the .ARM.exidx section. This fix will come
in a follow up patch.

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

4 years ago[doc] Fix broken link. NFC.
Xing GUO [Thu, 23 Apr 2020 14:46:58 +0000 (22:46 +0800)]
[doc] Fix broken link. NFC.

4 years ago[lldb/Core] Avoid more Communication::Disconnect races
Pavel Labath [Thu, 23 Apr 2020 14:27:01 +0000 (16:27 +0200)]
[lldb/Core] Avoid more Communication::Disconnect races

Calling Disconnect while the read thread is running is racy because the
thread can also call Disconnect.  This is a follow-up to b424b0bf, which
reorders other occurences of Disconnect/StopReadThread I can find, and also
adds an assertion to guard against new occurences being introduced.

4 years ago[clangd] Delete remapped buffers in tests
Kadir Cetinkaya [Thu, 23 Apr 2020 14:09:23 +0000 (16:09 +0200)]
[clangd] Delete remapped buffers in tests

These buffers normally get freed after being used in a CompilerInstance.
but tests don't make use of those, so we need to free them explicitly.

4 years ago[mlir] Extended Liveness analysis to support nested regions.
Marcel Koester [Wed, 8 Apr 2020 08:31:18 +0000 (10:31 +0200)]
[mlir] Extended Liveness analysis to support nested regions.

The current Liveness analysis does not support operations with nested regions.
This causes issues when querying liveness information about blocks nested within
operations. Furthermore, the live-in and live-out sets are not computed properly
in these cases.

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

4 years ago[InstCombine] substitute equivalent constant to reduce logic-of-icmps
Sanjay Patel [Thu, 23 Apr 2020 13:59:41 +0000 (09:59 -0400)]
[InstCombine] substitute equivalent constant to reduce logic-of-icmps

(X == C) && (Y Pred1 X) --> (X == C) && (Y Pred1 C)
(X != C) || (Y Pred1 X) --> (X != C) || (Y Pred1 C)

This cooperates/overlaps with D78430, but it is a more general transform
that gets us most of the expected simplifications and several other
improvements.
http://volta.cs.utah.edu:8080/z/5gxjjc

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

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

4 years ago[SveEmitter] Use llvm.aarch64.sve.ld1/st1 for contiguous load/store builtins
Sander de Smalen [Thu, 23 Apr 2020 14:04:12 +0000 (15:04 +0100)]
[SveEmitter] Use llvm.aarch64.sve.ld1/st1 for contiguous load/store builtins

This patch changes the codegen of the builtins for contiguous loads
to map onto the SVE specific IR intrinsics llvm.aarch64.sve.ld1/st1.

Reviewers: SjoerdMeijer, efriedma, kmclaughlin, rengolin

Reviewed By: efriedma

Tags: #clang

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

4 years ago[lldb/DWARF] Trust CU DW_AT_low/high_pc information when building address tables
Pavel Labath [Mon, 20 Apr 2020 12:38:31 +0000 (14:38 +0200)]
[lldb/DWARF] Trust CU DW_AT_low/high_pc information when building address tables

Summary:
The code in DWARFCompileUnit::BuildAddressRangeTable tries hard to avoid
relying on DW_AT_low/high_pc for compile unit range information, and
this logic is a big cause of llvm/lldb divergence in the lowest layers
of dwarf parsing code.

The implicit assumption in that code is that this information (as opposed to
DW_AT_ranges) is unreliable. However, I have not been able to verify
that assumption. It is definitely not true for all present-day
compilers (gcc, clang, icc), and it was also not the case for the
historic compilers that I have been able to get a hold of (thanks Matt
Godbolt).

All compiler included in my research either produced correct
DW_AT_ranges or .debug_aranges entries, or they produced no DW_AT_hi/lo
pc at all. The detailed findings are:
- gcc >= 4.4: produces DW_AT_ranges and .debug_aranges
- 4.1 <= gcc < 4.4: no DW_AT_ranges, no DW_AT_high_pc, .debug_aranges
  present. The upper version range here is uncertain as godbolt.org does
  not have intermediate versions.
- gcc < 4.1: no versions on godbolt.org
- clang >= 3.5: produces DW_AT_ranges, and (optionally) .debug_aranges
- 3.4 <= clang < 3.5: no DW_AT_ranges, no DW_AT_high_pc, .debug_aranges
  present.
- clang <= 3.3: no DW_AT_ranges, no DW_AT_high_pc, no .debug_aranges
- icc >= 16.0.1: produces DW_AT_ranges
- icc < 16.0.1: no functional versions on godbolt.org (some are present
  but fail to compile)

Based on this analysis, I believe it is safe to start trusting
DW_AT_low/high_pc information in dwarf as well as remove the code for
manually reconstructing range information by traversing the DIE
structure, and just keep the line table fallback. The only compilers
where this will change behavior are pre-3.4 clangs, which are almost 7
years old now. However, the functionality should remain unchanged
because we will be able to reconstruct this information from the line
table, which seems to be needed for some line-tables-only scenarios
anyway (haven't researched this too much, but at least some compilers
seem to emit DW_AT_ranges even in these situations).

In addition, benchmarks showed that for these compilers computing the
ranges via line tables is noticably faster than doing so via the DIE
tree.

Other advantages include simplifying the code base, removing some
untested code (the only test changes are recent tests with overly
reduced synthetic dwarf), and increasing llvm convergence.

Tags: #lldb

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

4 years ago[lldb/Utility] Improve error_code->Status conversion
Pavel Labath [Thu, 23 Apr 2020 13:55:39 +0000 (15:55 +0200)]
[lldb/Utility] Improve error_code->Status conversion

Both entities have the notion of error "namespaces". Map the errno
namespace correctly.

4 years ago[PowerPC] Remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 13:35:00 +0000 (14:35 +0100)]
[PowerPC] Remove unused forward declarations. NFC.

4 years ago[Mips] Remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 13:23:40 +0000 (14:23 +0100)]
[Mips] Remove unused forward declarations. NFC.

4 years agoLanaiMCTargetDesc.h - remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 13:12:01 +0000 (14:12 +0100)]
LanaiMCTargetDesc.h - remove unused forward declarations. NFC.

4 years ago[MSP430] Remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 13:09:22 +0000 (14:09 +0100)]
[MSP430] Remove unused forward declarations. NFC.

4 years ago[flang] Add missing check for unresolved name
Tim Keith [Wed, 22 Apr 2020 23:19:38 +0000 (16:19 -0700)]
[flang] Add missing check for unresolved name

Summary:
The name in an InputItem isn't necessarily resolved if an error occurred,
so it needs to be checked.

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

Reviewers: klausler, PeteSteinfeld, DavidTruby, jdoerfert, sscalpone

Reviewed By: klausler, sscalpone

Subscribers: llvm-commits

Tags: #llvm, #flang

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

4 years ago[InstSimplify] fold and/or of compares with equality to min/max constant
Sanjay Patel [Thu, 23 Apr 2020 13:10:23 +0000 (09:10 -0400)]
[InstSimplify] fold and/or of compares with equality to min/max constant

I found 12 (6 if we compress the DeMorganized forms) patterns for logic-of-compares
with a min/max constant while looking at PR45510:
https://bugs.llvm.org/show_bug.cgi?id=45510

The variations on those forms multiply the test cases by 8 (unsigned/signed, swapped
compare operands, commuted logic operands).
We have partial logic to deal with these for the unsigned min (zero) case, but
missed everything else.

We are deferring the majority of these patterns to InstCombine to allow more general
handling (see D78582).

We could use ConstantRange instead of predicate+constant matching here. I don't
expect there's any noticeable compile-time impact for either form.

Here's an abuse of Alive2 to show the 12 basic signed variants of the patterns in
one function:
http://volta.cs.utah.edu:8080/z/5Vpiyg

declare void @use(i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1)
define void @src(i8 %x, i8 %y)  {
  %m1 = icmp eq i8 %x, 127
  %c1 = icmp slt i8 %x, %y
  %r1 = and i1 %m1, %c1   ; (X == MAX) && (X < Y) --> false

  %m2 = icmp ne i8 %x, 127
  %c2 = icmp sge i8 %x, %y
  %r2 = or i1 %m2, %c2    ; (X != MAX) || (X >= Y) --> true

  %m3 = icmp eq i8 %x, -128
  %c3 = icmp sgt i8 %x, %y
  %r3 = and i1 %m3, %c3   ; (X == MIN) && (X > Y) --> false

  %m4 = icmp ne i8 %x, -128
  %c4 = icmp sle i8 %x, %y
  %r4 = or i1 %m4, %c4    ; (X != MIN) || (X <= Y) --> true

  %m5 = icmp eq i8 %x, 127
  %c5 = icmp sge i8 %x, %y
  %r5 = and i1 %m5, %c5   ; (X == MAX) && (X >= Y) --> X == MAX

  %m6 = icmp ne i8 %x, 127
  %c6 = icmp slt i8 %x, %y
  %r6 = or i1 %m6, %c6   ; (X != MAX) || (X < Y) --> X != MAX

  %m7 = icmp eq i8 %x, -128
  %c7 = icmp sle i8 %x, %y
  %r7 = and i1 %m7, %c7   ; (X == MIN) && (X <= Y) --> X == MIN

  %m8 = icmp ne i8 %x, -128
  %c8 = icmp sgt i8 %x, %y
  %r8 = or i1 %m8, %c8   ; (X != MIN) || (X > Y) --> X != MIN

  %m9 = icmp ne i8 %x, 127
  %c9 = icmp slt i8 %x, %y
  %r9 = and i1 %m9, %c9    ; (X != MAX) && (X < Y) --> X < Y

  %m10 = icmp eq i8 %x, 127
  %c10 = icmp sge i8 %x, %y
  %r10 = or i1 %m10, %c10    ; (X == MAX) || (X >= Y) --> X >= Y

  %m11 = icmp ne i8 %x, -128
  %c11 = icmp sgt i8 %x, %y
  %r11 = and i1 %m11, %c11    ; (X != MIN) && (X > Y) --> X > Y

  %m12 = icmp eq i8 %x, -128
  %c12 = icmp sle i8 %x, %y
  %r12 = or i1 %m12, %c12    ; (X == MIN) || (X <= Y) --> X <= Y

  call void @use(i1 %r1, i1 %r2, i1 %r3, i1 %r4, i1 %r5, i1 %r6, i1 %r7, i1 %r8, i1 %r9, i1 %r10, i1 %r11, i1 %r12)
  ret void
}

define void @tgt(i8 %x, i8 %y)  {
  %m5 = icmp eq i8 %x, 127
  %m6 = icmp ne i8 %x, 127
  %m7 = icmp eq i8 %x, -128
  %m8 = icmp ne i8 %x, -128
  %c9 = icmp slt i8 %x, %y
  %c10 = icmp sge i8 %x, %y
  %c11 = icmp sgt i8 %x, %y
  %c12 = icmp sle i8 %x, %y
  call void @use(i1 0, i1 1, i1 0, i1 1, i1 %m5, i1 %m6, i1 %m7, i1 %m8, i1 %c9, i1 %c10, i1 %c11, i1 %c12)
  ret void
}

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

4 years ago[InstCombine] add test for logic-of-icmps that should simplify (D78582); NFC
Sanjay Patel [Wed, 22 Apr 2020 13:49:36 +0000 (09:49 -0400)]
[InstCombine] add test for logic-of-icmps that should simplify (D78582); NFC

4 years agoAdd extension links for VSCode
Kumar Harsh [Thu, 23 Apr 2020 12:04:23 +0000 (17:34 +0530)]
Add extension links for VSCode

The clang-format docs were missing mention or links for the VSCode extension, which have been added.

4 years agoRuntimeDyldELF.h - make the object namespace explicit for ELFObjectFileBase. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 12:52:36 +0000 (13:52 +0100)]
RuntimeDyldELF.h - make the object namespace explicit for ELFObjectFileBase. NFC.

4 years ago[ObjCARC] Remove unused forward declarations. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 12:41:02 +0000 (13:41 +0100)]
[ObjCARC] Remove unused forward declarations. NFC.

4 years agoXCOFF.h - replace StringRef.h include with forward declaration. NFC.
Simon Pilgrim [Thu, 23 Apr 2020 12:10:55 +0000 (13:10 +0100)]
XCOFF.h - replace StringRef.h include with forward declaration. NFC.
Move StringRef.h include to XCOFF.cpp

4 years ago[clang-format] Handle C# property accessors when parsing lines
Jonathan Coe [Thu, 23 Apr 2020 10:38:52 +0000 (11:38 +0100)]
[clang-format] Handle C# property accessors when parsing lines

Summary:
Improve C# `{ get; set; } = default;` formatting by handling it in the UnwrappedLineParser rather than trying to merge lines later.

Remove old logic to merge lines.

Update tests as formatting output has changed (as intended).

Reviewers: krasimir, MyDeveloperDay

Reviewed By: krasimir

Subscribers: cfe-commits

Tags: #clang-format, #clang

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

4 years ago[lldb/Host] Modernize some socket functions
Pavel Labath [Thu, 23 Apr 2020 11:54:11 +0000 (13:54 +0200)]
[lldb/Host] Modernize some socket functions

return Expected<Socket> instead of a Status object plus a Socket*&
argument.

4 years ago[UpdateTestChecks] Make generation of UTC_ARGS: comment more robust
Alex Richardson [Thu, 23 Apr 2020 12:02:12 +0000 (13:02 +0100)]
[UpdateTestChecks] Make generation of UTC_ARGS: comment more robust

We now use the argparse Action objects to determine the name of the flags.
This fixes cases where the key for the stored result ('dest') is not the
same as the command line flag (e.g. --enable/--disable).
Also add a test that --disabled can be part of the initial UTC_ARGS.

This is split out from D78478

Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D78617

4 years agoUse FrameIndexTy for stack protector
Alex Richardson [Thu, 23 Apr 2020 12:01:30 +0000 (13:01 +0100)]
Use FrameIndexTy for stack protector

Using getValueType() is not correct for architectures extended with CHERI since
we need a pointer type and not the value that is loaded. While stack
protector is useless when you have CHERI (since CHERI provides much
stronger security guarantees), we still have a test to check that we can
generate correct code for checks. Merging b281138a1b67ca4405b77d774adc3de72742e7a2
into our tree broke this test. Fix by using TLI.getFrameIndexTy().

Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D77785

4 years ago[dsymutil][doc] Improve documentation.
Xing GUO [Thu, 23 Apr 2020 12:06:21 +0000 (20:06 +0800)]
[dsymutil][doc] Improve documentation.

This change helps improve `dsymutil` documentation.

- Add missing options
- Re-arrange options in alphabetical order
- Wrap inline options in double-back-quote
- `-v` is for `--version` not `--verbose`

Reviewed By: JDevlieghere

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

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.