Commit Graph

185543 Commits

Author SHA1 Message Date
Pavel Labath
d93e5a30d0 MCRegisterInfo: Merge getLLVMRegNum and getLLVMRegNumFromEH
Summary:
The functions different in two ways:
- getLLVMRegNum could return both "eh" and "other" dwarf register
  numbers, while getLLVMRegNumFromEH only returned the "eh" number.
- getLLVMRegNum asserted if the register was not found, while the second
  function returned -1.

The second distinction was pretty important, but it was very hard to
infer that from the function name. Aditionally, for the use case of
dumping dwarf expressions, we needed a function which can work with both
kinds of number, but does not assert.

This patch solves both of these issues by merging the two functions into
one, returning an Optional<unsigned> value. While the same thing could
be achieved by adding an "IsEH" argument to the (renamed)
getLLVMRegNumFromEH function, it seemed better to avoid the confusion of
two functions and put the choice of asserting into the hands of the
caller -- if he checks the Optional value, he can safely process
"untrusted" input, and if he blindly dereferences the Optional, he gets
the assertion.

I've updated all call sites to the new API, choosing between the two
options according to the function they were calling originally, except
that I've updated the usage in DWARFExpression.cpp to use the "safe"
method instead, and added a test case which would have previously
triggered an assertion failure when processing (incorrect?) dwarf
expressions.

Reviewers: dsanders, arsenm, JDevlieghere

Subscribers: wdng, aprantl, javed.absar, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372710 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-24 09:31:02 +00:00
GN Sync Bot
0709ddc112 gn build: Merge r372706
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372707 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-24 09:11:31 +00:00
Alexey Lapshin
70343be031 [Debuginfo] dbg.value points to undef value after Induction Variable Simplification.
Induction Variable Simplification pass does not update dbg.value intrinsic.

Before:

%add = add nuw nsw i32 %ArgIndex.06, 1
call void @llvm.dbg.value(metadata i32 %add, metadata !17, metadata !DIExpression())

After:

%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
call void @llvm.dbg.value(metadata i64 undef, metadata !17, metadata !DIExpression())

There should be:

%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
call void @llvm.dbg.value(metadata i64 %indvars.iv.next, metadata !17, metadata !DIExpression())

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372703 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-24 08:47:03 +00:00
Sjoerd Meijer
c2d414b4da [LV] Forced vectorization with runtime checks and OptForSize
When vectorisation is forced with a pragma, we optimise for min size, and we
need to emit runtime memory checks, then allow this code growth and don't run
in an assert like we currently do.

This is the result of D65197 and D66803, and was a use-case not really
considered before. If this now happens, we emit an optimisation remark warning
about the code-size expansion, which can be avoided by not forcing
vectorisation or possibly source-code modifications.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372694 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-24 08:03:34 +00:00
Jan Korous
2a20b9b4dd Revert "[lit] Add -D__clang_analyzer__ to clang_analyze_cc1"
This reverts commit 4185460f758b98ea5b898c04c179704756ca8f53.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372686 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-24 03:20:59 +00:00
Jan Korous
fda7c8ea4c [lit] Add -D__clang_analyzer__ to clang_analyze_cc1
Fixup after fbd13570b0d

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372682 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-24 01:59:20 +00:00
Huihui Zhang
2f5f78dbb3 [InstCombine] Fold a shifty implementation of clamp-to-allones.
Summary:
Fold
or(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X)
into
X s> Y ? -1 : X

https://rise4fun.com/Alive/d8Ab

clamp255 is a common operator in image processing, can be implemented
in a shifty way "(255 - X) >> 31 | X & 255". Fold shift into select
enables more optimization, e.g., vmin generation for ARM target.

Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon

Reviewed By: lebedev.ri

Subscribers: kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372678 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-24 00:30:09 +00:00
Huihui Zhang
e632c84e5b [InstCombine] Fold a shifty implementation of clamp-to-zero.
Summary:
Fold
and(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X)
into
X s> Y ? X : 0

https://rise4fun.com/Alive/lFH

Fold shift into select enables more optimization,
e.g., vmax generation for ARM target.

Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon

Reviewed By: lebedev.ri

Subscribers: xbolva00, andreadb, craig.topper, RKSimon, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372676 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-24 00:15:03 +00:00
Amara Emerson
36e6c6c028 [GlobalISel][IRTranslator] Fix switch table lowering to use signed LE not unsigned.
We were miscompiling switch value comparisons with the wrong signedness, which
shows up when we have things like switch case values with i1 types, which end up
being legalized incorrectly.

Fixes PR43383

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372675 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-24 00:09:23 +00:00
Alina Sbirlea
ff0b826927 [MemorySSA] Update Phi insertion.
Summary:
MemoryPhis may be needed following a Def insertion inthe IDF of all the
new accesses added (phis + potentially a def). Ensure this also  occurs when
only the new MemoryPhis are the defining accesses.

Note: The need for computing IDF here is because of new Phis added with
edges incoming from unreachable code, Phis that had previously been
simplified. The preferred solution is to not reintroduce such Phis.
This patch is the needed fix while working on the preferred solution.

Reviewers: george.burgess.iv

Subscribers: Prazek, sanjoy.google, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372673 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 23:50:16 +00:00
Huihui Zhang
3a615f3a76 [NFC][InstCombine] Add tests for shifty implementation of clamping.
Summary:
Clamp negative to zero and clamp positive to allOnes are common
operation in image saturation.

Add tests for shifty implementation of clamping, as prepare work for
folding:

and(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X) --> X s> 0 ? X : 0;

or(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X) --> X s> Y ? allOnes : X.

Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372671 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 23:48:32 +00:00
Saleem Abdulrasool
40e66efebe HotColdSplitting: invalidate the AssumptionCache on split
When a cold path is outlined, the value tracking in the assumption cache may be
invalidated due to the code motion.  We would previously trip an assertion in
subsequent passes (but required the passes to happen in a single run as the
assumption cache is shared across the passes).  Invalidating the cache ensures
that we get the correct information when needed with the legacy pass manager as
well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372667 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 22:23:01 +00:00
Alexander Shaposhnikov
f11e5b4be6 [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
2019-09-23 22:22:55 +00:00
Wei Mi
4fbe4cba64 [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
2019-09-23 22:11:35 +00:00
Simon Pilgrim
da5958c1a5 Fix uninitialized variable warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372662 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 21:32:38 +00:00
Craig Topper
b4bf39d8f2 [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
2019-09-23 21:29:28 +00:00
Thomas Lively
f41ccb2277 [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
2019-09-23 20:42:12 +00:00
Roman Lebedev
6ac855331b [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
2019-09-23 20:40:47 +00:00
Roman Lebedev
9bb7ac2e1c [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
2019-09-23 20:40:40 +00:00
Thomas Lively
2448b38fbf [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
2019-09-23 20:04:59 +00:00
David Bolvansky
b42778439f [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
2019-09-23 19:55:45 +00:00
Craig Topper
aff22b785e [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
2019-09-23 19:48:20 +00:00
Aditya Nandakumar
38a72ebd50 [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
2019-09-23 18:51:00 +00:00
Roman Lebedev
dac6f7735b [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
2019-09-23 18:21:33 +00:00
Roman Lebedev
f1a42a614d [InstCombine] dropRedundantMaskingOfLeftShiftInput(): improve comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372637 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 18:21:14 +00:00
David Bolvansky
e2d4a45c6e [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
2019-09-23 18:20:01 +00:00
Roman Lebedev
3b27a53095 [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
2019-09-23 17:04:28 +00:00
Roman Lebedev
31908d00ca [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
2019-09-23 17:04:14 +00:00
Sanjay Patel
e61b10cb03 [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
2019-09-23 17:01:01 +00:00
Alexey Bataev
f80446d257 [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
2019-09-23 16:25:03 +00:00
Roman Lebedev
da95cdbfb4 [InstCombine] foldUnsignedUnderflowCheck(): s/Subtracted/ZeroCmpOp/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372625 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 16:04:32 +00:00
Dmitry Preobrazhensky
c257065efa [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
2019-09-23 15:41:51 +00:00
Simon Pilgrim
462664777c 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
2019-09-23 15:36:24 +00:00
Cyndy Ishida
a6305400b9 [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
2019-09-23 15:28:02 +00:00
Krzysztof Parzyszek
6d98e4c3cc [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
2019-09-23 14:33:27 +00:00
Guillaume Chatelet
91e22ae9a1 [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
2019-09-23 14:23:37 +00:00
Simon Pilgrim
8652b3b5f5 [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
2019-09-23 14:11:48 +00:00
Sanjay Patel
413ec947a9 [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
2019-09-23 13:30:23 +00:00
Simon Pilgrim
5a1b329567 [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
2019-09-23 13:20:47 +00:00
Simon Pilgrim
439983d291 [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
2019-09-23 13:15:52 +00:00
Nico Weber
ef59a3e09a 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
2019-09-23 13:13:37 +00:00
Mark Murray
0b0d3bfc33 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
2019-09-23 12:52:42 +00:00
Simon Pilgrim
38a5344664 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
2019-09-23 12:49:39 +00:00
GN Sync Bot
e322e422de gn build: Merge r372595
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372597 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 12:44:45 +00:00
Guillaume Chatelet
c1f79bc5bd [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
2019-09-23 12:41:36 +00:00
Guillaume Chatelet
cc79c4fa35 [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
2019-09-23 12:01:32 +00:00
Simon Pilgrim
6ec2ed215c 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
2019-09-23 11:38:10 +00:00
Simon Pilgrim
fed25f49be 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
2019-09-23 11:36:24 +00:00
GN Sync Bot
581b77b3e9 gn build: Merge r372564
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372581 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 11:08:25 +00:00
Djordje Todorovic
6d72c4356e 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
2019-09-23 11:04:11 +00:00