]> granicus.if.org Git - llvm/log
llvm
5 years ago[llvm-lipo] Add support for archives
Alexander Shaposhnikov [Mon, 23 Sep 2019 22:22:55 +0000 (22:22 +0000)]
[llvm-lipo] Add support for archives

Add support for creating universal binaries which
can contain an archive.

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

Test plan: make check-all

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372666 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SampleFDO] Treat names in profile as not cold only when profile symbol list
Wei Mi [Mon, 23 Sep 2019 22:11:35 +0000 (22:11 +0000)]
[SampleFDO] Treat names in profile as not cold only when profile symbol list
is available

In rL372232, we treated names showing up in profile as not cold when
profile-sample-accurate is enabled. This caused 70k size regression in
Chrome/Android. The patch put a guard and only enable the change when
profile symbol list is available, i.e., keep the old behavior when profile
symbol list is not available.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372665 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix uninitialized variable warning. NFCI.
Simon Pilgrim [Mon, 23 Sep 2019 21:32:38 +0000 (21:32 +0000)]
Fix uninitialized variable warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372662 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Reduce the number of unique check prefixes in memset-nonzero.ll. NFC
Craig Topper [Mon, 23 Sep 2019 21:29:28 +0000 (21:29 +0000)]
[X86] Reduce the number of unique check prefixes in memset-nonzero.ll. NFC

The avx512 with prefer-256-bit generates the same code as AVX2 so
just reuse that prefix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372661 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] vNxM.load_splat instructions
Thomas Lively [Mon, 23 Sep 2019 20:42:12 +0000 (20:42 +0000)]
[WebAssembly] vNxM.load_splat instructions

Summary:
Adds the new load_splat instructions as specified at
https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#load-and-splat.

DAGISel does not allow matching multiple copies of the same load in a
single pattern, so we use a new node in WebAssemblyISD to wrap loads
that should be splatted.

Depends on D67783.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372655 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] foldOrOfICmps(): Acquire SimplifyQuery with set CxtI
Roman Lebedev [Mon, 23 Sep 2019 20:40:47 +0000 (20:40 +0000)]
[InstCombine] foldOrOfICmps(): Acquire SimplifyQuery with set CxtI

Extracted from https://reviews.llvm.org/D67849#inline-610377

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372654 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] foldAndOfICmps(): Acquire SimplifyQuery with set CxtI
Roman Lebedev [Mon, 23 Sep 2019 20:40:40 +0000 (20:40 +0000)]
[InstCombine] foldAndOfICmps(): Acquire SimplifyQuery with set CxtI

Extracted from https://reviews.llvm.org/D67849#inline-610377

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372653 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] Remove unused memory instructions and patterns
Thomas Lively [Mon, 23 Sep 2019 20:04:59 +0000 (20:04 +0000)]
[WebAssembly] Remove unused memory instructions and patterns

Summary:
Removes duplicated SIMD loads and store instructions and removes
patterns involving GlobalAddresses that were not used in any tests.

Reviewers: aheejin, sunfish

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, jfb, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372648 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] Annotate strndup calls with dereferenceable_or_null
David Bolvansky [Mon, 23 Sep 2019 19:55:45 +0000 (19:55 +0000)]
[InstCombine] Annotate strndup calls with dereferenceable_or_null

"Implementations are free to malloc() a buffer containing either (size + 1) bytes or (strnlen(s, size) + 1) bytes. Applications should not assume that strndup() will allocate (size + 1) bytes when strlen(s) is smaller than size."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372647 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Use TargetConstant for condition code on X86ISD::SETCC/CMOV/BRCOND nodes.
Craig Topper [Mon, 23 Sep 2019 19:48:20 +0000 (19:48 +0000)]
[X86] Use TargetConstant for condition code on X86ISD::SETCC/CMOV/BRCOND nodes.

This removes the need for ConvertToTarget opcodes in the isel table.
It's also consistent with the recent changes to use TargetConstant
for intrinsic nodes that always take immediates.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372645 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[TableGen] Emit OperandType enums for RegisterOperands/RegisterClasses
Aditya Nandakumar [Mon, 23 Sep 2019 18:51:00 +0000 (18:51 +0000)]
[TableGen] Emit OperandType enums for RegisterOperands/RegisterClasses

https://reviews.llvm.org/D66773

The OpTypes::OperandType was creating an enum for all records that
inherit from Operand, but in reality there are operands for instructions
that inherit from other types too. In particular, RegisterOperand and
RegisterClass. This commit adds those types to the list of operand types
that are tracked by the OperandType enum.

Patch by: nlguillemot

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372641 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[IR] Add getExtendedType() to IntegerType and Type (dispatching to IntegerType or...
Roman Lebedev [Mon, 23 Sep 2019 18:21:33 +0000 (18:21 +0000)]
[IR] Add getExtendedType() to IntegerType and Type (dispatching to IntegerType or VectorType)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372638 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] dropRedundantMaskingOfLeftShiftInput(): improve comment
Roman Lebedev [Mon, 23 Sep 2019 18:21:14 +0000 (18:21 +0000)]
[InstCombine] dropRedundantMaskingOfLeftShiftInput(): improve comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372637 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SLC] Convert some strndup calls to strdup calls
David Bolvansky [Mon, 23 Sep 2019 18:20:01 +0000 (18:20 +0000)]
[SLC] Convert some strndup calls to strdup calls

Summary:
Motivation:
- If we can fold it to strdup, we should (strndup does more things than strdup).
- Annotation mechanism. (Works for strdup well).

strdup and strndup are part of C 20 (currently posix fns), so we should optimize them.

Reviewers: efriedma, jdoerfert

Reviewed By: jdoerfert

Subscribers: lebedev.ri, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372636 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. c/d/e with mask (PR42563)
Roman Lebedev [Mon, 23 Sep 2019 17:04:28 +0000 (17:04 +0000)]
[InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. c/d/e with mask (PR42563)

Summary:
If we have a pattern `(x & (-1 >> maskNbits)) << shiftNbits`,
we already know (have a fold) that will drop the `& (-1 >> maskNbits)`
mask iff `(shiftNbits-maskNbits) s>= 0` (i.e. `shiftNbits u>= maskNbits`).

So even if `(shiftNbits-maskNbits) s< 0`, we can still
fold, we will just need to apply a **constant** mask afterwards:
```
Name: c, normal+mask
  %t0 = lshr i32 -1, C1
  %t1 = and i32 %t0, %x
  %r = shl i32 %t1, C2
=>
  %n0 = shl i32 %x, C2
  %n1 = i32 ((-(C2-C1))+32)
  %n2 = zext i32 %n1 to i64
  %n3 = lshr i64 -1, %n2
  %n4 = trunc i64 %n3 to i32
  %r = and i32 %n0, %n4
```
https://rise4fun.com/Alive/gslRa

Naturally, old `%masked` will have to be one-use.
This is not valid for pattern f - where "masking" is done via `ashr`.

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

Reviewers: spatel, nikic, xbolva00

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372630 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563)
Roman Lebedev [Mon, 23 Sep 2019 17:04:14 +0000 (17:04 +0000)]
[InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563)

Summary:
And this is **finally** the interesting part of that fold!

If we have a pattern `(x & (~(-1 << maskNbits))) << shiftNbits`,
we already know (have a fold) that will drop the `& (~(-1 << maskNbits))`
mask iff `(maskNbits+shiftNbits) u>= bitwidth(x)`.
But that is actually ignorant, there's more general fold here:

In this pattern, `(maskNbits+shiftNbits)` actually correlates
with the number of low bits that will remain in the final value.
So even if `(maskNbits+shiftNbits) u< bitwidth(x)`, we can still
fold, we will just need to apply a **constant** mask afterwards:
```
Name: a, normal+mask
  %onebit = shl i32 -1, C1
  %mask = xor i32 %onebit, -1
  %masked = and i32 %mask, %x
  %r = shl i32 %masked, C2
=>
  %n0 = shl i32 %x, C2
  %n1 = add i32 C1, C2
  %n2 = zext i32 %n1 to i64
  %n3 = shl i64 -1, %n2
  %n4 = xor i64 %n3, -1
  %n5 = trunc i64 %n4 to i32
  %r = and i32 %n0, %n5
```
https://rise4fun.com/Alive/F5R

Naturally, old `%masked` will have to be one-use.
Similar fold exists for patterns c,d,e, will post patch later.

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

Reviewers: spatel, nikic, xbolva00

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372629 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[BreakFalseDeps] ignore function with minsize attribute
Sanjay Patel [Mon, 23 Sep 2019 17:01:01 +0000 (17:01 +0000)]
[BreakFalseDeps] ignore function with minsize attribute

This came up in the x86-specific:
https://bugs.llvm.org/show_bug.cgi?id=43239
...but it is a general problem for the BreakFalseDeps pass.
Dependencies may be broken by adding some other instruction,
so that should be avoided if the overall goal is to minimize size.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372628 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAdd...
Alexey Bataev [Mon, 23 Sep 2019 16:25:03 +0000 (16:25 +0000)]
[SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!")

Summary:
Initially SLP vectorizer replaced all going-to-be-vectorized
instructions with Undef values. It may break ScalarEvaluation and may
cause a crash.
Reworked SLP vectorizer so that it does not replace vectorized
instructions by UndefValue anymore. Instead vectorized instructions are
marked for deletion inside if BoUpSLP class and deleted upon class
destruction.

Reviewers: mzolotukhin, mkuper, hfinkel, RKSimon, davide, spatel

Subscribers: RKSimon, Gerolf, anemet, hans, majnemer, llvm-commits, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372626 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] foldUnsignedUnderflowCheck(): s/Subtracted/ZeroCmpOp/
Roman Lebedev [Mon, 23 Sep 2019 16:04:32 +0000 (16:04 +0000)]
[InstCombine] foldUnsignedUnderflowCheck(): s/Subtracted/ZeroCmpOp/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372625 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AMDGPU][MC] Corrected handling of relocatable expressions
Dmitry Preobrazhensky [Mon, 23 Sep 2019 15:41:51 +0000 (15:41 +0000)]
[AMDGPU][MC] Corrected handling of relocatable expressions

See bug 43359: https://bugs.llvm.org//show_bug.cgi?id=43359

Reviewers: rampitec

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372622 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoHexagonLoopIdiomRecognition - silence static analyzer dyn_cast<> null dereference...
Simon Pilgrim [Mon, 23 Sep 2019 15:36:24 +0000 (15:36 +0000)]
HexagonLoopIdiomRecognition - silence static analyzer dyn_cast<> null dereference warnings. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372619 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[TextAPI] Add New Supported Platforms
Cyndy Ishida [Mon, 23 Sep 2019 15:28:02 +0000 (15:28 +0000)]
[TextAPI] Add New Supported Platforms

Summary: This patch introduces simulators, as well was the restriced zippered and macCatalyst to supported platforms

Reviewers: ributzka, steven_wu

Reviewed By: ributzka

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372618 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Hexagon] Bitcast v4i16 to v8i8, unify no-op casts between scalar and HVX
Krzysztof Parzyszek [Mon, 23 Sep 2019 14:33:27 +0000 (14:33 +0000)]
[Hexagon] Bitcast v4i16 to v8i8, unify no-op casts between scalar and HVX

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372616 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Alignment][NFC] Migrate Instructions to Align
Guillaume Chatelet [Mon, 23 Sep 2019 14:23:37 +0000 (14:23 +0000)]
[Alignment][NFC] Migrate Instructions to Align

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372613 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM library
Simon Pilgrim [Mon, 23 Sep 2019 14:11:48 +0000 (14:11 +0000)]
[llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM library

Modify LLVMConfig to produce LLVM_USE_CRT variables in build-directory. It helps to set the same compiler debug options like in builded library.

Committed on behalf of @igorban (Igor)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372610 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[x86] fix assert with horizontal math + broadcast of vector (PR43402)
Sanjay Patel [Mon, 23 Sep 2019 13:30:23 +0000 (13:30 +0000)]
[x86] fix assert with horizontal math + broadcast of vector (PR43402)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372606 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ValueTracking] Remove unused matchSelectPattern optional argument. NFCI.
Simon Pilgrim [Mon, 23 Sep 2019 13:20:47 +0000 (13:20 +0000)]
[ValueTracking] Remove unused matchSelectPattern optional argument. NFCI.

The matchSelectPattern const wrapper is never explicitly called with the optional Instruction::CastOps argument, and it turns out that it wasn't being forwarded to matchSelectPattern anyway!

Noticed while investigating clang static analyzer warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372604 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ValueTracking] Fix uninitialized variable warnings in matchSelectPattern const wrapp...
Simon Pilgrim [Mon, 23 Sep 2019 13:15:52 +0000 (13:15 +0000)]
[ValueTracking] Fix uninitialized variable warnings in matchSelectPattern const wrapper. NFCI.

Static analyzer complains about const_cast uninitialized variables, we should explicitly set these to null.

Ideally that const wrapper would go away though.......

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372603 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agollvm-undname: Add support for demangling typeinfo names
Nico Weber [Mon, 23 Sep 2019 13:13:37 +0000 (13:13 +0000)]
llvm-undname: Add support for demangling typeinfo names

typeinfo names aren't symbols but string constant contents
stored in compiler-generated typeinfo objects, but llvm-cxxfilt
can demangle these for Itanium names.

In the MSVC ABI, these are just a '.' followed by a mangled
type -- this means they don't start with '?' like all MS-mangled
symbols do.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372602 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoCosmetic; don't use the magic constant 35 when HASH is more readable. This matches...
Mark Murray [Mon, 23 Sep 2019 12:52:42 +0000 (12:52 +0000)]
Cosmetic; don't use the magic constant 35 when HASH is more readable. This matches other MCK__<THING>_* usage better.

Summary: No functional change. This fixes a magic constant in MCK__*_... macros only.

Reviewers: ostannard

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372599 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFunction::BuildLazyArguments() - fix "variable used but never read" analyzer warning...
Simon Pilgrim [Mon, 23 Sep 2019 12:49:39 +0000 (12:49 +0000)]
Function::BuildLazyArguments() - fix "variable used but never read" analyzer warning. NFCI.

Simplify the code by separating the masking of the SDC variable from using it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372598 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r372595
GN Sync Bot [Mon, 23 Sep 2019 12:44:45 +0000 (12:44 +0000)]
gn build: Merge r372595

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372597 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Alignment][NFC] DataLayout migration to llvm::Align
Guillaume Chatelet [Mon, 23 Sep 2019 12:41:36 +0000 (12:41 +0000)]
[Alignment][NFC] DataLayout migration to llvm::Align

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: jholewinski, hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372596 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Alignment] Get DataLayout::StackAlignment as Align
Guillaume Chatelet [Mon, 23 Sep 2019 12:01:32 +0000 (12:01 +0000)]
[Alignment] Get DataLayout::StackAlignment as Align

Summary:
Internally it is needed to know if StackAlignment is set but we can
expose it as llvm::Align.

This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372585 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoLocalizer - fix "variable used but never read" analyzer warning. NFCI.
Simon Pilgrim [Mon, 23 Sep 2019 11:38:10 +0000 (11:38 +0000)]
Localizer - fix "variable used but never read" analyzer warning. NFCI.

Simplify the code by separating the modification of the Changed variable from returning it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372583 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoTargetInstrInfo::getStackSlotRange - fix "variable used but never read" analyzer...
Simon Pilgrim [Mon, 23 Sep 2019 11:36:24 +0000 (11:36 +0000)]
TargetInstrInfo::getStackSlotRange - fix "variable used but never read" analyzer warning. NFCI.

We don't need to divide the BitSize local variable at all.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372582 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r372564
GN Sync Bot [Mon, 23 Sep 2019 11:08:25 +0000 (11:08 +0000)]
gn build: Merge r372564

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372581 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "Reland "[utils] Implement the llvm-locstats tool""
Djordje Todorovic [Mon, 23 Sep 2019 11:04:11 +0000 (11:04 +0000)]
Revert "Reland "[utils] Implement the llvm-locstats tool""

This reverts commit rL372554.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372580 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-readobj] - Stop treating ".stack_sizes.*" sections as stack sizes sections.
George Rimar [Mon, 23 Sep 2019 10:43:09 +0000 (10:43 +0000)]
[llvm-readobj] - Stop treating ".stack_sizes.*" sections as stack sizes sections.

llvm-readobj currently handles .stack_sizes.* (e.g. .stack_sizes.foo)
as a normal stack sizes section. Though MC does not produce sections with
such names. Also, linkers do not combine .stack_sizes.* into .stack_sizes.

A mini discussion about this correctness issue is here: https://reviews.llvm.org/D67757#inline-609274
This patch changes implementation so that only now only '.stack_sizes' name is
accepted as a real stack sizes section.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372578 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoCriticalAntiDepBreaker - Assert that we've found the bottom of the critical path...
Simon Pilgrim [Mon, 23 Sep 2019 10:42:47 +0000 (10:42 +0000)]
CriticalAntiDepBreaker - Assert that we've found the bottom of the critical path. NFCI.

Silences static analyzer null dereference warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372577 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-readobj] - Implement LLVM-style dumping for .stack_sizes sections.
George Rimar [Mon, 23 Sep 2019 10:33:19 +0000 (10:33 +0000)]
[llvm-readobj] - Implement LLVM-style dumping for .stack_sizes sections.

D65313 implemented GNU-style dumping (llvm-readelf).
This one implements LLVM-style dumping (llvm-readobj).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372576 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[FunctionAttrs] Enable nonnull arg propagation
David Bolvansky [Mon, 23 Sep 2019 09:58:02 +0000 (09:58 +0000)]
[FunctionAttrs] Enable nonnull arg propagation

Enable flag introduced in rL294998. Security concerns are no longer valid, since function signatures for mentioned libc functions has no nonnull attribute (Clang does not generate them? I see no nonnull attr in LLVM IR for these functions) and since rL372091 we carefully annotate the callsites where we know that size is static, non zero. So let's enable this flag again..

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372573 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM][MVE] Remove old tail predicates
Sam Parker [Mon, 23 Sep 2019 09:48:25 +0000 (09:48 +0000)]
[ARM][MVE] Remove old tail predicates

Remove any predicate that we replace with a vctp intrinsic, and try
to remove their operands too. Also look into the exit block to see if
there's any duplicates of the predicates that we've replaced and
clone the vctp to be used there instead.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372567 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64] support neon_sshl and neon_ushl in performIntrinsicCombine.
Florian Hahn [Mon, 23 Sep 2019 09:38:53 +0000 (09:38 +0000)]
[AArch64] support neon_sshl and neon_ushl in performIntrinsicCombine.

Try to generate ushll/sshll for aarch64_neon_ushl/aarch64_neon_sshl,
if their first operand is extended and the second operand is a constant

Also adds a few tests marked with FIXME, where we can further increase
codegen.

Reviewers: t.p.northover, samparker, dmgreen, anemet

Reviewed By: anemet

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372565 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM][LowOverheadLoops] Use subs during revert.
Sam Parker [Mon, 23 Sep 2019 08:57:50 +0000 (08:57 +0000)]
[ARM][LowOverheadLoops] Use subs during revert.

Check whether there are any uses or defs between the LoopDec and
LoopEnd. If there's not, then we can use a subs to set the cpsr and
skip generating a cmp.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372560 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Alignment][NFC] Switch DataLayout private members to llvm::Align
Guillaume Chatelet [Mon, 23 Sep 2019 08:38:36 +0000 (08:38 +0000)]
[Alignment][NFC] Switch DataLayout private members to llvm::Align

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372558 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM][LowOverheadLoops] Use tBcc when reverting
Sam Parker [Mon, 23 Sep 2019 08:35:31 +0000 (08:35 +0000)]
[ARM][LowOverheadLoops] Use tBcc when reverting

Check the branch target ranges and use a tBcc instead of t2Bcc when
we can.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372557 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MIPS GlobalISel] VarArg argument lowering, select G_VASTART and vacopy
Petar Avramovic [Mon, 23 Sep 2019 08:11:41 +0000 (08:11 +0000)]
[MIPS GlobalISel] VarArg argument lowering, select G_VASTART and vacopy

CC_Mips doesn't accept vararg functions for O32, so we have to explicitly
use CC_Mips_FixedArg.
For lowerCall we now properly figure out whether callee function is vararg
or not, this has no effect for O32 since we always use CC_Mips_FixedArg.
For lower formal arguments we need to copy arguments in register to stack
and save pointer to start for argument list into MipsMachineFunction
object so that G_VASTART could use it during instruction select.
For vacopy we need to copy content from one vreg to another,
load and store are used for that purpose.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372555 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReland "[utils] Implement the llvm-locstats tool"
Djordje Todorovic [Mon, 23 Sep 2019 07:57:53 +0000 (07:57 +0000)]
Reland "[utils] Implement the llvm-locstats tool"

The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372554 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Canonicalize all zeroes vector to RHS in X86DAGToDAGISel::tryVPTESTM.
Craig Topper [Mon, 23 Sep 2019 05:35:23 +0000 (05:35 +0000)]
[X86] Canonicalize all zeroes vector to RHS in X86DAGToDAGISel::tryVPTESTM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372544 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Remove SETEQ/SETNE canonicalization code from LowerIntVSETCC_AVX512 to prevent...
Craig Topper [Mon, 23 Sep 2019 05:35:20 +0000 (05:35 +0000)]
[X86] Remove SETEQ/SETNE canonicalization code from LowerIntVSETCC_AVX512 to prevent an infinite loop.

The attached test case would previous infinite loop after
r365711.

I'm going to move this to X86ISelDAGToDAG.cpp to get the setcc
to match VPTEST in 32-bit mode in a follow up commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372543 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add 32-bit command line to avx512f-vec-test-testn.ll
Craig Topper [Mon, 23 Sep 2019 05:35:15 +0000 (05:35 +0000)]
[X86] Add 32-bit command line to avx512f-vec-test-testn.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372542 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoPrefer AVX512 memcpy when applicable
David Zarzycki [Mon, 23 Sep 2019 05:00:59 +0000 (05:00 +0000)]
Prefer AVX512 memcpy when applicable

When AVX512 is available and the preferred vector width is 512-bits or
more, we should prefer AVX512 for memcpy().

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

https://reviews.llvm.org/D67874

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372540 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Convert to Constant arguments to MMX shift by i32 intrinsics to TargetConstant...
Craig Topper [Mon, 23 Sep 2019 01:21:51 +0000 (01:21 +0000)]
[X86] Convert to Constant arguments to MMX shift by i32 intrinsics to TargetConstant during lowering.

This allows us to use timm in the isel table which is more
consistent with other intrinsics that take an immediate now.

We can't declare the intrinsic as taking an ImmArg because we
need to match non-constants to the shift by MMX register
instruction which we do by mutating the intrinsic id during
lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372537 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Remove stale FIXME.
Craig Topper [Mon, 23 Sep 2019 01:21:47 +0000 (01:21 +0000)]
[X86] Remove stale FIXME.

This goes back to when MMX was migrated to intrinsic only. The
hack referenced here has been gone for quite a while.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372536 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][SelectionDAGBuilder] Move the hack for handling MMX shift by i32 intrinsics...
Craig Topper [Mon, 23 Sep 2019 01:05:33 +0000 (01:05 +0000)]
[X86][SelectionDAGBuilder] Move the hack for handling MMX shift by i32 intrinsics into the X86 backend.

This intrinsics should be shift by immediate, but gcc allows any
i32 scalar and clang needs to match that. So we try to detect the
non-constant case and move the data from an integer register to an
MMX register.

Previously this was done by creating a v2i32 build_vector and
bitcast in SelectionDAGBuilder. This had to be done early since
v2i32 isn't a legal type. The bitcast+build_vector would be DAG
combined to X86ISD::MMX_MOVW2D which isel will turn into a
GPR->MMX MOVD.

This commit just moves the whole thing to lowering and emits
the X86ISD::MMX_MOVW2D directly to avoid the illegal type. The
test changes just seem to be due to nodes being linearized in a
different order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372535 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Require last argument to LWPINS/LWPVAL builtins to be an ICE. Add ImmArg to...
Craig Topper [Sun, 22 Sep 2019 23:48:50 +0000 (23:48 +0000)]
[X86] Require last argument to LWPINS/LWPVAL builtins to be an ICE. Add ImmArg to the llvm intrinsics.

Update the isel patterns to use timm instead of imm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372534 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI...
Roman Lebedev [Sun, 22 Sep 2019 22:04:29 +0000 (22:04 +0000)]
[X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI is profitable (PR43381)

Summary:
PR43381 notes that while we are good at matching `(X >> C1) & C2` as BEXTR/BEXTRI,
we only do that if we either have BEXTRI (TBM),
or if BEXTR is marked as being fast (`-mattr=+fast-bextr`).
In all other cases we don't match.

But that is mainly only true for AMD CPU's.
However, for all the CPU's for which we have sched models,
the BZHI is always fast (or the sched models are all bad.)

So if we decide that it's unprofitable to emit BEXTR/BEXTRI,
we should consider falling-back to BZHI if it is available,
and follow-up with the shift.

While it's really tempting to do something because it's cool
it is wise to first think whether it actually makes sense to do.
We shouldn't just use BZHI because we can, but only it it is beneficial.
In particular, it isn't really worth it if the input is a register,
mask is small, or we can fold a load.
But it is worth it if the mask does not fit into 32-bits.

(careful, i don't know much about intel cpu's, my choice of `-mcpu` may be bad here)
Thus we manage to fold a load:
https://godbolt.org/z/Er0OQz
Or if we'd end up using BZHI anyways because the mask is large:
https://godbolt.org/z/dBJ_5h
But this isn'r actually profitable in general case,
e.g. here we'd increase microop count
(the register renaming is free, mca does not model that there it seems)
https://godbolt.org/z/k6wFoz
Likewise, not worth it if we just get load folding:
https://godbolt.org/z/1M1deG

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

Reviewers: RKSimon, craig.topper, davezarzycki, spatel

Reviewed By: craig.topper, davezarzycki

Subscribers: andreadb, hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372532 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoVerifier - silence static analyzer dyn_cast<VectorType> null dereference warnings...
Simon Pilgrim [Sun, 22 Sep 2019 21:01:23 +0000 (21:01 +0000)]
Verifier - silence static analyzer dyn_cast<VectorType> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use cast<VectorType> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372529 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AMDGPU] isSDNodeAlwaysUniform - silence static analyzer dyn_cast<LoadSDNode> null...
Simon Pilgrim [Sun, 22 Sep 2019 21:01:13 +0000 (21:01 +0000)]
[AMDGPU] isSDNodeAlwaysUniform - silence static analyzer dyn_cast<LoadSDNode> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we should be able to use cast<LoadSDNode> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372528 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Fix some VCVTPS2PH isel patterns where 'i32' was used instead of 'timm'
Craig Topper [Sun, 22 Sep 2019 20:08:57 +0000 (20:08 +0000)]
[X86] Fix some VCVTPS2PH isel patterns where 'i32' was used instead of 'timm'

This seems to have completed omitted any check for the opcode
of the operand in the isel table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372526 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][TableGen] Allow timm to appear in output patterns. Use it to remove ConvertToTa...
Craig Topper [Sun, 22 Sep 2019 19:49:39 +0000 (19:49 +0000)]
[X86][TableGen] Allow timm to appear in output patterns. Use it to remove ConvertToTarget opcodes from the X86 isel table.

We're now using a lot more TargetConstant nodes in SelectionDAG.
But we were still telling isel to convert some of them
to TargetConstants even though they already are. This is because
isel emits a conversion anytime the output pattern has a an 'imm'.
I guess for patterns in instructions we take the 'timm' from the
'set' pattern, but for Pat patterns with explcicit output we
previously had to say 'imm' since 'timm' wasn't allowed in outputs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372525 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][X86] Add BEXTR test with load and 33-bit mask (PR43381 / D67875)
Roman Lebedev [Sun, 22 Sep 2019 19:36:38 +0000 (19:36 +0000)]
[NFC][X86] Add BEXTR test with load and 33-bit mask (PR43381 / D67875)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372524 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Update commutable EVEX vcmp patterns to use timm instead of imm.
Craig Topper [Sun, 22 Sep 2019 19:06:13 +0000 (19:06 +0000)]
[X86] Update commutable EVEX vcmp patterns to use timm instead of imm.

We need to match TargetConstant, not Constant. This was broken
in r372338, but we lacked test coverage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372523 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add more tests for commuting evex vcmp instructions during isel to fold a load.
Craig Topper [Sun, 22 Sep 2019 19:06:08 +0000 (19:06 +0000)]
[X86] Add more tests for commuting evex vcmp instructions during isel to fold a load.

Some of the isel patterns were not updated to check for
TargetConstant instead of Constant in r372338.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372522 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SelectionDAG] computeKnownBits/ComputeNumSignBits - cleanup demanded/unknown paths...
Simon Pilgrim [Sun, 22 Sep 2019 18:47:12 +0000 (18:47 +0000)]
[SelectionDAG] computeKnownBits/ComputeNumSignBits - cleanup demanded/unknown paths. NFCI.

Merge the calls, just adjust the demandedelts if we have a valid extract_subvector constant index, else demand all elts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372521 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[XRay] Silence static analyzer dyn_cast<BufferExtents> null dereference warning....
Simon Pilgrim [Sun, 22 Sep 2019 18:47:00 +0000 (18:47 +0000)]
[XRay] Silence static analyzer dyn_cast<BufferExtents> null dereference warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372520 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LSR] Silence static analyzer null dereference warnings with assertions. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 17:59:24 +0000 (17:59 +0000)]
[LSR] Silence static analyzer null dereference warnings with assertions. NFCI.

Add assertions to make it clear that GenerateIVChain / NarrowSearchSpaceByPickingWinnerRegs should succeed in finding non-null values

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372518 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoConstantHoisting - Silence static analyzer dyn_cast<PointerType> null dereference...
Simon Pilgrim [Sun, 22 Sep 2019 17:45:05 +0000 (17:45 +0000)]
ConstantHoisting - Silence static analyzer dyn_cast<PointerType> null dereference warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372517 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Friendlier error on invalid entries in llvm_targets_to_build
Nico Weber [Sun, 22 Sep 2019 16:48:20 +0000 (16:48 +0000)]
gn build: Friendlier error on invalid entries in llvm_targets_to_build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372515 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Cost][X86] Add more missing vector truncation costs
Simon Pilgrim [Sun, 22 Sep 2019 16:46:15 +0000 (16:46 +0000)]
[Cost][X86] Add more missing vector truncation costs

The AVX512 cases still need some work to correct recognise the PMOV truncation cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372514 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: consolidate "Nothing to do" branches in targets.gni
Nico Weber [Sun, 22 Sep 2019 15:42:40 +0000 (15:42 +0000)]
gn build: consolidate "Nothing to do" branches in targets.gni

No behavior change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372512 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] allow icmp+binop folds before min/max bailout (PR43310)
Sanjay Patel [Sun, 22 Sep 2019 14:31:53 +0000 (14:31 +0000)]
[InstCombine] allow icmp+binop folds before min/max bailout (PR43310)

This has the potential to uncover missed analysis/folds as shown in the
min/max code comment/test, but fewer restrictions on icmp folds should
be better in general to solve cases like:
https://bugs.llvm.org/show_bug.cgi?id=43310

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372510 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add tests for icmp fold hindered by min/max; NFC
Sanjay Patel [Sun, 22 Sep 2019 14:23:22 +0000 (14:23 +0000)]
[InstCombine] add tests for icmp fold hindered by min/max; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372509 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix uninitialized variable warning. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 13:43:21 +0000 (13:43 +0000)]
Fix uninitialized variable warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372508 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64] AArch64StackTagging - Silence static analyzer dyn_cast<> null dereference...
Simon Pilgrim [Sun, 22 Sep 2019 13:43:12 +0000 (13:43 +0000)]
[AArch64] AArch64StackTagging - Silence static analyzer dyn_cast<> null dereference warning. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372507 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Add missing RISCV to llvm_targets_to_build="all"
Nico Weber [Sun, 22 Sep 2019 13:41:38 +0000 (13:41 +0000)]
gn build: Add missing RISCV to llvm_targets_to_build="all"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372506 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Add build files for llvm/lib/Target/AVR
Nico Weber [Sun, 22 Sep 2019 13:17:38 +0000 (13:17 +0000)]
gn build: Add build files for llvm/lib/Target/AVR

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372505 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NVPTX] NVPTXLowerAggrCopies - Silence static analyzer dyn_cast<StoreInst> null deref...
Simon Pilgrim [Sun, 22 Sep 2019 13:14:30 +0000 (13:14 +0000)]
[NVPTX] NVPTXLowerAggrCopies - Silence static analyzer dyn_cast<StoreInst> null dereference warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372504 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Lanai] LanaiAsmParser - Silence static analyzer dyn_cast null dereference warnings...
Simon Pilgrim [Sun, 22 Sep 2019 13:14:21 +0000 (13:14 +0000)]
[Lanai] LanaiAsmParser - Silence static analyzer dyn_cast null dereference warnings. NFCI.

We were already doing this dyn_cast && isa<> && cast<> pattern for some add*Operands methods, just do this more consistently to stop clang static analyzer warning so much.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372503 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[VPlan] Silence static analyzer dyn_cast null dereference warning. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 13:02:00 +0000 (13:02 +0000)]
[VPlan] Silence static analyzer dyn_cast null dereference warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372502 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 13:01:49 +0000 (13:01 +0000)]
AMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372501 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MIPS] Don't dereference dyn_cast<> Constant results. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 12:38:32 +0000 (12:38 +0000)]
[MIPS] Don't dereference dyn_cast<> Constant results. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372500 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Hexagon] Don't dereference dyn_cast<ConstantFPSDNode> result. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 12:38:21 +0000 (12:38 +0000)]
[Hexagon] Don't dereference dyn_cast<ConstantFPSDNode> result. NFCI.

The static analyzer is warning about potential null dereference, but we should be able to use cast<ConstantFPSDNode> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372499 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Cost][X86] Add v2i64 truncation costs
Simon Pilgrim [Sun, 22 Sep 2019 12:04:38 +0000 (12:04 +0000)]
[Cost][X86] Add v2i64 truncation costs

We are missing costs for a lot of truncation cases, I'm hoping to address all the 'zero cost' cases in trunc.ll

I thought this was a vector widening side effect, but even before this we had some interesting LV decisions (notably over indvars) being made due to these zero costs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372498 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMove classes into anonymous namespaces. NFC.
Benjamin Kramer [Sun, 22 Sep 2019 09:28:47 +0000 (09:28 +0000)]
Move classes into anonymous namespaces. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372495 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add test memset and memcpy testcases for D67874. NFC
Craig Topper [Sun, 22 Sep 2019 06:52:25 +0000 (06:52 +0000)]
[X86] Add test memset and memcpy testcases for D67874. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372494 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstSimplify] simplifyUnsignedRangeCheck(): X >= Y && Y == 0 --> Y == 0
Roman Lebedev [Sat, 21 Sep 2019 22:27:39 +0000 (22:27 +0000)]
[InstSimplify] simplifyUnsignedRangeCheck(): X >= Y && Y == 0  -->  Y == 0

https://rise4fun.com/Alive/v9Y4

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372491 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstSimplify][NFC] Reorganize simplifyUnsignedRangeCheck() to emphasize and/or symmetry
Roman Lebedev [Sat, 21 Sep 2019 22:27:28 +0000 (22:27 +0000)]
[InstSimplify][NFC] Reorganize simplifyUnsignedRangeCheck() to emphasize and/or symmetry

Only a single `X >= Y && Y == 0  -->  Y == 0` fold appears to be missing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372490 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][InstSimplify] Add exhaustive test coverage for simplifyUnsignedRangeCheck().
Roman Lebedev [Sat, 21 Sep 2019 22:27:18 +0000 (22:27 +0000)]
[NFC][InstSimplify] Add exhaustive test coverage for simplifyUnsignedRangeCheck().

One case is not handled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372489 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Updates sidebar links
DeForest Richards [Sat, 21 Sep 2019 21:05:20 +0000 (21:05 +0000)]
[Docs] Updates sidebar links

Adds sidebar links to mailing lists, IRC, and meetups and social events.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372488 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Adds new page for Getting Involved articles
DeForest Richards [Sat, 21 Sep 2019 20:56:40 +0000 (20:56 +0000)]
[Docs] Adds new page for Getting Involved articles

Adds a new page for existing Getting Involved, Development Process, and Community Proposals articles. Also moves Mailing Lists, Meetups and social events, and IRC sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372487 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[CodeView] Add pragma push/pop_macro for ARM64_FPSR to enum header
Martin Storsjo [Sat, 21 Sep 2019 19:09:24 +0000 (19:09 +0000)]
[CodeView] Add pragma push/pop_macro for ARM64_FPSR to enum header

This fixes (one aspect of) compilation of LLDB with MSVC for ARM64.

LLDB source files include intrin.h, and the MSVC intrin.h transitively
includes arm64intr.h, which has an ARM64_FPSR define, which clashes
with the enum declaration.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372481 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoSROA: Check Total Bits of vector type
Suyog Sarda [Sat, 21 Sep 2019 18:16:37 +0000 (18:16 +0000)]
SROA: Check Total Bits of vector type

While Promoting alloca instruction of Vector Type,
Check total size in bits of its slices too.
If they don't match, don't promote the alloca instruction.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372480 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoTest mail. NFC.
Suyog Sarda [Sat, 21 Sep 2019 18:03:30 +0000 (18:03 +0000)]
Test mail. NFC.

Testing commit acces. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372479 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRecommit [SampleFDO] Expose an interface to return the size of a section
Wei Mi [Sat, 21 Sep 2019 17:23:55 +0000 (17:23 +0000)]
Recommit [SampleFDO] Expose an interface to return the size of a section
or the size of the profile for profile in ExtBinary format.

Fix a test failure on Mac.

[SampleFDO] Expose an interface to return the size of a section or the
size of the profile for profile in ExtBinary format.

Sometimes we want to limit the size of the profile by stripping some functions
with low sample count or by stripping some function names with small text size
from profile symbol list. That requires the profile reader to have the
interfaces returning the size of a section or the size of total profile. The
patch add those interfaces.

At the same time, add some dump facility to show the size of each section.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372478 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor] Implement "norecurse" function attribute deduction
Hideto Ueno [Sat, 21 Sep 2019 15:13:19 +0000 (15:13 +0000)]
[Attributor] Implement "norecurse" function attribute deduction

Summary:
This patch introduces `norecurse` function attribute deduction.

`norecurse` will be deduced if the following conditions hold:
* The size of SCC in which the function belongs equals to 1.
* The function doesn't have self-recursion.
* We have `norecurse` for all call site.

To avoid a large change, SCC is calculated using scc_iterator in InfoCache initialization for now.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372475 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Support] Add a DataExtractor constructor that takes ArrayRef<uint8_t>
Fangrui Song [Sat, 21 Sep 2019 15:05:03 +0000 (15:05 +0000)]
[Support] Add a DataExtractor constructor that takes ArrayRef<uint8_t>

The new constructor can simplify some llvm-readobj call sites.

Reviewed By: grimar, dblaikie

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372473 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Bug fix for document not included in toctree
DeForest Richards [Sat, 21 Sep 2019 14:29:19 +0000 (14:29 +0000)]
[Docs] Bug fix for document not included in toctree

Fixes 'document not included in toctree' bug for FAQ and Lexicon topics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372470 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Updates sidebar links
DeForest Richards [Sat, 21 Sep 2019 14:17:09 +0000 (14:17 +0000)]
[Docs] Updates sidebar links

Adds additional links to sidebar. Also removes Glossary and FAQ from LLVM Design & Overview section. (These links now reside on the sidebar.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372469 91177308-0d34-0410-b5e6-96231b3b80d8