platform/upstream/llvm.git
5 years ago[OpenCL] Allow variadic macros as Clang feature.
Anastasia Stulova [Tue, 26 Mar 2019 11:22:37 +0000 (11:22 +0000)]
[OpenCL] Allow variadic macros as Clang feature.

llvm-svn: 356987

5 years ago[TableGen] Let list elements have a trailing comma
Javed Absar [Tue, 26 Mar 2019 11:16:01 +0000 (11:16 +0000)]
[TableGen] Let list elements have a trailing comma

Let lists have an trailing comma to allow cleaner diffs e.g:
  def : Features<[FeatureA,
                  FeatureB,
                 ]>;
Reviewed By: hfinkel
Differential Revision: https://reviews.llvm.org/D59247

llvm-svn: 356986

5 years ago[TableGen] Give meaningful msg for def use in multiclass
Javed Absar [Tue, 26 Mar 2019 10:49:09 +0000 (10:49 +0000)]
[TableGen] Give meaningful msg for def use in multiclass

When one mistakenly specifies 'def' instead of using 'defm',
the error message is quite misleading: 'Couldn't find class..'
Instead, it should recommend using defm if the multiclass of
same name exists.

Reviewed By: hfinkel

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

llvm-svn: 356985

5 years ago[ARM][Asm] Accept upper case coprocessor number and registers
Oliver Stannard [Tue, 26 Mar 2019 10:24:03 +0000 (10:24 +0000)]
[ARM][Asm] Accept upper case coprocessor number and registers

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

llvm-svn: 356984

5 years agoupdate the release notes after the change of 'clang -dumpversion'
Sylvestre Ledru [Tue, 26 Mar 2019 09:48:23 +0000 (09:48 +0000)]
update the release notes after the change of 'clang -dumpversion'

llvm-svn: 356983

5 years ago[llvm-dlltool] Set a proper machine type for weak symbol object files
Martin Storsjo [Tue, 26 Mar 2019 09:02:44 +0000 (09:02 +0000)]
[llvm-dlltool] Set a proper machine type for weak symbol object files

This makes GNU binutils not reject the libraries outright.

GNU ld handles weak externals slightly differently though, so it
can't use them for aliases in import libraries, but this makes GNU
ld able to use the rest of the import libraries.

LLD accepted object files with machine type 0 aka
IMAGE_FILE_MACHINE_UNKNOWN.

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

llvm-svn: 356982

5 years ago[RISCV] Pass -target-abi to -cc1as
Roger Ferrer Ibanez [Tue, 26 Mar 2019 08:01:18 +0000 (08:01 +0000)]
[RISCV] Pass -target-abi to -cc1as

The RISC-V assembler needs the target ABI because it defines a flag of the ELF
file, as described in [1].

Make clang (the driver) to pass the target ABI to -cc1as in exactly the same
way it does for -cc1.

Currently -cc1as knows about -target-abi but is not handling it. Handle it and
pass it to the MC layer via MCTargetOptions.

[1] https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#file-header

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

llvm-svn: 356981

5 years ago[ADT] Update SmallVectorTest.EmplaceBack tests after rL356312
Fangrui Song [Tue, 26 Mar 2019 05:33:52 +0000 (05:33 +0000)]
[ADT] Update SmallVectorTest.EmplaceBack tests after rL356312

rL356312 changed the return type of emplace_back from void to reference.
Update the tests to check the behavior.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 356980

5 years ago[X86] In matchBitExtract, place all of the new nodes before Node's position in the...
Craig Topper [Tue, 26 Mar 2019 05:31:32 +0000 (05:31 +0000)]
[X86] In matchBitExtract, place all of the new nodes before Node's position in the DAG for the topological sort.

We were using OrigNBits, but that put all the nodes before the node we used to start the control computation. This caused some node earlier than the sequence we inserted to be selected before the sequence we created. We want our new sequence to be selected first since it depends on OrigNBits.

I don't have a test case. Found by reviewing the code.

llvm-svn: 356979

5 years ago[X86] In matchBitExtract, if we need to truncate the BEXTR make sure we put the BEXTR...
Craig Topper [Tue, 26 Mar 2019 05:12:23 +0000 (05:12 +0000)]
[X86] In matchBitExtract, if we need to truncate the BEXTR make sure we put the BEXTR at Node's position in the DAG for the topological sort.

We were using OrigNBits, but that doesn't guarantee that it will be selected before the nodes that make up X.

llvm-svn: 356978

5 years ago[X86] Remove unneeded FIXME. NFC
Craig Topper [Tue, 26 Mar 2019 05:12:21 +0000 (05:12 +0000)]
[X86] Remove unneeded FIXME. NFC

We do fold loads right below this.

llvm-svn: 356977

5 years agoReland "[WebAssembly] Add linker options to control feature checking"
Thomas Lively [Tue, 26 Mar 2019 04:11:05 +0000 (04:11 +0000)]
Reland "[WebAssembly] Add linker options to control feature checking"

Do not pipe binary data between processes in lit tests this time,
since it turns out that can break on Windows.

This reverts commit 84c8652fc3085155d0f9c355455e5a797c6d9db6.

llvm-svn: 356975

5 years ago[clangd][xpc][cmake] Respect explicit value of CLANGD_BUILD_XPC
Jan Korous [Tue, 26 Mar 2019 03:48:25 +0000 (03:48 +0000)]
[clangd][xpc][cmake] Respect explicit value of CLANGD_BUILD_XPC

We shouldn't prevent user from disabling XPC framework build on Darwin.
However, by keeping it on by default our CI systems also test
it by default on macOS.

Based on user request:
http://lists.llvm.org/pipermail/cfe-dev/2019-March/061778.html

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

llvm-svn: 356974

5 years agoX86Parser: Fix potential reference to deleted object
Craig Topper [Tue, 26 Mar 2019 03:12:43 +0000 (03:12 +0000)]
X86Parser: Fix potential reference to deleted object

Within the MatchFPUWaitAlias function, Operands[0] is potentially overwritten leading to &Op referencing a deleted object. To fix this, assign the reference after the function.

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

llvm-svn: 356973

5 years agoX86AsmParser: Do not process a non-existent token
Craig Topper [Tue, 26 Mar 2019 03:12:41 +0000 (03:12 +0000)]
X86AsmParser: Do not process a non-existent token

This error can only happen if an unfinished operation is at Eof.

Patch by Brandon Jones

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

llvm-svn: 356972

5 years ago[Python] Define empty SWIG wrapper for unit testin"
Jonas Devlieghere [Tue, 26 Mar 2019 01:11:15 +0000 (01:11 +0000)]
[Python] Define empty SWIG wrapper for unit testin"

The python plugin uses wrappers generated by swig. For the symbols to be
available, we'd need to link against liblldb, which is not an option
because the symbols could conflict with the static library we are
testing. Instead we define the symbols ourselves in the unit test.

llvm-svn: 356971

5 years ago[CMake][Fuchsia] Merge static libunwind and libc++abi into libc++ on Darwin
Petr Hosek [Tue, 26 Mar 2019 00:43:29 +0000 (00:43 +0000)]
[CMake][Fuchsia] Merge static libunwind and libc++abi into libc++ on Darwin

We want to distribute only a single archive so -lc++ does the right
thing and users don't have to explicitly link -lc++abi and -lunwind.

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

llvm-svn: 356970

5 years ago[CFG] [analyzer] pr41142: C++17: Skip transparent InitListExprs in ExprEngine.
Artem Dergachev [Tue, 26 Mar 2019 00:36:53 +0000 (00:36 +0000)]
[CFG] [analyzer] pr41142: C++17: Skip transparent InitListExprs in ExprEngine.

r356634 didn't fix all the problems caused by r356222 - even though simple
constructors involving transparent init-list expressions are now evaluated
precisely, many more complicated constructors aren't, for other reasons.

The attached test case is an example of a constructor that will never be
evaluated precisely - simply because there isn't a constructor there (instead,
the program invokes run-time undefined behavior by returning without a return
statement that should have constructed the return value).

Fix another part of the problem for such situations: evaluate transparent
init-list expressions transparently, so that to avoid creating ill-formed
"transparent" nonloc::CompoundVals.

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

llvm-svn: 356969

5 years ago[ELF] Change GOT*_FROM_END (relative to end(.got)) to GOTPLT* (start(.got.plt))
Fangrui Song [Mon, 25 Mar 2019 23:46:19 +0000 (23:46 +0000)]
[ELF] Change GOT*_FROM_END (relative to end(.got)) to GOTPLT* (start(.got.plt))

Summary:
This should address remaining issues discussed in PR36555.

Currently R_GOT*_FROM_END are exclusively used by x86 and x86_64 to
express relocations types relative to the GOT base. We have
_GLOBAL_OFFSET_TABLE_ (GOT base) = start(.got.plt) but end(.got) !=
start(.got.plt)

This can have problems when _GLOBAL_OFFSET_TABLE_ is used as a symbol, e.g.
glibc dl_machine_dynamic assumes _GLOBAL_OFFSET_TABLE_ is start(.got.plt),
which is not true.

  extern const ElfW(Addr) _GLOBAL_OFFSET_TABLE_[] attribute_hidden;
  return _GLOBAL_OFFSET_TABLE_[0]; // R_X86_64_GOTPC32

In this patch, we

* Change all GOT*_FROM_END to GOTPLT* to fix the problem.
* Add HasGotPltOffRel to denote whether .got.plt should be kept even if
  the section is empty.
* Simplify GotSection::empty and GotPltSection::empty by setting
  HasGotOffRel and HasGotPltOffRel according to GlobalOffsetTable early.

The change of R_386_GOTPC makes X86::writePltHeader simpler as we don't
have to compute the offset start(.got.plt) - Ebx (it is constant 0).

We still diverge from ld.bfd (at least in most cases) and gold in that
.got.plt and .got are not adjacent, but the advantage doing that is
unclear.

Reviewers: ruiu, sivachandra, espindola

Subscribers: emaste, mehdi_amini, arichardson, dexonsmith, jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 356968

5 years ago[Python] Move SWIG wrapper dependency into the plugin
Jonas Devlieghere [Mon, 25 Mar 2019 23:36:12 +0000 (23:36 +0000)]
[Python] Move SWIG wrapper dependency into the plugin

This should fix the Windows bot (fingers crossed).

llvm-svn: 356967

5 years agoUse a class instead of lambda-based callbacks to organize garbage collector.
Rui Ueyama [Mon, 25 Mar 2019 23:28:47 +0000 (23:28 +0000)]
Use a class instead of lambda-based callbacks to organize garbage collector.

lld's mark-sweep garbage collector was written in the visitor pattern.
There are functions that traverses a given graph, and the functions calls
callback functions to dispatch according to node type.

The code was originaly pretty simple, and lambdas worked pretty
well. However, as we add more features to the garbage collector, that became
more like a callback hell. We now have a callback function that wraps
another callback function, for example. It is not easy to follow the flow of
the control.

This patch rewrites it as a regular class. What was once a lambda is now a
regular class member function. I think this change fixes the readability
issue.

No functionality change intended.

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

llvm-svn: 356966

5 years agoMoving ManagedMemoryRewritePass when hybrid option is selected
Michael Kruse [Mon, 25 Mar 2019 23:26:59 +0000 (23:26 +0000)]
Moving ManagedMemoryRewritePass when hybrid option is selected

Compiling with -polly-target=hybrid was causing Polly to occur two times
in the pipeline. The reason was how the ManagedMemoryRewritePass was
registered in the pass manager. ManagedMemoryRewritePass being a
ModulePass was forcing all previous passes to get recomputed. This
commit avoids Polly to appear two times in the pipeline registering the
ManagedMemoryRewritePass later in the pass manager.

Patch by Lorenzo Chelini <l.chelini@icloud.com>

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

llvm-svn: 356965

5 years ago[MS] Add frontend support for __declspec(allocator)
Reid Kleckner [Mon, 25 Mar 2019 23:20:18 +0000 (23:20 +0000)]
[MS] Add frontend support for __declspec(allocator)

The intention is to add metadata to direct call sites of functions
marked with __declspec(allocator), which will ultimately result in some
S_HEAPALLOCSITE debug info records when emitting codeview.

This is a piece of PR38491

llvm-svn: 356964

5 years ago[ARM] Add missing memory operands to a bunch of instructions.
Eli Friedman [Mon, 25 Mar 2019 22:42:30 +0000 (22:42 +0000)]
[ARM] Add missing memory operands to a bunch of instructions.

This should hopefully lead to minor improvements in code generation, and
more accurate spill/reload comments in assembly.

Also fix isLoadFromStackSlotPostFE/isStoreToStackSlotPostFE so they
don't lead to misleading assembly comments for merged memory operands;
this is technically orthogonal, but in practice the relevant memory
operand lists don't show up without this change.

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

llvm-svn: 356963

5 years ago[OpenMP] Add LLVM license header to file
Jonathan Peyton [Mon, 25 Mar 2019 22:36:31 +0000 (22:36 +0000)]
[OpenMP] Add LLVM license header to file

This file was missing the LLVM license header

llvm-svn: 356962

5 years ago[OpenMP] Add Intel 19.0 to list of compilers in kmp_version.cpp
Jonathan Peyton [Mon, 25 Mar 2019 22:31:00 +0000 (22:31 +0000)]
[OpenMP] Add Intel 19.0 to list of compilers in kmp_version.cpp

llvm-svn: 356961

5 years ago[lldb] [Process/NetBSD] Use nullptr to fix template arg deduction
Michal Gorny [Mon, 25 Mar 2019 22:29:29 +0000 (22:29 +0000)]
[lldb] [Process/NetBSD] Use nullptr to fix template arg deduction

llvm-svn: 356960

5 years ago[x86] add tests for vector cmps; NFC
Sanjay Patel [Mon, 25 Mar 2019 22:08:45 +0000 (22:08 +0000)]
[x86] add tests for vector cmps; NFC

llvm-svn: 356959

5 years agoRevert "AMDGPU: Scavenge register instead of findUnusedReg"
Matt Arsenault [Mon, 25 Mar 2019 21:41:40 +0000 (21:41 +0000)]
Revert "AMDGPU: Scavenge register instead of findUnusedReg"

This reverts r356149.

This is crashing on rocBLAS.

llvm-svn: 356958

5 years ago[Sema] Don't check for array bounds when the types in the base expression are dependent
Bruno Ricci [Mon, 25 Mar 2019 21:37:10 +0000 (21:37 +0000)]
[Sema] Don't check for array bounds when the types in the base expression are dependent

Bail-out of CheckArrayAccess when the types of the base expression before
and after eventual casts are dependent. We will get another chance to check
for array bounds during instantiation. Fixes PR41087.

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

Reviewed By: efriedma

llvm-svn: 356957

5 years agoAMDGPU: Remove unnecessary check for isFullCopy
Matt Arsenault [Mon, 25 Mar 2019 21:28:53 +0000 (21:28 +0000)]
AMDGPU: Remove unnecessary check for isFullCopy

Subregister indexes are not used for physical register operands, so
isFullCopy is implied by the physical register check.

llvm-svn: 356956

5 years agoAMDGPU: Make collapse-endcf test more useful
Matt Arsenault [Mon, 25 Mar 2019 21:28:51 +0000 (21:28 +0000)]
AMDGPU: Make collapse-endcf test more useful

Without a VALU instruction in the return block, these were mostly
testing the path to delete exec mask code before s_endpgm rather than
the end cf handling.

llvm-svn: 356955

5 years ago[AArch64] Prefer "mov" over "orr" to materialize constants.
Eli Friedman [Mon, 25 Mar 2019 21:25:28 +0000 (21:25 +0000)]
[AArch64] Prefer "mov" over "orr" to materialize constants.

This is generally more readable due to the way the assembler aliases
work.

(This causes a lot of test changes, but it's not really as scary as it
looks at first glance; it's just mechanically changing a bunch of checks
for orr to check for mov instead.)

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

llvm-svn: 356954

5 years ago[WebAssembly] Don't use default GetLinkerPath
Sam Clegg [Mon, 25 Mar 2019 21:14:26 +0000 (21:14 +0000)]
[WebAssembly] Don't use default GetLinkerPath

We can't (don't want to) honor the same set of "-fuse-ld" flags with
WebAssembly since the ELF linkers (ld.lld, ld.gnu, etc) don't work with
wasm object files.

Instead we implement our own linker finding logic, similar or other
non-ELF platforms like MSVC.

We've had a few issues with CLANG_DEFAULT_LINKER overriding the
WebAssembly linker which doesn't make sense since there is no generic
linker that can handle WebAssembly today.

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

llvm-svn: 356953

5 years agoAMDGPU: Set hasSideEffects 0 on _term instructions
Matt Arsenault [Mon, 25 Mar 2019 21:10:12 +0000 (21:10 +0000)]
AMDGPU: Set hasSideEffects 0 on _term instructions

These were defaulting to true, but they are just wrappers around bit
operations. This avoids regressions in the exec mask optimization
passes in a future commit.

llvm-svn: 356952

5 years agoRevert "[llvm] Prevent duplicate files in debug line header in dwarf 5."
Ali Tamur [Mon, 25 Mar 2019 21:09:07 +0000 (21:09 +0000)]
Revert "[llvm] Prevent duplicate files in debug line header in dwarf 5."

This reverts commit 312ab05887d0e2caa29aaf843cefe39379a98d36.

My commit broke the build; I will revert and find out what happened.

llvm-svn: 356951

5 years ago[PythonTestSuite] Fix usage of InitializePrivate in PythonTestSuite
Jonas Devlieghere [Mon, 25 Mar 2019 21:07:53 +0000 (21:07 +0000)]
[PythonTestSuite] Fix usage of InitializePrivate in PythonTestSuite

llvm-svn: 356950

5 years agoRevert "[lld] Prevent duplicate files in debug line header in dwarf 5."
Ali Tamur [Mon, 25 Mar 2019 21:06:02 +0000 (21:06 +0000)]
Revert "[lld] Prevent duplicate files in debug line header in dwarf 5."

This reverts commit 5aa7478a55fa86dae45913b82bd05ed32d9c0973.

Some things are broken; I will fix and try to commit again.

llvm-svn: 356949

5 years ago[LLVM-C] Add binding to look up intrinsic by name
Robert Widmann [Mon, 25 Mar 2019 20:58:58 +0000 (20:58 +0000)]
[LLVM-C] Add binding to look up intrinsic by name

Summary: Add a binding to Function::lookupIntrinsicID so clients don't have to go searching the ID table themselves.

Reviewers: whitequark, deadalnix

Reviewed By: whitequark

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 356948

5 years agoAMDGPU: Add support for cross address space synchronization scopes (clang)
Konstantin Zhuravlyov [Mon, 25 Mar 2019 20:54:00 +0000 (20:54 +0000)]
AMDGPU: Add support for cross address space synchronization scopes (clang)

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

llvm-svn: 356947

5 years agoAMDGPU: Add support for cross address space synchronization scopes
Konstantin Zhuravlyov [Mon, 25 Mar 2019 20:50:21 +0000 (20:50 +0000)]
AMDGPU: Add support for cross address space synchronization scopes

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

llvm-svn: 356946

5 years ago[pstl][NFC] Remove some warnings
Louis Dionne [Mon, 25 Mar 2019 20:44:07 +0000 (20:44 +0000)]
[pstl][NFC] Remove some warnings

llvm-svn: 356945

5 years ago[ScriptInterpreterPython] Make SWIG callback private (NFC)
Jonas Devlieghere [Mon, 25 Mar 2019 20:39:08 +0000 (20:39 +0000)]
[ScriptInterpreterPython] Make SWIG callback private (NFC)

With the initialization taking place inside the Python script
interpreter, these function no longer need to be public. The exception
is the g_swig_init_callback which is used from the RAII object.

llvm-svn: 356944

5 years ago[lld] Prevent duplicate files in debug line header in dwarf 5.
Ali Tamur [Mon, 25 Mar 2019 20:18:27 +0000 (20:18 +0000)]
[lld] Prevent duplicate files in debug line header in dwarf 5.

Summary:
Changes to a couple of tests that will start failing after https://reviews.llvm.org/D59515 is submitted.

Reviewers: echristo, ruiu, espindola

Reviewed By: echristo, ruiu

Subscribers: emaste, arichardson, MaskRay, llvm-commits

Tags: #llvm

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

llvm-svn: 356943

5 years ago[ScriptInterpreterPython] Move SWIG initialization into the Python plugin (NFC)
Jonas Devlieghere [Mon, 25 Mar 2019 20:14:31 +0000 (20:14 +0000)]
[ScriptInterpreterPython] Move SWIG initialization into the Python plugin (NFC)

Abstract initialization of the Python SWIG support in the Python plugin.

llvm-svn: 356942

5 years ago[llvm] Prevent duplicate files in debug line header in dwarf 5.
Ali Tamur [Mon, 25 Mar 2019 20:08:00 +0000 (20:08 +0000)]
[llvm] Prevent duplicate files in debug line header in dwarf 5.

Summary:

Motivation: In previous dwarf versions, file name indexes started from 1, and
the primary source file was not explicit. Dwarf 5 standard (6.2.4) prescribes
the primary source file to be explicitly given an entry with an index number 0.

The current implementation honors the specification by just duplicating the
main source file, once with index number 0, and later maybe with another
index number. While this is compliant with the letter of the standard, the
duplication causes problems for consumers of this information such as lldb.
(Some files are duplicated, where only some of them have a line table although
all refer to the same file)

With this change, dwarf 5 debug line section files always start from 0, and
the zeroth entry is not duplicated whenever possible. This requires different
handling of dwarf 4 and dwarf 5 during generation (e.g. when a function returns
an index zero for a file name, it signals an error in dwarf 4, but not in dwarf 5)
However, I think the minor complication is worth it, because it enables all
consumers (lldb, gdb, dwarfdump, objdump, and so on) to treat all files in the
file name list homogenously.

Reviewers: dblaikie, probinson, aprantl, espindola

Reviewed By: probinson

Subscribers: emaste, jvesely, nhaehnle, aprantl, javed.absar, arichardson, hiraditya, MaskRay, rupprecht, jdoerfert, llvm-commits

Tags: #llvm, #debug-info

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

llvm-svn: 356941

5 years agoThread Safety: also look at ObjC methods
JF Bastien [Mon, 25 Mar 2019 20:06:32 +0000 (20:06 +0000)]
Thread Safety: also look at ObjC methods

Summary:
SExprBuilder::translateDeclRefExpr was only looking at FunctionDecl and not also looking at ObjCMethodDecl. It should consider both because the attributes can be used on Objective-C as well.

<rdar://problem/48941331>

Reviewers: dexonsmith, erik.pilkington

Subscribers: jkorous, jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 356940

5 years ago[SLPVectorizer] Merge reorderAltShuffleOperands into reorderInputsAccordingToOpcode
Simon Pilgrim [Mon, 25 Mar 2019 20:05:27 +0000 (20:05 +0000)]
[SLPVectorizer] Merge reorderAltShuffleOperands into reorderInputsAccordingToOpcode

As discussed on D59738, this generalizes reorderInputsAccordingToOpcode to handle multiple + non-commutative instructions so we can get rid of reorderAltShuffleOperands and make use of the extra canonicalizations that reorderInputsAccordingToOpcode brings.

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

llvm-svn: 356939

5 years ago[SelectionDAG] Add icmp UNDEF handling to SelectionDAG::FoldSetCC
Simon Pilgrim [Mon, 25 Mar 2019 18:51:57 +0000 (18:51 +0000)]
[SelectionDAG] Add icmp UNDEF handling to SelectionDAG::FoldSetCC

First half of PR40800, this patch adds DAG undef handling to icmp instructions to match the behaviour in llvm::ConstantFoldCompareInstruction and SimplifyICmpInst, this permits constant folding of vector comparisons where some elements had been reduced to UNDEF (by SimplifyDemandedVectorElts etc.).

This involved a lot of tweaking to reduced tests as bugpoint loves to reduce icmp arguments to undef........

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

llvm-svn: 356938

5 years ago[CGP] Build the DominatorTree lazily
Teresa Johnson [Mon, 25 Mar 2019 18:38:48 +0000 (18:38 +0000)]
[CGP] Build the DominatorTree lazily

Summary:
In r355512 CGP was changed to build the DominatorTree only once per
function traversal, to avoid repeatedly building it each time it was
accessed. This solved one compile time issue but introduced another. In
the second case, we now were building the DT unnecessarily many times
when we performed many function traversals (i.e. more than once per
function when running CGP because of changes made each time).

Change to saving the DT in the CodeGenPrepare object, and building it
lazily when needed. It is reset whenever we need to rebuild it.

The case that exposed the issue there are 617 functions, and we walk
them (i.e. execute the "while (MadeChange)" loop in runOnFunction) a
total of 12083 times (so previously we were building the DT 12083
times). With this patch we only build the DT 844 times (average of 1.37
times per function). We dropped the total time to compile this file from
538.11s without this patch to 339.63s with it.

There is still an issue as CGP is taking much longer than all other
passes even with this patch, and before a recent compiler release cut at
r355392 the total time to this compile was only 97 sec with a huge
reduction in CGP time. I suspect that one of the other recent changes to
CGP led to iterating each function many more times on average, but I
need to do some more investigation.

Reviewers: spatel

Subscribers: jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 356937

5 years agoFix interoperability test compilation on FreeBSD
Dimitry Andric [Mon, 25 Mar 2019 18:37:49 +0000 (18:37 +0000)]
Fix interoperability test compilation on FreeBSD

Summary:
While building the 8.0 releases on FreeBSD, I encountered the following
error in the regression tests, where ompt/misc/interoperability.cpp
failed to compile, with:

```
projects/openmp/runtime/test/ompt/misc/interoperability.cpp:7:10: fatal error: 'alloca.h' file not found
#include <alloca.h>
         ^~~~~~~~~~
```

Like on NetBSD, alloca(3) is defined in <stdlib.h> instead.

Reviewers: emaste, jlpeyton, krytarowski, mgorny, protze.joachim

Reviewed By: jlpeyton

Subscribers: jdoerfert, openmp-commits

Tags: #openmp

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

llvm-svn: 356936

5 years ago[pstl] Gate usage of TBB in test on whether TBB is used as a backend
Louis Dionne [Mon, 25 Mar 2019 18:37:28 +0000 (18:37 +0000)]
[pstl] Gate usage of TBB in test on whether TBB is used as a backend

__PSTL_USE_PAR_POLICIES is the wrong macro to use there, since the PSTL
could conceivably be using parallel policies but not TBB as a backend.

llvm-svn: 356935

5 years agoFix gettid warnings on FreeBSD
Dimitry Andric [Mon, 25 Mar 2019 18:37:14 +0000 (18:37 +0000)]
Fix gettid warnings on FreeBSD

Summary:
[Split off from D59451 to get this fix in separately]

While building the 8.0 releases on FreeBSD, I encountered the following
warnings in openmp quite a few times:

```
In file included from projects/openmp/runtime/src/kmp_settings.cpp:27:
projects/openmp/runtime/src/kmp_wrapper_getpid.h:35:2: warning: #warning is a language extension [-Wpedantic]
#warning No gettid found, use getpid instead
 ^
projects/openmp/runtime/src/kmp_wrapper_getpid.h:35:2: warning: No gettid found, use getpid instead [-W#warnings]
2 warnings generated.
```

I added a gettid wrapper that uses FreeBSD's pthread_getthreadid_np(3)
function for this.

Reviewers: emaste, jlpeyton, krytarowski, mgorny, protze.joachim

Reviewed By: jlpeyton

Subscribers: jfb, jdoerfert, openmp-commits

Tags: #openmp

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

llvm-svn: 356934

5 years ago[OpenMP] Fix pause check with version info
Jonathan Peyton [Mon, 25 Mar 2019 18:17:55 +0000 (18:17 +0000)]
[OpenMP] Fix pause check with version info

Add 5.0 guard to pause code for now.

Patch by Terry Wilmarth

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

llvm-svn: 356933

5 years agoRevert "[WebAssembly] Add linker options to control feature checking"
Thomas Lively [Mon, 25 Mar 2019 18:10:26 +0000 (18:10 +0000)]
Revert "[WebAssembly] Add linker options to control feature checking"

This reverts commit 5991328c96b6146999cfa74ede42901f8c01f2fa.

llvm-svn: 356932

5 years agoclang -dumpversion returns 4.2.1 for legacy reason, update it
Sylvestre Ledru [Mon, 25 Mar 2019 18:06:20 +0000 (18:06 +0000)]
clang -dumpversion returns 4.2.1 for legacy reason, update it

Summary:
It has been introduced in 2011 for gcc compat:
https://github.com/llvm-mirror/clang/commit/95a907fc0f2f717dca38a379c1d2353bfea06d4f
it is probably time to remove it to remove the confusion.

reported: https://bugs.llvm.org/show_bug.cgi?id=38836
https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1810860

Reviewers: ddunbar, rnk

Reviewed By: rnk

Subscribers: jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 356931

5 years ago[x86] add another vector zext test; NFC
Sanjay Patel [Mon, 25 Mar 2019 17:53:56 +0000 (17:53 +0000)]
[x86] add another vector zext test; NFC

Goes with the proposal in D59777

llvm-svn: 356930

5 years agoMoved everything SMT-related to LLVM and updated the cmake scripts.
Mikhail R. Gadelha [Mon, 25 Mar 2019 17:47:45 +0000 (17:47 +0000)]
Moved everything SMT-related to LLVM and updated the cmake scripts.

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

llvm-svn: 356929

5 years ago[clang-format] Refine structured binding detection
Krasimir Georgiev [Mon, 25 Mar 2019 17:29:16 +0000 (17:29 +0000)]
[clang-format] Refine structured binding detection

Summary:
Revision r356575 had the unfortunate consequence that now clang-format never
detects an ObjC call expression after `&&`.

This patch tries harder to distinguish between C++17 structured bindings and
ObjC call expressions and adds a few regression tests.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 356928

5 years ago[Args] Handle backticks to prevent crash.
Jonas Devlieghere [Mon, 25 Mar 2019 17:27:14 +0000 (17:27 +0000)]
[Args] Handle backticks to prevent crash.

Currently LLDB crashes when autocompleting a command that ends with a
backtick because the quote character wasn't handled. This fixes that and
adds a unit test for this function.

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

llvm-svn: 356927

5 years agoMISched: Don't schedule regions with 0 instructions
Matt Arsenault [Mon, 25 Mar 2019 17:15:44 +0000 (17:15 +0000)]
MISched: Don't schedule regions with 0 instructions

I think this is correct, but may not necessarily be the correct fix
for the assertion I'm really trying to solve. If a scheduling region
was found that only has dbg_value instructions, the RegPressure
tracker would end up in an inconsistent state because it would skip
over any debug instructions and point to an instruction outside of the
scheduling region. It may still be possible for this to happen if
there are some real schedulable instructions between dbg_values, but I
haven't managed to break this.

The testcase is extremely sensitive and I'm not sure how to make it
more resistent to future scheduler changes that would avoid stressing
this situation.

llvm-svn: 356926

5 years ago[Sema][NFCI] Don't allocate storage for the various CorrectionCandidateCallback unles...
Bruno Ricci [Mon, 25 Mar 2019 17:08:51 +0000 (17:08 +0000)]
[Sema][NFCI] Don't allocate storage for the various CorrectionCandidateCallback unless we are going to do some typo correction

The various CorrectionCandidateCallbacks are currently heap-allocated
unconditionally. This was needed because of delayed typo correction.
However these allocations represent currently 15.4% of all allocations
(number of allocations) when parsing all of Boost (!), mostly because
of ParseCastExpression, ParseStatementOrDeclarationAfterAttrtibutes
and isCXXDeclarationSpecifier. Note that all of these callback objects
are small. Let's not do this.

Instead initially allocate the callback on the stack, and only do a
heap allocation if we are going to do some typo correction. Do this by:

1. Adding a clone function to each callback, which will do a polymorphic
   clone of the callback. This clone function is required to be implemented
   by every callback (of which there is a fair amount). Make sure this is
   the case by making it pure virtual.

2. Use this clone function when we are going to try to correct a typo.

This additionally cut the time of -fsyntax-only on all of Boost by 0.5%
(not that much, but still something). No functional changes intended.

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

Reviewed By: rnk

llvm-svn: 356925

5 years agomerge-request.sh: Update 8.0 metabug for 8.0.1
Tom Stellard [Mon, 25 Mar 2019 17:01:29 +0000 (17:01 +0000)]
merge-request.sh: Update 8.0 metabug for 8.0.1

llvm-svn: 356924

5 years agoAttempt to fix sphinx bot after r356897
Nico Weber [Mon, 25 Mar 2019 16:50:24 +0000 (16:50 +0000)]
Attempt to fix sphinx bot after r356897

llvm-svn: 356923

5 years agoAMDGPU: Preserve LiveIntervals in WQM
Matt Arsenault [Mon, 25 Mar 2019 16:47:42 +0000 (16:47 +0000)]
AMDGPU: Preserve LiveIntervals in WQM

This seems to already be done, but wasn't marked.

llvm-svn: 356922

5 years ago[pstl] Make sure unit tests exit with a non-zero error code when they fail
Louis Dionne [Mon, 25 Mar 2019 16:44:08 +0000 (16:44 +0000)]
[pstl] Make sure unit tests exit with a non-zero error code when they fail

The previous test system would only print errors to stderr, however CMake
(and lit) detect failure via the program returning a non-zero error code.
So all the tests would always pretend they passed.

llvm-svn: 356921

5 years ago[clang] Remove cmake warning message (NFC)
Evandro Menezes [Mon, 25 Mar 2019 16:38:48 +0000 (16:38 +0000)]
[clang] Remove cmake warning message (NFC)

Recognize an empty string for CLANG_DEFAULT_UNWINDLIB as a valid option.

llvm-svn: 356920

5 years ago[llvm-objcopy]Preserve data in segments not covered by sections
James Henderson [Mon, 25 Mar 2019 16:36:26 +0000 (16:36 +0000)]
[llvm-objcopy]Preserve data in segments not covered by sections

llvm-objcopy previously knew nothing about data in segments that wasn't
covered by section headers, meaning that it wrote zeroes instead of what
was there. As it is possible for this data to be useful to the loader,
this patch causes llvm-objcopy to start preserving this data. Data in
sections that are explicitly removed continues to be written as zeroes.

This fixes https://bugs.llvm.org/show_bug.cgi?id=41005.

Reviewed by: jakehehrlich, rupprecht

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

llvm-svn: 356919

5 years agoCleaup of requirements for optional. While researching LWG3196, I realized that optio...
Marshall Clow [Mon, 25 Mar 2019 16:35:59 +0000 (16:35 +0000)]
Cleaup of requirements for optional. While researching LWG3196, I realized that optional did not reject 'const in_place_t' like it should. Added a test as well, and a check for arrays (which were already disallowed, but now we get a better error message). Should not affect anyone's code.

llvm-svn: 356918

5 years ago[PSTL][NFC] Add missing #include
Louis Dionne [Mon, 25 Mar 2019 16:20:49 +0000 (16:20 +0000)]
[PSTL][NFC] Add missing #include

llvm-svn: 356917

5 years ago[clangd] Add .cu files to VSCode extension
Ilya Biryukov [Mon, 25 Mar 2019 16:18:56 +0000 (16:18 +0000)]
[clangd] Add .cu files to VSCode extension

Summary:
clangd should be able to handle those with a proper compilation
database. However, users using 'nvcc' might start seeing spurious errors
in '.cu' files after this change.

My plan is to land and release this, but be ready to revert in
case of negative user feedback.

Reviewers: hokein

Reviewed By: hokein

Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 356916

5 years ago[SLPVectorizer] Update file missed in rL356913
Simon Pilgrim [Mon, 25 Mar 2019 16:14:21 +0000 (16:14 +0000)]
[SLPVectorizer] Update file missed in rL356913

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

llvm-svn: 356915

5 years ago[x86] add tests for vector zext; NFC
Sanjay Patel [Mon, 25 Mar 2019 15:54:34 +0000 (15:54 +0000)]
[x86] add tests for vector zext; NFC

The AVX1 lowering is poor.

llvm-svn: 356914

5 years ago[SLPVectorizer] reorderInputsAccordingToOpcode - remove non-Instruction canonicalization
Simon Pilgrim [Mon, 25 Mar 2019 15:53:55 +0000 (15:53 +0000)]
[SLPVectorizer] reorderInputsAccordingToOpcode - remove non-Instruction canonicalization

Remove attempts to commute non-Instructions to the LHS - the codegen changes appear to rely on chance more than anything else and also have a tendency to fight existing instcombine canonicalization which moves constants to the RHS of commutable binary ops.

This is prep work towards:
(a) reusing reorderInputsAccordingToOpcode for alt-shuffles and removing the similar reorderAltShuffleOperands
(b) improving reordering to optimized cases with commutable and non-commutable instructions to still find splat/consecutive ops.

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

llvm-svn: 356913

5 years agoRevert "[clang-format] Keep protobuf "package" statement on one line"
Haojian Wu [Mon, 25 Mar 2019 15:46:07 +0000 (15:46 +0000)]
Revert "[clang-format] Keep protobuf "package" statement on one line"

This reverts commit r356835. This patch causes a regression, see the
test below:

verifyFormat("// Detached comment\n\n"
             "// Leading comment\n"
             "syntax = \"proto2\"; // trailing comment\n\n"
             "// in foo.bar package\n"
             "package foo.bar; // foo.bar package\n");

llvm-svn: 356912

5 years agoUpdate the lldb driver to support the -O and -S options when passing --repl
Adrian Prantl [Mon, 25 Mar 2019 15:38:18 +0000 (15:38 +0000)]
Update the lldb driver to support the -O and -S options when passing --repl

At the moment when --repl is passed to lldb it silently ignores any
commands passed via the options below:

--one-line-before-file <command>
                     Tells the debugger to execute this one-line lldb command before any file provided on the command line has been loaded.
--one-line <command>
                     Tells the debugger to execute this one-line lldb command after any file provided on the command line has been loaded.
--source-before-file <file>
                     Tells the debugger to read in and execute the lldb commands in the given file, before any file has been loaded.
--source <file>
                     Tells the debugger to read in and execute the lldb commands in the given file, after any file has been loaded.
-O <value>           Alias for --one-line-before-file
-o <value>           Alias for --one-line
-S <value>           Alias for --source-before-file
-s <value>           Alias for --source

The -O and -S options are quite useful when writing tests for the REPL
though, e.g. to change settings prior to entering REPL mode. This
patch updates the driver to still respect the commands supplied via -O
and -S when passing --repl instead of silently ignoring them. As -s
and -o don't really make sense in REPL mode, commands supplied via
those options are still ignored, but the driver now emits a warning to
make that clear to the user.

Patch by Nathan Hawes!

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

llvm-svn: 356911

5 years agoPython 2/3 compat: StringIO
Serge Guelton [Mon, 25 Mar 2019 15:23:34 +0000 (15:23 +0000)]
Python 2/3 compat: StringIO

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

llvm-svn: 356910

5 years agoPython 2/3 compat: tkinter
Serge Guelton [Mon, 25 Mar 2019 15:22:41 +0000 (15:22 +0000)]
Python 2/3 compat: tkinter

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

llvm-svn: 356909

5 years agoPython 2/3 compat: str vs basestring
Serge Guelton [Mon, 25 Mar 2019 15:21:29 +0000 (15:21 +0000)]
Python 2/3 compat: str vs basestring

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

llvm-svn: 356908

5 years agoRevert 356905
Serge Guelton [Mon, 25 Mar 2019 15:18:55 +0000 (15:18 +0000)]
Revert 356905

Commited from wrong directory...

llvm-svn: 356907

5 years agoPython 2/3 compat: queue vs Queue
Serge Guelton [Mon, 25 Mar 2019 15:14:56 +0000 (15:14 +0000)]
Python 2/3 compat: queue vs Queue

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

llvm-svn: 356906

5 years agoPython 2/3 compat: queue vs Queue
Serge Guelton [Mon, 25 Mar 2019 15:14:15 +0000 (15:14 +0000)]
Python 2/3 compat: queue vs Queue

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

llvm-svn: 356905

5 years agoPython 2/3 compat: unichr vs chr
Serge Guelton [Mon, 25 Mar 2019 15:12:48 +0000 (15:12 +0000)]
Python 2/3 compat: unichr vs chr

llvm-svn: 356904

5 years ago[libc++][CMake] Allow merging libc++abi.a into libc++ even on Apple platforms
Louis Dionne [Mon, 25 Mar 2019 14:56:29 +0000 (14:56 +0000)]
[libc++][CMake] Allow merging libc++abi.a into libc++ even on Apple platforms

Summary:
I can't see a good reason to disallow this, even though it isn't the
standard way we build libc++ for Apple platforms.

Making this work on Apple platforms requires using different flags for
--whole-archive and removing the -D flag when running `ar` to merge
archives because that flag isn't supported by the `ar` shipped on Apple
platforms. This shouldn't be an issue since the -D option appears to be
enabled by default in GNU `ar`.

Reviewers: phosek, EricWF, serge-sans-paille

Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits

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

llvm-svn: 356903

5 years ago[clang-tidy] ClangTidy.h -> ClangTidyCheck.h
Alexander Kornienko [Mon, 25 Mar 2019 14:46:51 +0000 (14:46 +0000)]
[clang-tidy] ClangTidy.h -> ClangTidyCheck.h

llvm-svn: 356902

5 years agoMinidumpYAML.cpp: Fix some code standard violations missed during review
Pavel Labath [Mon, 25 Mar 2019 14:45:31 +0000 (14:45 +0000)]
MinidumpYAML.cpp: Fix some code standard violations missed during review

functions should begin with lower case letters. NFC.

llvm-svn: 356901

5 years ago[pstl][CMake] Move include() closer to its point of use
Louis Dionne [Mon, 25 Mar 2019 14:45:21 +0000 (14:45 +0000)]
[pstl][CMake] Move include() closer to its point of use

llvm-svn: 356900

5 years ago[RegAlloc] Simplify MIR test
Jonas Paulsson [Mon, 25 Mar 2019 14:28:32 +0000 (14:28 +0000)]
[RegAlloc]  Simplify MIR test

Remove the IR part from test/CodeGen/X86/regalloc-copy-hints.mir (added by
r355854).

To make the test remain functional, the parts of the MBB names referring to
BB names have been removed, as well as all machine memory operands.

llvm-svn: 356899

5 years agoMinidump: Use minidump constants defined in llvm
Pavel Labath [Mon, 25 Mar 2019 14:09:27 +0000 (14:09 +0000)]
Minidump: Use minidump constants defined in llvm

This patch begins the process of migrating the "minidump" plugin to the
minidump parser in llvm. The llvm parser is not fully finished yet, but
even now, a lot of things can be switched over. The gradual migration
process will allow us to easier detect if things break than doing a big
one-step migration. Doing it early will allow us to make sure that the
llvm parser fits the use case that we need in lldb.

In this patch I start with the various minidump constants, which have
their llvm equivalent. It doesn't contain any functional changes. The
diff just reflects the different naming of things in llvm.

llvm-svn: 356898

5 years agoRename directory housing clang-include-fixer to be eponymous
Nico Weber [Mon, 25 Mar 2019 14:09:10 +0000 (14:09 +0000)]
Rename directory housing clang-include-fixer to be eponymous

Makes the name of this directory consistent with the names of the other
directories in clang-tools-extra.

Similar to r356254. No intended behavior change.

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

llvm-svn: 356897

5 years agoReapply minidump changes reverted in r356806
Pavel Labath [Mon, 25 Mar 2019 14:02:16 +0000 (14:02 +0000)]
Reapply minidump changes reverted in r356806

The changes were reverted due to ubsan errors (unaligned accesses). Here
I fix those errors by first copying the data into aligned storage.
Besides fixing alignment issues, this also fixes reading of minidump
strings on big-endian systems.

llvm-svn: 356896

5 years ago[DebugInfo] IntelJitEventListener follow up for "add SectionedAddress ..."
Brock Wyma [Mon, 25 Mar 2019 13:50:26 +0000 (13:50 +0000)]
[DebugInfo] IntelJitEventListener follow up for "add SectionedAddress ..."

Following r354972 the Intel JIT Listener would not report line table
information because the section indices did not match. There was
a similar issue with the PerfJitEventListener. This change performs
the section index lookup when building the object address used to
query the line table information.

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

llvm-svn: 356895

5 years ago[clangd] Add std subnamespace symbols to the symbol map.
Haojian Wu [Mon, 25 Mar 2019 13:14:10 +0000 (13:14 +0000)]
[clangd] Add std subnamespace symbols to the symbol map.

Reviewers: ioeric, serge-sans-paille

Reviewed By: ioeric

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

Tags: #clang

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

llvm-svn: 356894

5 years ago[pp-trace] Use ClangTool in pp-trace, NFC
Haojian Wu [Mon, 25 Mar 2019 12:49:46 +0000 (12:49 +0000)]
[pp-trace] Use ClangTool in pp-trace, NFC

Summary:
This patch partially reverts the commit rL356849.

Unfortunately, tooling::createExecutorFromCommandLineArgs doesn't
corperate well with our internal infrastructure, which leads failing
lit tests. We use ClangTool at the moment, until we find a better
solution to smooth it.

Reviewers: ioeric

Reviewed By: ioeric

Subscribers: jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 356893

5 years ago[clang-tidy] Switch checks to #include "ClangTidyCheck.h"
Alexander Kornienko [Mon, 25 Mar 2019 12:38:26 +0000 (12:38 +0000)]
[clang-tidy] Switch checks to #include "ClangTidyCheck.h"

llvm-svn: 356892

5 years ago[pstl] Call the right overload of std::equal with an execution policy
Louis Dionne [Mon, 25 Mar 2019 12:37:51 +0000 (12:37 +0000)]
[pstl] Call the right overload of std::equal with an execution policy

Thanks to Mikhail Dvorskiy for the patch.

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

llvm-svn: 356891

5 years ago[clang-tidy] Separate the check-facing interface
Alexander Kornienko [Mon, 25 Mar 2019 12:36:30 +0000 (12:36 +0000)]
[clang-tidy] Separate the check-facing interface

Summary:
Move ClangTidyCheck to a separate header/.cpp
Switch checks to #include "ClangTidyCheck.h"
Mention ClangTidyCheck.h in the docs

Reviewers: hokein, gribozavr, aaron.ballman

Reviewed By: hokein

Subscribers: mgorny, javed.absar, xazax.hun, arphaman, jdoerfert, llvm-commits, cfe-commits

Tags: #clang, #llvm

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

llvm-svn: 356890

5 years ago[llvm-objcopy] - Refactor the code. NFC.
George Rimar [Mon, 25 Mar 2019 12:34:25 +0000 (12:34 +0000)]
[llvm-objcopy] - Refactor the code. NFC.

The idea of the patch is about to move out the code to a new
helper static functions (to reduce the size of 'handleArgs' and to
isolate the parts of it's logic).

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

llvm-svn: 356889

5 years ago[OpenCL] Allow addr space spelling without __ prefix in C++.
Anastasia Stulova [Mon, 25 Mar 2019 11:54:02 +0000 (11:54 +0000)]
[OpenCL] Allow addr space spelling without __ prefix in C++.

For backwards compatibility we allow alternative spelling of address
spaces - 'private', 'local', 'global', 'constant', 'generic'.

In order to accept 'private' correctly, parsing has been changed to
understand different use cases - access specifier vs address space.

Fixes PR40707 and PR41011!

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

llvm-svn: 356888

5 years ago[pp-trace] Try fixing MSVC C2248 after rCTE356849
Fangrui Song [Mon, 25 Mar 2019 11:40:11 +0000 (11:40 +0000)]
[pp-trace] Try fixing MSVC C2248 after rCTE356849

llvm-svn: 356887