platform/upstream/llvm.git
6 years ago[LLD] Fix Microsoft precompiled headers cross-compile on Linux
Alexandre Ganea [Thu, 8 Nov 2018 14:42:37 +0000 (14:42 +0000)]
[LLD] Fix Microsoft precompiled headers cross-compile on Linux

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

llvm-svn: 346403

6 years ago[X86][SSE] Add PR39387 shuffle test case
Simon Pilgrim [Thu, 8 Nov 2018 14:07:17 +0000 (14:07 +0000)]
[X86][SSE] Add PR39387 shuffle test case

llvm-svn: 346402

6 years ago[ARM] Enable spilling of the hGPR register class in Thumb2
Petr Pavlu [Thu, 8 Nov 2018 13:02:10 +0000 (13:02 +0000)]
[ARM] Enable spilling of the hGPR register class in Thumb2

Generalize code in Thumb2InstrInfo::storeRegToStackSlot() and
loadRegToStackSlot() to allow the GPR class or any of its sub-classes
(including hGPR) to be stored/loaded by ARM::t2STRi12/ARM::t2LDRi12.

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

llvm-svn: 346401

6 years ago[llvm-exegesis][NFC] Add missing header guard + cosmetics.
Clement Courbet [Thu, 8 Nov 2018 12:37:56 +0000 (12:37 +0000)]
[llvm-exegesis][NFC] Add missing header guard + cosmetics.

Reviewers: gchatelet

Reviewed By: gchatelet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 346400

6 years ago[X86][AVX] Tidyup prefixes and regenerate interleaved tests
Simon Pilgrim [Thu, 8 Nov 2018 12:14:10 +0000 (12:14 +0000)]
[X86][AVX] Tidyup prefixes and regenerate interleaved tests

Share common AVX prefix and split off AVX2OR512 prefix instead

llvm-svn: 346399

6 years agoRevert "[llvm-exegesis] Add a snippet generator to generate snippets to compute ROB...
Clement Courbet [Thu, 8 Nov 2018 12:09:45 +0000 (12:09 +0000)]
Revert "[llvm-exegesis] Add a snippet generator to generate snippets to compute ROB sizes."

This reverts accidental commit rL346394.

llvm-svn: 346398

6 years agoReturn "[IndVars] Smart hard uses detection"
Max Kazantsev [Thu, 8 Nov 2018 11:54:35 +0000 (11:54 +0000)]
Return "[IndVars] Smart hard uses detection"

The patch has been reverted because it ended up prohibiting propagation
of a constant to exit value. For such values, we should skip all checks
related to hard uses because propagating a constant is always profitable.

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

llvm-svn: 346397

6 years agoAdding Yvan as release test backup for Diana
Renato Golin [Thu, 8 Nov 2018 11:51:27 +0000 (11:51 +0000)]
Adding Yvan as release test backup for Diana

Thanks for offering to help, Yvan! :)

llvm-svn: 346396

6 years ago[llvm-exegesis] Add a snippet generator to generate snippets to compute ROB sizes.
Clement Courbet [Thu, 8 Nov 2018 11:45:14 +0000 (11:45 +0000)]
[llvm-exegesis] Add a snippet generator to generate snippets to compute ROB sizes.

llvm-svn: 346394

6 years agoclang-cl: Add "/clang:" pass-through arg support.
Hans Wennborg [Thu, 8 Nov 2018 11:27:04 +0000 (11:27 +0000)]
clang-cl: Add "/clang:" pass-through arg support.

The clang-cl driver disables access to command line options outside of the
"Core" and "CLOption" sets of command line arguments. This filtering makes it
impossible to pass arguments that are interpreted by the clang driver and not
by either 'cc1' (the frontend) or one of the other tools invoked by the driver.

An example driver-level flag is the '-fno-slp-vectorize' flag, which is
processed by the driver in Clang::ConstructJob and used to set the cc1 flag
"-vectorize-slp". There is no negative cc1 flag or -mllvm flag, so it is not
currently possible to disable the SLP vectorizer from the clang-cl driver.

This change introduces the "/clang:" argument that is available when the
driver mode is set to CL compatibility. This option works similarly to the
"-Xclang" option, except that the option values are processed by the clang
driver rather than by 'cc1'. An example usage is:

  clang-cl /clang:-fno-slp-vectorize /O2 test.c

Another example shows how "/clang:" can be used to pass a flag where there is
a conflict between a clang-cl compat option and an overlapping clang driver
option:

  clang-cl /MD /clang:-MD /clang:-MF /clang:test_dep_file.dep test.c

In the previous example, the unprefixed /MD selects the DLL version of the msvc
CRT, while the prefixed -MD flag and the -MF flags are used to create a make
dependency file for included headers.

One note about flag ordering: the /clang: flags are concatenated to the end of
the argument list, so in cases where the last flag wins, the /clang: flags
will be chosen regardless of their order relative to other flags on the driver
command line.

Patch by Neeraj K. Singh!

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

llvm-svn: 346393

6 years ago[OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension
Andrew Savonichev [Thu, 8 Nov 2018 11:25:41 +0000 (11:25 +0000)]
[OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

Summary:
Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt

Patch by Kristina Bessonova

Reviewers: Anastasia, yaxunl, shafik

Reviewed By: Anastasia

Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits

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

llvm-svn: 346392

6 years ago[MSP430] Fix encodeInstruction() for big endian hosts
Anton Korobeynikov [Thu, 8 Nov 2018 10:17:52 +0000 (10:17 +0000)]
[MSP430] Fix encodeInstruction() for big endian hosts

Reviewers: asl

Subscribers: llvm-commits

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

llvm-svn: 346391

6 years ago[LSR] Combine unfolded offset into invariant register
Gil Rapaport [Thu, 8 Nov 2018 09:01:19 +0000 (09:01 +0000)]
[LSR] Combine unfolded offset into invariant register

LSR reassociates constants as unfolded offsets when the constants fit as
immediate add operands, which currently prevents such constants from being
combined later with loop invariant registers.
This patch modifies GenerateCombinations() to generate a second formula which
includes the unfolded offset in the combined loop-invariant register.

This commit fixes a bug in the original patch (committed at r345114, reverted
at r345123).

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

llvm-svn: 346390

6 years ago[SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCond
Max Kazantsev [Thu, 8 Nov 2018 05:07:58 +0000 (05:07 +0000)]
[SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCond

We have a lot of various bugs that are caused by misuse of SCEV (in particular in LV),
all of them can simply be described as "we ask SCEV to prove some fact on invalid IR".
Some of examples of those are PR36311, PR37221, PR39160.

The problem is that these failues manifest differently (what we saw was failure of various
asserts across SCEV, but there can also be miscompiles). This patch adds an assert into two
SCEV methods that strongly rely on correctness of the IR and are involved in known failues.
This will at least allow us to have a clear indication of what was wrong in this case.

This patch also fixes a unit test with incorrect IR that fails this verification.

Differential Revision: https://reviews.llvm.org/D52930
Reviewed By: fhahn

llvm-svn: 346389

6 years ago[bindings/go] Add Go bindings to LLVMGetIndices
whitequark [Thu, 8 Nov 2018 04:04:04 +0000 (04:04 +0000)]
[bindings/go] Add Go bindings to LLVMGetIndices

Summary: This instruction is useful for inspecting extractvalue/insertvalue in IR. Unlike most other operations, indices cannot be inspected using the generic Value.Opcode() function so a specialized function needs to be added.

Reviewers: whitequark, pcc

Reviewed By: whitequark

Subscribers: llvm-commits

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

llvm-svn: 346388

6 years ago[OCaml] Fix incorrect use of CAMLlocal in nested blocks
whitequark [Thu, 8 Nov 2018 04:00:18 +0000 (04:00 +0000)]
[OCaml] Fix incorrect use of CAMLlocal in nested blocks

Summary:
The OCaml manual states:

> Local variables of type value must be declared with one of the
> CAMLlocal macros. [...] These macros must be used at the beginning
> of the function, not in a nested block.

This patch moves several instances of CAMLlocal macros from nested
blocks to the function beginning.

Reviewers: whitequark

Reviewed By: whitequark

Subscribers: CodaFi, llvm-commits

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

llvm-svn: 346387

6 years ago[MergeFuncs] Improve ordering of equal functions
whitequark [Thu, 8 Nov 2018 03:58:01 +0000 (03:58 +0000)]
[MergeFuncs] Improve ordering of equal functions

Summary:
MergeFunctions currently tries to process strong functions before
weak functions, because weak functions can simply call strong
functions, while a strong/weak function cannot call a weak function
(a backing strong function is needed).

This patch additionally tries to process external functions before
local functions, because we definitely have to keep the external
function, but may be able to drop the local one (and definitely
can if it is also unnamed_addr).

Unfortunately, this exposes an existing bug in the implementation:
The FnTree and FNodesInTree structures can currently go out of
sync in the case where two weak functions are merged, because the
function in FnTree/FNodesInTree is RAUWed. This leaves it behind in
FnTree (this is intended, as it is the strong backing function which
should be used for further merges), while it is replaced in
FNodesInTree (this is not intended).

This is fixed by switching FNodesInTree from using a ValueMap to
using a DenseMap of AssertingVH.

This exposes another minor issue: Currently FNodesInTree is not
cleared after MergeFunctions finishes running. Currently, this is
potentially dangerous (e.g. if something else wants to RAUW a function
with a non-function), but at the very least it is unnecessary/inefficient.
After the change to use AssertingVH it becomes more problematic,
because there are certainly passes that remove functions.

This issue is fixed by clearing FNodesInTree at the end of the pass.

Reviewers: jfb, whitequark

Reviewed By: whitequark

Subscribers: rkruppe, llvm-commits

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

llvm-svn: 346386

6 years ago[MergeFuncs] Call removeUsers() prior to unnamed_addr RAUW
whitequark [Thu, 8 Nov 2018 03:57:55 +0000 (03:57 +0000)]
[MergeFuncs] Call removeUsers() prior to unnamed_addr RAUW

Summary:
For unnamed_addr functions we RAUW instead of only replacing direct callers. However, functions in which replacements were performed currently are not added back to the worklist, resulting in missed merging opportunities.

Fix this by calling removeUsers() prior to RAUW.

Reviewers: jfb, whitequark

Reviewed By: whitequark

Subscribers: rkruppe, llvm-commits

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

llvm-svn: 346385

6 years ago[WebAssembly] Add V128 to WebAssemblyInstrInfo::copyPhysReg
Thomas Lively [Thu, 8 Nov 2018 02:35:28 +0000 (02:35 +0000)]
[WebAssembly] Add V128 to WebAssemblyInstrInfo::copyPhysReg

Reviewers: aheejin, dschuff

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

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

llvm-svn: 346384

6 years agoRevert "Reorder FindPythonInterp so that config-ix can use PYTHON_EXECUTABLE"
Nathan Lanza [Thu, 8 Nov 2018 01:10:24 +0000 (01:10 +0000)]
Revert "Reorder FindPythonInterp so that config-ix can use PYTHON_EXECUTABLE"

This reverts commit rL346367 due to test error in compiler-rt.

llvm-svn: 346383

6 years ago[sancov] Put .SCOV* sections into the right comdat groups on COFF
Reid Kleckner [Thu, 8 Nov 2018 00:57:33 +0000 (00:57 +0000)]
[sancov] Put .SCOV* sections into the right comdat groups on COFF

Avoids linker errors about relocations against discarded sections.

This was uncovered during the Chromium clang roll here:
https://chromium-review.googlesource.com/c/chromium/src/+/1321863#message-717516acfcf829176f6a2f50980f7a4bdd66469a

After this change, Chromium's libGLESv2 links successfully for me.

Reviewers: metzman, hans, morehouse

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

llvm-svn: 346381

6 years agoNFC: DebugInfo: Track the origin CU rather than just the base address for range lists
David Blaikie [Thu, 8 Nov 2018 00:35:54 +0000 (00:35 +0000)]
NFC: DebugInfo: Track the origin CU rather than just the base address for range lists

Turns out knowing more than just the base address might be useful -
specifically a future change to respect a DICompileUnit flag for the use
of base address specifiers in DWARF < 5.

llvm-svn: 346380

6 years ago[MachineOutliner][NFC] Only map blocks which have adjacent legal instructions
Jessica Paquette [Thu, 8 Nov 2018 00:33:38 +0000 (00:33 +0000)]
[MachineOutliner][NFC] Only map blocks which have adjacent legal instructions

If a block doesn't have any ranges of adjacent legal instructions, then it
can't have outlining candidates. There's no point in mapping legal isntructions
in situations like this.

I noticed this reduces the size of the suffix tree in sqlite3 for AArch64 at
-Oz by about 3%.

llvm-svn: 346379

6 years ago[clang] Set CMP0075 to new
Shoaib Meenai [Thu, 8 Nov 2018 00:29:33 +0000 (00:29 +0000)]
[clang] Set CMP0075 to new

Make the check_include_file* macros honor CMAKE_REQUIRED_LIBRARIES. This
shouldn't cause any of the configuration checks to give different
results, and I verified that a clean configure before and after this
change resulted in identical CMake caches on my machine. The same change
was done for LLVM in r346377.

llvm-svn: 346378

6 years ago[cmake] Set CMP0075 to NEW
Shoaib Meenai [Thu, 8 Nov 2018 00:18:12 +0000 (00:18 +0000)]
[cmake] Set CMP0075 to NEW

Make the check_include_file* macros honor CMAKE_REQUIRED_LIBRARIES. This
shouldn't cause any of the configuration checks to give different
results (and I did clean configures before and after this change and
confirmed that the resulting CMake caches were identical, though of
course that's just one machine). This suppresses a warning when building
with CMake 3.12 or later.

This doesn't suppress the warning in clang, because clang does its own
cmake_minimum_required call even when being built in-tree, and that
resets all policy settings. I'll address that separately.

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

llvm-svn: 346377

6 years ago[AMDGPU] Extend promote alloca vectorization
Stanislav Mekhanoshin [Thu, 8 Nov 2018 00:16:23 +0000 (00:16 +0000)]
[AMDGPU] Extend promote alloca vectorization

Promote alloca can vectorize a small array by bitcasting it to a
vector type. Extend vectorization for the case when alloca is
already a vector type. We still want to replace GEPs with an
insert/extract element instructions in this case.

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

llvm-svn: 346376

6 years ago[FileSystem] Add convenience method to check for directories.
Jonas Devlieghere [Thu, 8 Nov 2018 00:14:50 +0000 (00:14 +0000)]
[FileSystem] Add convenience method to check for directories.

Replace calls to LLVM's is_directory with calls to LLDB's FileSytem
class. For this I introduced a new convenience method that, like the
other methods, takes either a path or filespec. This still uses the LLVM
functions under the hood.

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

llvm-svn: 346375

6 years ago[MSP430] Add MC layer
Anton Korobeynikov [Thu, 8 Nov 2018 00:03:45 +0000 (00:03 +0000)]
[MSP430] Add MC layer

Summary:
This change implements assembler parser, code emitter, ELF object writer
and disassembler for the MSP430 ISA.  Also, more instruction forms are added
to the target description.

Reviewers: asl

Reviewed By: asl

Subscribers: pftbest, krisb, mgorny, llvm-commits

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

llvm-svn: 346374

6 years ago[MachineOutliner][NFC] Don't map MBBs that don't contain legal instructions
Jessica Paquette [Thu, 8 Nov 2018 00:02:11 +0000 (00:02 +0000)]
[MachineOutliner][NFC] Don't map MBBs that don't contain legal instructions

I noticed that there are lots of basic blocks that don't have enough legal
instructions in them to warrant outlining. We can skip mapping these entirely.

In sqlite3, compiled for AArch64 at -Oz, this results in a 10% reduction of
the total nodes in the suffix tree. These nodes can never be part of a
repeated substring, and so they don't impact the result at all.

Before this, there were 62128 nodes in the tree for sqlite3. After this, there
are 56457 nodes.

llvm-svn: 346373

6 years agoExtend virtual file system with `isLocal` method
Jonas Devlieghere [Thu, 8 Nov 2018 00:01:32 +0000 (00:01 +0000)]
Extend virtual file system with `isLocal` method

Expose the `llvm::sys::fs::is_local` function through the VFS.

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

llvm-svn: 346372

6 years ago[llvm-readobj] Implement LLVM style printer for --notes
Jordan Rupprecht [Wed, 7 Nov 2018 23:53:50 +0000 (23:53 +0000)]
[llvm-readobj] Implement LLVM style printer for --notes

Summary:
Port the GNU style printNotes method to the LLVMStyle subclass.

This is basically just a heavy refactor so that the note parsing/formatting logic from the GNUStyle::printNotes can be shared with LLVMStyle::printNotes.

Reviewers: MaskRay

Reviewed By: MaskRay

Subscribers: dschuff, fedor.sergeev, llvm-commits

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

llvm-svn: 346371

6 years ago[PGO] Exit early if all count values are zero
Rong Xu [Wed, 7 Nov 2018 23:51:20 +0000 (23:51 +0000)]
[PGO] Exit early if all count values are zero

If all the edge counts for a function are zero, skip count population and
annotation, as nothing will happen. This can save some compile time.

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

llvm-svn: 346370

6 years agoFix -Wimplicit-fallthrough warning
Fangrui Song [Wed, 7 Nov 2018 23:51:13 +0000 (23:51 +0000)]
Fix -Wimplicit-fallthrough warning

Reviewers: EricWF, ldionne, mclow.lists

Reviewed By: ldionne

Subscribers: christof, libcxx-commits

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

llvm-svn: 346369

6 years agoAdd 'REQUIRES: default_triple' to test/CodeGen/MIR/X86/zero-probability.mir
Daniel Sanders [Wed, 7 Nov 2018 23:33:55 +0000 (23:33 +0000)]
Add 'REQUIRES: default_triple' to test/CodeGen/MIR/X86/zero-probability.mir

llvm-svn: 346368

6 years agoReorder FindPythonInterp so that config-ix can use PYTHON_EXECUTABLE
Nathan Lanza [Wed, 7 Nov 2018 23:22:09 +0000 (23:22 +0000)]
Reorder FindPythonInterp so that config-ix can use PYTHON_EXECUTABLE

Summary:
Code in config-ix tries to call `PYTHON_EXECUTABLE` to search for some
python modules but that variable isn't set until the moved chunk of
code that finds Python is called.

Reorder it so CMake can use PYTHON_EXECUTABLE

Subscribers: mgorny, llvm-commits

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

llvm-svn: 346367

6 years ago[AArch64] [Windows] Address post-commit review comment on r346358.
Eli Friedman [Wed, 7 Nov 2018 22:30:56 +0000 (22:30 +0000)]
[AArch64] [Windows] Address post-commit review comment on r346358.

In this context, usesWindowsCFI() is basically the same thing as
isOSWindows(), but it makes the relevant property of the target
more explicit.

llvm-svn: 346366

6 years agoAdd parentheses to silence warning.
Jorge Gorbe Moya [Wed, 7 Nov 2018 22:30:01 +0000 (22:30 +0000)]
Add parentheses to silence warning.

DWARFContext.cpp:356:20: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]

llvm-svn: 346365

6 years agoRevert "AMDGPU: Divergence-driven selection of scalar buffer load intrinsics"
Nicolai Haehnle [Wed, 7 Nov 2018 21:53:43 +0000 (21:53 +0000)]
Revert "AMDGPU: Divergence-driven selection of scalar buffer load intrinsics"

This reverts commit r344696 for now (except for some test additions).

See https://bugs.freedesktop.org/show_bug.cgi?id=108611.

llvm-svn: 346364

6 years agoAMDGPU/InsertWaitcnts: Cleanup some old cruft (NFCI)
Nicolai Haehnle [Wed, 7 Nov 2018 21:53:36 +0000 (21:53 +0000)]
AMDGPU/InsertWaitcnts: Cleanup some old cruft (NFCI)

Summary: Remove redundant logic and simplify control flow.

Reviewers: msearles, rampitec, scott.linder, kanarayan

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

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

llvm-svn: 346363

6 years agoAMDGPU/InsertWaitcnts: Remove kill-related logic
Nicolai Haehnle [Wed, 7 Nov 2018 21:53:29 +0000 (21:53 +0000)]
AMDGPU/InsertWaitcnts: Remove kill-related logic

Summary:
This is not needed, because we don't actually insert relevant branches
for KILLs that late in the compilation flow.

Besides, this was always checking for the wrong kill opcode anyway...

Reviewers: msearles, rampitec, scott.linder, kanarayan

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

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

llvm-svn: 346362

6 years agoAMDGPU/NFC: Split FLAT_Global_Atomic_Pseudo into RTN/NO_RTN multiclasses
Konstantin Zhuravlyov [Wed, 7 Nov 2018 21:42:13 +0000 (21:42 +0000)]
AMDGPU/NFC: Split FLAT_Global_Atomic_Pseudo into RTN/NO_RTN multiclasses

llvm-svn: 346361

6 years ago[DWARFv5] Read and dump multiple .debug_info sections.
Paul Robinson [Wed, 7 Nov 2018 21:39:09 +0000 (21:39 +0000)]
[DWARFv5] Read and dump multiple .debug_info sections.
Type units go in .debug_info comdats, not .debug_types, in v5.

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

llvm-svn: 346360

6 years agoFix spelling error
Adrian Prantl [Wed, 7 Nov 2018 21:34:33 +0000 (21:34 +0000)]
Fix spelling error

llvm-svn: 346359

6 years ago[AArch64] [Windows] Trap after noreturn calls.
Eli Friedman [Wed, 7 Nov 2018 21:31:14 +0000 (21:31 +0000)]
[AArch64] [Windows] Trap after noreturn calls.

Like the comment says, this isn't the most efficient fix in terms of
codesize, but it works.

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

llvm-svn: 346358

6 years agoAMDGPU/NFC: Split MUBUF_Pseudo_Atomics into RTN/NO_RTN multiclasses
Konstantin Zhuravlyov [Wed, 7 Nov 2018 21:21:32 +0000 (21:21 +0000)]
AMDGPU/NFC: Split MUBUF_Pseudo_Atomics into RTN/NO_RTN multiclasses

llvm-svn: 346357

6 years ago[PPC64] Use INT32_MIN instead of std::numeric_limits<int32_t>::min()
Fangrui Song [Wed, 7 Nov 2018 21:14:54 +0000 (21:14 +0000)]
[PPC64] Use INT32_MIN instead of std::numeric_limits<int32_t>::min()

Summary:
D53821 fixed the bogus MSVC (at least 2017) C4146 warning (unary minus applied on unsigned type)
by using std::numeric_limits<int32_t>::min().
The warning was because -2147483648 is incorrectly treated as unsigned long instead of long long)

Let's use INT32_MIN which is arguably more readable.
Note, on GCC or clang, -0x80000000 works fine (ILP64: long, LP64: long long).

Reviewers: ruiu, jhenderson, sfertile, espindola

Reviewed By: sfertile

Subscribers: emaste, nemanjai, arichardson, kbarton, jsji, llvm-commits

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

llvm-svn: 346356

6 years ago[ARM] Fix CPSR liveness in tMOVCCr_pseudo lowering.
Eli Friedman [Wed, 7 Nov 2018 21:08:13 +0000 (21:08 +0000)]
[ARM] Fix CPSR liveness in tMOVCCr_pseudo lowering.

The lowering was missing live-ins in certain cases, like a sequence of
multiple tMOVCCr_pseudo instructions.  This would lead to a verifier
failure, and on pre-v6 Thumb CPSR would be incorrectly clobbered.

For reasons I don't completely understand, it's hard to get a sequence
of multiple tMOVCCr_pseudo instructions; the issue only seems to show up
with 64-bit comparisons where the result is zero-extended. I added some
extra testcases in case that changes in the future. Probably some
optimization opportunities here if anyone is interested. (@test_slt_not
is the case that was getting miscompiled.)

The code to check the liveness of CPSR was stolen from
X86ISelLowering.cpp; maybe it could be refactored into common helper,
but I have no idea where to put it.

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

llvm-svn: 346355

6 years agoAMDGPU/Docs: Add product names for Vega20
Konstantin Zhuravlyov [Wed, 7 Nov 2018 20:54:16 +0000 (20:54 +0000)]
AMDGPU/Docs: Add product names for Vega20

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

llvm-svn: 346354

6 years agoAllow subclassing ExternalAA
Matt Arsenault [Wed, 7 Nov 2018 20:26:42 +0000 (20:26 +0000)]
Allow subclassing ExternalAA

This allows testing AMDGPU alias analysis like any
other alias analysis pass. This fixes the existing
test pointlessly running opt -O3 when it really
just wants to run the one analysis.

Before there was no way to test this using -aa-eval
with opt, since the default constructed pass
is run. The wrapper subclass allows the
default constructor to pass the necessary callback.

llvm-svn: 346353

6 years agoSplit lgammal() from INIT_LGAMMAL
Kamil Rytarowski [Wed, 7 Nov 2018 20:19:53 +0000 (20:19 +0000)]
Split lgammal() from INIT_LGAMMAL

Summary:
Introduce SANITIZER_INTERCEPT_LGAMMAL
dedicated for lgammal(). Disable it for NetBSD
as this routine is not implemented in this OS.

Installation of supernumerary interceptors causes
leaking of errors to dlsym(3)-like operations.

Reviewers: joerg, vitalybuka

Reviewed By: vitalybuka

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

Tags: #sanitizers

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

llvm-svn: 346352

6 years agoSplit remquol() from INIT_REMQUO
Kamil Rytarowski [Wed, 7 Nov 2018 20:18:36 +0000 (20:18 +0000)]
Split remquol() from INIT_REMQUO

Summary:
Introduce SANITIZER_INTERCEPT_REMQUOL
dedicated for remquol(). Disable for for NetBSD
as this routine is not implemented in this OS.

Installation of supernumerary interceptors causes
leaking of errors to dlsym(3)-like operations.

Reviewers: joerg, vitalybuka

Reviewed By: vitalybuka

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

Tags: #sanitizers

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

llvm-svn: 346351

6 years ago[SimpleLoopUnswitch] partial unswitch needs to be careful when replacing invariants...
Fedor Sergeev [Wed, 7 Nov 2018 20:05:11 +0000 (20:05 +0000)]
[SimpleLoopUnswitch] partial unswitch needs to be careful when replacing invariants with constants

When partial unswitch operates on multiple conditions at once, .e.g:
   if (Cond1 || Cond2 || NonInv) ...

it should infer (and replace) values for individual conditions only on one
side of unswitch and not another.

More precisely only these derivations hold true:
   (Cond1 || Cond2) == false  =>  Cond1 == Cond2 == false
   (Cond1 && Cond2) == true   =>  Cond1 == Cond2 == true

By the way we organize unswitching it means only replacing on "continue" blocks
and never on "unswitched" ones. Since trivial unswitch does not have "unswitched"
blocks it does not have this problem.

Fixes PR 39568.

Reviewers: chandlerc, asbirlea
Differential Revision: https://reviews.llvm.org/D54211

llvm-svn: 346350

6 years ago[MachineOutliner][NFC] Remove Parent field from SuffixTreeNode
Jessica Paquette [Wed, 7 Nov 2018 19:56:13 +0000 (19:56 +0000)]
[MachineOutliner][NFC] Remove Parent field from SuffixTreeNode

This is only used for calculating ConcatLen. This isn't necessary,
since it's easily derived from the traversal setting suffix indices.

Remove that. Rename CurrIdx to CurrNodeLen to better describe what's
going on.

llvm-svn: 346349

6 years ago[Support] Fix line width to 80
Martin Elshuber [Wed, 7 Nov 2018 19:35:04 +0000 (19:35 +0000)]
[Support] Fix line width to 80

Test commit

llvm-svn: 346348

6 years agoRe-commit regularization of the lldb-gtest-build target.
Jason Molenda [Wed, 7 Nov 2018 19:28:03 +0000 (19:28 +0000)]
Re-commit regularization of the lldb-gtest-build target.

llvm-svn: 346347

6 years agoAdjust some id bit shifts to fit inside 32 bit integers
Nathan Lanza [Wed, 7 Nov 2018 19:27:36 +0000 (19:27 +0000)]
Adjust some id bit shifts to fit inside 32 bit integers

Summary:
The DAP on vscode uses a JavaScript `number` for identifiers while the
Visual Studio version uses a C# `Int` for identifiers. lldb-vscode is
bit shifting identifiers 32 bits and then bitwise ORing another 32 bit
identifier into a 64 bit id to form a unique ID. Change this to
a a partitioning of the 32 bits that makes sense for the data types.

Reviewers: clayborg

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

llvm-svn: 346346

6 years ago[MachineOutliner][NFC] Traverse suffix tree using a RepeatedSubstring iterator
Jessica Paquette [Wed, 7 Nov 2018 19:20:55 +0000 (19:20 +0000)]
[MachineOutliner][NFC] Traverse suffix tree using a RepeatedSubstring iterator

This takes the traversal methods introduced in r346269 and adapts them
into an iterator. This allows the outliner to iterate over repeated substrings
within the suffix tree directly without having to initially find all of the
substrings and then iterate over them after you've found them.

llvm-svn: 346345

6 years ago[llvm-mca] Move the AssembleInput logic into its own class.
Matt Davis [Wed, 7 Nov 2018 19:20:04 +0000 (19:20 +0000)]
[llvm-mca] Move the AssembleInput logic into its own class.

Summary:
This patch introduces a CodeRegionGenerator class which is responsible for parsing some type of input and creating a 'CodeRegions' instance for use by llvm-mca.  In the future, we will also have a CodeRegionGenerator subclass for converting an input object file into CodeRegions.  For now, we only have the subclass for converting input assembly into CodeRegions.

This is mostly a NFC patch, as the logic remains close to the original, but now encapsulated in its own class and moved outside of llvm-mca.cpp.

Reviewers: andreadb, courbet, RKSimon

Reviewed By: andreadb

Subscribers: mgorny, tschuett, gbedwell, llvm-commits

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

llvm-svn: 346344

6 years ago[OPENMP]Fix handling of the globals during compilation for the device.
Alexey Bataev [Wed, 7 Nov 2018 19:11:14 +0000 (19:11 +0000)]
[OPENMP]Fix handling of the globals during compilation for the device.

Fixed lookup for the target regions in unused virtual functions + fixed
processing of the global variables not marked as declare target but
emitted during debug info emission.

llvm-svn: 346343

6 years agoRevert r346285 until I can make it work correctly
Jason Molenda [Wed, 7 Nov 2018 18:38:15 +0000 (18:38 +0000)]
Revert r346285 until I can make it work correctly
the way the bots build lldb.

llvm-svn: 346342

6 years ago[llvm-mt] Accept and ignore notify_update flag
Petr Hosek [Wed, 7 Nov 2018 18:36:50 +0000 (18:36 +0000)]
[llvm-mt] Accept and ignore notify_update flag

This flag is being set by CMake when invoking mt.

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

llvm-svn: 346341

6 years ago[MachineOutliner] Don't store outlined function numberings on OutlinedFunction
Jessica Paquette [Wed, 7 Nov 2018 18:36:43 +0000 (18:36 +0000)]
[MachineOutliner] Don't store outlined function numberings on OutlinedFunction

NFC-ish. This doesn't change the behaviour of the outliner, but does make sure
that you won't end up with say

OUTLINED_FUNCTION_2:
...
ret

OUTLINED_FUNCTION_248:
...
ret

as the only outlined functions in your module. Those should really be

OUTLINED_FUNCTION_0:
...
ret

OUTLINED_FUNCTION_1:
...
ret

If we produce outlined functions, they probably should have sequential numbers
attached to them. This makes it a bit easier+stable to write outliner tests.

The point of this is to move towards a bit more stability in outlined function
names. By doing this, we at least don't rely on the traversal order of the
suffix tree. Instead, we rely on the order of the candidate list, which is
*far* more consistent. The candidate list is ordered by the end indices of
candidates, so we're more likely to get a stable ordering. This is still
susceptible to changes in the cost model though (like, if we suddenly find new
candidates, for example).

llvm-svn: 346340

6 years ago[CMake][ASan][HWASan] Set an explicit dependency on libc++ headers
Petr Hosek [Wed, 7 Nov 2018 18:35:44 +0000 (18:35 +0000)]
[CMake][ASan][HWASan] Set an explicit dependency on libc++ headers

We have seen failing builds due to a race condition between
RTAsan_dynamic and libc++ headers builds, specifically libc++
headers depend on __config and if this header hasn't been copied
into the final location, including other headers will typically
result in failure. To avoid this race, we add an explicit dependency
on libc++ headers which ensures that they've been copied into place
before the sanitizer object library build starts.

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

llvm-svn: 346339

6 years agoRevert r346326 [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation
Andrew Savonichev [Wed, 7 Nov 2018 18:34:19 +0000 (18:34 +0000)]
Revert r346326 [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation

This patch breaks Index/opencl-types.cl LIT test:

Script:
--
: 'RUN: at line 1';   stage1/bin/c-index-test -test-print-type llvm/tools/clang/test/Index/opencl-types.cl -cl-std=CL2.0 | stage1/bin/FileCheck llvm/tools/clang/test/Index/opencl-types.cl
--
Command Output (stderr):
--
llvm/tools/clang/test/Index/opencl-types.cl:3:26: warning: unsupported OpenCL extension 'cl_khr_fp16' - ignoring [-Wignored-pragmas]
llvm/tools/clang/test/Index/opencl-types.cl:4:26: warning: unsupported OpenCL extension 'cl_khr_fp64' - ignoring [-Wignored-pragmas]
llvm/tools/clang/test/Index/opencl-types.cl:8:9: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:11:8: error: declaring variable of type 'half' is not allowed
llvm/tools/clang/test/Index/opencl-types.cl:15:3: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:16:3: error: use of type 'double4' (vector of 4 'double' values) requires cl_khr_fp64 extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:26:26: warning: unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring [-Wignored-pragmas]
llvm/tools/clang/test/Index/opencl-types.cl:35:44: error: use of type '__read_only image2d_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:36:49: error: use of type '__read_only image2d_array_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:37:49: error: use of type '__read_only image2d_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:38:54: error: use of type '__read_only image2d_array_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled

llvm-svn: 346338

6 years ago[LoopSink] Do not sink instructions into non-cold blocks
Mandeep Singh Grang [Wed, 7 Nov 2018 18:26:24 +0000 (18:26 +0000)]
[LoopSink] Do not sink instructions into non-cold blocks

Summary: This fixes PR39570.

Reviewers: danielcdh, rnk, bkramer

Reviewed By: rnk

Subscribers: llvm-commits

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

llvm-svn: 346337

6 years ago[X86] improve split-stack machine BB placement
Than McIntosh [Wed, 7 Nov 2018 17:41:57 +0000 (17:41 +0000)]
[X86] improve split-stack machine BB placement

Summary:
The conditional branch created to support -fsplit-stack for X86 is
left unbiased/unhinted, resulting in less than ideal block placement:
the __morestack call block is kept on the main hot path. Bias the
branch to insure that the stack allocation block is treated as a
"cold" block during machine basic block placement.

Subscribers: llvm-commits

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

llvm-svn: 346336

6 years ago[NewGVN] Make sure we do not add a user to itself.
Florian Hahn [Wed, 7 Nov 2018 17:20:07 +0000 (17:20 +0000)]
[NewGVN] Make sure we do not add a user to itself.

If we simplify an instruction to itself, we do not need to add a user to
itself. For congruence classes with a defining expression, we already
use a similar logic.

Fixes PR38259.

Reviewers: davide, efriedma, mcrosier

Reviewed By: davide

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

llvm-svn: 346335

6 years agoWorkaround PPC backend bug in test for r346322.
James Y Knight [Wed, 7 Nov 2018 17:01:47 +0000 (17:01 +0000)]
Workaround PPC backend bug in test for r346322.

It seems that the PPC backend croaks when lowering a call to a
function with an argument of type [2 x i32].

Just modify the type slightly to avoid this -- I wasn't actually
intending to stress test the backend...

llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6172: llvm::SDValue llvm::PPCTargetLowering::LowerCall_64SVR4(...): Assertion `(!HasParameterArea || NumBytesActuallyUsed == ArgOffset) && "mismatch in size of parameter area"' failed.

llvm-svn: 346334

6 years ago[llvm-exegesis] Remove superfluous move.
Clement Courbet [Wed, 7 Nov 2018 16:52:50 +0000 (16:52 +0000)]
[llvm-exegesis] Remove superfluous move.

/Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/tools/llvm-exegesis/lib/X86/Target.cpp:155:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]
    return std::move(Error);
           ^
/Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/tools/llvm-exegesis/lib/X86/Target.cpp:155:12: note: remove std::move call here
    return std::move(Error);
           ^~~~~~~~~~     ~

llvm-svn: 346333

6 years agoFix ignorded type qualifier warning [NFC]
Serge Guelton [Wed, 7 Nov 2018 16:17:30 +0000 (16:17 +0000)]
Fix ignorded type qualifier warning [NFC]

llvm-svn: 346332

6 years ago[InstCombine] propagate FMF for fcmp+fabs folds
Sanjay Patel [Wed, 7 Nov 2018 16:15:01 +0000 (16:15 +0000)]
[InstCombine] propagate FMF for fcmp+fabs folds

By morphing the instruction rather than deleting and creating a new one,
we retain fast-math-flags and potentially other metadata (profile info?).

llvm-svn: 346331

6 years ago[llvm-exegesis] Correclty handle all X86 memory encoding formats.
Clement Courbet [Wed, 7 Nov 2018 16:14:55 +0000 (16:14 +0000)]
[llvm-exegesis] Correclty handle all X86 memory encoding formats.

Summary:
Add unit tests to check the support for each supported format to avoid
regressions such as the one in PR36906.

Reviewers: gchatelet

Subscribers: tschuett, lebedev.ri, llvm-commits

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

llvm-svn: 346330

6 years ago[Profile] Mark gcov-fork test as failing for arm
Calixte Denizet [Wed, 7 Nov 2018 15:58:18 +0000 (15:58 +0000)]
[Profile] Mark gcov-fork test as failing for arm

Summary: instrprof-gcov-fork.test is failing with arm so mark it as XFAIL

Reviewers: marco-c

Reviewed By: marco-c

Subscribers: javed.absar, kristof.beyls, delcypher, chrib, llvm-commits, sylvestre.ledru, #sanitizers

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

llvm-svn: 346329

6 years ago[llvm-exegesis] Increasing wrapping limit.
Clement Courbet [Wed, 7 Nov 2018 15:46:45 +0000 (15:46 +0000)]
[llvm-exegesis] Increasing wrapping limit.

Summary: Fixes PR39097.

Reviewers: gchatelet

Subscribers: llvm-commits, tschuett

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

llvm-svn: 346328

6 years ago[InstCombine] peek through fabs() when checking isnan()
Sanjay Patel [Wed, 7 Nov 2018 15:44:26 +0000 (15:44 +0000)]
[InstCombine] peek through fabs() when checking isnan()

That should be the end of the missing cases for this fold.
See earlier patches in this series:
rL346321
rL346324

llvm-svn: 346327

6 years ago[OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension
Andrew Savonichev [Wed, 7 Nov 2018 15:44:01 +0000 (15:44 +0000)]
[OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

Summary:
Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt

Patch by Kristina Bessonova

Reviewers: Anastasia, yaxunl, shafik

Reviewed By: Anastasia

Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits

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

llvm-svn: 346326

6 years ago[InstCombine] add tests for isnan(fabs(X)); NFC
Sanjay Patel [Wed, 7 Nov 2018 15:36:23 +0000 (15:36 +0000)]
[InstCombine] add tests for isnan(fabs(X)); NFC

llvm-svn: 346325

6 years ago[InstCombine] add folds for fcmp Pred fabs(X), 0.0
Sanjay Patel [Wed, 7 Nov 2018 15:33:03 +0000 (15:33 +0000)]
[InstCombine] add folds for fcmp Pred fabs(X), 0.0

Similar to rL346321, we had folds for the ordered
versions of these compares already, so add the
unordered siblings for completeness.

llvm-svn: 346324

6 years ago[InstCombine] add tests for more fcmp+fabs preds; NFC
Sanjay Patel [Wed, 7 Nov 2018 15:27:02 +0000 (15:27 +0000)]
[InstCombine] add tests for more fcmp+fabs preds; NFC

llvm-svn: 346323

6 years agoAdd support for llvm.is.constant intrinsic (PR4898)
James Y Knight [Wed, 7 Nov 2018 15:24:12 +0000 (15:24 +0000)]
Add support for llvm.is.constant intrinsic (PR4898)

This adds the llvm-side support for post-inlining evaluation of the
__builtin_constant_p GCC intrinsic.

Also fixed SCCPSolver::visitCallSite to not blow up when seeing a call
to a function where canConstantFoldTo returns true, and one of the
arguments is a struct.

Updated from patch initially by Janusz Sobczak.

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

llvm-svn: 346322

6 years ago[InstCombine] add fold for fabs(X) u< 0.0
Sanjay Patel [Wed, 7 Nov 2018 15:11:32 +0000 (15:11 +0000)]
[InstCombine] add fold for fabs(X) u< 0.0

The sibling fold for 'oge' --> 'ord' was already here,
but this half was missing.

The result of fabs() must be positive or nan, so asking
if the result is negative or nan is the same as asking
if the result is nan.

This is another step towards fixing:
https://bugs.llvm.org/show_bug.cgi?id=39475

llvm-svn: 346321

6 years ago[InstCombine] add test for fcmp+fabs; NFC
Sanjay Patel [Wed, 7 Nov 2018 15:01:09 +0000 (15:01 +0000)]
[InstCombine] add test for fcmp+fabs; NFC

llvm-svn: 346320

6 years ago[clangd] Drop namespace references in the index.
Haojian Wu [Wed, 7 Nov 2018 14:59:24 +0000 (14:59 +0000)]
[clangd] Drop namespace references in the index.

Summary:
Namespace references is less useful compared with other symbols, and
they contribute large part of the index. This patch drops them.
The number of refs is reduced from 5.4 million to 4.7 million.

|           |  Before | After |
|file size  |  78 MB  |  71MB |
|memory     |  330MB  |  300MB|

Reviewers: sammccall

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

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

llvm-svn: 346319

6 years agoFix unit tests after patch https://reviews.llvm.org/rL346313
Calixte Denizet [Wed, 7 Nov 2018 14:46:26 +0000 (14:46 +0000)]
Fix unit tests after patch https://reviews.llvm.org/rL346313

Summary: Tests are broken so fix them.

Reviewers: marco-c

Reviewed By: marco-c

Subscribers: sylvestre.ledru, llvm-commits

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

llvm-svn: 346318

6 years ago[InstCombine] add FMF to fcmp to show failure to propagate; NFC
Sanjay Patel [Wed, 7 Nov 2018 14:44:09 +0000 (14:44 +0000)]
[InstCombine] add FMF to fcmp to show failure to propagate; NFC

llvm-svn: 346317

6 years agofix typos aggressively; NFC
Sanjay Patel [Wed, 7 Nov 2018 14:35:36 +0000 (14:35 +0000)]
fix typos aggressively; NFC

llvm-svn: 346316

6 years ago[InstCombine] do not shrink switch conditions to illegal types (PR29009)
Sanjay Patel [Wed, 7 Nov 2018 14:12:41 +0000 (14:12 +0000)]
[InstCombine] do not shrink switch conditions to illegal types (PR29009)

This patch makes shrinking switch conditions less aggressive which was introduced by:
rL274233

Note that we have 2 new bugs to track potential follow-ups that might have solved PR29009
in different ways:
https://bugs.llvm.org/show_bug.cgi?id=39569
https://bugs.llvm.org/show_bug.cgi?id=39578

Patch by:
@dendibakh (Denis Bakhvalov)

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

llvm-svn: 346315

6 years ago[Profile] Fix fork test and add tests for execlp and execvp after patch https://revie...
Calixte Denizet [Wed, 7 Nov 2018 13:51:17 +0000 (13:51 +0000)]
[Profile] Fix fork test and add tests for execlp and execvp after patch https://reviews.llvm.org/D53593

Summary: This is a follow-up of patch https://reviews.llvm.org/D53593

Reviewers: marco-c

Reviewed By: marco-c

Subscribers: delcypher, llvm-commits, #sanitizers, sylvestre.ledru

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

llvm-svn: 346314

6 years ago[GCOV] Flush counters before to avoid counting the execution before fork twice and...
Calixte Denizet [Wed, 7 Nov 2018 13:49:17 +0000 (13:49 +0000)]
[GCOV] Flush counters before to avoid counting the execution before fork twice and for exec** functions we must flush before the call

Summary:
This is replacement for patch in https://reviews.llvm.org/D49460.
When we fork, the counters are duplicate as they're and so the values are finally wrong when writing gcda for parent and child.
So just before to fork, we flush the counters and so the parent and the child have new counters set to zero.
For exec** functions, we need to flush before the call to have some data.

Reviewers: vsk, davidxl, marco-c

Reviewed By: marco-c

Subscribers: llvm-commits, sylvestre.ledru, marco-c

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

llvm-svn: 346313

6 years ago[clangd] Fix mainfile filtering for diagnostics: don't emit diagnostics for builtin...
Sam McCall [Wed, 7 Nov 2018 13:21:09 +0000 (13:21 +0000)]
[clangd] Fix mainfile filtering for diagnostics: don't emit diagnostics for builtin headers. (Relevant for clang-tidy)

llvm-svn: 346312

6 years ago[OpenCL] Fix diagnostic message about overload candidates
Andrew Savonichev [Wed, 7 Nov 2018 13:07:18 +0000 (13:07 +0000)]
[OpenCL] Fix diagnostic message about overload candidates

Summary:
I wonder if there are some extension which need to be disabled to get
overloadable candidate available.

Reviewers: asavonic, Anastasia

Reviewed By: Anastasia

Subscribers: yaxunl, sidorovd, cfe-commits

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

llvm-svn: 346311

6 years agoAdd Hurd support.
Andrey Churbanov [Wed, 7 Nov 2018 12:27:38 +0000 (12:27 +0000)]
Add Hurd support.

Patch by samuel.thibault@ens-lyon.org

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

llvm-svn: 346310

6 years ago[X86][FixupLEA] Avoid checking target features for every single processed instruction...
Andrea Di Biagio [Wed, 7 Nov 2018 12:26:00 +0000 (12:26 +0000)]
[X86][FixupLEA] Avoid checking target features for every single processed instruction. NFCI

llvm-svn: 346309

6 years ago[clangd] [NFC] Fix clang-tidy warnings.
Kadir Cetinkaya [Wed, 7 Nov 2018 12:25:27 +0000 (12:25 +0000)]
[clangd] [NFC] Fix clang-tidy warnings.

Reviewers: ioeric, sammccall, ilya-biryukov, hokein

Subscribers: MaskRay, jkorous, arphaman, cfe-commits

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

llvm-svn: 346308

6 years agoImplementation of OpenMP 5.0 mutexinoutset task dependency type.
Andrey Churbanov [Wed, 7 Nov 2018 12:19:57 +0000 (12:19 +0000)]
Implementation of OpenMP 5.0 mutexinoutset task dependency type.

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

llvm-svn: 346307

6 years ago[XRay] Clean up more std::copy(...)'s
Dean Michael Berris [Wed, 7 Nov 2018 11:52:22 +0000 (11:52 +0000)]
[XRay] Clean up more std::copy(...)'s

Update a couple more places to use conversion from StringRef to string.

llvm-svn: 346306

6 years ago[MIPS GlobalISel] Set operand order for G_MERGE and G_UNMERGE
Petar Avramovic [Wed, 7 Nov 2018 11:45:43 +0000 (11:45 +0000)]
[MIPS GlobalISel] Set operand order for G_MERGE and G_UNMERGE

Set operands order for G_MERGE_VALUES and G_UNMERGE_VALUES so
that least significant bits always go first, regardless of endianness.

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

llvm-svn: 346305

6 years ago[XRay] Use explicit string conversion
Dean Michael Berris [Wed, 7 Nov 2018 11:44:00 +0000 (11:44 +0000)]
[XRay] Use explicit string conversion

Instead of using std::copy(...), use a conversion to string instead from
StringRef to std::string.

llvm-svn: 346304

6 years ago[NFC][Clang][Aarch64] Add missing test file
Diogo N. Sampaio [Wed, 7 Nov 2018 11:42:02 +0000 (11:42 +0000)]
[NFC][Clang][Aarch64] Add missing test file

The commit rL345273 by @LukeCheeseman has a missing test file,
see https://reviews.llvm.org/D51429
This patch adds the missing test file.

Patch by Luke Cheeseman

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

llvm-svn: 346303

6 years ago[mips][msa] Fix msa_[st/ld] offset check
Aleksandar Beserminji [Wed, 7 Nov 2018 11:37:05 +0000 (11:37 +0000)]
[mips][msa] Fix msa_[st/ld] offset check

This patch fixes a minimum divider for offset in intrinsics
msa_[st/ld]_[b/h/w/d], when value is known in compile time.

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

llvm-svn: 346302