Jonas Devlieghere [Mon, 23 Sep 2019 22:31:16 +0000 (22:31 +0000)]
[Make] Add support for building NeXT-style frameworks
This patch extends the Makefile.rules to build NeXT-style frameworks. It
also fixes a bug in the clean logic that would accidentally delete the
.mm source file instead of the .o object file.
Thanks a lot to Adrian who was instrumental is getting this to work!
llvm-svn: 372669
Alex Langford [Mon, 23 Sep 2019 22:24:47 +0000 (22:24 +0000)]
[NFCI] Return PathSensitiveBugReport where appropriate
Some compilers have trouble converting unique_ptr<PathSensitiveBugReport> to
unique_ptr<BugReport> causing some functions to fail to compile.
Changing the return type of the functions that fail to compile does not
appear to have any issues.
I ran into this issue building with clang 3.8 on Ubuntu 16.04.
llvm-svn: 372668
Saleem Abdulrasool [Mon, 23 Sep 2019 22:23:01 +0000 (22:23 +0000)]
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.
llvm-svn: 372667
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
llvm-svn: 372666
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
llvm-svn: 372665
David Bolvansky [Mon, 23 Sep 2019 22:09:49 +0000 (22:09 +0000)]
[Diagnostics] Warn for enum constants in bool context (-Wint-in-bool-context; GCC compatibility)
Extracted from D63082.
llvm-svn: 372664
Adrian Prantl [Mon, 23 Sep 2019 22:01:49 +0000 (22:01 +0000)]
Support for DWARF-5 C++ language tags.
This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.
Patch by Sourabh Singh Tomar!
Differential Revision: https://reviews.llvm.org/D67613
llvm-svn: 372663
Simon Pilgrim [Mon, 23 Sep 2019 21:32:38 +0000 (21:32 +0000)]
Fix uninitialized variable warning. NFCI.
llvm-svn: 372662
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.
llvm-svn: 372661
Sam Clegg [Mon, 23 Sep 2019 21:28:29 +0000 (21:28 +0000)]
[lld][WebAssembly] Preserve symbol flags in --relocatable output
Fixes https://github.com/emscripten-core/emscripten/issues/8879
Differential Revision: https://reviews.llvm.org/D67729
llvm-svn: 372660
Martin Storsjo [Mon, 23 Sep 2019 20:43:22 +0000 (20:43 +0000)]
[LLDB] [Windows] Map COFF ARM machine ids to the right triple architectures
Differential Revision: https://reviews.llvm.org/D67913
llvm-svn: 372658
Martin Storsjo [Mon, 23 Sep 2019 20:43:16 +0000 (20:43 +0000)]
[LLDB] [PECOFF] Recognize arm64 executables
Differential Revision: https://reviews.llvm.org/D67912
llvm-svn: 372657
Martin Storsjo [Mon, 23 Sep 2019 20:43:11 +0000 (20:43 +0000)]
[LLDB] Rework a MinGW build fix from D65691
That change didn't contain any explanation for this bit. There shouldn't
be any need for a check for MinGW ifdefs here, as long as the include
uses lowercase windows.h (as is used consistently elsewhere in
the llvm projects).
Differential Revision: https://reviews.llvm.org/D67894
llvm-svn: 372656
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
llvm-svn: 372655
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
llvm-svn: 372654
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
llvm-svn: 372653
Jonas Devlieghere [Mon, 23 Sep 2019 20:36:46 +0000 (20:36 +0000)]
File::SetDescriptor() should require options
lvm_private::File::GetStream() can fail if m_options == 0
It's not clear from the header a File created with a descriptor will be
not be usable by many parts of LLDB unless SetOptions is also called,
but it is.
This is because those parts of LLDB rely on GetStream() to use the
file, and that in turn relies on calling fdopen on the descriptor. When
calling fdopen, GetStream relies on m_options to determine the access
mode. If m_options has never been set, GetStream() will fail.
This patch adds options as a required argument to File::SetDescriptor
and the corresponding constructor.
Patch by: Lawrence D'Anna
Differential revision: https://reviews.llvm.org/D67792
llvm-svn: 372652
Simon Atanasyan [Mon, 23 Sep 2019 20:32:43 +0000 (20:32 +0000)]
[mips] Support elf32btsmipn32_fbsd / elf32ltsmipn32_fbsd emulations
Patch by Kyle Evans.
llvm-svn: 372651
Simon Atanasyan [Mon, 23 Sep 2019 20:32:33 +0000 (20:32 +0000)]
[mips] Add tests to check MIPS FreeBSD emulations. NFC
llvm-svn: 372650
Simon Atanasyan [Mon, 23 Sep 2019 20:32:27 +0000 (20:32 +0000)]
[mips] Reformat test case to simplify addition new tests. NFC
llvm-svn: 372649
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
llvm-svn: 372648
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."
llvm-svn: 372647
Gabor Marton [Mon, 23 Sep 2019 19:49:45 +0000 (19:49 +0000)]
[ASTImporter] 2nd attempt to fix Windows buildbot test errors
llvm-svn: 372646
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
llvm-svn: 372645
Jonas Devlieghere [Mon, 23 Sep 2019 19:34:26 +0000 (19:34 +0000)]
[Host] File::GetWaitableHandle() should call fileno()
If the file has m_stream, it may not have a m_descriptor.
GetWaitableHandle() should call GetDescriptor(), which will call
fileno(), so it will get waitable descriptor whenever one is available.
Patch by: Lawrence D'Anna
Differential revision: https://reviews.llvm.org/D67789
llvm-svn: 372644
Jonas Devlieghere [Mon, 23 Sep 2019 19:06:00 +0000 (19:06 +0000)]
[ABISysV] Fix regression for Simulator and MacABI
The ABISysV ABI was refactored in r364216 to support the Windows ABI for
x86_64. In particular it changed ABISysV_x86_64::CreateInstance to
switch on the OS type. This breaks debugging MacABI apps as well as apps
in the simulator. This adds back the necessary cases.
We have a test on Github that exercises this code path and which I'd
like to upstream once the remaining MacABI parts become available in
clang.
Differential revision: https://reviews.llvm.org/D67869
llvm-svn: 372642
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
llvm-svn: 372641
Michael Liao [Mon, 23 Sep 2019 18:48:06 +0000 (18:48 +0000)]
[Sema] Fix the atomic expr rebuilding order.
Summary:
- Rearrange the atomic expr order to the API order when rebuilding
atomic expr during template instantiation.
Reviewers: erichkeane
Subscribers: jfb, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67924
llvm-svn: 372640
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)
llvm-svn: 372638
Roman Lebedev [Mon, 23 Sep 2019 18:21:14 +0000 (18:21 +0000)]
[InstCombine] dropRedundantMaskingOfLeftShiftInput(): improve comment
llvm-svn: 372637
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
llvm-svn: 372636
Alexey Bataev [Mon, 23 Sep 2019 18:13:31 +0000 (18:13 +0000)]
[OPENMP]Use standard parsing for 'match' clause, NFC.
Reused standard clauses parsing scheme for parsing/matching 'match'
clause in 'declare variant' directive.
llvm-svn: 372635
Stella Stamenova [Mon, 23 Sep 2019 17:51:27 +0000 (17:51 +0000)]
[lldb-suite] TestCallOverriddenMethod.py is now passing on Windows
The test is now passing, so remove the expected failure. No other tests associated with the bug are passing, though, so only remove expected failure from this one test
llvm-svn: 372634
Gabor Marton [Mon, 23 Sep 2019 17:29:08 +0000 (17:29 +0000)]
[ASTImporter] Attempt to fix Windows buildbot test errors
llvm-svn: 372633
Louis Dionne [Mon, 23 Sep 2019 17:22:13 +0000 (17:22 +0000)]
[libc++] Mark CTAD tests as not failing on AppleClang 10.0.1
They do fail on AppleClang 10.0.0, but not AppleClang 10.0.1
llvm-svn: 372632
Erik Pilkington [Mon, 23 Sep 2019 17:16:55 +0000 (17:16 +0000)]
NFC: Fix a poorly-written test
The author of r364954 foolishly forgot that == binds tighter than ?:
llvm-svn: 372631
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
llvm-svn: 372630
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
llvm-svn: 372629
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
llvm-svn: 372628
Shaurya Gupta [Mon, 23 Sep 2019 16:55:13 +0000 (16:55 +0000)]
[Clang-doc] NFC: Fixed link to llvm bugs in documentation
llvm-svn: 372627
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
llvm-svn: 372626
Roman Lebedev [Mon, 23 Sep 2019 16:04:32 +0000 (16:04 +0000)]
[InstCombine] foldUnsignedUnderflowCheck(): s/Subtracted/ZeroCmpOp/
llvm-svn: 372625
Zoe Carver [Mon, 23 Sep 2019 16:02:46 +0000 (16:02 +0000)]
Fix __is_fundamental to accept nullptr_t
Summary: This patch updates the __is_fundamental builtin type trait to return true for nullptr_t.
Reviewers: rsmith, EricWF, efriedma, craig.topper, erichkeane
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67899
llvm-svn: 372624
Alexey Bataev [Mon, 23 Sep 2019 15:53:51 +0000 (15:53 +0000)]
[OPENMP]Fix PR43355: DO not emit target calls if only -fopenmp-targets
is not provided.
We should not emit any target-dependent code if only -fopenmp flag is
used and device targets are not provided to prevent compiler crash.
llvm-svn: 372623
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
llvm-svn: 372622
Zoe Carver [Mon, 23 Sep 2019 15:41:20 +0000 (15:41 +0000)]
Fix __is_signed builtin
Summary: This patch fixes the __is_signed builtin type trait to work with floating point types and enums. Now, the builtin will return true if it is passed a floating point type and false for an enum type.
Reviewers: EricWF, rsmith, erichkeane, craig.topper, efriedma
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67897
llvm-svn: 372621
Louis Dionne [Mon, 23 Sep 2019 15:40:47 +0000 (15:40 +0000)]
[libc++] Mark iostreams test as XFAIL on older macOSes
llvm-svn: 372620
Simon Pilgrim [Mon, 23 Sep 2019 15:36:24 +0000 (15:36 +0000)]
HexagonLoopIdiomRecognition - silence static analyzer dyn_cast<> null dereference warnings. NFCI.
llvm-svn: 372619
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
llvm-svn: 372618
Haojian Wu [Mon, 23 Sep 2019 14:39:37 +0000 (14:39 +0000)]
[clangd] Simplify the callside of URI::resolve, NFC.
Summary:
- Add a overrloded URI::resolve, which accepts a string URI;
- also fixed some callside that don't check the error;
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67916
llvm-svn: 372617
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
llvm-svn: 372616
Sven van Haastregt [Mon, 23 Sep 2019 14:24:29 +0000 (14:24 +0000)]
[docs] Fix some typos in InternalsManual
llvm-svn: 372614
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
llvm-svn: 372613
David Bolvansky [Mon, 23 Sep 2019 14:21:08 +0000 (14:21 +0000)]
[Diagnostics] Warn if '<<' in bool context with -Wint-in-bool-context (GCC compatibility)
Extracted from D63082, addressed review comments related to a warning message.
llvm-svn: 372612
Erich Keane [Mon, 23 Sep 2019 14:12:13 +0000 (14:12 +0000)]
Fix test atomic-expr.cpp after R372422
The test tried to match a path in a printout by doing '^:' which failed
on windows, since C:\... is a path.
llvm-svn: 372611
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
llvm-svn: 372610
Alexey Bataev [Mon, 23 Sep 2019 14:06:51 +0000 (14:06 +0000)]
[OPENMP]Call __kmpc_push_tripcount in task context.
Runtime function __kmpc_push_tripcount better to call inside of the task
context for target regions. Otherwise, the libomptarget is unable to
link the provided tripcount value for nowait target regions and
completely looses this information.
llvm-svn: 372609
Konrad Kleine [Mon, 23 Sep 2019 14:05:51 +0000 (14:05 +0000)]
[LLDB] Fix logically dead code
Summary:
The indicated dead code may have performed some action; that action will never occur.
In lldb_private::LoadedModuleInfoList::LoadedModuleInfo::operator ==(lldb_private::LoadedModuleInfoList::LoadedModuleInfo const &): Code can never be reached because of a logical contradiction (CWE-561)
Coverity Scan: https://scan.coverity.com/projects/kwk-llvm-project?tab=overview
CID 221581
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D67915
llvm-svn: 372608
Dmitri Gribenko [Mon, 23 Sep 2019 13:44:42 +0000 (13:44 +0000)]
Added a test for agreement between paths used in ClangTidy's diagnostics and header filter
This test would have been broken by r372388.
llvm-svn: 372607
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
llvm-svn: 372606
Yitzhak Mandelbaum [Mon, 23 Sep 2019 13:21:42 +0000 (13:21 +0000)]
[libTooling] Add `access` and `ifBound` combinators to Stencil library.
Summary:
This revision add the `access` and `ifBound` combinators to the Stencil library:
* `access` -- constructs an idiomatic expression for accessing a member (a
`MemberExpr`).
* `ifBound` -- chooses between two `StencilParts` based on the whether an id is
bound in the match (corresponds to the combinator of the same name in
RangeSelector).
Reviewers: gribozavr
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67633
llvm-svn: 372605
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.
llvm-svn: 372604
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.......
llvm-svn: 372603
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
llvm-svn: 372602
Dmitri Gribenko [Mon, 23 Sep 2019 13:06:25 +0000 (13:06 +0000)]
Revert "[clang-tidy] Fix relative path in header-filter."
This reverts commit r372388. It made '-header-filter' inconsistent with
paths printed in diagnostics.
llvm-svn: 372601
David Bolvansky [Mon, 23 Sep 2019 12:54:35 +0000 (12:54 +0000)]
[Diagnostics] Avoid -Wsizeof-array-div when dividing the size of a nested array by the size of the deepest base type
llvm-svn: 372600
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
llvm-svn: 372599
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.
llvm-svn: 372598
GN Sync Bot [Mon, 23 Sep 2019 12:44:45 +0000 (12:44 +0000)]
gn build: Merge r372595
llvm-svn: 372597
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
llvm-svn: 372596
Yitzhak Mandelbaum [Mon, 23 Sep 2019 12:40:10 +0000 (12:40 +0000)]
[libTooling] Introduce new library of source-code builders.
Summary:
Introduces facilities for easily building source-code strings, including
idiomatic use of parentheses and the address-of, dereference and member-access
operators (dot and arrow) and queries about need for parentheses.
Reviewers: gribozavr
Subscribers: mgorny, cfe-commits, ilya-biryukov
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67632
llvm-svn: 372595
Dmitri Gribenko [Mon, 23 Sep 2019 12:15:48 +0000 (12:15 +0000)]
Removed dead code from Stencil.h
llvm-svn: 372594
Dmitri Gribenko [Mon, 23 Sep 2019 12:07:10 +0000 (12:07 +0000)]
Removed an incorred namespace-end comment
llvm-svn: 372593
Martin Storsjo [Mon, 23 Sep 2019 12:03:56 +0000 (12:03 +0000)]
[LLDB] Check for _WIN32 instead of _MSC_VER for code specific to windows in general
These ifdefs contain code that isn't specific to MSVC but useful for
any windows target, like MinGW.
Differential Revision: https://reviews.llvm.org/D67893
llvm-svn: 372592
Martin Storsjo [Mon, 23 Sep 2019 12:03:33 +0000 (12:03 +0000)]
[LLDB] Remove a now redundant windows specific workaround
vsnprintf(NULL, 0, ...) works for measuring the needed string
size on all supported Windows variants; it's supported since
at least MSVC 2015 (and LLVM requires a newer version than that),
and works on both msvcrt.dll (since at least XP) and UCRT with MinGW.
The previous use of ifdefs was wrong as well, as __MINGW64__ only is
defined for 64 bit targets, and the define without trailing
underscores is never defined automatically (neither by clang nor
by gcc).
Differential Revision: https://reviews.llvm.org/D67861
llvm-svn: 372591
Martin Storsjo [Mon, 23 Sep 2019 12:03:28 +0000 (12:03 +0000)]
[LLDB] Add a void* cast when passing object pointers to printf %p
This fixes build warnings in MinGW mode.
Also remove leftover if (log) {} around the log macro.
Differential Revision: https://reviews.llvm.org/D67896
llvm-svn: 372590
Martin Storsjo [Mon, 23 Sep 2019 12:03:21 +0000 (12:03 +0000)]
[LLDB] Avoid a warning about an unused static variable
The variable is unused on windows.
Differential Revision: https://reviews.llvm.org/D67895
llvm-svn: 372589
Martin Storsjo [Mon, 23 Sep 2019 12:03:14 +0000 (12:03 +0000)]
[LLDB] Remove a stray semicolon. NFC.
This fixes build warnings with at least GCC.
llvm-svn: 372588
Martin Storsjo [Mon, 23 Sep 2019 12:03:08 +0000 (12:03 +0000)]
[LLDB] Add a missing specification of linking against dbghelp
The PECOFF object file plugin uses the dbghelp API, but doesn't
specify that it has to be linked in anywhere.
Current MSVC based builds have probably succeeded, as other parts
in LLDB have had a "#pragma comment(lib, "dbghelp.lib")", but there's
currently no such pragma in the PECOFF plugin.
The "#pragma comment(lib, ...)" approach doesn't work in MinGW mode
(unless the compiler is given the -fms-extensions option, and even
then, it's only supported by clang/lld, not by GCC/binutils), thus
add it to be linked via CMake. (The other parts of LLDB that use
dbghelp are within _MSC_VER ifdefs.)
Differential Revision: https://reviews.llvm.org/D67885
llvm-svn: 372587
Martin Storsjo [Mon, 23 Sep 2019 12:02:59 +0000 (12:02 +0000)]
[LLDB] Use the Windows SOCKET type on all windows targets, not only MSVC
Differential Revision: https://reviews.llvm.org/D67859
llvm-svn: 372586
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
llvm-svn: 372585
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.
llvm-svn: 372583
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.
llvm-svn: 372582
GN Sync Bot [Mon, 23 Sep 2019 11:08:25 +0000 (11:08 +0000)]
gn build: Merge r372564
llvm-svn: 372581
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.
llvm-svn: 372580
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
llvm-svn: 372578
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.
llvm-svn: 372577
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
llvm-svn: 372576
David Bolvansky [Mon, 23 Sep 2019 10:14:07 +0000 (10:14 +0000)]
[NFC] Fixed clang wasm test after rL372573
These tests should not depend on -O1..
llvm-svn: 372575
Raphael Isemann [Mon, 23 Sep 2019 10:02:26 +0000 (10:02 +0000)]
[lldb][NFC] Remove unused variable in Options::HandleOptionArgumentCompletion
llvm-svn: 372574
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..
llvm-svn: 372573
Raphael Isemann [Mon, 23 Sep 2019 09:56:53 +0000 (09:56 +0000)]
[lldb][NFC] Remove dead code in Options::HandleOptionArgumentCompletion
llvm-svn: 372572
George Rimar [Mon, 23 Sep 2019 09:55:10 +0000 (09:55 +0000)]
[LLD][ELF] - Simplify getFlagsFromEmulation(). NFCI.
A straightforward simplification.
llvm-svn: 372570
Raphael Isemann [Mon, 23 Sep 2019 09:53:33 +0000 (09:53 +0000)]
[lldb][NFC] Fix documentation of CompletionRequest::AddCompletion
llvm-svn: 372569
Raphael Isemann [Mon, 23 Sep 2019 09:51:36 +0000 (09:51 +0000)]
[lldb][NFC] Make cursor char position unsigned in CompletionRequest
This was only an 'int' because to fit into the old API which is
gone by now.
llvm-svn: 372568
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
llvm-svn: 372567
Raphael Isemann [Mon, 23 Sep 2019 09:46:17 +0000 (09:46 +0000)]
[lldb] Make cursor index in CompletionRequest unsigned
The fact that index==-1 means "no arguments" is not obvious and only
used in one place from what I can tell. Also fixes several warnings
about using the cursor index as if it was a size_t when comparing.
Not fully NFC as we now also correctly update the partial argument list
when injecting the fake empty argument in the CompletionRequest
constructor.
llvm-svn: 372566
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
llvm-svn: 372565
Gabor Marton [Mon, 23 Sep 2019 09:32:07 +0000 (09:32 +0000)]
[ASTImporter][NFC] Add comprehensive tests for ODR violation handling strategies
Summary:
In this patch we provide additional and comprehensive tests for the ODR
handling strategies. This is the continuation of
https://reviews.llvm.org/D59692.
Reviewers: shafik, a_sidorin, balazske, a.sidorin
Subscribers: mgorny, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D66951
llvm-svn: 372564
Guillaume Chatelet [Mon, 23 Sep 2019 09:04:12 +0000 (09:04 +0000)]
[Alignment] fix build
llvm-svn: 372562