platform/upstream/llvm.git
6 years agoFix -Wsign-compare warnings. NFCI
Simon Pilgrim [Wed, 19 Sep 2018 14:52:34 +0000 (14:52 +0000)]
Fix -Wsign-compare warnings. NFCI

llvm-svn: 342551

6 years ago[AtomicExpandPass]: Add a hook for custom cmpxchg expansion in IR
Alex Bradbury [Wed, 19 Sep 2018 14:51:42 +0000 (14:51 +0000)]
[AtomicExpandPass]: Add a hook for custom cmpxchg expansion in IR

This involves changing the shouldExpandAtomicCmpXchgInIR interface, but I have
updated the in-tree backends using this hook (ARM, AArch64, Hexagon) so they
will see no functional change. Previously this hook returned bool, but it now
returns AtomicExpansionKind.

This hook allows targets to select how a given cmpxchg is to be expanded.
D48131 uses this to expand part-word cmpxchg to a target-specific intrinsic.

See my associated RFC for more info on the motivation for this change
<http://lists.llvm.org/pipermail/llvm-dev/2018-June/123993.html>.

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

llvm-svn: 342550

6 years ago[benchmark] Cherrypick fix for MinGW/ARM from upstream
Martin Storsjo [Wed, 19 Sep 2018 14:30:45 +0000 (14:30 +0000)]
[benchmark] Cherrypick fix for MinGW/ARM from upstream

This fixes building for Windows on ARM, with MinGW headers.
(Building for Windows on ARM with Windows SDK still is unsupported
by the benchmark library.)

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

llvm-svn: 342549

6 years ago[InstCombine] foldICmpWithLowBitMaskedVal(): handle uncanonical ((-1 << y) >> y)...
Roman Lebedev [Wed, 19 Sep 2018 13:35:46 +0000 (13:35 +0000)]
[InstCombine] foldICmpWithLowBitMaskedVal(): handle uncanonical ((-1 << y) >> y) mask

Summary:
The last low-bit-mask-pattern-producing-pattern i can think of.

https://rise4fun.com/Alive/UGzE <- non-canonical
But we can not canonicalize it because of extra uses.

https://bugs.llvm.org/show_bug.cgi?id=38123

Reviewers: spatel, craig.topper, RKSimon

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 342548

6 years ago[InstCombine] foldICmpWithLowBitMaskedVal(): handle uncanonical ((1 << y)+(-1)) mask
Roman Lebedev [Wed, 19 Sep 2018 13:35:40 +0000 (13:35 +0000)]
[InstCombine] foldICmpWithLowBitMaskedVal(): handle uncanonical ((1 << y)+(-1)) mask

Summary:
Same as to D52146.
`((1 << y)+(-1))` is simply non-canoniacal version of `~(-1 << y)`: https://rise4fun.com/Alive/0vl
We can not canonicalize it due to the extra uses. But we can handle it here.

Reviewers: spatel, craig.topper, RKSimon

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 342547

6 years ago[InstCombine] foldICmpWithLowBitMaskedVal(): handle ~(-1 << y) mask
Roman Lebedev [Wed, 19 Sep 2018 13:35:27 +0000 (13:35 +0000)]
[InstCombine] foldICmpWithLowBitMaskedVal(): handle  ~(-1 << y)  mask

Summary:
Two folds are happening here:
1. https://rise4fun.com/Alive/oaFX
2. And then `foldICmpWithHighBitMask()` (D52001): https://rise4fun.com/Alive/wsP4

This change doesn't just add the handling for eq/ne predicates,
it actually builds upon the previous `foldICmpWithLowBitMaskedVal()` work,
so **all** the 16 fold variants* are immediately supported.

I'm indeed only testing these two predicates.
I do not feel like re-proving all 16 folds*, because they were already proven
for the general case of constant with all-ones in low bits. So as long as
the mask produces all-ones in low bits, i'm pretty sure the fold is valid.

But required, i can re-prove, let me know.

* eq/ne are commutative - 4 folds; ult/ule/ugt/uge - are not commutative (the commuted variant is InstSimplified), 4 folds; slt/sle/sgt/sge are not commutative - 4 folds. 12 folds in total.

https://bugs.llvm.org/show_bug.cgi?id=38123
https://bugs.llvm.org/show_bug.cgi?id=38708

Reviewers: spatel, craig.topper, RKSimon

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 342546

6 years ago[ARM] Fix unwind information for floating point registers
Oliver Stannard [Wed, 19 Sep 2018 13:25:31 +0000 (13:25 +0000)]
[ARM] Fix unwind information for floating point registers

Fixes the unwind information generated for floating-point registers.
Previously, all padding registers were assumed to be four bytes wide. Now, the
width of the register is used to specify the amount of padding.

Patch by Jackson Woodruff!

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

llvm-svn: 342545

6 years ago[New PM] Introducing PassInstrumentation framework
Fedor Sergeev [Wed, 19 Sep 2018 12:25:52 +0000 (12:25 +0000)]
[New PM] Introducing PassInstrumentation framework

Summary:
Pass Execution Instrumentation interface enables customizable instrumentation
of pass execution, as per "RFC: Pass Execution Instrumentation interface"
posted 06/07/2018 on llvm-dev@

The intent is to provide a common machinery to implement all
the pass-execution-debugging features like print-before/after,
opt-bisect, time-passes etc.

Here we get a basic implementation consisting of:
* PassInstrumentationCallbacks class that handles registration of callbacks
  and access to them.

* PassInstrumentation class that handles instrumentation-point interfaces
  that call into PassInstrumentationCallbacks.

* Callbacks accept StringRef which is just a name of the Pass right now.
  There were some ideas to pass an opaque wrapper for the pointer to pass instance,
  however it appears that pointer does not actually identify the instance
  (adaptors and managers might have the same address with the pass they govern).
  Hence it was decided to go simple for now and then later decide on what the proper
  mental model of identifying a "pass in a phase of pipeline" is.

* Callbacks accept llvm::Any serving as a wrapper for const IRUnit*, to remove direct dependencies
  on different IRUnits (e.g. Analyses).

* PassInstrumentationAnalysis analysis is explicitly requested from PassManager through
  usual AnalysisManager::getResult. All pass managers were updated to run that
  to get PassInstrumentation object for instrumentation calls.

* Using tuples/index_sequence getAnalysisResult helper to extract generic AnalysisManager's extra
  args out of a generic PassManager's extra args. This is the only way I was able to explicitly
  run getResult for PassInstrumentationAnalysis out of a generic code like PassManager::run or
  RepeatedPass::run.
  TODO: Upon lengthy discussions we agreed to accept this as an initial implementation
  and then get rid of getAnalysisResult by improving RepeatedPass implementation.

* PassBuilder takes PassInstrumentationCallbacks object to pass it further into
  PassInstrumentationAnalysis. Callbacks registration should be performed directly
  through PassInstrumentationCallbacks.

* new-pm tests updated to account for PassInstrumentationAnalysis being run

* Added PassInstrumentation tests to PassBuilderCallbacks unit tests.
  Other unit tests updated with registration of the now-required PassInstrumentationAnalysis.

Reviewers: chandlerc, philip.pfaffe
Differential Revision: https://reviews.llvm.org/D47858

llvm-svn: 342544

6 years ago[TableGen] CodeGenDAGPatterns::GenerateVariants - use BitVector::set() where possible...
Simon Pilgrim [Wed, 19 Sep 2018 12:23:50 +0000 (12:23 +0000)]
[TableGen] CodeGenDAGPatterns::GenerateVariants - use BitVector::set() where possible. NFCI.

In these cases we are always setting to true.

llvm-svn: 342543

6 years ago[InstCombine] Don't transform sin/cos -> tanl if for half types
Benjamin Kramer [Wed, 19 Sep 2018 12:01:38 +0000 (12:01 +0000)]
[InstCombine] Don't transform sin/cos -> tanl if for half types

This is still unsafe for long double, we will transform things into tanl
even if tanl is for another type. But that's for someone else to fix.

llvm-svn: 342542

6 years ago[compiler-rt][TSan] Add TSan runtime support for Go on linux-aarch64.
Arnaud A. de Grandmaison [Wed, 19 Sep 2018 11:56:20 +0000 (11:56 +0000)]
[compiler-rt][TSan] Add TSan runtime support for Go on linux-aarch64.

Summary:
This patch adds TSan runtime support for Go on linux-aarch64
platforms. This enables people working on golang to implement their
platform/language part of the TSan support.

Basic testing is done with lib/tsan/go/buildgo.sh. Additional testing will be
done as part of the work done in the Go project.

It is intended to support other VMA sizes, except 39 which does not
have enough bits to support the Go heap requirements.

Patch by Fangming Fang <Fangming.Fang@arm.com>.

Reviewers: kubamracek, dvyukov, javed.absar

Subscribers: mcrosier, dberris, mgorny, kristof.beyls, delcypher, #sanitizers, llvm-commits

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

llvm-svn: 342541

6 years ago[clang-tidy] run-clang-tidy.py - fails using python 3.7
Andi-Bogdan Postelnicu [Wed, 19 Sep 2018 11:52:20 +0000 (11:52 +0000)]
[clang-tidy] run-clang-tidy.py - fails using python 3.7
Differential Revision: https://reviews.llvm.org/D51220

llvm-svn: 342540

6 years agoVerify commit access in fixing typo
Calixte Denizet [Wed, 19 Sep 2018 11:26:20 +0000 (11:26 +0000)]
Verify commit access in fixing typo

llvm-svn: 342538

6 years ago[TableGen] CodeGenDAGPatterns::GenerateVariants - use BitVector::push_back()
Simon Pilgrim [Wed, 19 Sep 2018 11:18:49 +0000 (11:18 +0000)]
[TableGen] CodeGenDAGPatterns::GenerateVariants - use BitVector::push_back()

As mentioned on D52236, this saves 10secs in debug builds of x86 -gen-dag-isel

llvm-svn: 342536

6 years ago[ADT][BitVector] Add push_back()
Simon Pilgrim [Wed, 19 Sep 2018 11:08:54 +0000 (11:08 +0000)]
[ADT][BitVector] Add push_back()

Add a higher performance alternative to calling resize() every time which performs a lot of clearing to zero - when we're adding a single bit most of the time this will be completely unnecessary.

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

llvm-svn: 342535

6 years ago[RISCV] Codegen for i8, i16, and i32 atomicrmw with RV32A
Alex Bradbury [Wed, 19 Sep 2018 10:54:22 +0000 (10:54 +0000)]
[RISCV] Codegen for i8, i16, and i32 atomicrmw with RV32A

Introduce a new RISCVExpandPseudoInsts pass to expand atomic
pseudo-instructions after register allocation. This is necessary in order to
ensure that register spills aren't introduced between LL and SC, thus breaking
the forward progress guarantee for the operation. AArch64 does something
similar for CmpXchg (though only at O0), and Mips is moving towards this
approach (see D31287). See also [this mailing list
post](http://lists.llvm.org/pipermail/llvm-dev/2016-May/099490.html) from
James Knight, which summarises the issues with lowering to ll/sc in IR or
pre-RA.

See the [accompanying RFC
thread](http://lists.llvm.org/pipermail/llvm-dev/2018-June/123993.html) for an
overview of the lowering strategy.

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

llvm-svn: 342534

6 years ago[clangd] Add option to enable/disable function argument snippets.
Kadir Cetinkaya [Wed, 19 Sep 2018 10:16:44 +0000 (10:16 +0000)]
[clangd] Add option to enable/disable function argument snippets.

Summary:
Currently LSP clients cannot directly change EnableFunctionArgSnippets parameter.
This patch is to provide them with a way to enable/disable that functionality.

Reviewers: hokein, ioeric, ilya-biryukov

Reviewed By: ilya-biryukov

Subscribers: sammccall, MaskRay, jkorous, arphaman, cfe-commits

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

llvm-svn: 342533

6 years ago[COFF] Emit @feat.00 on 64-bit and set the CFG bit when emitting guardcf tables
Hans Wennborg [Wed, 19 Sep 2018 09:58:30 +0000 (09:58 +0000)]
[COFF] Emit @feat.00 on 64-bit and set the CFG bit when emitting guardcf tables

The 0x800 bit in @feat.00 needs to be set in order to make LLD pick up
the .gfid$y table. I believe this is fine to set even if we don't emit
the instrumentation.

We haven't emitted @feat.00 on 64-bit before. I see that MSVC does emit
it, but I'm not entirely sure what the default value should be. I went
with zero since that seems as safe as not emitting the symbol in the
first place.

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

llvm-svn: 342532

6 years ago[X86][SSE] Update extractelement test in preparation for D52140
Simon Pilgrim [Wed, 19 Sep 2018 09:50:32 +0000 (09:50 +0000)]
[X86][SSE] Update extractelement test in preparation for D52140

SimplifyDemandedVectorEltsForTargetNode will remove most of this test unless get rid of the undefs - still testing for align 1 which was the point of the test

Removed out of date comment as well

llvm-svn: 342531

6 years ago[clangd] Store preamble macros in dynamic index.
Eric Liu [Wed, 19 Sep 2018 09:35:04 +0000 (09:35 +0000)]
[clangd] Store preamble macros in dynamic index.

Summary:
Pros:
o Loading macros from preamble for every completion is slow (see profile).
o Calculating macro USR is also slow (see profile).
o Sema can provide a lot of macro completion results (e.g. when filter is empty,
60k for some large TUs!).

Cons:
o Slight memory increase in dynamic index (~1%).
o Some extra work during preamble build (should be fine as preamble build and
indexAST is way slower).

Before:
{F7195645}

After:
{F7195646}

Reviewers: ilya-biryukov, sammccall

Reviewed By: sammccall

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

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

llvm-svn: 342529

6 years ago[Sema] Do not load macros from preamble when LoadExternal is false.
Eric Liu [Wed, 19 Sep 2018 09:34:55 +0000 (09:34 +0000)]
[Sema] Do not load macros from preamble when LoadExternal is false.

Reviewers: ilya-biryukov

Reviewed By: ilya-biryukov

Subscribers: cfe-commits

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

llvm-svn: 342528

6 years ago[DebugInfo][Dexter] Speculated BB presents illegal variable value to debugger.
Carlos Alberto Enciso [Wed, 19 Sep 2018 08:16:56 +0000 (08:16 +0000)]
[DebugInfo][Dexter] Speculated BB presents illegal variable value to debugger.

When SimplifyCFG changes the PHI node into a select instruction, the debug information becomes ambiguous. It causes the debugger to display wrong variable value.

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

llvm-svn: 342527

6 years ago[DWARF Verifier] Add helper function to dump DIEs. [NFC]
Jonas Devlieghere [Wed, 19 Sep 2018 08:08:13 +0000 (08:08 +0000)]
[DWARF Verifier] Add helper function to dump DIEs. [NFC]

It's pretty common for the verifier to dump the relevant DIE when it
finds an issue. This tends to be relatively verbose and error prone
because we have to pass the DIDumpOptions to the DIE's dump method. This
patch adds a helper function to the verifier to make this easier.

llvm-svn: 342526

6 years ago[NFC] Fix uncompilable test cases of ExprMutationAnalyzer.
Shuai Wang [Wed, 19 Sep 2018 03:50:03 +0000 (03:50 +0000)]
[NFC] Fix uncompilable test cases of ExprMutationAnalyzer.

And ensure future test cases doesn't have compile errors.

llvm-svn: 342525

6 years agoRemove unused include of "verbose_assert.h"
Marshall Clow [Wed, 19 Sep 2018 02:27:44 +0000 (02:27 +0000)]
Remove unused include of "verbose_assert.h"

llvm-svn: 342524

6 years ago[XRay] Detect terminfo library
Dean Michael Berris [Wed, 19 Sep 2018 01:35:52 +0000 (01:35 +0000)]
[XRay] Detect terminfo library

Instead of assuming `-ltinfo` works, check whether there's terminfo
support on the host where LLVMSupport is compiled.

Follow-up to D52220.

llvm-svn: 342523

6 years ago[WebAssembly][NFC] Remove extra space in WebAssemblyInstrSIMD.td
Thomas Lively [Wed, 19 Sep 2018 00:54:20 +0000 (00:54 +0000)]
[WebAssembly][NFC] Remove extra space in WebAssemblyInstrSIMD.td

llvm-svn: 342522

6 years agoAArch64MacroFusion: Factor out some opcode handling code; NFC
Matthias Braun [Wed, 19 Sep 2018 00:23:37 +0000 (00:23 +0000)]
AArch64MacroFusion: Factor out some opcode handling code; NFC

llvm-svn: 342521

6 years agoScheduleDAG: Cleanup dumping code; NFC
Matthias Braun [Wed, 19 Sep 2018 00:23:35 +0000 (00:23 +0000)]
ScheduleDAG: Cleanup dumping code; NFC

- Instead of having both `SUnit::dump(ScheduleDAG*)` and
  `ScheduleDAG::dumpNode(ScheduleDAG*)`, just keep the latter around.
- Add `ScheduleDAG::dump()` and avoid code duplication in several
  places. Implement it for different ScheduleDAG variants.
- Add `ScheduleDAG::dumpNodeName()` in favor of the `SUnit::print()`
  functions. They were only ever used for debug dumping and putting the
  function into ScheduleDAG is consistent with the `dumpNode()` change.

llvm-svn: 342520

6 years agoThread safety analysis: Fix crash for function pointers
Aaron Puchert [Wed, 19 Sep 2018 00:19:38 +0000 (00:19 +0000)]
Thread safety analysis: Fix crash for function pointers

For function pointers, the FunctionDecl of the callee is unknown, so
getDirectCallee will return nullptr. We have to catch that case to avoid
crashing. We assume there is no attribute then.

llvm-svn: 342519

6 years ago[XRay][compiler-rt] FDRLogWriter Abstraction
Dean Michael Berris [Tue, 18 Sep 2018 23:59:32 +0000 (23:59 +0000)]
[XRay][compiler-rt] FDRLogWriter Abstraction

Summary:
This change introduces an `FDRLogWriter` type which is responsible for
serialising metadata and function records to character buffers. This is
the first step in a refactoring of the implementation of the FDR runtime
to allow for more granular testing of the individual components of the
implementation.

The main contribution of this change is a means of hiding the details of
how specific records are written to a buffer, and for managing the
extents of these buffers. We make use of C++ features (templates and
some metaprogramming) to reduce repetition in the act of writing out
specific kinds of records to the buffer.

In this process, we make a number of changes across both LLVM and
compiler-rt to allow us to use the `Trace` abstraction defined in the
LLVM project in the testing of the runtime implementation. This gives us
a closer end-to-end test which version-locks the runtime implementation
with the loading implementation in LLVM.

We also allow using gmock in compiler-rt unit tests, by adding the
requisite definitions in the `AddCompilerRT.cmake` module.

Finally, we've gone ahead and updated the FDR logging implementation to
use the FDRLogWriter for the lowest-level record-writing details.

Following patches will isolate the state machine transitions which
manage the set-up and tear-down of the buffers we're using in multiple
threads.

Reviewers: mboerger, eizan

Subscribers: mgorny, jfb, llvm-commits

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

llvm-svn: 342518

6 years agoAdd a callback for `__has_include` and use it for dependency scanning.
Volodymyr Sapsai [Tue, 18 Sep 2018 23:27:02 +0000 (23:27 +0000)]
Add a callback for `__has_include` and use it for dependency scanning.

This adds a preprocessor callback for the `__has_include` and
`__has_include_next` directives.

Successful checking for the presence of a header should add it to the list of
header dependencies so this overrides the callback in the dependency scanner.

Patch by Pete Cooper with some additions by me.

rdar://problem/39545636

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

llvm-svn: 342517

6 years ago[MS] Defer dllexport inline friend functions like other inline methods
Reid Kleckner [Tue, 18 Sep 2018 23:16:30 +0000 (23:16 +0000)]
[MS] Defer dllexport inline friend functions like other inline methods

This special case was added in r264841, but the code breaks our
invariants by calling EmitTopLevelDecl without first creating a
HandlingTopLevelDeclRAII scope.

This fixes the PCH crash in https://crbug.com/884427. I was never able
to make a satisfactory reduction, unfortunately. I'm not very worried
about this regressing since this change makes the code simpler while
passing the existing test that shows we do emit dllexported friend
function definitions. Now we just defer their emission until the tag is
fully complete, which is generally good.

llvm-svn: 342516

6 years agoDriver: extract a local variable for the Toolchain (NFC)
Saleem Abdulrasool [Tue, 18 Sep 2018 22:14:50 +0000 (22:14 +0000)]
Driver: extract a local variable for the Toolchain (NFC)

Create and store a reference to the current toolchain rather than calling
`getToolChain` throughout the function.  NFC.

llvm-svn: 342515

6 years ago[clang-tidy] Replace redundant checks with an assert().
Artem Belevich [Tue, 18 Sep 2018 21:51:02 +0000 (21:51 +0000)]
[clang-tidy] Replace redundant checks with an assert().

findStyleKind is only called if D is an explicit identifier with a name,
so the checks for operators will never return true. The explicit assert()
enforces this invariant.

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

llvm-svn: 342514

6 years ago[WebAssembly] v4f32.abs and v2f64.abs
Thomas Lively [Tue, 18 Sep 2018 21:45:12 +0000 (21:45 +0000)]
[WebAssembly] v4f32.abs and v2f64.abs

Summary: implement lowering of @llvm.fabs for vector types.

Reviewers: aheejin, dschuff

Subscribers:

llvm-svn: 342513

6 years agoDriver: hoist `-mlimit-float-precision` (NFC)
Saleem Abdulrasool [Tue, 18 Sep 2018 21:12:39 +0000 (21:12 +0000)]
Driver: hoist `-mlimit-float-precision` (NFC)

Move the floating point argument handling into the RenderFloatingPointOptions
helper.  This relocation just puts the floating point related options into a
single location.

llvm-svn: 342512

6 years agobuild: clean up some unnecessary cached variables
Saleem Abdulrasool [Tue, 18 Sep 2018 20:33:01 +0000 (20:33 +0000)]
build: clean up some unnecessary cached variables

The CMAKE_<LANG>_ARCHIVE_FINISH rule doesn't need to be cleared for Darwin
static libraries.  Avoid resetting the variables in the SIP case.  If
CMAKE_RANLIB is cached, then CMake's Ninja generator will invoke ranlib during
installation, not due to the CMAKE_<LANG>_ARCHIVE_FINISH rule.

llvm-svn: 342511

6 years agoFix fomit-frame-pointe+pg error
David Blaikie [Tue, 18 Sep 2018 20:11:45 +0000 (20:11 +0000)]
Fix fomit-frame-pointe+pg error

llvm-svn: 342510

6 years agoRevert r342494 as it was failing on a bot and the author cannot look at it until...
Douglas Yung [Tue, 18 Sep 2018 19:34:05 +0000 (19:34 +0000)]
Revert r342494 as it was failing on a bot and the author cannot look at it until tomorrow.

Failing bot: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/36708

llvm-svn: 342509

6 years agoAllow use of self.filecheck in LLDB tests (c.f self.expect)
Vedant Kumar [Tue, 18 Sep 2018 19:31:47 +0000 (19:31 +0000)]
Allow use of self.filecheck in LLDB tests (c.f self.expect)

Add a "filecheck" method to the LLDB test base. This allows test authors
to pattern match command output using FileCheck, making it possible to
write stricter tests than what `self.expect` allows.

For context (motivation, examples of stricter checking, etc), see the
lldb-dev thread: "Using FileCheck in lldb inline tests".

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

llvm-svn: 342508

6 years ago[benchmark] Mention another cherry-picked change in README.LLVM. NFC.
Martin Storsjo [Tue, 18 Sep 2018 19:31:09 +0000 (19:31 +0000)]
[benchmark] Mention another cherry-picked change in README.LLVM. NFC.

This was cherry-picked in SVN r342450.

llvm-svn: 342506

6 years ago[clangd] Fix error handling for SymbolID parsing (notably YAML and dexp)
Sam McCall [Tue, 18 Sep 2018 19:00:59 +0000 (19:00 +0000)]
[clangd] Fix error handling for SymbolID parsing (notably YAML and dexp)

llvm-svn: 342505

6 years ago[builtins] Fix c?zdi2 on sparc64/Linux and ignore riscv32
Kristina Brooks [Tue, 18 Sep 2018 18:56:52 +0000 (18:56 +0000)]
[builtins] Fix c?zdi2 on sparc64/Linux and ignore riscv32

On sparc64/Linux, sparc64 isn't defined; the canonical way of
checking for sparc64 is sparc && arch64, which also works on the
BSDs and Solaris. Since this problem does not occur on 32-bit
architectures, riscv32 can be ignored. This fixes and refines rL324593.

Patch by jrtc27 (James Clarke)

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

llvm-svn: 342504

6 years ago[bugpoint] Revert r318459
Don Hinton [Tue, 18 Sep 2018 18:39:27 +0000 (18:39 +0000)]
[bugpoint] Revert r318459

Summary: Revert r318459 which introduced a TempFile scoping bug.

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

llvm-svn: 342503

6 years agoRemove svn:executable from a documentation file.
Kristina Brooks [Tue, 18 Sep 2018 18:37:16 +0000 (18:37 +0000)]
Remove svn:executable from a documentation file.

Should fix the buildbot failure caused by it.

llvm-svn: 342502

6 years agoFix logic around determining use of frame pointer with -pg.
Stephen Hines [Tue, 18 Sep 2018 18:34:33 +0000 (18:34 +0000)]
Fix logic around determining use of frame pointer with -pg.

Summary:
As part of r342165, I rewrote the logic to check whether
-fno-omit-frame-pointer was passed after a -fomit-frame-pointer
argument. This CL switches that logic to use the consolidated
shouldUseFramePointer() function. This fixes a potential issue where -pg
gets used with -fomit-frame-pointer on a platform that must always retain
frame pointers.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: cfe-commits

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

llvm-svn: 342501

6 years ago[Docs] [Support] System Library to Support Library transition along with minor correc...
Kristina Brooks [Tue, 18 Sep 2018 18:05:38 +0000 (18:05 +0000)]
[Docs] [Support] System Library to Support Library transition along with minor corrections to reflect it.

System Library has been a long deprecated term along with the path lib/System, having been superseded/renamed
to the Support Library a long time ago. These patches reflect those changes in documentation as well as
update some outdated examples and provide context to the origin of the Support Library.

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

llvm-svn: 342500

6 years ago[Modules] Add platform and environment features to requires clause
Bruno Cardoso Lopes [Tue, 18 Sep 2018 17:11:13 +0000 (17:11 +0000)]
[Modules] Add platform and environment features to requires clause

Allows module map writers to add build requirements based on
platform/os. This helps when target features and language dialects
aren't enough to conditionalize building a module, among other things,
it allow module maps for different platforms to live in the same file.

rdar://problem/43909745

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

llvm-svn: 342499

6 years agoDo not optimize atomic load to non-atomic memcmp
Christy Lee [Tue, 18 Sep 2018 17:02:42 +0000 (17:02 +0000)]
Do not optimize atomic load to non-atomic memcmp

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

llvm-svn: 342498

6 years ago[AMDGPU] Match udot8 pattern
Farhana Aleen [Tue, 18 Sep 2018 16:59:48 +0000 (16:59 +0000)]
[AMDGPU] Match udot8 pattern

Summary: D.u32 = S0.u4[0] * S1.u4[0] +

         S0.u4[1] * S1.u4[1] +
         S0.u4[2] * S1.u4[2] +
         S0.u4[3] * S1.u4[3] +
         S0.u4[4] * S1.u4[4] +
         S0.u4[5] * S1.u4[5] +
         S0.u4[6] * S1.u4[6] +
         S0.u4[7] * S1.u4[7] +
         S2.u32

Author: FarhanaAleen

Reviewed By: arsenm, nhaehnle

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

llvm-svn: 342497

6 years agoFix function signature to actually be an override.
Zachary Turner [Tue, 18 Sep 2018 16:58:17 +0000 (16:58 +0000)]
Fix function signature to actually be an override.

llvm-svn: 342496

6 years ago[PGO][CHR] Add opt remarks.
Hiroshi Yamauchi [Tue, 18 Sep 2018 16:50:10 +0000 (16:50 +0000)]
[PGO][CHR] Add opt remarks.

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: llvm-commits

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

llvm-svn: 342495

6 years agoCheck lines before using alias analysis to check for interference
Christy Lee [Tue, 18 Sep 2018 16:43:44 +0000 (16:43 +0000)]
Check lines before using alias analysis to check for interference

This diff is to show the difference before and after D51550

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

llvm-svn: 342494

6 years ago[PDB] Better support for enumerating pointer types.
Zachary Turner [Tue, 18 Sep 2018 16:35:05 +0000 (16:35 +0000)]
[PDB] Better support for enumerating pointer types.

There were several issues with the previous implementation.

1) There were no tests.
2) We didn't support creating PDBSymbolTypePointer records for
   builtin types since those aren't described by LF_POINTER
   records.
3) We didn't support a wide enough variety of builtin types even
   ignoring pointers.

This patch fixes all of these issues.  In order to add tests,
it's helpful to be able to ignore the symbol index id hierarchy
because it makes the golden output from the DIA version not match
our output, so I've extended the dumper to disable dumping of id
fields.

llvm-svn: 342493

6 years ago[PostRASink] Make sure to remove subregisters from live-ins as well
Krzysztof Parzyszek [Tue, 18 Sep 2018 16:10:51 +0000 (16:10 +0000)]
[PostRASink] Make sure to remove subregisters from live-ins as well

llvm-svn: 342492

6 years ago[NFC] Update comments regarding BufferSize for ProcResources
Jinsong Ji [Tue, 18 Sep 2018 15:38:56 +0000 (15:38 +0000)]
[NFC] Update comments regarding BufferSize for ProcResources

llvm-svn: 342491

6 years agoRevert rL342465: Added function to set a register to a particular value + tests.
Simon Pilgrim [Tue, 18 Sep 2018 15:38:16 +0000 (15:38 +0000)]
Revert rL342465: Added function to set a register to a particular value + tests.

rL342465 is breaking the MSVC buildbots.

llvm-svn: 342490

6 years agoRevert rL342466: [llvm-exegesis] Improve Register Setup.
Simon Pilgrim [Tue, 18 Sep 2018 15:35:49 +0000 (15:35 +0000)]
Revert rL342466: [llvm-exegesis] Improve Register Setup.

rL342465 is breaking the MSVC buildbots, but I need to revert this dependent revision as well.

Summary:
Added function to set a register to a particular value + tests.
Add EFLAGS test, use new setRegTo instead of setRegToConstant.

Reviewers: courbet, javed.absar

Subscribers: mgorny, tschuett, llvm-commits

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

llvm-svn: 342489

6 years ago[RISCV][MC] Use a custom ParserMethod for the bare_symbol operand type
Alex Bradbury [Tue, 18 Sep 2018 15:18:16 +0000 (15:18 +0000)]
[RISCV][MC] Use a custom ParserMethod for the bare_symbol operand type

This allows the hard-coded shouldForceImmediate logic to be removed because
the generated MatchOperandParserImpl makes use of the current context (i.e.
the current mnemonic) to determine parsing behaviour, and so won't first try
to parse a register before parsing a symbol name.

No functional change is intended. gas accepts immediate arguments for call,
tail and lla. This patch doesn't address this discrepancy.

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

llvm-svn: 342488

6 years ago[RISCV][MC] Reject bare symbols for the simm12 operand type
Alex Bradbury [Tue, 18 Sep 2018 15:13:29 +0000 (15:13 +0000)]
[RISCV][MC] Reject bare symbols for the simm12 operand type

addi a0, a0, foo and lw a0, foo(a0) and similar are now rejected. An explicit
%lo and %pcrel_lo modifier is required. This matches gas behaviour.

llvm-svn: 342487

6 years ago[RISCV][MC] Tighten up checking of sybol operands to lui and auipc
Alex Bradbury [Tue, 18 Sep 2018 15:08:35 +0000 (15:08 +0000)]
[RISCV][MC] Tighten up checking of sybol operands to lui and auipc

Reject bare symbols and accept only %pcrel_hi(sym) for auipc and %hi(sym) for
lui. Also test valid operand modifiers in rv32i-valid.s.

Note this is slightly stricter than gas, which will accept either %pcrel_hi or
%hi for both lui and auipc.

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

llvm-svn: 342486

6 years agoRemove dead function user_cache_directory()
Nico Weber [Tue, 18 Sep 2018 15:06:16 +0000 (15:06 +0000)]
Remove dead function user_cache_directory()

It's been unused since it was added almost 3 years ago in
https://reviews.llvm.org/D13801

Motivated by https://reviews.llvm.org/rL342002 since it removes one of the
functions keeping a ref to SHGetKnownFolderPath.

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

llvm-svn: 342485

6 years ago[index] Enhance indexing for module references
Argyrios Kyrtzidis [Tue, 18 Sep 2018 15:02:56 +0000 (15:02 +0000)]
[index] Enhance indexing for module references

* Create a USR for the occurrences of the 'module' symbol kind
* Record module references for each identifier in an import declaration

llvm-svn: 342484

6 years ago[llvm-mca] Add the ability to mark register reads/writes associated with dep-breaking...
Andrea Di Biagio [Tue, 18 Sep 2018 15:00:06 +0000 (15:00 +0000)]
[llvm-mca] Add the ability to mark register reads/writes associated with dep-breaking instructions. NFCI

This patch adds two new boolean fields:
  - Field `ReadState::IndependentFromDef`.
  - Field `WriteState::WritesZero`.

Field `IndependentFromDef` is set for ReadState objects associated with
dependency-breaking instructions. It is used by the simulator when updating data
dependencies between registers.

Field `WritesZero` is set by WriteState objects associated with dependency
breaking zero-idiom instructions. It helps the PRF identify which writes don't
consume any physical registers.

llvm-svn: 342483

6 years agoRevert r342457 "Fixes removal of dead elements from PressureDiff (PR37252)."
Hans Wennborg [Tue, 18 Sep 2018 14:12:54 +0000 (14:12 +0000)]
Revert r342457 "Fixes removal of dead elements from PressureDiff (PR37252)."

This broke the lit tests on a bunch of buildbots, e.g.
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/36679

> Reviewed By: MatzeB
>
> Differential Revision: https://reviews.llvm.org/D51495

llvm-svn: 342482

6 years agoUse pass-by-reference for-range loop. NFCI.
Simon Pilgrim [Tue, 18 Sep 2018 14:05:07 +0000 (14:05 +0000)]
Use pass-by-reference for-range loop. NFCI.

llvm-svn: 342481

6 years ago[llvm-mca] Slightly refactor class InstRef. NFC.
Andrea Di Biagio [Tue, 18 Sep 2018 14:03:46 +0000 (14:03 +0000)]
[llvm-mca] Slightly refactor class InstRef. NFC.

llvm-svn: 342480

6 years ago[ThinLTO] Update LangRef doc for summary parsing
Teresa Johnson [Tue, 18 Sep 2018 13:44:13 +0000 (13:44 +0000)]
[ThinLTO] Update LangRef doc for summary parsing

Summary:
Remove note about summary being ignored. Update to reflect the
fact that summary is now parsed by llvm-as.

While here, fix one summary format that changed since the initial
implementation.

Reviewers: dexonsmith

Subscribers: inglorion, llvm-commits

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

llvm-svn: 342479

6 years ago[PowerPC] Do not emit record-form rotates when record-form andi/andis suffices
Nemanja Ivanovic [Tue, 18 Sep 2018 13:43:16 +0000 (13:43 +0000)]
[PowerPC] Do not emit record-form rotates when record-form andi/andis suffices

This is a follow-up to the previous patch that eliminated some of the rotates.
With this addition, we will also emit the record-form andis.

This patch increases the number of record-form rotates we eliminate by
more than 70%.

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

llvm-svn: 342478

6 years ago[LTO] Make detection of WPD remark enablement more robust
Teresa Johnson [Tue, 18 Sep 2018 13:42:24 +0000 (13:42 +0000)]
[LTO] Make detection of WPD remark enablement more robust

Summary:
Currently only the first function in the module is checked to
see if it has remarks enabled. If that first function is a declaration,
remarks will be incorrectly skipped. Change to look for the first
non-empty function.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits

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

llvm-svn: 342477

6 years ago[LLVM-C][OCaml] Add UnifyFunctionExitNodes pass to C and OCaml APIs
whitequark [Tue, 18 Sep 2018 13:36:03 +0000 (13:36 +0000)]
[LLVM-C][OCaml] Add UnifyFunctionExitNodes pass to C and OCaml APIs

Summary:
Adds LLVMAddUnifyFunctionExitNodesPass to expose
createUnifyFunctionExitNodesPass to the C and OCaml APIs.

Reviewers: whitequark, deadalnix

Reviewed By: whitequark

Subscribers: llvm-commits

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

llvm-svn: 342476

6 years ago[LLVM-C][OCaml] Add LowerAtomic pass to C and OCaml APIs
whitequark [Tue, 18 Sep 2018 13:35:50 +0000 (13:35 +0000)]
[LLVM-C][OCaml] Add LowerAtomic pass to C and OCaml APIs

Summary:
Adds LLVMAddLowerAtomicPass to expose createLowerAtomicPass in the C
and OCaml APIs.

Reviewers: whitequark, deadalnix

Reviewed By: whitequark

Subscribers: jfb, llvm-commits

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

llvm-svn: 342475

6 years ago[OCaml] Add OCaml API for LLVMGetIndices
whitequark [Tue, 18 Sep 2018 13:35:39 +0000 (13:35 +0000)]
[OCaml] Add OCaml API for LLVMGetIndices

Summary:
This patch adds a thin wrapper around LLVMGetNumIndices and
LLVMGetIndices to return the indices of ExtractValue or InsertValue
instructions as an OCaml array. It has not seemed to be necessary to
expose LLVMGetNumIndices separately.

Reviewers: whitequark

Reviewed By: whitequark

Subscribers: llvm-commits

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

llvm-svn: 342474

6 years ago[clangd] Get rid of Decls parameter in indexMainDecls. NFC
Eric Liu [Tue, 18 Sep 2018 13:35:16 +0000 (13:35 +0000)]
[clangd] Get rid of Decls parameter in indexMainDecls. NFC

It's already available in ParsedAST.

llvm-svn: 342473

6 years ago[PowerPC] Optimize compares fed by ANDISo
Nemanja Ivanovic [Tue, 18 Sep 2018 13:21:58 +0000 (13:21 +0000)]
[PowerPC] Optimize compares fed by ANDISo

Both ANDIo and ANDISo (and the 64-bit versions) are record-form instructions.
When optimizing compares, we handle the former in order to eliminate the compare
instruction but not the latter. This patch just adds the latter to the set of
instructions we optimize.
The reason these instructions need to be handled separately is that they are not
part of the RecFormRel map (since they don't have a non-record-form). The
missing "and-immediate-shifted" is just an oversight in the initial
implementation.

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

llvm-svn: 342472

6 years ago[TargetLowering] Android has sincos functions
John Brawn [Tue, 18 Sep 2018 13:18:21 +0000 (13:18 +0000)]
[TargetLowering] Android has sincos functions

Since Android API version 9 the Android libm has had the sincos functions, so
they should be recognised as libcalls and sincos optimisation should be applied.

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

llvm-svn: 342471

6 years agocl-options.c: Fix negative -cfguard check
Hans Wennborg [Tue, 18 Sep 2018 13:07:55 +0000 (13:07 +0000)]
cl-options.c: Fix negative -cfguard check

llvm-svn: 342470

6 years agoFix signed/unsigned comparison warning. NFCI.
Simon Pilgrim [Tue, 18 Sep 2018 12:01:25 +0000 (12:01 +0000)]
Fix signed/unsigned comparison warning. NFCI.

llvm-svn: 342469

6 years ago[clang-tidy] use CHECK-NOTES in bugprone-unused-return-value
Jonas Toth [Tue, 18 Sep 2018 11:49:20 +0000 (11:49 +0000)]
[clang-tidy] use CHECK-NOTES in bugprone-unused-return-value

Reviewers: aaron.ballman, alexfh, hokein

Reviewed By: alexfh

Subscribers: xazax.hun, cfe-commits

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

llvm-svn: 342468

6 years ago[TableGen] CodeGenDAGPatterns::GenerateVariants - full caching of matching predicates
Simon Pilgrim [Tue, 18 Sep 2018 11:30:30 +0000 (11:30 +0000)]
[TableGen] CodeGenDAGPatterns::GenerateVariants - full caching of matching predicates

Further extension to D51035, this patch avoids all repeated predicates[] matching by caching as it collects the patterns that have multiple variants.

Saves around 25secs in debug builds of x86 -gen-dag-isel.

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

llvm-svn: 342467

6 years ago[llvm-exegesis] Improve Register Setup.
Guillaume Chatelet [Tue, 18 Sep 2018 11:26:48 +0000 (11:26 +0000)]
[llvm-exegesis] Improve Register Setup.

Summary:
Added function to set a register to a particular value + tests.
Add EFLAGS test, use new setRegTo instead of setRegToConstant.

Reviewers: courbet, javed.absar

Subscribers: mgorny, tschuett, llvm-commits

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

llvm-svn: 342466

6 years agoAdded function to set a register to a particular value + tests.
Guillaume Chatelet [Tue, 18 Sep 2018 11:26:35 +0000 (11:26 +0000)]
Added function to set a register to a particular value + tests.

llvm-svn: 342465

6 years agoImprove Register Setup
Guillaume Chatelet [Tue, 18 Sep 2018 11:26:27 +0000 (11:26 +0000)]
Improve Register Setup

llvm-svn: 342464

6 years agoRemove trailing whitespace introduced in r342440.
Alexander Kornienko [Tue, 18 Sep 2018 10:53:13 +0000 (10:53 +0000)]
Remove trailing whitespace introduced in r342440.

llvm-svn: 342463

6 years ago[X86][SSE] LowerShift - pull out repeated getTargetVShiftUniformOpcode calls. NFCI.
Simon Pilgrim [Tue, 18 Sep 2018 10:44:44 +0000 (10:44 +0000)]
[X86][SSE] LowerShift - pull out repeated getTargetVShiftUniformOpcode calls. NFCI.

llvm-svn: 342462

6 years ago[Xray] llvm-xray fix possible segfault
David Carlier [Tue, 18 Sep 2018 10:31:10 +0000 (10:31 +0000)]
[Xray] llvm-xray fix possible segfault

top argument when superior to the instrumentated code list capacity can lead to a segfault.

Reviewers: dberris

Reviewed By: dberris

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

llvm-svn: 342461

6 years ago[clangd] Merge ClangdServer::DynamicIndex into FileIndex. NFC.
Eric Liu [Tue, 18 Sep 2018 10:30:44 +0000 (10:30 +0000)]
[clangd] Merge ClangdServer::DynamicIndex into FileIndex. NFC.

Summary:
FileIndex now provides explicit interfaces for preamble and main file updates.
This avoids growing parameter list when preamble and main symbols diverge
further (e.g. D52078). This also gets rid of the hack in `indexAST` that
inferred main file index based on `TopLevelDecls`.

Also separate `indexMainDecls` from `indexAST`.

Reviewers: sammccall

Reviewed By: sammccall

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

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

llvm-svn: 342460

6 years ago[clang-tidy] use CHECK-NOTES in bugprone-forwarding-reference-overload
Jonas Toth [Tue, 18 Sep 2018 10:21:33 +0000 (10:21 +0000)]
[clang-tidy] use CHECK-NOTES in bugprone-forwarding-reference-overload

Reviewers: aaron.ballman, alexfh, hokein

Reviewed By: alexfh

Subscribers: xazax.hun, cfe-commits

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

llvm-svn: 342459

6 years ago[clang-tidy] use CHECK-NOTES in tests for bugprone-argument-comment
Jonas Toth [Tue, 18 Sep 2018 10:15:15 +0000 (10:15 +0000)]
[clang-tidy] use CHECK-NOTES in tests for bugprone-argument-comment

Summary:
This patch uses CHECK-NOTES for the tests.
Its part of an effort to test *ALL* generated diagnostics in clang-tidy,
as emitted notes were previously ignored.

Reviewers: alexfh, aaron.ballman, hokein

Reviewed By: alexfh

Subscribers: xazax.hun, cfe-commits

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

llvm-svn: 342458

6 years agoFixes removal of dead elements from PressureDiff (PR37252).
Yury Gribov [Tue, 18 Sep 2018 09:53:42 +0000 (09:53 +0000)]
Fixes removal of dead elements from PressureDiff (PR37252).

Reviewed By: MatzeB

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

llvm-svn: 342457

6 years ago[clangd] dexp tool uses llvm::cl to parse its flags.
Sam McCall [Tue, 18 Sep 2018 09:49:57 +0000 (09:49 +0000)]
[clangd] dexp tool uses llvm::cl to parse its flags.

Summary:
We can use cl::ResetCommandLineParser() to support different types of
command-lines, as long as we're careful about option lifetimes.
(I tried using subcommands, but the error messages were bad)
I found a mostly-reasonable pattern to isolate the fiddly parts.

Added -scope and -limit flags to the `find` command to demonstrate.
(Note that scope support seems to be broken in dex?)

Fixed symbol lookup to parse symbol IDs.

Caveats:
 - with command help (e.g. `find -help`), you also get some spam
   about required arguments. This is a bug in llvm::cl, which prints
   these to errs() rather than the designated stream.

Reviewers: kbobyrev

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

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

llvm-svn: 342456

6 years ago[AArch64] Attempt to parse more operands as expressions
David Green [Tue, 18 Sep 2018 09:44:53 +0000 (09:44 +0000)]
[AArch64] Attempt to parse more operands as expressions

This tries to make use of evaluateAsRelocatable in AArch64AsmParser::classifySymbolRef
to parse more complex expressions as relocatable operands. It is hopefully better than
the existing code which only handles Symbol +- Constant.

This allows us to parse more complex adr/adrp, mov, ldr/str and add operands. It also
loosens the requirements on parsing addends in ld/st and mov's and adds a number of
tests.

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

llvm-svn: 342455

6 years ago[clangd] Update code completion for #include completions in r342449
Sam McCall [Tue, 18 Sep 2018 09:08:28 +0000 (09:08 +0000)]
[clangd] Update code completion for #include completions in r342449

llvm-svn: 342453

6 years ago[clangd] Adapt API change after 342451.
Eric Liu [Tue, 18 Sep 2018 08:52:14 +0000 (08:52 +0000)]
[clangd] Adapt API change after 342451.

llvm-svn: 342452

6 years ago[Index] Add an option to collect macros from preprocesor.
Eric Liu [Tue, 18 Sep 2018 08:51:08 +0000 (08:51 +0000)]
[Index] Add an option to collect macros from preprocesor.

Summary: Also added unit tests for the index library; lit+c-index-test is painful...

Reviewers: ilya-biryukov

Reviewed By: ilya-biryukov

Subscribers: mgorny, cfe-commits

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

llvm-svn: 342451

6 years ago[benchmark] Lowercase windows specific includes
Martin Storsjo [Tue, 18 Sep 2018 08:44:57 +0000 (08:44 +0000)]
[benchmark] Lowercase windows specific includes

The windows SDK headers don't have self-consistent casing anyway,
so we consistently use lowercase for these in other places, in order
to fix crosscompilation with mingw headers.

This applies an upstream commit:
https://github.com/google/benchmark/commit/52613079824ac58d06c070aa9fbbb186a5859e2c

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

llvm-svn: 342450

6 years ago[CodeComplete] Add completions for filenames in #include directives.
Sam McCall [Tue, 18 Sep 2018 08:40:41 +0000 (08:40 +0000)]
[CodeComplete] Add completions for filenames in #include directives.

Summary:
The dir component ("somedir" in #include <somedir/fo...>) is considered fixed.
We append "foo" to each directory on the include path, and then list its files.

Completions are of the forms:
 #include <somedir/fo^
                   foo.h>
                   fox/

The filter is set to the filename part ("fo"), so fuzzy matching can be
applied to the filename only.

No fancy scoring/priorities are set, and no information is added to
CodeCompleteResult to make smart scoring possible. Could be in future.

Reviewers: ilya-biryukov

Subscribers: cfe-commits

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

llvm-svn: 342449

6 years ago[COFF] Fix the name mangling of a function in the autoexport exclusion list
Martin Storsjo [Tue, 18 Sep 2018 07:22:05 +0000 (07:22 +0000)]
[COFF] Fix the name mangling of a function in the autoexport exclusion list

The __NULL_IMPORT_DESCRIPTOR symbol has two leading underscores on
architectures other than i386 as well; it is not a mangled symbol name.

llvm-svn: 342448

6 years ago[COFF] Add support for delay loading DLLs for ARM64
Martin Storsjo [Tue, 18 Sep 2018 07:22:01 +0000 (07:22 +0000)]
[COFF] Add support for delay loading DLLs for ARM64

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

llvm-svn: 342447