platform/upstream/llvm.git
4 years agoRevert "[lldb/PDB] Use the new line table constructor"
Pavel Labath [Tue, 28 Jan 2020 16:15:26 +0000 (17:15 +0100)]
Revert "[lldb/PDB] Use the new line table constructor"

This reverts commit bb73210ba9f16c1516f564235c86cbddccd1bd6d due to
failures on the windows bot.

4 years ago[gn build] Port a32f894f17b
LLVM GN Syncbot [Tue, 28 Jan 2020 15:50:50 +0000 (15:50 +0000)]
[gn build] Port a32f894f17b

4 years ago[ADT] Remove more llvm::make_unique
Jonathan Roelofs [Fri, 24 Jan 2020 00:54:15 +0000 (17:54 -0700)]
[ADT] Remove more llvm::make_unique

https://reviews.llvm.org/D73316

4 years ago[clang] Fix EOL whitespace. NFC
Jonathan Roelofs [Sun, 26 Jan 2020 19:05:46 +0000 (12:05 -0700)]
[clang] Fix EOL whitespace. NFC

4 years ago[clang][CodeComplete] Support for designated initializers
Kadir Cetinkaya [Thu, 23 Jan 2020 12:28:16 +0000 (13:28 +0100)]
[clang][CodeComplete] Support for designated initializers

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[scudo][standalone] Secondary & general other improvements
Kostya Kortchinsky [Mon, 27 Jan 2020 22:03:21 +0000 (14:03 -0800)]
[scudo][standalone] Secondary & general other improvements

Summary:
This CL changes multiple things to improve performance (notably on
Android).We introduce a cache class for the Secondary that is taking
care of this mechanism now.

The changes:
- change the Secondary "freelist" to an array. By keeping free secondary
  blocks linked together through their headers, we were keeping a page
  per block, which isn't great. Also we know touch less pages when
  walking the new "freelist".
- fix an issue with the freelist getting full: if the pattern is an ever
  increasing size malloc then free, the freelist would fill up and
  entries would not be used. So now we empty the list if we get to many
  "full" events;
- use the global release to os interval option for the secondary: it
  was too costly to release all the time, particularly for pattern that
  are malloc(X)/free(X)/malloc(X). Now the release will only occur
  after the selected interval, when going through the deallocate path;
- allow release of the `BatchClassId` class: it is releasable, we just
  have to make sure we don't mark the batches containing batches
  pointers as free.
- change the default release interval to 1s for Android to match the
  current Bionic allocator configuration. A patch is coming up to allow
  changing it through `mallopt`.
- lower the smallest class that can be released to `PageSize/64`.

Reviewers: cferris, pcc, eugenis, morehouse, hctim

Subscribers: phosek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

4 years ago[mlir][spirv] Add GroupNonUniform arithmetic operations.
Denis Khalikov [Tue, 28 Jan 2020 14:36:01 +0000 (09:36 -0500)]
[mlir][spirv] Add GroupNonUniform arithmetic operations.

Add GroupNonUniform arithmetic operations: FAdd, FMul, IMul.
Unify parser, printer, verifier for GroupNonUniform arithmetic
operations.

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

4 years ago[clangd] Make bin/llvm-lit run standalone clangd tests
Kadir Cetinkaya [Tue, 28 Jan 2020 11:24:45 +0000 (12:24 +0100)]
[clangd] Make bin/llvm-lit run standalone clangd tests

Summary:
Currently clangd lit tests can't be run in isolation because we don't
set some of the config parameters. This enables running

./bin/llvm-lit ../clang-tools-extra/clangd/test/

or any other test in that subdirectory.

Reviewers: sammccall

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

Tags: #clang

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

4 years agoPrevent building with MSVC 14.24
Nico Weber [Tue, 28 Jan 2020 15:09:52 +0000 (10:09 -0500)]
Prevent building with MSVC 14.24

MSVC 14.24 miscompiles some of LLVM's code, which makes at least these tests fail:

    LLVM :: MC/MachO/gen-dwarf-cpp.s
    LLVM :: MC/MachO/gen-dwarf-macro-cpp.s
    LLVM :: MC/MachO/gen-dwarf-producer.s
    LLVM :: MC/MachO/gen-dwarf.s

It seems better to diagnose that at build time. Since both the previous
and the next version have a fix, this might be good enough and we might
not need a real workaround. (We ran into this at
https://crbug.com/1045948)

If you hit this, use either a newer or an older version of MSVC,
or use clang-cl as host compiler.

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

4 years ago[clang-format] Handle quotes and escaped braces in C# interpolated strings
Jonathan Coe [Tue, 28 Jan 2020 14:46:27 +0000 (14:46 +0000)]
[clang-format] Handle quotes and escaped braces in C# interpolated strings

Summary:
This addresses issues raised in https://bugs.llvm.org/show_bug.cgi?id=44454.

There are outstanding issues with multi-line verbatim strings in C# that will be addressed in a follow-up PR.

Reviewers: krasimir, MyDeveloperDay

Reviewed By: krasimir, MyDeveloperDay

Subscribers: MyDeveloperDay

Tags: #clang-format

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

4 years agoRevert "[Clang] Warn about 'z' printf modifier in old MSVC."
Nico Weber [Tue, 28 Jan 2020 14:27:54 +0000 (09:27 -0500)]
Revert "[Clang] Warn about 'z' printf modifier in old MSVC."

This reverts commit fe0d1b6a8ac5048b8007e5e7cc2aeb4e3291bda0.
Makes Analysis/taint-generic.c fail on some Windows systems.

4 years ago[PowerPC][Future] Add pld and pstd to future CPU
Victor Huang [Tue, 28 Jan 2020 14:22:53 +0000 (08:22 -0600)]
[PowerPC][Future] Add pld and pstd to future CPU
Add the prefixed instructions pld and pstd to future CPU. These are load and
store instructions that require new operand types that are 34 bits. This patch
adds the two instructions as well as the operand types required.

Note that this patch also makes a minor change to tablegen to account for the
fact that some instructions are going to require shifts greater than 31 bits
for the new 34 bit instructions.

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

4 years ago[CodeMoverUtils] Improve IsControlFlowEquivalent.
Whitney Tsang [Tue, 28 Jan 2020 03:50:33 +0000 (03:50 +0000)]
[CodeMoverUtils] Improve IsControlFlowEquivalent.

Summary:
Currently IsControlFlowEquivalent determine if two blocks are control
flow equivalent by checking if A dominates B and B post dominates A.
There exists blocks that are control flow equivalent even if they don't
satisfy the A dominates B and B post dominates A condition.
For example,

if (cond)
  A
if (cond)
  B
In the PR, we determine if two blocks are control flow equivalent by
also checking if the two sets of conditions A and B depends on are
equivalent.
Reviewer: jdoerfert, Meinersbur, dmgreen, etiotto, bmahjour, fhahn,
hfinkel, kbarton
Reviewed By: fhahn
Subscribers: hiraditya, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D71578

4 years ago[lldb/PDB] Use the new line table constructor
Pavel Labath [Tue, 28 Jan 2020 14:03:09 +0000 (15:03 +0100)]
[lldb/PDB] Use the new line table constructor

The old method of adding line sequences one by one can easily go
quadratic if the sequences are not perfectly sorted. The equivalent
change in DWARF brought a considerable improvement in line table
parsing. It is not clear if the same will be the case for PDB, but this
does bring us a step closer towards removing the dangerous API.

4 years agoFix sphinx build bot failure. NFCI.
Wang, Pengfei [Tue, 28 Jan 2020 14:05:15 +0000 (22:05 +0800)]
Fix sphinx build bot failure. NFCI.

4 years agoRevert "PR44684: Look through parens and similar constructs when determining"
Nico Weber [Tue, 28 Jan 2020 14:03:27 +0000 (09:03 -0500)]
Revert "PR44684: Look through parens and similar constructs when determining"

This reverts commit af80b8ccc5772c14920d4554b7ca7e15f2fad1c4.
It broke clang-tidy/checkers/modernize-use-uncaught-exceptions.cpp in
check-clang-tools on macOS and Windows, see e.g.
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/13976/steps/stage%201%20check/logs/stdio

4 years ago[NFC][RDA] typedef SmallPtrSetImpl<MachineInstr*>
Sam Parker [Tue, 28 Jan 2020 13:06:07 +0000 (13:06 +0000)]
[NFC][RDA] typedef SmallPtrSetImpl<MachineInstr*>

4 years ago[ASTMatchers] Add cxxNoexceptExpr AST matcher
Nathan [Tue, 28 Jan 2020 13:12:08 +0000 (13:12 +0000)]
[ASTMatchers] Add cxxNoexceptExpr AST matcher

Summary: Adds a cxxNoexceptExpr matcher that matches the [[ https://en.cppreference.com/w/cpp/language/noexcept |  noexcept operator ]].

Reviewers: aaron.ballman

Reviewed By: aaron.ballman

Subscribers: merge_guards_bot, cfe-commits

Tags: #clang

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

4 years ago[ADT] Implicitly convert between StringRef and std::string_view when we have C++17
Benjamin Kramer [Tue, 28 Jan 2020 12:51:38 +0000 (13:51 +0100)]
[ADT] Implicitly convert between StringRef and std::string_view when we have C++17

This makes the types almost seamlessly interchangeable in C++17
codebases. Eventually we want to replace StringRef with the standard
type, but that requires C++17 being the default and a huge refactoring
job as StringRef has a lot more functionality.

4 years agoRevert "[lldb/DWARF] Only match mangled name in full-name function lookup (with accel...
Pavel Labath [Tue, 28 Jan 2020 12:42:34 +0000 (13:42 +0100)]
Revert "[lldb/DWARF] Only match mangled name in full-name function lookup (with accelerators)"

This reverts commit 1b12766883006b8aa9d1ff744e57317647aa052a because of
breaking the mac test suite.

I'm not certain this is the cause because of a concurrent build breakage
which masked this problem, but the failure messages are related to
symbol lookup, which makes this very likely.

4 years ago[FPEnv] Add pragma FP_CONTRACT support under strict FP.
Wang, Pengfei [Wed, 15 Jan 2020 11:08:38 +0000 (19:08 +0800)]
[FPEnv] Add pragma FP_CONTRACT support under strict FP.

Summary: Support pragma FP_CONTRACT under strict FP.

Reviewers: craig.topper, andrew.w.kaylor, uweigand, RKSimon, LiuChen3

Subscribers: hiraditya, jdoerfert, cfe-commits, llvm-commits, LuoYuanke

Tags: #clang, #llvm

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

4 years ago[mips][NFC] Remove unused instruction formats
Miloš Stojanović [Mon, 27 Jan 2020 15:29:26 +0000 (16:29 +0100)]
[mips][NFC] Remove unused instruction formats

`BranchBase` unused sice: rL170663
`FI` unsused since: rL170954
`FFI` unused since: rL190221

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

4 years ago[X86] Add combination for fma and fneg on X86 under strict FP.
Wang, Pengfei [Wed, 15 Jan 2020 11:08:38 +0000 (19:08 +0800)]
[X86] Add combination for fma and fneg on X86 under strict FP.

Summary: X86 has instructions to calculate fma and fneg at the same time. But we combine the fneg and fma only when fneg is the source operand under strict FP.

Reviewers: craig.topper, andrew.w.kaylor, uweigand, RKSimon, LiuChen3

Subscribers: LuoYuanke, llvm-commits, cfe-commits, jdoerfert, hiraditya

Tags: #llvm

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

4 years ago[LLD][ELF][ARM] Do not insert interworking thunks for non STT_FUNC symbols
Peter Smith [Thu, 23 Jan 2020 19:03:25 +0000 (19:03 +0000)]
[LLD][ELF][ARM] Do not insert interworking thunks for non STT_FUNC symbols

ELF for the ARM architecture requires linkers to provide
interworking for symbols that are of type STT_FUNC. Interworking for
other symbols must be encoded directly in the object file. LLD was always
providing interworking, regardless of the symbol type, this breaks some
programs that have branches from Thumb state targeting STT_NOTYPE symbols
that have bit 0 clear, but they are in fact internal labels in a Thumb
function. LLD treats these symbols as ARM and inserts a transition to Arm.

This fixes the problem for in range branches, R_ARM_JUMP24,
R_ARM_THM_JUMP24 and R_ARM_THM_JUMP19. This is expected to be the vast
majority of problem cases as branching to an internal label close to the
function.

There is at least one follow up patch required.
- R_ARM_CALL and R_ARM_THM_CALL may do interworking via BL/BLX
  substitution.

In theory range-extension thunks can be altered to not change state when
the symbol type is not STT_FUNC. I will need to check with ld.bfd to see if
this is the case in practice.

Fixes (part of) https://github.com/ClangBuiltLinux/linux/issues/773

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

4 years ago[LLD][ELF][ARM] clang-format function signature [NFC]
Peter Smith [Tue, 28 Jan 2020 11:22:48 +0000 (11:22 +0000)]
[LLD][ELF][ARM] clang-format function signature [NFC]

ARM::needsThunk had gone over 80 characters, run clang-format over it to
prevent it wrapping.

4 years agoRevert "[DebugInfo] Make most debug line prologue errors non-fatal to parsing"
James Henderson [Tue, 28 Jan 2020 11:49:30 +0000 (11:49 +0000)]
Revert "[DebugInfo] Make most debug line prologue errors non-fatal to parsing"

This reverts commit b94191fecdbadc18b342a27df1109754edcb8c4b.

The change broke both an LLD test and the LLDB build.

4 years ago[DebugInfo] Make most debug line prologue errors non-fatal to parsing
James Henderson [Fri, 3 Jan 2020 15:19:27 +0000 (15:19 +0000)]
[DebugInfo] Make most debug line prologue errors non-fatal to parsing

Many of the debug line prologue errors are not inherently fatal. In most
cases, we can make reasonable assumptions and carry on. This patch does
exactly that. In the case of length problems, the approach of "the
claimed length is correct" is taken to be consistent with other
instances such as the SectionParser, which ignores the read length.

Reviewed by: dblaikie

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

4 years ago[clangd] use SCOPED_TRACE to better trace the testcase in test failure, NFC
Haojian Wu [Mon, 27 Jan 2020 13:09:27 +0000 (14:09 +0100)]
[clangd] use SCOPED_TRACE to better trace the testcase in test failure, NFC

Reviewers: kadircet

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

Tags: #clang

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

4 years ago[lldb/DWARF] Only match mangled name in full-name function lookup (with accelerators)
Jaroslav Sevcik [Tue, 28 Jan 2020 10:37:44 +0000 (11:37 +0100)]
[lldb/DWARF] Only match mangled name in full-name function lookup (with accelerators)

Summary:
In the spirit of https://reviews.llvm.org/D70846, we only return functions with matching mangled name from Apple/DebugNamesDWARFIndex::GetFunction if eFunctionNameTypeFull is requested.

This speeds up lookup in the presence of large amount of class methods of the same name (a typical examples would be constructors of templates with many instantiations or overloaded operators).

Reviewers: labath

Reviewed By: labath

Subscribers: aprantl, arphaman, lldb-commits

Tags: #lldb

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

4 years ago[docs] Clarify llvm.used semantics with less awkward wording
Benjamin Kramer [Tue, 28 Jan 2020 11:13:57 +0000 (12:13 +0100)]
[docs] Clarify llvm.used semantics with less awkward wording

4 years agoAdd lowering for loop.parallel to cfg.
Stephan Herhut [Fri, 24 Jan 2020 14:17:04 +0000 (15:17 +0100)]
Add lowering for loop.parallel to cfg.

Summary:
This also removes the explicit pattern for loop.terminator to ensure
that the terminator is only erased if the parent op is rewritten.

Reductions are not yet supported.

Reviewers: nicolasvasilache

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, llvm-commits

Tags: #llvm

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

4 years ago[mlir] NFC: use ValueRange in AffineToStandard conversion
Alex Zinenko [Tue, 28 Jan 2020 10:53:00 +0000 (11:53 +0100)]
[mlir] NFC: use ValueRange in AffineToStandard conversion

ValueRange is a more flexible way of passing around ranges of Values
that avoids Value vector materialization in affine expression expansion.

4 years ago[AMDGPU] Fix vccz after v_readlane/v_readfirstlane to vcc_lo/hi
Jay Foad [Wed, 30 Oct 2019 12:18:51 +0000 (12:18 +0000)]
[AMDGPU] Fix vccz after v_readlane/v_readfirstlane to vcc_lo/hi

Summary:
Up to gfx9, writes to vcc_lo and vcc_hi by instructions like
v_readlane and v_readfirstlane do not update vccz to reflect the new
value of vcc. Fix it by reusing part of the existing vccz bug handling
code, which inserts an "s_mov_b64 vcc, vcc" instruction to restore vccz
just before an instruction that needs the correct value.

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[lldb][NFC] Simplify Materializer/Dematerializer constructors
Raphael Isemann [Tue, 28 Jan 2020 10:31:02 +0000 (11:31 +0100)]
[lldb][NFC] Simplify Materializer/Dematerializer constructors

4 years ago[clangd][Hover] Handle uninstantiated templates
Kadir Cetinkaya [Fri, 24 Jan 2020 12:04:00 +0000 (13:04 +0100)]
[clangd][Hover] Handle uninstantiated templates

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

Reviewers: hokein, sammccall

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

Tags: #clang

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

4 years ago[clangd] Support pseudo-obj expr, opaque values, and property references in findExpli...
Sam McCall [Fri, 10 Jan 2020 15:27:12 +0000 (16:27 +0100)]
[clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()

Reviewers: ilya-biryukov, dgoldman

Subscribers: MaskRay, jkorous, arphaman, jfb, kadircet, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[lldb] Cut off unused suffix in CompletionRequest::GetRawLine
Raphael Isemann [Tue, 28 Jan 2020 09:21:30 +0000 (10:21 +0100)]
[lldb] Cut off unused suffix in CompletionRequest::GetRawLine

The GetRawLine currently returns the full command line used
to create the CompletionRequest. So for example for "foo b[tab] --arg"
it would return the whole string instead of "foo b". Usually
completion code makes the wrong assumption that the cursor is at
the end of the line and handing out the complete line will cause
that people implement completions that also make this assumption.

This patch makes GetRawLine() return only the string until the
cursor and hides the suffix (so that the cursor is always at the
end of this string) and adds another function GetRawLineWithUnusedSuffix
that is specifically the line with the suffix that isn't used by
the CompletionRequest for argument parsing etc.

There is only one user of this new function that actually needs the
suffix and that is the expression command which needs the suffix to
detect if it is in the raw or argument part of the command (by looking
at the "--" separator).

4 years ago[clangd] Improve ObjC property handling in SelectionTree.
Sam McCall [Mon, 13 Jan 2020 18:53:52 +0000 (19:53 +0100)]
[clangd] Improve ObjC property handling in SelectionTree.

Fixes https://github.com/clangd/clangd/issues/233

Reviewers: dgoldman

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

Tags: #clang

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

4 years ago[mlir] fixed invalid LLVM intrinsics in LLVMOPs.td and llvmir-intrinsics.mlir.
Julian Gross [Mon, 27 Jan 2020 13:58:36 +0000 (14:58 +0100)]
[mlir] fixed invalid LLVM intrinsics in LLVMOPs.td and llvmir-intrinsics.mlir.

Summary:
The intrinsic operation added multiple type annotations to the llvm intrinsic operations, but only one is needed.
The related tests in llvmir-intrinsics.mlir checked the wrong number and are adjusted as well.

Reviewers: nicolasvasilache, ftynse

Reviewed By: ftynse

Subscribers: merge_guards_bot, ftynse, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits

Tags: #llvm

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

4 years agoAdd tanh lowering from Standard dialect to NVVM and ROCDL.
Julian Gross [Mon, 27 Jan 2020 13:59:49 +0000 (14:59 +0100)]
Add tanh lowering from Standard dialect to NVVM and ROCDL.

Summary:
The tanh lowering from Standard dialect to NVVM and ROCDL was not working.
The conversion pattern are inserted in the lowering files.
The test cases for the lowerings were added in the test files.

Reviewers: nicolasvasilache, ftynse, herhut

Reviewed By: ftynse, herhut

Subscribers: merge_guards_bot, ftynse, jholewinski, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, csigg, arpith-jacob, mgester, lucyrfox, herhut, liufengdb, llvm-commits

Tags: #llvm

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

4 years ago[VE] call isel with stack passing
Kazushi (Jam) Marukawa [Tue, 28 Jan 2020 08:55:56 +0000 (09:55 +0100)]
[VE] call isel with stack passing

Summary:
Function calls and stack-passing of function arguments.
Custom lowering, isel patterns and tests.

Reviewed By: arsenm

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

4 years ago[llvm-readobj][test] - Remove --symbols --dyn-syms part from Object/readobj-shared...
Georgii Rymar [Wed, 22 Jan 2020 12:58:32 +0000 (15:58 +0300)]
[llvm-readobj][test] - Remove --symbols --dyn-syms part from Object/readobj-shared-object.test.

The intention of Object/readobj-shared-object.test was to check the
general output for shared object.

I've added a case for testing dynamic objects to ELF/symbols.test.
Also we already test dynamic symbols printing in ELF/dyn-symbols.test +
I've added a case for `--dyn-syms` alias in D73164.

Hence we can remove this piece from Object/readobj-shared-object.test.

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

4 years agoUpdate tests for @llvm.memcpy.inline intrinsics
Guillaume Chatelet [Tue, 28 Jan 2020 09:32:32 +0000 (10:32 +0100)]
Update tests for @llvm.memcpy.inline intrinsics

4 years ago[mlir] NFC: use doxygen-style comments in AffineToStandard.cpp
Alex Zinenko [Tue, 28 Jan 2020 09:21:12 +0000 (10:21 +0100)]
[mlir] NFC: use doxygen-style comments in AffineToStandard.cpp

4 years agoFix failing bot
Guillaume Chatelet [Tue, 28 Jan 2020 09:20:41 +0000 (10:20 +0100)]
Fix failing bot

4 years ago[Clang] Warn about 'z' printf modifier in old MSVC.
Simon Tatham [Tue, 28 Jan 2020 09:03:31 +0000 (09:03 +0000)]
[Clang] Warn about 'z' printf modifier in old MSVC.

Summary:
The 'z' length modifier, signalling that an integer format specifier
takes a `size_t` sized integer, is only supported by the C library of
MSVC 2015 and later. Earlier versions don't recognize the 'z' at all,
and respond to `printf("%zu", x)` by just printing "zu".

So, if the MS compatibility version is set to a value earlier than
MSVC2015, it's useful to warn about 'z' modifiers in printf format
strings we check.

Reviewers: aaron.ballman, lebedev.ri, rnk, majnemer, zturner

Reviewed By: aaron.ballman

Subscribers: amccarth, cfe-commits

Tags: #clang

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

4 years ago[VE] enable unaligned load/store isel
Kazushi (Jam) Marukawa [Tue, 28 Jan 2020 08:52:53 +0000 (09:52 +0100)]
[VE] enable unaligned load/store isel

Summary: Enable unaligned load/store isel for iN and fp32/64 and tests.

Reviewed By: arsenm

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

4 years ago[instrinsics] Add @llvm.memcpy.inline instrinsics
Guillaume Chatelet [Thu, 19 Dec 2019 16:33:36 +0000 (17:33 +0100)]
[instrinsics] Add @llvm.memcpy.inline instrinsics

Summary:
This is a follow up on D61634. It adds an LLVM IR intrinsic to allow better implementation of memcpy from C++.
A follow up CL will add the intrinsics in Clang.

Reviewers: courbet, theraven, t.p.northover, jdoerfert, tejohnson

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years agoRevert "[lsan] Support LeakSanitizer runtime on Fuchsia"
Petr Hosek [Tue, 28 Jan 2020 08:24:41 +0000 (00:24 -0800)]
Revert "[lsan] Support LeakSanitizer runtime on Fuchsia"

This reverts commit d59e3429f3a6291416e7eb99184448dfe685b77a.

4 years ago[mlir] Replace toy::DeadFunctionEliminationPass with symbolDCEPass.
River Riddle [Tue, 28 Jan 2020 07:40:01 +0000 (23:40 -0800)]
[mlir] Replace toy::DeadFunctionEliminationPass with symbolDCEPass.

Summary:
The dead function elimination pass in toy was a temporary stopgap until we had proper dead function elimination support in MLIR. Now that this functionality is available, this pass is no longer necessary.

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

4 years ago[Clang] Enable -fsanitize=leak on Fuchsia targets
Roland McGrath [Tue, 28 Jan 2020 07:36:24 +0000 (23:36 -0800)]
[Clang] Enable -fsanitize=leak on Fuchsia targets

This required some fixes to the generic code for two issues:

1. -fsanitize=safe-stack is default on x86_64-fuchsia and is *not* incompatible with -fsanitize=leak on Fuchisa
2. -fsanitize=leak and other static-only runtimes must not be omitted under -shared-libsan (which is the default on Fuchsia)

Patch By: mcgrathr

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

4 years ago[lsan] Support LeakSanitizer runtime on Fuchsia
Roland McGrath [Tue, 28 Jan 2020 07:34:15 +0000 (23:34 -0800)]
[lsan] Support LeakSanitizer runtime on Fuchsia

Support LeakSanitizer runtime on Fuchsia.

Patch By: mcgrathr

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

4 years ago[mlir] Add a DCE pass for dead symbols.
River Riddle [Tue, 28 Jan 2020 07:24:48 +0000 (23:24 -0800)]
[mlir] Add a DCE pass for dead symbols.

Summary: This pass deletes all symbols that are found to be unreachable. This is done by computing the set of operations that are known to be live, propagating that liveness to other symbols, and then deleting all symbols that are not within this live set.

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

4 years ago[mlir] Refactor the implementation of Symbol use lists.
River Riddle [Tue, 28 Jan 2020 06:57:06 +0000 (22:57 -0800)]
[mlir] Refactor the implementation of Symbol use lists.

Summary: This revision refactors the implementation of the symbol use-list functionality to be a bit cleaner, as well as easier to reason about. Aside from code cleanup, this revision updates the user contract to never recurse into operations if they define a symbol table. The current functionality, which does recurse, makes it difficult to examine the uses held by a symbol table itself. Moving forward users may provide a specific region to examine for uses instead.

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

4 years ago[mlir][NFC] Update Operation::getResultTypes to use ArrayRef<Type> instead of iterato...
River Riddle [Tue, 28 Jan 2020 03:57:14 +0000 (19:57 -0800)]
[mlir][NFC] Update Operation::getResultTypes to use ArrayRef<Type> instead of iterator_range.

Summary: The new internal representation of operation results now allows for accessing the result types to be more efficient. Changing the API to ArrayRef is more efficient and removes the need to explicitly materialize vectors in several places.

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

4 years ago[mlir] Add support for marking 'unknown' operations as dynamically legal.
River Riddle [Tue, 28 Jan 2020 03:04:55 +0000 (19:04 -0800)]
[mlir] Add support for marking 'unknown' operations as dynamically legal.

Summary: This allows for providing a default "catchall" legality check that is not dependent on specific operations or dialects. For example, this can be useful to check legality based on the specific types of operation operands or results.

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

4 years agoMake AST reading work better with LLVM_APPEND_VC_REV=NO
Nico Weber [Wed, 22 Jan 2020 15:34:34 +0000 (10:34 -0500)]
Make AST reading work better with LLVM_APPEND_VC_REV=NO

With LLVM_APPEND_VC_REV=NO, Modules/merge-lifetime-extended-temporary.cpp
would fail if it ran before a0f50d731639350c7a7 (which changed
the serialization format) and then after, for these reasons:

1. With LLVM_APPEND_VC_REV=NO, the module hash before and after the
   change was the same.

2. Modules/merge-lifetime-extended-temporary.cpp is the only test
   we have that uses -fmodule-cache-path=%t that
   a) actually writes to the cache path
   b) doesn't do `rm -rf %t` at the top of the test

So the old run would write a module file, and then the new run would
try to load it, but the serialized format changed.

Do several things to fix this:

1. Include clang::serialization::VERSION_MAJOR/VERSION_MINOR in
   the module hash, so that when the AST format changes (...and
   we remember to bump these), we use a different module cache dir.
2. Bump VERSION_MAJOR, since a0f50d731639350c7a7 changed the
   on-disk format in a way that a gch file written before that change
   can't be read after that change.
3. Add `rm -rf %t` to all tests that pass -fmodule-cache-path=%t.
   This is unnecessary from a correctness PoV after 1 and 2,
   but makes it so that we don't amass many cache dirs over time.
   (Arguably, it also makes it so that the test suite doesn't catch
   when we change the serialization format but don't bump
   clang::serialization::VERSION_MAJOR/VERSION_MINOR; oh well.)

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

4 years agoPR44684: Look through parens and similar constructs when determining
Richard Smith [Tue, 28 Jan 2020 02:08:41 +0000 (18:08 -0800)]
PR44684: Look through parens and similar constructs when determining
whether a call is to a builtin.

We already had a general mechanism to do this but for some reason
weren't using it. In passing, check for the other unary operators that
can intervene in a reasonably-direct function call (we already handled
'&' but missed '*' and '+').

4 years ago[Matrix] Mark remarks test as AArch64 specific.
Florian Hahn [Tue, 28 Jan 2020 02:00:43 +0000 (18:00 -0800)]
[Matrix] Mark remarks test as AArch64 specific.

4 years ago[Matrix] Add info about number of operations to remarks.
Florian Hahn [Tue, 28 Jan 2020 01:17:17 +0000 (17:17 -0800)]
[Matrix] Add info about number of operations to remarks.

This patch updates the remark to also include a summary of the number of
vector operations generated for each matrix expression.

Reviewers: anemet, Gerolf, thegameg, hfinkel, andrew.w.kaylor, LuoYuanke

Reviewed By: anemet

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

4 years ago[llvm] Fix file ignoring inside directories
Shoaib Meenai [Thu, 23 Jan 2020 06:29:34 +0000 (22:29 -0800)]
[llvm] Fix file ignoring inside directories

We have some ! patterns in the .gitignore (for the projects and runtimes
directories), and those patterns end up overriding the previous file
ignores, such that e.g. a .swp file inside the runtimes directory isn't
ignored. Move the file ignores last to ensure they take effect.

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

4 years ago[runtimes] Support install-*-stripped targets
Shoaib Meenai [Thu, 23 Jan 2020 06:28:14 +0000 (22:28 -0800)]
[runtimes] Support install-*-stripped targets

This is needed to support including runtime targets in
LLVM_DISTRIBUTION_COMPONENTS.

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

4 years ago[runtimes] Fix installation for LLVM_RUNTIME_DISTRIBUTION_COMPONENTS
Shoaib Meenai [Thu, 23 Jan 2020 06:16:28 +0000 (22:16 -0800)]
[runtimes] Fix installation for LLVM_RUNTIME_DISTRIBUTION_COMPONENTS

The installation target we create should trigger the corresponding
installation target in the runtimes external project.

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

4 years ago[LV] Remove nondeterminacy by changing LoopVectorizationLegality::Reductions
Wei Mi [Tue, 28 Jan 2020 00:49:50 +0000 (16:49 -0800)]
[LV] Remove nondeterminacy by changing LoopVectorizationLegality::Reductions
from DenseMap to MapVector

The iteration order of LoopVectorizationLegality::Reductions matters for the
final code generation, so we better use MapVector instead of DenseMap for it
to remove the nondeterminacy. reduction-order.ll in the patch is an example
reduced from the case we saw. In the output of opt command, the order of the
select instructions in the vector.body block keeps changing from run to run
currently.

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

4 years ago[Matrix] Add optimization remarks for matrix expression.
Florian Hahn [Tue, 28 Jan 2020 00:22:04 +0000 (16:22 -0800)]
[Matrix] Add optimization remarks for matrix expression.

Generate remarks for matrix operations in a function. To generate remarks
for matrix expressions, the following approach is used:
1. Collect leafs of matrix expressions (done in
   RemarkGenerator::getExpressionLeafs).  Leafs are lowered matrix
   instructions without other matrix users (like stores).

2. For each leaf, create a remark containing a linearizied version of the
   matrix expression.

The following improvements will be submitted as follow-ups:
* Summarize number of vector instructions generated for each expression.
* Account for shared sub-expressions.
* Propagate matrix remarks up the inlining chain.

The information provided by the matrix remarks helps users to spot cases
where matrix expression got split up, e.g. due to inlining not
happening. The remarks allow users to address those issues, ensuring
best performance.

Reviewers: anemet, Gerolf, thegameg, hfinkel, andrew.w.kaylor, LuoYuanke

Reviewed By: anemet

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

4 years ago[clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator
Nathan [Tue, 28 Jan 2020 00:28:59 +0000 (00:28 +0000)]
[clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator

Summary: Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44667 | noexcept operator misinterpreted as being evaluated ]].

Reviewers: aaron.ballman, alexfh, JonasToth, hokein, gribozavr2

Reviewed By: gribozavr2

Subscribers: merge_guards_bot, Quuxplusone, xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

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

4 years agoReland "[StackColoring] Remap PseudoSourceValue frame indices via MachineFunction...
Fangrui Song [Mon, 27 Jan 2020 23:10:07 +0000 (15:10 -0800)]
Reland "[StackColoring] Remap PseudoSourceValue frame indices via MachineFunction::getPSVManager()""

Reland 7a8b0b1595e7dc878b48cf9bbaa652087a6895db, with a fix that checks
`!E.value().empty()` to avoid inserting a zero to SlotRemap.

Debugged by rnk@ in https://bugs.chromium.org/p/chromium/issues/detail?id=1045650#c33

Reviewed By: rnk

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

4 years ago[clang-tidy] readability-redundant-string-init now flags redundant initialisation...
Nathan [Mon, 27 Jan 2020 23:50:26 +0000 (23:50 +0000)]
[clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

Summary:
The original behaviour of this check only looked at VarDecls with strings that had an empty string initializer. This has been improved to check for FieldDecls with an in class initializer as well as constructor initializers.

Addresses [[ https://bugs.llvm.org/show_bug.cgi?id=44474 | clang-tidy "modernize-use-default-member-init"/"readability-redundant-string-init" and redundant initializer of std::string ]]

Reviewers: aaron.ballman, alexfh, hokein

Reviewed By: aaron.ballman

Subscribers: merge_guards_bot, mgorny, Eugene.Zelenko, xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

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

4 years ago[clang-tidy] readability-identifier-naming disregards parameters restrictions on...
Nathan [Mon, 27 Jan 2020 23:46:53 +0000 (23:46 +0000)]
[clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

Summary:
Typically most main functions have the signature:
```
int main(int argc, char *argv[])
```
To stick with convention when renaming parameters we should ignore the `argc` and `argv` names even if the parameter style says they should be renamed. This patch addresses this by checking all ParmVarDecls if they form part of a function with a signature that matches main `int name(int argc, char * argv[], (optional char *env[]))`

Reviewers: aaron.ballman, JonasToth, alexfh, hokein

Reviewed By: aaron.ballman

Subscribers: Mordante, merge_guards_bot, xazax.hun, kristof.beyls, cfe-commits

Tags: #clang, #clang-tools-extra

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

4 years ago[IR] Keep a double break between functions when printing a module
Reid Kleckner [Mon, 27 Jan 2020 21:49:09 +0000 (13:49 -0800)]
[IR] Keep a double break between functions when printing a module

This behavior appears to have changed unintentionally in
b0e979724f2679e4e6f5b824144ea89289bd6d56.

Instead of printing the leading newline in printFunction, print it when
printing a module. This ensures that `OS << *Func` starts printing
immediately on the current line, but whole modules are printed nicely.

Reviewed By: MaskRay

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

4 years ago[WinEH] Re-run stack coloring test for i686
Reid Kleckner [Mon, 27 Jan 2020 23:24:58 +0000 (15:24 -0800)]
[WinEH] Re-run stack coloring test for i686

This would've caught https://crbug.com/1045650, which resulted in the
revert of 7a8b0b1595e7dc878b48cf9bbaa652087a6895db.

4 years agoSupport zero size types in StackSafetyAnalysis.
Evgenii Stepanov [Sat, 25 Jan 2020 00:36:24 +0000 (16:36 -0800)]
Support zero size types in StackSafetyAnalysis.

Reviewers: vitalybuka

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years agoFix StackSafetyAnalysis crash with scalable vector types.
Evgenii Stepanov [Sat, 25 Jan 2020 00:36:13 +0000 (16:36 -0800)]
Fix StackSafetyAnalysis crash with scalable vector types.

Summary:
Treat scalable allocas as if they have storage size of 0, and
scalable-typed memory accesses as if their range is unlimited.

This is not a proper support of scalable vector types in the analysis -
we can do better, but not today.

Reviewers: vitalybuka

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[AArch64] Add option to enable/disable load-store renaming.
Florian Hahn [Mon, 27 Jan 2020 23:11:45 +0000 (15:11 -0800)]
[AArch64] Add option to enable/disable load-store renaming.

This patch adds a new option to enable/disable register renaming in the
load-store optimizer. Defaults to disabled, as there is a potential
mis-compile caused by this.

4 years ago[lldb/Commands] Make column available through _regexp-break
Jonas Devlieghere [Mon, 27 Jan 2020 23:10:13 +0000 (15:10 -0800)]
[lldb/Commands] Make column available through _regexp-break

Update _regexp-break to interpret main.c:8:21 as:

  breakpoint set --line 8 --column 21

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

4 years ago[lldb/Test] Use lit.local.cfg to mark whole directory as (un)supported.
Jonas Devlieghere [Mon, 27 Jan 2020 23:08:58 +0000 (15:08 -0800)]
[lldb/Test] Use lit.local.cfg to mark whole directory as (un)supported.

Mark the whole Python or Lua test directory as unsupported when the
corresponding language is not available.

4 years agoremove a trailing space character (test commit)
Eric Schweitz [Mon, 27 Jan 2020 23:01:55 +0000 (15:01 -0800)]
remove a trailing space character (test commit)

4 years agoAMDGPU/GlobalISel: Eliminate SelectVOP3Mods_f32
Matt Arsenault [Fri, 24 Jan 2020 18:11:23 +0000 (13:11 -0500)]
AMDGPU/GlobalISel: Eliminate SelectVOP3Mods_f32

Trivial type predicates should be moved into the tablegen pattern
itself, and not checked inside complex patterns. This eliminates a
redundant complex pattern, and fixes select source modifiers for
GlobalISel.

I have further patches which fully handle select in tablegen and
remove all of the C++ selection, although it requires the ugliness to
support the entire range of legal register types.

4 years ago[gwp-asan] Implement malloc_iterate.
Evgenii Stepanov [Fri, 24 Jan 2020 00:12:15 +0000 (16:12 -0800)]
[gwp-asan] Implement malloc_iterate.

Summary:
This is an Android-specific interface for iterating over all live
allocations in a memory range.

Reviewers: hctim, cferris

Subscribers: mgorny, mgrang, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

4 years ago[GlobalISel] Make use of KnownBits::computeForAddSub
Jay Foad [Sun, 26 Jan 2020 14:34:28 +0000 (14:34 +0000)]
[GlobalISel] Make use of KnownBits::computeForAddSub

Summary:
This is mostly NFC. computeForAddSub may give more precise results in
some cases, but that doesn't seem to affect any existing GlobalISel
tests.

Subscribers: rovka, hiraditya, volkan, Petar.Avramovic, llvm-commits

Tags: #llvm

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

4 years ago[mlir] Remove 'valuesToRemoveIfDead' from PatternRewriter API
Diego Caballero [Mon, 27 Jan 2020 21:13:20 +0000 (13:13 -0800)]
[mlir] Remove 'valuesToRemoveIfDead' from PatternRewriter API

Summary:
Remove 'valuesToRemoveIfDead' from PatternRewriter API. The removal
functionality wasn't implemented and we decided [1] not to implement it in
favor of having more powerful DCE approaches.

[1] https://github.com/tensorflow/mlir/pull/212

Reviewers: rriddle, bondhugula

Reviewed By: rriddle

Subscribers: liufengdb, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, llvm-commits

Tags: #llvm

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

4 years ago[examples] Fix CMakefiles for JITLink and OrcError library refactoring
Stephen Neuendorffer [Fri, 25 Oct 2019 22:49:41 +0000 (15:49 -0700)]
[examples] Fix CMakefiles for JITLink and OrcError library refactoring

The examples need explicit library dependencies when building with
BUILD_SHARED_LIBS=on

4 years ago[analyzer] Add FuchsiaLockChecker and C11LockChecker
Gabor Horvath [Fri, 24 Jan 2020 20:04:37 +0000 (12:04 -0800)]
[analyzer] Add FuchsiaLockChecker and C11LockChecker

These are mostly trivial additions as both of them are reusing existing
PThreadLockChecker logic. I only needed to add the list of functions to
check and do some plumbing to make sure that we display the right
checker name in the diagnostic.

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

4 years ago[InstCombine] allow more narrowing of casted select
Sanjay Patel [Mon, 27 Jan 2020 21:33:13 +0000 (16:33 -0500)]
[InstCombine] allow more narrowing of casted select

D47163 created a rule that we should not change the casted
type of a select when we have matching types in its compare condition.
That was intended to help vector codegen, but it also could create
situations where we miss subsequent folds as shown in PR44545:
https://bugs.llvm.org/show_bug.cgi?id=44545

By using shouldChangeType(), we can continue to get the vector folds
(because we always return false for vector types). But we also solve
the motivating bug because it's ok to narrow the scalar select in that
example.

Our canonicalization rules around select are a mess, but AFAICT, this
will not induce any infinite looping from the reverse transform (but
we'll need to watch for that possibility if committed).

Side note: there's a similar use of shouldChangeType() for phi ops
just below this diff, and the source and destination types appear to
be reversed.

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

4 years ago[NFC][mlir][linalg] Merge Utils/Intrinsics.h into EDSC/Intrinsics.h
Kern Handa [Mon, 27 Jan 2020 21:31:12 +0000 (22:31 +0100)]
[NFC][mlir][linalg] Merge Utils/Intrinsics.h into EDSC/Intrinsics.h

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

4 years ago[mlir] add lowering from affine.min to std
Alex Zinenko [Mon, 27 Jan 2020 16:14:56 +0000 (17:14 +0100)]
[mlir] add lowering from affine.min to std

Summary:
Affine minimum computation will be used in tiling transformation. The
implementation is mostly boilerplate as we already lower the minimum in the
upper bound of an affine loop.

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

4 years ago[DAG] Enable ISD::EXTRACT_SUBVECTOR SimplifyMultipleUseDemandedBits handling
Simon Pilgrim [Mon, 27 Jan 2020 21:17:26 +0000 (21:17 +0000)]
[DAG] Enable ISD::EXTRACT_SUBVECTOR SimplifyMultipleUseDemandedBits handling

This allows SimplifyDemandedBits to call SimplifyMultipleUseDemandedBits to create a simpler ISD::EXTRACT_SUBVECTOR, which is particularly useful for cases where we're splitting into subvectors anyhow.

Differential Revision: This allows SimplifyDemandedBits to call SimplifyMultipleUseDemandedBits to create a simpler ISD::EXTRACT_SUBVECTOR, which is particularly useful for cases where we're splitting into subvectors anyhow.

4 years agoFix an assertion failure in DwarfExpression's subregister composition
Adrian Prantl [Fri, 17 Jan 2020 18:38:41 +0000 (10:38 -0800)]
Fix an assertion failure in DwarfExpression's subregister composition

This patch fixes an assertion failure in DwarfExpression that is
triggered when a complex fragment has exactly the size of a
subregister of the register the DBG_VALUE points to *and* there is no
DWARF encoding for the super-register.

I took the opportunity to replace/document some magic values with
static constructor functions to make this code less confusing to read.

rdar://problem/58489125

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

4 years ago[NFC][LoopVectorize] Autogenerate tests affected by isHighCostExpansionHelper() cost...
Roman Lebedev [Mon, 27 Jan 2020 20:30:37 +0000 (23:30 +0300)]
[NFC][LoopVectorize] Autogenerate tests affected by isHighCostExpansionHelper() cost modelling (PR44668)

4 years ago[NFC][IndVarSimplify] Autogenerate tests affected by isHighCostExpansionHelper()...
Roman Lebedev [Mon, 27 Jan 2020 20:22:30 +0000 (23:22 +0300)]
[NFC][IndVarSimplify] Autogenerate tests affected by isHighCostExpansionHelper() cost modelling (PR44668)

4 years agoAMDGPU/GlobalISel: Select buffer atomics
Matt Arsenault [Tue, 14 Jan 2020 04:17:59 +0000 (23:17 -0500)]
AMDGPU/GlobalISel: Select buffer atomics

The cmpswap handling is incomplete and fails to select.

4 years agoAMDGPU/GlobalISel: Select llvm.amdgcn.raw.tbuffer.store
Matt Arsenault [Tue, 14 Jan 2020 03:06:01 +0000 (22:06 -0500)]
AMDGPU/GlobalISel: Select llvm.amdgcn.raw.tbuffer.store

4 years agoRevert "[nfc][libomptarget] Remove SHARED annotation from local variables"
Jon Chesterfield [Mon, 27 Jan 2020 20:04:02 +0000 (20:04 +0000)]
Revert "[nfc][libomptarget] Remove SHARED annotation from local variables"

This reverts commit 0e9374e3740f82f2d46af564f6b059e68ff307c8.
Revert D73239. It fails some local testing, cause presently unknown

4 years agoAMDGPU/GlobalISel: Select llvm.amdgcn.struct.buffer.store[.format]
Matt Arsenault [Tue, 14 Jan 2020 04:01:23 +0000 (23:01 -0500)]
AMDGPU/GlobalISel: Select llvm.amdgcn.struct.buffer.store[.format]

4 years agoAMDGPU/GlobalISel: Move llvm.amdgcn.raw.buffer.store handling
Matt Arsenault [Tue, 14 Jan 2020 01:39:09 +0000 (20:39 -0500)]
AMDGPU/GlobalISel: Move llvm.amdgcn.raw.buffer.store handling

Treat this the same way as loads. There's less value to the
intermediate nodes, but it's good to be consistent.

4 years ago[OPENMP50]Track changes of lastprivate conditional in parallel-based
Alexey Bataev [Mon, 27 Jan 2020 19:10:17 +0000 (14:10 -0500)]
[OPENMP50]Track changes of lastprivate conditional in parallel-based
regions with reductions, lastprivates or linears clauses.

If the lastprivate conditional variable is updated in inner parallel
region with reduction, lastprivate or linear clause, the value must be
considred as a candidate for lastprivate conditional. Also, tracking in
inner parallel regions is not required.

4 years agoRevert "[clang-tidy] readability-identifier-naming disregards parameters restrictions...
Shoaib Meenai [Mon, 27 Jan 2020 19:48:42 +0000 (11:48 -0800)]
Revert "[clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions"

This reverts commit 27e3671ff49b72640f89c34a415412e400503442.

This was an accidental push, and the author requested a revert on IRC as
their local branch is in a bad state.

4 years ago[InstCombine] convert fsub nsz with fneg operand to -(X + Y)
Sanjay Patel [Mon, 27 Jan 2020 19:40:43 +0000 (14:40 -0500)]
[InstCombine] convert fsub nsz with fneg operand to -(X + Y)

This was noted in D72521 - we need to match fneg specifically to
consistently handle that pattern along with (-0.0 - X).

4 years ago[InstCombine] Move negation handling into freelyNegateValue()
Nikita Popov [Thu, 23 Jan 2020 20:13:57 +0000 (21:13 +0100)]
[InstCombine] Move negation handling into freelyNegateValue()

Followup to D72978. This moves existing negation handling in
InstCombine into freelyNegateValue(), which make it composable.
In particular, root negations of div/zext/sext/ashr/lshr/sub can
now always be performed through a shl/trunc as well.

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

4 years ago[InstCombine] Add more negation tests; NFC
Nikita Popov [Thu, 23 Jan 2020 20:12:41 +0000 (21:12 +0100)]
[InstCombine] Add more negation tests; NFC

Additional test cases for pushing negations through various
instructions.