platform/upstream/llvm.git
6 years ago[X86] Add NotMemoryFoldable to more instructions.
Craig Topper [Tue, 12 Jun 2018 07:32:17 +0000 (07:32 +0000)]
[X86] Add NotMemoryFoldable to more instructions.

These include PUSH/POP instructions that don't match the manual table. This also includes CMPXCHG which we never emit in non-locked form.

llvm-svn: 334479

6 years ago[X86] Update folding table generator to properly detect RMW arithmetic instructions.
Craig Topper [Tue, 12 Jun 2018 07:32:15 +0000 (07:32 +0000)]
[X86] Update folding table generator to properly detect RMW arithmetic instructions.

The RMW instructions are detected by reading the SchedRW data, but the RMW instructions have had their SchedRW changed in recent months. This broke the expectation.

We probably should fix this to use the mayLoad/mayStore flags if possible.

llvm-svn: 334478

6 years ago[CMake] Use common variable for all header targets NFC
Petr Hosek [Tue, 12 Jun 2018 06:58:06 +0000 (06:58 +0000)]
[CMake] Use common variable for all header targets NFC

This simplifies the handling of header targets.

llvm-svn: 334477

6 years ago[NFC] Change sample profile format enum name SPF_Raw_Binary to SPF_Binary.
Wei Mi [Tue, 12 Jun 2018 05:53:49 +0000 (05:53 +0000)]
[NFC] Change sample profile format enum name SPF_Raw_Binary to SPF_Binary.

Some out-of-tree targets depend on the enum name SPF_Binary. Keep the name
can avoid unnecessary churn to those targets.

llvm-svn: 334476

6 years agoFix a typo in rL334447.
Wei Mi [Tue, 12 Jun 2018 04:43:09 +0000 (04:43 +0000)]
Fix a typo in rL334447.

llvm-svn: 334475

6 years ago[X86] Add NotMemoryFoldable to a bunch of instructions to suppress them from the...
Craig Topper [Tue, 12 Jun 2018 04:34:59 +0000 (04:34 +0000)]
[X86] Add NotMemoryFoldable to a bunch of instructions to suppress them from the autogenerated load folding table.

Most of these are system instructions or other instructions we don't use in CodeGen. No point wasting space for them in the table. Removing them from the autogenerated table makes it easier to review the manual table.

A few are real opcode collisions where the memory and register forms are completely different instructions.

llvm-svn: 334474

6 years ago[X86] Enforce agreement of AdSize field when autogenerating load folding table entries.
Craig Topper [Tue, 12 Jun 2018 04:34:58 +0000 (04:34 +0000)]
[X86] Enforce agreement of AdSize field when autogenerating load folding table entries.

llvm-svn: 334473

6 years ago[XRay][profiler] Part 5: Profiler File Writing
Dean Michael Berris [Tue, 12 Jun 2018 04:06:25 +0000 (04:06 +0000)]
[XRay][profiler] Part 5: Profiler File Writing

Summary:
This is part of the larger XRay Profiling Mode effort.

This patch implements the profile writing mechanism, to allow profiles
collected through the profiler mode to be persisted to files.

Follow-on patches would allow us to load these profiles and start
converting/analysing them through the `llvm-xray` tool.

Depends on D44620.

Reviewers: echristo, kpw, pelikan

Reviewed By: kpw

Subscribers: llvm-commits

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

llvm-svn: 334472

6 years agoFix that AlignedAllocation.h doesn't compile because of VersionTuple
Raphael Isemann [Tue, 12 Jun 2018 03:43:21 +0000 (03:43 +0000)]
Fix that AlignedAllocation.h doesn't compile because of VersionTuple

Summary:
 rL334399 put VersionTuple in the llvm namespace, but this header still assumes it's in the clang namespace.
This leads to compilation failures with enabled modules when building Clang.

Subscribers: cfe-commits

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

llvm-svn: 334471

6 years ago[CMake] Add a missing target dependency on C++ ABI headers
Petr Hosek [Tue, 12 Jun 2018 03:31:03 +0000 (03:31 +0000)]
[CMake] Add a missing target dependency on C++ ABI headers

This resolves the breakage introduced in r334468 which results in
build error when using CMake Makefile generator.

llvm-svn: 334470

6 years ago[XRay][profiler] Part 4: Profiler Mode Wiring
Dean Michael Berris [Tue, 12 Jun 2018 03:29:39 +0000 (03:29 +0000)]
[XRay][profiler] Part 4: Profiler Mode Wiring

Summary:
This is part of the larger XRay Profiling Mode effort.

This patch implements the wiring required to enable us to actually
select the `xray-profiling` mode, and install the handlers to start
measuring the time and frequency of the function calls in call stacks.
The current way to get the profile information is by working with the
XRay API to `__xray_process_buffers(...)`.

In subsequent changes we'll implement profile saving to files, similar
to how the FDR and basic modes operate, as well as means for converting
this format into those that can be loaded/visualised as flame graphs. We
will also be extending the accounting tool in LLVM to support
stack-based function call accounting.

We also continue with the implementation to support building small
histograms of latencies for the `FunctionCallTrie::Node` type, to allow
us to actually approximate the distribution of latencies per function.

Depends on D45758 and D46998.

Reviewers: eizan, kpw, pelikan

Reviewed By: kpw

Subscribers: llvm-commits, mgorny

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

llvm-svn: 334469

6 years agoReland "Use custom command and target to install libc++ headers"
Petr Hosek [Tue, 12 Jun 2018 03:10:02 +0000 (03:10 +0000)]
Reland "Use custom command and target to install libc++ headers"

Using file(COPY FILE...) has several downsides. Since the file command
is only executed at configuration time, any changes to headers made
after the initial CMake execution are ignored. This can lead to subtle
errors since the just built Clang will be using stale libc++ headers.
Furthermore, since the headers are copied prior to executing the build
system, this may hide missing dependencies on libc++ from other LLVM
components.

This changes replaces the use of file(COPY FILE...) command with a
custom command and target which addresses all aforementioned issues and
matches the implementation already used by other LLVM components that
also install headers like Clang builtin headers.

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

llvm-svn: 334468

6 years agoUpdate the to-do list with motions from Rapperswil.
Marshall Clow [Tue, 12 Jun 2018 02:45:30 +0000 (02:45 +0000)]
Update the to-do list with motions from Rapperswil.

llvm-svn: 334467

6 years ago[Darwin] Use errorHandler from liblldCommon
Brian Gesiak [Tue, 12 Jun 2018 02:34:04 +0000 (02:34 +0000)]
[Darwin] Use errorHandler from liblldCommon

Summary:
Error handling in liblldCore and the Darwin toolchain prints to an
output stream. A TODO in the project explained that a diagnostics
interface resembling Clang's should be added.

For now, the simple diagnostics interface defined in liblldCommon seems
like an improvement. It prints colors when they're available, uses locks
for thread-safety, and abstracts away the `"error: "` and newline
literal strings that litter the Darwin toolchain code.

To use the liblldCommon error handler, a link dependency is added to
the liblldDriver library.

Test Plan:
1. check-lld
2. Invoke `ld64.lld -r` in a terminal that supports color output.
   Confirm that "ld64.lld: error: -arch not specified and could not be inferred"
   is output, and that the "error:" is colored red!

Reviewers: ruiu, smeenai

Reviewed By: ruiu

Subscribers: mgorny, llvm-commits

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

llvm-svn: 334466

6 years ago[PPC64] Support R_PPC64_DTPREL relocations.
Sean Fertile [Tue, 12 Jun 2018 01:47:02 +0000 (01:47 +0000)]
[PPC64] Support R_PPC64_DTPREL relocations.

Patch adds support for most of the dynamic thread pointer based relocations
for local-dynamic tls. The HIGH and HIGHA versions are missing becuase they
are not supported by the llvm integrated assembler yet.

llvm-svn: 334465

6 years ago[builtins] Delay emutls deallocation for one round
Ryan Prichard [Tue, 12 Jun 2018 01:32:26 +0000 (01:32 +0000)]
[builtins] Delay emutls deallocation for one round

Summary:
With Android/Bionic, delay deallocation to round 2 of 4. It must run after
C++ thread_local destructors have been called, but before the final 2
rounds, because emutls calls free, and jemalloc then needs another 2
rounds to free its thread-specific data.

Fixes https://github.com/android-ndk/ndk/issues/687

Reviewers: cmtice, srhines, jyknight, chh, echristo

Reviewed By: srhines, chh, echristo

Subscribers: echristo, delcypher, llvm-commits, #sanitizers

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

llvm-svn: 334463

6 years ago[builtins] emutls cleanup: determine header size using sizeof
Ryan Prichard [Tue, 12 Jun 2018 01:32:25 +0000 (01:32 +0000)]
[builtins] emutls cleanup: determine header size using sizeof

Summary: Also add a few post-#else/#endif comments

Reviewers: echristo, srhines

Reviewed By: echristo

Subscribers: chh, delcypher, llvm-commits, #sanitizers

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

llvm-svn: 334462

6 years agoNFC, some additional tests added and some renaming for planned fma support changes
Michael Berg [Tue, 12 Jun 2018 00:52:43 +0000 (00:52 +0000)]
NFC, some additional tests added and some renaming for planned fma support changes

llvm-svn: 334461

6 years ago[X86] Add isel patterns for folding loads when creating ROUND instructions from ffloo...
Craig Topper [Tue, 12 Jun 2018 00:48:57 +0000 (00:48 +0000)]
[X86] Add isel patterns for folding loads when creating ROUND instructions from ffloor/fnearbyint/fceil/frint/ftrunc.

We were missing packed isel folding patterns for all of sse41, avx, and avx512.

For some reason avx512 had scalar load folding patterns under optsize(due to partial/undef reg update), but we didn't have the equivalent sse41 and avx patterns.

Sometimes we would get load folding due to peephole pass anyway, but we're also missing avx512 instructions from the load folding table. I'll try to fix that in another patch.

Some of this was spotted in the review for D47993.

This patch adds all the folds to isel, adds a few spot tests, and disables the peephole pass on a few tests to ensure we're testing some of these patterns.

llvm-svn: 334460

6 years ago[AMDGPU] prevent hitting Assertion `isReg() && "Wrong MachineOperand accessor"'
Mark Searles [Tue, 12 Jun 2018 00:41:26 +0000 (00:41 +0000)]
[AMDGPU] prevent hitting Assertion `isReg() && "Wrong MachineOperand accessor"'

The use iterator, used within findMaskOperands(), can return anything which is
not a def. isUse() requires a register, so check isReg() before calling isUse().

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

llvm-svn: 334459

6 years ago[CMake] Remove -Wno-maybe-uninitialized from passthrough vars.
Matt Morehouse [Tue, 12 Jun 2018 00:37:06 +0000 (00:37 +0000)]
[CMake] Remove -Wno-maybe-uninitialized from passthrough vars.

Fixes http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/
buildbot.

llvm-svn: 334458

6 years ago[CUDA][HIP] Set kernel calling convention before arrange function
Yaxun Liu [Tue, 12 Jun 2018 00:16:33 +0000 (00:16 +0000)]
[CUDA][HIP] Set kernel calling convention before arrange function

Currently clang set kernel calling convention for CUDA/HIP after
arranging function, which causes incorrect kernel function type since
it depends on calling convention.

This patch moves setting kernel convention before arranging
function.

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

llvm-svn: 334457

6 years agoExempt some compilers from new static variable test.
Jonas Devlieghere [Tue, 12 Jun 2018 00:15:59 +0000 (00:15 +0000)]
Exempt some compilers from new static variable test.

Apparently some compilers generate incomplete debug information which
caused the updated test to fail. Therefore I've extracted the new check
into a separate test case with the necessary decorators.

llvm-svn: 334456

6 years agoFix a buildbot error reported by sanitizer-x86_64-linux-fast:
Wei Mi [Mon, 11 Jun 2018 23:39:02 +0000 (23:39 +0000)]
Fix a buildbot error reported by sanitizer-x86_64-linux-fast:
Function::getGUID may complain if its input is an empty StringRef.

llvm-svn: 334455

6 years ago[Test] Update static variable test.
Jonas Devlieghere [Mon, 11 Jun 2018 23:26:15 +0000 (23:26 +0000)]
[Test] Update static variable test.

Before Pavel's change in r334181, we were printing too many global
variables. This patch updates the test suite to ensure we don't regress
again in the future.

rdar://problem/29180927

llvm-svn: 334454

6 years agoFix a warning issued by clang.
Wei Mi [Mon, 11 Jun 2018 23:09:04 +0000 (23:09 +0000)]
Fix a warning issued by clang.

llvm-svn: 334453

6 years ago[CMake] Fix dropped dependency in install-llvm-headers
Justin Bogner [Mon, 11 Jun 2018 23:05:28 +0000 (23:05 +0000)]
[CMake] Fix dropped dependency in install-llvm-headers

This dependency was accidentally dropped in r319480, causing
install-distribution and install-llvm-headers to install an incomplete
set of headers (the generated Intrinsics and Attributes would be
missing).

llvm-svn: 334452

6 years agoSimplify; NFC
George Burgess IV [Mon, 11 Jun 2018 22:58:32 +0000 (22:58 +0000)]
Simplify; NFC

Not shown in the diff: AQ is a `vector<SUnit *>`, and SU is a `SUnit *`

llvm-svn: 334451

6 years ago[sanitizer] Add fgets, fputs and puts into sanitizer_common
Peter Wu [Mon, 11 Jun 2018 22:58:04 +0000 (22:58 +0000)]
[sanitizer] Add fgets, fputs and puts into sanitizer_common

Summary:
Add fgets, fputs and puts to sanitizer_common. This adds ASAN coverage
for these functions, extends MSAN support from fgets to fputs/puts and
extends TSAN support from puts to fputs.

Fixes: https://github.com/google/sanitizers/issues/952
Reviewed By: vitalybuka

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

llvm-svn: 334450

6 years agoFix a warning reported by clang but not by gcc.
Wei Mi [Mon, 11 Jun 2018 22:51:28 +0000 (22:51 +0000)]
Fix a warning reported by clang but not by gcc.

llvm-svn: 334449

6 years ago- Add "AV" as new default acronym. - Add support for "I" and "A" in lowerCamelCase...
Yan Zhang [Mon, 11 Jun 2018 22:44:06 +0000 (22:44 +0000)]
- Add "AV" as new default acronym. - Add support for "I" and "A" in lowerCamelCase pattern

Summary: Now we can support property names like "hasADog" correctly.

Reviewers: benhamilton, hokein

Reviewed By: benhamilton

Subscribers: cfe-commits

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

llvm-svn: 334448

6 years ago[SampleFDO] Add a new compact binary format for sample profile.
Wei Mi [Mon, 11 Jun 2018 22:40:43 +0000 (22:40 +0000)]
[SampleFDO] Add a new compact binary format for sample profile.

Name table occupies a big chunk of size in current binary format sample profile.
In order to reduce its size, the patch changes the sample writer/reader to
save/restore MD5Hash of names in the name table. Sample annotation phase will
also use MD5Hash of name to query samples accordingly.

Experiment shows compact binary format can reduce the size of sample profile by
2/3 compared with binary format generally.

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

llvm-svn: 334447

6 years agoTableGen: Change some pointer parameters to references since they're never null anyway
David Blaikie [Mon, 11 Jun 2018 22:14:43 +0000 (22:14 +0000)]
TableGen: Change some pointer parameters to references since they're never null anyway

llvm-svn: 334446

6 years ago[CMake] Use libc++ and compiler-rt for bootstrap Fuchsia Clang
Petr Hosek [Mon, 11 Jun 2018 22:06:44 +0000 (22:06 +0000)]
[CMake] Use libc++ and compiler-rt for bootstrap Fuchsia Clang

We want to build the second stage compiler with libc++ and compiler-rt,
also include builtins and runtimes into extra bootstrap components to
ensure these get built.

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

llvm-svn: 334445

6 years agoAMDGPU/LLD: Handle R_AMDGPU_REL64 relocation
Konstantin Zhuravlyov [Mon, 11 Jun 2018 21:42:53 +0000 (21:42 +0000)]
AMDGPU/LLD: Handle R_AMDGPU_REL64 relocation

Requires r334443 from llvm

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

llvm-svn: 334444

6 years agoAMDGPU: Add 64-bit relative variant kind
Konstantin Zhuravlyov [Mon, 11 Jun 2018 21:37:57 +0000 (21:37 +0000)]
AMDGPU: Add 64-bit relative variant kind

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

llvm-svn: 334443

6 years agoDocument how lldb uses the DBGSourcePathRemapping
Jason Molenda [Mon, 11 Jun 2018 21:36:40 +0000 (21:36 +0000)]
Document how lldb uses the DBGSourcePathRemapping
source path remapping src/dest path pairs with
respect to the DBGVersion number in the plist.

llvm-svn: 334442

6 years agoAdd DebugNamesDWARFIndex.cpp.
Jason Molenda [Mon, 11 Jun 2018 21:35:36 +0000 (21:35 +0000)]
Add DebugNamesDWARFIndex.cpp.

llvm-svn: 334441

6 years agoDAG: Fix extract_subvector combine for a single element
Matt Arsenault [Mon, 11 Jun 2018 21:27:41 +0000 (21:27 +0000)]
DAG: Fix extract_subvector combine for a single element

This would fail before because 1x vectors aren't legal,
so instead just use the scalar type.

Avoids regressions in a future AMDGPU commit to add
v4i16/v4f16 as legal types.

Test update is just the one test that this triggers
on in tree now. It wasn't checking anything before.
The result is completely  changed since the selects
are eliminated. Not sure if it's considered better
or not.

llvm-svn: 334440

6 years agoAdd a new SBTarget::LoadCore() overload which surfaces errors if the load fails
Leonard Mosescu [Mon, 11 Jun 2018 21:19:26 +0000 (21:19 +0000)]
Add a new SBTarget::LoadCore() overload which surfaces errors if the load fails

There was no way to find out what's wrong if SBProcess SBTarget::LoadCore(const char *core_file) failed.
Additionally, the implementation was unconditionally setting sb_process, so it wasn't even possible to check if the return SBProcess is valid.

This change adds a new overload which surfaces the errors and also returns a valid SBProcess only if the core load succeeds:

SBProcess SBTarget::LoadCore(const char *core_file, SBError &error);

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

llvm-svn: 334439

6 years ago[Sanitizers] %tool_options -> %env_tool_opts in allocator_returns_null.cc
Alex Shlyapnikov [Mon, 11 Jun 2018 21:04:24 +0000 (21:04 +0000)]
[Sanitizers] %tool_options -> %env_tool_opts in allocator_returns_null.cc

Use proper substitution in the common allocator_returns_null.cc test.

llvm-svn: 334438

6 years ago[CMake] Allow specifying extra dependencies of bootstrap stage
Petr Hosek [Mon, 11 Jun 2018 20:59:31 +0000 (20:59 +0000)]
[CMake] Allow specifying extra dependencies of bootstrap stage

This allows adding additional bootstrap dependencies to the bootstrap
compiler that may be needed by later stages.

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

llvm-svn: 334437

6 years ago[X86] Push some variable declarations down into the individual switch cases that...
Craig Topper [Mon, 11 Jun 2018 20:50:58 +0000 (20:50 +0000)]
[X86] Push some variable declarations down into the individual switch cases that need them. NFC

All of the cases are already wrapped in curly braces so declaring a variable there isn't an issue. And the variables aren't assigned or used in the larger scope.

llvm-svn: 334436

6 years ago[SLP] Add testcases of min/max reduction pattern for AMDGPU.
Farhana Aleen [Mon, 11 Jun 2018 20:29:31 +0000 (20:29 +0000)]
[SLP] Add testcases of min/max reduction pattern for AMDGPU.

Author: FarhanaAleen
llvm-svn: 334435

6 years agoFix incorrect CHECK-LABEL
Tim Shen [Mon, 11 Jun 2018 19:56:12 +0000 (19:56 +0000)]
Fix incorrect CHECK-LABEL

llvm-svn: 334434

6 years ago[Sanitizers] Move allocator_returns_null.cc test to common.
Alex Shlyapnikov [Mon, 11 Jun 2018 19:45:59 +0000 (19:45 +0000)]
[Sanitizers] Move allocator_returns_null.cc test to common.

Summary:
Add allocator_returns_null.cc test to sanitizer_common and
remove all sanitizer-specific ones except:
- HWASan is not covered by sanitizer_common
- TSan allocator does not have comprehensive error reporting yet

Reviewers: vitalybuka

Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits

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

llvm-svn: 334433

6 years ago[ELF] Fix copy relocation when two symbols share the same Symbol instance.
Fangrui Song [Mon, 11 Jun 2018 19:42:57 +0000 (19:42 +0000)]
[ELF] Fix copy relocation when two symbols share the same Symbol instance.

In glibc libc.so.6, the multiple versions of sys_errlist share the same Symbol instance. When sys_errlist is copy relocated, we would replace SharedSymbol with Defined in the first iteration of the following loop:

  for (SharedSymbol *Sym : getSymbolsAt<ELFT>(SS))

Then in the second iteration, we think the symbol (which has been changed to Defined) is still SharedSymbol and screw up (the address ends up in the `Size` field).

llvm-svn: 334432

6 years agoMark the test using <experimental/memory_resource> to require c++experimental.
Volodymyr Sapsai [Mon, 11 Jun 2018 19:42:27 +0000 (19:42 +0000)]
Mark the test using <experimental/memory_resource> to require c++experimental.

When built against the old libc++ version the test was causing linker error

Undefined symbols for architecture x86_64:
  "std::experimental::fundamentals_v1::pmr::new_delete_resource()", referenced from:
      void test_evil<WidgetV0, WidgetV0>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV0, WidgetV1>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV0, WidgetV2>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV0, WidgetV3>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV1, WidgetV0>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV1, WidgetV1>() in construct_piecewise_pair_evil.pass.cpp.o
      void test_evil<WidgetV1, WidgetV2>() in construct_piecewise_pair_evil.pass.cpp.o
      ...

llvm-svn: 334431

6 years ago[X86] Reorder some type constraints to force things to be vectors and integer/fp...
Craig Topper [Mon, 11 Jun 2018 19:20:15 +0000 (19:20 +0000)]
[X86] Reorder some type constraints to force things to be vectors and integer/fp before forcing them to be the same size.

This may be needed by another patch that I'm working on. It should have no effect on any of the generated outputs.

llvm-svn: 334430

6 years ago[SCEV] Add transform zext((A * B * ...)<nuw>) --> (zext(A) * zext(B) * ...)<nuw>.
Justin Lebar [Mon, 11 Jun 2018 18:57:58 +0000 (18:57 +0000)]
[SCEV] Add transform zext((A * B * ...)<nuw>) --> (zext(A) * zext(B) * ...)<nuw>.

Reviewers: sanjoy

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 334429

6 years ago[SCEV] Add nuw/nsw to mul ops in StrengthenNoWrapFlags where safe.
Justin Lebar [Mon, 11 Jun 2018 18:57:42 +0000 (18:57 +0000)]
[SCEV] Add nuw/nsw to mul ops in StrengthenNoWrapFlags where safe.

Summary:
Previously we would add them for adds, but not multiplies.

Reviewers: sanjoy

Subscribers: llvm-commits, hiraditya

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

llvm-svn: 334428

6 years agoFix indentation in ScalarEvolution.cpp.
Justin Lebar [Mon, 11 Jun 2018 18:57:27 +0000 (18:57 +0000)]
Fix indentation in ScalarEvolution.cpp.

Whitespace-only change.  (clang-formatted the whole block.)

llvm-svn: 334427

6 years ago[Hexagon] Late predicate producers cannot be used as dot-new sources
Krzysztof Parzyszek [Mon, 11 Jun 2018 18:45:52 +0000 (18:45 +0000)]
[Hexagon] Late predicate producers cannot be used as dot-new sources

llvm-svn: 334426

6 years ago[SCEV] Canonicalize "A /u C1 /u C2" to "A /u (C1*C2)".
Tim Shen [Mon, 11 Jun 2018 18:44:58 +0000 (18:44 +0000)]
[SCEV] Canonicalize "A /u C1 /u C2" to "A /u (C1*C2)".

Summary: FWIW InstCombine already folds this. Also avoid the case where C1*C2 overflows.

Reviewers: sunfish, sanjoy

Subscribers: hiraditya, bixia, llvm-commits

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

llvm-svn: 334425

6 years ago[Sanitizers] Move pvalloc overflow tests to common.
Alex Shlyapnikov [Mon, 11 Jun 2018 17:33:53 +0000 (17:33 +0000)]
[Sanitizers] Move pvalloc overflow tests to common.

Summary:
Now all sanitizers with improved allocator error reporting are covered
by these common tests.

Also, add pvalloc-specific checks to LSan.

HWASan is not covered by sanitizer_common, hence its own pvalloc
and other allocator tests.

Reviewers: vitalybuka

Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits

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

llvm-svn: 334424

6 years ago[X86][AVX512] Tag AVX5124FMAPS/AVX5124VNNIW with missing scheduler classes
Simon Pilgrim [Mon, 11 Jun 2018 17:28:00 +0000 (17:28 +0000)]
[X86][AVX512] Tag AVX5124FMAPS/AVX5124VNNIW with missing scheduler classes

Necessary for D46276 as even though btver2 doesn't use these instructions, its now flagged as complete so complains if ANY instruction isn't tagged.....

UnsupportedFeatures wouldn't help here as these instructions don't appear to have a feature predicate (like a lot of AVX512).

llvm-svn: 334423

6 years ago[X86] Fix operand order in the shuffle created for blend builtins.
Craig Topper [Mon, 11 Jun 2018 17:06:01 +0000 (17:06 +0000)]
[X86] Fix operand order in the shuffle created for blend builtins.

This was broken when the builtin was added in r334249.

llvm-svn: 334422

6 years ago[clang-fuzzer] Modified protobuf and converter to add new signature, remove conditionals.
Matt Morehouse [Mon, 11 Jun 2018 17:05:45 +0000 (17:05 +0000)]
[clang-fuzzer] Modified protobuf and converter to add new signature, remove conditionals.

Changed the function signature and removed conditionals from loop body.

Patch By:  emmettneyman

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

llvm-svn: 334421

6 years ago[AMDGPU] Do not consider indirect acces through phi for wave limiter
Stanislav Mekhanoshin [Mon, 11 Jun 2018 16:50:49 +0000 (16:50 +0000)]
[AMDGPU] Do not consider indirect acces through phi for wave limiter

Rational: if there is indirect access that is usually an issue
because load is not ready by the use. However, if use is inside a
loop and load is outside that is potentially an issue for a first
iteration only.

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

llvm-svn: 334420

6 years ago[mips] Fix spill slot for mips3, n64 abi
Aleksandar Beserminji [Mon, 11 Jun 2018 16:50:28 +0000 (16:50 +0000)]
[mips] Fix spill slot for mips3, n64 abi

When program is compiled for mips3 with n64 abi, wrong register class
is used for creating an emergency spill slot. This patch fixes the
correct register class to be chosen.

This patch resolves PR35859.

Thanks to John Baldwin for reporting the issue!

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

llvm-svn: 334419

6 years agoEnable crash recovery tests on Windows, globs work in the lit internal shell now
Reid Kleckner [Mon, 11 Jun 2018 16:50:07 +0000 (16:50 +0000)]
Enable crash recovery tests on Windows, globs work in the lit internal shell now

llvm-svn: 334418

6 years ago[MS] Use mangled names and comdats for string merging with ASan
Reid Kleckner [Mon, 11 Jun 2018 16:49:43 +0000 (16:49 +0000)]
[MS] Use mangled names and comdats for string merging with ASan

This should reduce the binary size penalty of ASan on Windows. After
r334313, ASan will add red zones to globals in comdats, so we will still
find OOB accesses to string literals.

llvm-svn: 334417

6 years ago[X86] Properly account for the immediate being multiplied by 8 in the immediate range...
Craig Topper [Mon, 11 Jun 2018 16:34:10 +0000 (16:34 +0000)]
[X86] Properly account for the immediate being multiplied by 8 in the immediate range checking for BI__builtin_ia32_psrldqi128 and friends.

The limit was set to 1023 which only up to 127*8. It needs to be 2047 to allow 255*8.

llvm-svn: 334416

6 years agoclang-format: [JS] strict prop init annotation.
Martin Probst [Mon, 11 Jun 2018 16:20:13 +0000 (16:20 +0000)]
clang-format: [JS] strict prop init annotation.

Summary:
TypeScript uses the `!` token for strict property initialization
assertions, as in:

    class X {
      strictPropAsserted!: string;
    }

Previously, clang-format would wrap between the `!` and the `:` for
overly long lines. This patch fixes that by generally preventing the
wrap in that location.

Reviewers: krasimir

Subscribers: cfe-commits

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

llvm-svn: 334415

6 years ago[Driver] Add aliases for -Qn/-Qy
Mikhail Maltsev [Mon, 11 Jun 2018 16:10:06 +0000 (16:10 +0000)]
[Driver] Add aliases for -Qn/-Qy

This patch adds aliases for -Qn (-fno-ident) and -Qy (-fident) which
look less cryptic than -Qn/-Qy. The aliases are compatible with GCC.

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

llvm-svn: 334414

6 years agoDrop unnecessary whitespace [NFCI]
Tobias Grosser [Mon, 11 Jun 2018 15:11:57 +0000 (15:11 +0000)]
Drop unnecessary whitespace [NFCI]

llvm-svn: 334413

6 years ago[ScopBuilder] Slightly improve code structure [NFCI]
Tobias Grosser [Mon, 11 Jun 2018 14:59:28 +0000 (14:59 +0000)]
[ScopBuilder] Slightly improve code structure [NFCI]

First build the surrounding loops and then build up the polyhedral
structures. Before r326664 we had to mix these updates, clean this
up to improve readability (slightly).

llvm-svn: 334412

6 years agoFix tuple getter in std unique pointer pretty-printer
Pavel Labath [Mon, 11 Jun 2018 14:52:52 +0000 (14:52 +0000)]
Fix tuple getter in std unique pointer pretty-printer

Summary: Check case when _M_t child member is not present.

Reviewers: labath, tberghammer

Reviewed By: labath, tberghammer

Differential Revision: https://reviews.llvm.org/D47932
Patch by Aleksandr Urakov <aleksandr.urakov@jetbrains.com>.

llvm-svn: 334411

6 years ago[scudo] Improve the scalability of the shared TSD model
Kostya Kortchinsky [Mon, 11 Jun 2018 14:50:31 +0000 (14:50 +0000)]
[scudo] Improve the scalability of the shared TSD model

Summary:
The shared TSD model in its current form doesn't scale. Here is an example of
rpc2-benchmark (with default parameters, which is threading heavy) on a 72-core
machines (defaulting to a `CompactSizeClassMap` and no Quarantine):
- with tcmalloc: 337K reqs/sec, peak RSS of 338MB;
- with scudo (exclusive): 321K reqs/sec, peak RSS of 637MB;
- with scudo (shared): 241K reqs/sec, peak RSS of 324MB.

This isn't great, since the exclusive model uses a lot of memory, while the
shared model doesn't even come close to be competitive.

This is mostly due to the fact that we are consistently scanning the TSD pool
starting at index 0 for an available TSD, which can result in a lot of failed
lock attempts, and touching some memory that needs not be touched.

This CL attempts to make things better in most situations:
- first, use a thread local variable on Linux (intead of pthread APIs) to store
  the current TSD in the shared model;
- move the locking boolean out of the TSD: this allows the compiler to use a
  register and potentially optimize out a branch instead of reading it from the
  TSD everytime (we also save a tiny bit of memory per TSD);
- 64-bit atomic operations on 32-bit ARM platforms happen to be expensive: so
  store the `Precedence` in a `uptr` instead of a `u64`. We lose some
  nanoseconds of precision and we'll wrap around at some point, but the benefit
  is worth it;
- change a `CHECK` to a `DCHECK`: this should never happen, but if something is
  ever terribly wrong, we'll crash on a near null AV if the TSD happens to be
  null;
- based on an idea by dvyukov@, we are implementing a bound random scan for
  an available TSD. This requires computing the coprimes for the number of TSDs,
  and attempting to lock up to 4 TSDs in an random order before falling back to
  the current one. This is obviously slightly more expansive when we have just
  2 TSDs (barely noticeable) but is otherwise beneficial. The `Precedence` still
  basically corresponds to the moment of the first contention on a TSD. To seed
  on random choice, we use the precedence of the current TSD since it is very
  likely to be non-zero (since we are in the slow path after a failed `tryLock`)

With those modifications, the benchmark yields to:
- with scudo (shared): 330K reqs/sec, peak RSS of 327MB.

So the shared model for this specific situation not only becomes competitive but
outperforms the exclusive model. I experimented with some values greater than 4
for the number of TSDs to attempt to lock and it yielded a decrease in QPS. Just
sticking with the current TSD is also a tad slower. Numbers on platforms with
less cores (eg: Android) remain similar.

Reviewers: alekseyshl, dvyukov, javed.absar

Reviewed By: alekseyshl, dvyukov

Subscribers: srhines, kristof.beyls, delcypher, llvm-commits, #sanitizers

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

llvm-svn: 334410

6 years ago[AVR] Set trackLivenessAfterRegAlloc
Dylan McKay [Mon, 11 Jun 2018 14:46:48 +0000 (14:46 +0000)]
[AVR] Set trackLivenessAfterRegAlloc

This sets trackLivenessAfterRegAlloc on AVRRegisterInfo.

Most existing targets set this flag. Without it, specific IR inputs
cause LLVM to fail with:

Assertion failed: (getParent()->getProperties().hasProperty( MachineFunctionProperties::Property::TracksLiveness) &&
                   "Liveness information is accurate"), function livein_begin
file MachineBasicBlock.cpp, line 1354.

With this commit, this no longer happens.

Patch by Peter Nimmervoll.

llvm-svn: 334409

6 years agoclang-format: Introduce BreakInheritanceList option
Francois Ferrand [Mon, 11 Jun 2018 14:41:26 +0000 (14:41 +0000)]
clang-format: Introduce BreakInheritanceList option

Summary:
This option replaces the BreakBeforeInheritanceComma option with an
enum, thus introducing a mode where the colon stays on the same line as
constructor declaration:

  // When it fits on line:
  class A : public B, public C {
    ...
  };

  // When it does not fit:
  class A :
      public B,
      public C {
    ...
  };

This matches the behavior of the `BreakConstructorInitializers` option,
introduced in https://reviews.llvm.org/D32479.

Reviewers: djasper, klimek

Reviewed By: djasper

Subscribers: mzeren-vmw, cfe-commits

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

llvm-svn: 334408

6 years ago[X86] Fix skylake server scheduling info.
Clement Courbet [Mon, 11 Jun 2018 14:37:53 +0000 (14:37 +0000)]
[X86] Fix skylake server scheduling info.

Summary:
This fixes most of the scheduling info for SKX vector operations.
I had to split a lot of the YMM/ZMM classes into separate classes for YMM and ZMM.

The before/after llvm-exegesis analysis are in the phabricator diff.

Subscribers: llvm-commits

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

llvm-svn: 334407

6 years agoUpdate isl to isl-0.19-185-g8e9f55ce
Tobias Grosser [Mon, 11 Jun 2018 14:25:42 +0000 (14:25 +0000)]
Update isl to isl-0.19-185-g8e9f55ce

This is mainly a maintenance update.

llvm-svn: 334406

6 years ago[llvm-exegesis] Fix unhandled error.
Guillaume Chatelet [Mon, 11 Jun 2018 14:10:10 +0000 (14:10 +0000)]
[llvm-exegesis] Fix unhandled error.

Summary: Fixing an unhandled error when calling writeYaml.

Reviewers: courbet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 334405

6 years ago[x86] add scalar cvtt intrinsic tests; NFC
Sanjay Patel [Mon, 11 Jun 2018 13:51:34 +0000 (13:51 +0000)]
[x86] add scalar cvtt intrinsic tests; NFC

More coverage for the problem noted in D47993 (although these shouldn't be affected by that patch).

llvm-svn: 334404

6 years agoFix build errors on some configurations
Pavel Labath [Mon, 11 Jun 2018 13:30:47 +0000 (13:30 +0000)]
Fix build errors on some configurations

It's been reported
<http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180611/559616.html>
that template argument deduction for RetryAfterSignal fails if open is
not prefixed with "::".

This should help us build correctly on those platforms and explicitly
specifying the namespace is more correct anyway.

llvm-svn: 334403

6 years agoDWARFDebugNames: Fix lookup in dwo files
Pavel Labath [Mon, 11 Jun 2018 13:22:31 +0000 (13:22 +0000)]
DWARFDebugNames: Fix lookup in dwo files

The getDIESectionOffset function is not correct for split dwarf files
(and will probably be removed in D48009).

This patch implements correct section offset computation for split and
non-split compile units -- we first need to check if the referenced unit
is a skeleton unit, and if it is, we add the die offset to the full unit
base offset (as the full unit is the one which contains the die).

llvm-svn: 334402

6 years ago[clang-format] text protos: put entries on separate lines if there is a submessage
Krasimir Georgiev [Mon, 11 Jun 2018 12:53:25 +0000 (12:53 +0000)]
[clang-format] text protos: put entries on separate lines if there is a submessage

Summary:
This patch updates clang-format text protos to put entries of a submessage into separate lines if the submessage contains at least two entries and contains at least one submessage entry.

For example, the entries here are kept on separate lines even if putting them on a single line would be under the column limit:
```
message: {
  entry: 1
  submessage: { key: value }
}
```

Messages containing a single submessage or several scalar entries can still be put on one line if they fit:
```
message { submessage { key: value } }
message { x: 1 y: 2 z: 3 }
```

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: klimek, cfe-commits

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

llvm-svn: 334401

6 years agoAdd support for arrays in performance-implicit-conversion-in-loop
Alexander Kornienko [Mon, 11 Jun 2018 12:46:48 +0000 (12:46 +0000)]
Add support for arrays in performance-implicit-conversion-in-loop

Summary:
Add support for arrays (and structure that use naked pointers for their iterator, like std::array) in performance-implicit-conversion-in-loop

Reviewers: alexfh

Reviewed By: alexfh

Subscribers: cfe-commits

Patch by Alex Pilkiewicz.

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

llvm-svn: 334400

6 years agoMove VersionTuple from clang/Basic to llvm/Support
Pavel Labath [Mon, 11 Jun 2018 10:28:04 +0000 (10:28 +0000)]
Move VersionTuple from clang/Basic to llvm/Support

Summary:
This kind of functionality is useful to other project apart from clang.
LLDB works with version numbers a lot, but it does not have a convenient
abstraction for this. Moving this class to a lower level library allows
it to be freely used within LLDB.

Since this class is used in a lot of places in clang, and it used to be
in the clang namespace, it seemed appropriate to add it to the list of
adopted classes in LLVM.h to avoid prefixing all uses with "llvm::".

Also, I didn't find any tests specific for this class, so I wrote a
couple of quick ones for the more interesting bits of functionality.

Reviewers: zturner, erik.pilkington

Subscribers: mgorny, cfe-commits, llvm-commits

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

llvm-svn: 334399

6 years ago[NFC][AMDGPU] Add tests for all the various IR patterns equivalent to extracting...
Roman Lebedev [Mon, 11 Jun 2018 10:21:10 +0000 (10:21 +0000)]
[NFC][AMDGPU] Add tests for all the various IR patterns equivalent to extracting low bits.

Summary:
The idiom recognition seems rather poor.
Only the `@bzhi32_d0` produces `v_bfe_u32`.
But they all should.

This needs to be fixed before D47980 can be re-landed.

Reviewers: mareko, bogner, rampitec, arsenm, tstellar, nhaehnle

Reviewed By: nhaehnle

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

Tags: #amdgpu

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

llvm-svn: 334398

6 years agoEditline: make #include <codecvt> conditional
Pavel Labath [Mon, 11 Jun 2018 09:32:58 +0000 (09:32 +0000)]
Editline: make #include <codecvt> conditional

My previous patch made this include unconditional. However, it seems it
is not available everywhere. This patch makes us include it only in
configurations we really need it, which should be enough to unblock the
bots.

llvm-svn: 334397

6 years ago[Utils] update_llc_test_checks.py: support AMDGPU backend: AMDGCN, r600 triples
Roman Lebedev [Mon, 11 Jun 2018 09:20:21 +0000 (09:20 +0000)]
[Utils] update_llc_test_checks.py: support AMDGPU backend: AMDGCN, r600 triples

Summary:
Lack of that support has taken me by surprise.
I need to add (or at least look at) some tests for https://reviews.llvm.org/D47980#1127615,
and i don't really fancy doing that by hand.

The asm pattern is quite similar to that of x86:
https://godbolt.org/g/hfgeds
just with `#` replaced with `;`

Reviewers: spatel, RKSimon, MaskRay, tstellar, arsenm

Reviewed By: arsenm

Subscribers: arsenm, kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, rampitec, bogner, mareko, llvm-commits

Tags: #amdgpu

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

llvm-svn: 334396

6 years ago[llvm-exegesis] Program should succeed if benchmark returns StringError.
Guillaume Chatelet [Mon, 11 Jun 2018 09:18:01 +0000 (09:18 +0000)]
[llvm-exegesis] Program should succeed if benchmark returns StringError.

Summary: Fix for https://bugs.llvm.org/show_bug.cgi?id=37759.

Reviewers: courbet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 334395

6 years ago[Unittests] Change linker flags of dynamic library tests
Mikhail Maltsev [Mon, 11 Jun 2018 09:15:37 +0000 (09:15 +0000)]
[Unittests] Change linker flags of dynamic library tests

A recent change https://reviews.llvm.org/D46898 which had no intended
behavior change, actually modified the linker flags used when linking
the dynamic libraries used by the DynamicLibraryTests unit test. This
made the test fail in our testing environment which runs the tests
from an NFS share. Prior to D46898 the two libraries used by the test
were different (because the library name used to be embedded into the
binary), and after the change they became bit-to-bit identical. This
causes dlopen to return the same handle when these two libraries are
loaded from an NFS share, and the test expects two different handles.

This patch reverts the part of D46898 that is responsible for
changing the linker flags.

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

llvm-svn: 334394

6 years ago[cmake] Detect presence of wide-char libedit at build time
Pavel Labath [Mon, 11 Jun 2018 09:14:26 +0000 (09:14 +0000)]
[cmake] Detect presence of wide-char libedit at build time

Summary:
Instead of hardcoding a list of platforms where libedit is known to have
wide char support we detect this in cmake. The main motivation for this
is attempting to improve compatibility with different versions of
libedit, as the interface of non-wide-char functions varies slightly
between versions.

Reviewers: krytarowski, uweigand, jankratochvil, timshen, beanz

Subscribers: mgorny, lldb-commits

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

llvm-svn: 334393

6 years ago[ELF] Pass a pointer to InputFile to the getRelocTargetVA to escape dereferencing...
Simon Atanasyan [Mon, 11 Jun 2018 08:37:19 +0000 (08:37 +0000)]
[ELF] Pass a pointer to InputFile to the getRelocTargetVA to escape dereferencing of nullptr. NFC

llvm-svn: 334392

6 years ago[ExynosM1][Sched] Fix resource usage in scheduling model.
Clement Courbet [Mon, 11 Jun 2018 07:33:08 +0000 (07:33 +0000)]
[ExynosM1][Sched] Fix resource usage in scheduling model.

This is part of https://reviews.llvm.org/D46356.

llvm-svn: 334391

6 years ago[ELF][MIPS] Multi-GOT implementation
Simon Atanasyan [Mon, 11 Jun 2018 07:24:31 +0000 (07:24 +0000)]
[ELF][MIPS] Multi-GOT implementation

Almost all entries inside MIPS GOT are referenced by signed 16-bit
index. Zero entry lies approximately in the middle of the GOT. So the
total number of GOT entries cannot exceed ~16384 for 32-bit architecture
and ~8192 for 64-bit architecture. This limitation makes impossible to
link rather large application like for example LLVM+Clang. There are two
workaround for this problem. The first one is using the -mxgot
compiler's flag. It enables using a 32-bit index to access GOT entries.
But each access requires two assembly instructions two load GOT entry
index to a register. Another workaround is multi-GOT. This patch
implements it.

Here is a brief description of multi-GOT for detailed one see the
following link https://dmz-portal.mips.com/wiki/MIPS_Multi_GOT.

If the sum of local, global and tls entries is less than 64K only single
got is enough. Otherwise, multi-got is created. Series of primary and
multiple secondary GOTs have the following layout:
```
- Primary GOT
    Header
    Local entries
    Global entries
    Relocation only entries
    TLS entries

- Secondary GOT
    Local entries
    Global entries
    TLS entries
...
```

All GOT entries required by relocations from a single input file
entirely belong to either primary or one of secondary GOTs. To reference
GOT entries each GOT has its own _gp value points to the "middle" of the
GOT. In the code this value loaded to the register which is used for GOT
access.

MIPS 32 function's prologue:
```
lui     v0,0x0
0: R_MIPS_HI16  _gp_disp
addiu   v0,v0,0
4: R_MIPS_LO16  _gp_disp
```

MIPS 64 function's prologue:
```
lui     at,0x0
14: R_MIPS_GPREL16  main
```

Dynamic linker does not know anything about secondary GOTs and cannot
use a regular MIPS mechanism for GOT entries initialization. So we have
to use an approach accepted by other architectures and create dynamic
relocations R_MIPS_REL32 to initialize global entries (and local in case
of PIC code) in secondary GOTs. But ironically MIPS dynamic linker
requires GOT entries and correspondingly ordered dynamic symbol table
entries to deal with dynamic relocations. To handle this problem
relocation-only section in the primary GOT contains entries for all
symbols referenced in global parts of secondary GOTs. Although the sum
of local and normal global entries of the primary got should be less
than 64K, the size of the primary got (including relocation-only entries
can be greater than 64K, because parts of the primary got that overflow
the 64K limit are used only by the dynamic linker at dynamic link-time
and not by 16-bit gp-relative addressing at run-time.

The patch affects common LLD code in the following places:

- Added new hidden -mips-got-size flag. This flag required to set low
maximum size of a single GOT to be able to test the implementation using
small test cases.

- Added InputFile argument to the getRelocTargetVA function. The same
symbol referenced by GOT relocation from different input file might be
allocated in different GOT. So result of relocation depends on the file.

- Added new ctor to the DynamicReloc class. This constructor records
settings of dynamic relocation which used to adjust address of 64kb page
lies inside a specific output section.

With the patch LLD is able to link all LLVM+Clang+LLD applications and
libraries for MIPS 32/64 targets.

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

llvm-svn: 334390

6 years ago[X86] Explicitly mark unsupported classes in scheduling models.
Clement Courbet [Mon, 11 Jun 2018 07:00:08 +0000 (07:00 +0000)]
[X86] Explicitly mark unsupported classes in scheduling models.

Summary: In preparation for D47721. HSW and SNB still define unsupported
classes as they are used by KNL and generic models respectively.

Reviewers: RKSimon

Subscribers: llvm-commits

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

llvm-svn: 334389

6 years ago[MS ABI] Mangle unnamed empty enums (PR37723)
Hans Wennborg [Mon, 11 Jun 2018 06:54:23 +0000 (06:54 +0000)]
[MS ABI] Mangle unnamed empty enums (PR37723)

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

llvm-svn: 334388

6 years ago[X86] Add encoding tests for avx5124fmaps and avx5124vnni instructions.
Craig Topper [Mon, 11 Jun 2018 06:22:41 +0000 (06:22 +0000)]
[X86] Add encoding tests for avx5124fmaps and avx5124vnni instructions.

I forgot to git add these in r333812

llvm-svn: 334387

6 years ago[X86] Add test files for upgrade of vbmi2 expand load and compress store intrinsics...
Craig Topper [Mon, 11 Jun 2018 06:20:24 +0000 (06:20 +0000)]
[X86] Add test files for upgrade of vbmi2 expand load and compress store intrinsics that was done in r334381.

llvm-svn: 334386

6 years ago[X86] Remove masking from dbpsadbw builtins, use select builtin instead.
Craig Topper [Mon, 11 Jun 2018 06:18:29 +0000 (06:18 +0000)]
[X86] Remove masking from dbpsadbw builtins, use select builtin instead.

llvm-svn: 334385

6 years ago[X86] Remove masking from dbpsadbw intrinsics, use select in IR instead.
Craig Topper [Mon, 11 Jun 2018 06:18:22 +0000 (06:18 +0000)]
[X86] Remove masking from dbpsadbw intrinsics, use select in IR instead.

llvm-svn: 334384

6 years ago[Sparc] Add support for 13-bit PIC
Daniel Cederman [Mon, 11 Jun 2018 05:50:08 +0000 (05:50 +0000)]
[Sparc] Add support for 13-bit PIC

Summary: When compiling with -fpic, in contrast to -fPIC, use only the
immediate field to index into the GOT. This saves space if the GOT is
known to be small. The linker will warn if the GOT is too large for
this method.

Reviewers: jyknight, venkatra

Reviewed By: jyknight

Subscribers: brad, fedor.sergeev, jrtc27, llvm-commits

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

llvm-svn: 334383

6 years ago[CodeView] Omit forward references for unnamed structs and unions
Brock Wyma [Mon, 11 Jun 2018 01:39:34 +0000 (01:39 +0000)]
[CodeView] Omit forward references for unnamed structs and unions

Codeview references to unnamed structs and unions are expected to refer to the
complete type definition instead of a forward reference so Visual Studio can
resolve the type properly.

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

llvm-svn: 334382

6 years ago[X86] Remove and autoupgrade the expandload and compressstore intrinsics.
Craig Topper [Mon, 11 Jun 2018 01:25:22 +0000 (01:25 +0000)]
[X86] Remove and autoupgrade the expandload and compressstore intrinsics.

We use the target independent intrinsics now.

llvm-svn: 334381

6 years ago[TableGen] Make better use of std::map::emplace and emplace construct the object...
Craig Topper [Sun, 10 Jun 2018 23:15:49 +0000 (23:15 +0000)]
[TableGen] Make better use of std::map::emplace and emplace construct the object in the map rather than moving it into it. Remove a use std::map::find by remembering the return from emplace.

llvm-svn: 334380

6 years ago[TableGen] Combine two constructors by taking vectors by value instead of trying...
Craig Topper [Sun, 10 Jun 2018 23:15:48 +0000 (23:15 +0000)]
[TableGen] Combine two constructors by taking vectors by value instead of trying to support combininations for rvalue and lvalue references.

llvm-svn: 334379