Commit Graph

292528 Commits

Author SHA1 Message Date
Adrian Prantl 56a196c020 Mark this test as no debuginfo
llvm-svn: 335386
2018-06-22 20:26:53 +00:00
Tobias Edler von Koch 7609cb83e6 Re-land "[LTO] Enable module summary emission by default for regular LTO"
Since we are now producing a summary also for regular LTO builds, we
need to run the NameAnonGlobals pass in those cases as well (the
summary cannot handle anonymous globals).

See https://reviews.llvm.org/D34156 for details on the original change.

This reverts commit 6c9ee4a4a438a8059aacc809b2dd57128fccd6b3.

llvm-svn: 335385
2018-06-22 20:23:21 +00:00
Craig Topper 9bc2c059c3 [X86] Don't accept (%si,%bp) 16-bit address expressions.
The second register is the index register and should only be %si or %di if used with a base register. And in that case the base register should be %bp or %bx.

This makes us compatible with gas.

We do still need to support both orders with Intel syntax which uses [bp+si] and [si+bp]

llvm-svn: 335384
2018-06-22 20:20:38 +00:00
Vedant Kumar c835306ac5 [ubsan] Fix __ubsan_on_report interface definition
Speculative fix for the interface definition of __ubsan_on_report for
the Windows bots:

  http://lab.llvm.org:8011/builders/sanitizer-windows/builds/30528
  lib\ubsan\ubsan_interface.inc(55): error C2065: '__ubsan_on_report':
  undeclared identifier

INTERCEPT_SANITIZER_WEAK_FUNCTION was the wrong macro to use to begin
with because __ubsan_on_report isn't weak. Reading through that macro,
it's still not clear to me why there is an undefined reference, though,
because it appears to define a dummy __ubsan_on_report shim.

llvm-svn: 335383
2018-06-22 20:15:33 +00:00
Benjamin Kramer 9508af351a Reinstate quotes around the path to python that I accidentaly removed in r335330
This broke users with spaces in the path, like C:\Program Files\Python

llvm-svn: 335382
2018-06-22 20:03:32 +00:00
Richard Smith 69bc9aa22f Restore pre-r335182 behavior for naming inherited constructors as
members of dependent contexts.

This permits cases where the names before and after the '::' in a
dependent inherited constructor using-declaration do not match, but
where we can nonetheless tell when parsing the template that a
constructor is being named. Under (open) core language DR 2070, such
cases will probably be ill-formed, but r335182 does not quite give
that result and didn't intend to change this, so restore the old
behavior for now.

llvm-svn: 335381
2018-06-22 19:50:19 +00:00
Sam Clegg 5421b37893 Fix BUILD_SHARED_LIBS=1 build of libclangHandleLLVM
Differential Revision: https://reviews.llvm.org/D48503

llvm-svn: 335380
2018-06-22 19:44:48 +00:00
Craig Topper c26c62e0e5 [X86][AsmParser] Allow (%bp,%si) and (%bp,%di) to be encoded without using a zero displacement.
(%bp) can't be encoded without a displacement. The encoding is instead used for displacement alone. So a 1 byte displacement of 0 must be used. But if there is an index register we can encode without a displacement.

llvm-svn: 335379
2018-06-22 19:42:21 +00:00
Konstantin Zhuravlyov dd6b05c34c AMDHSA: Put old assembler docs back
Until we switch to code object v3 by default.
Follow up for https://reviews.llvm.org/D47736.

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

llvm-svn: 335378
2018-06-22 19:23:18 +00:00
Alexey Bataev 12c62908b5 [OPENMP, NVPTX] Fix reduction of the big data types/structures.
If the shuffle is required for the reduced structures/big data type,
current code may cause compiler crash because of the loading of the
aggregate values. Patch fixes this problem.

llvm-svn: 335377
2018-06-22 19:10:38 +00:00
Simon Pilgrim 938dbe664b [X86][SSE] Add sdiv by (nonuniform) minus one tests (PR37119)
Test cases from D45806

llvm-svn: 335376
2018-06-22 18:31:57 +00:00
Bruno Cardoso Lopes a9c51fe089 Re-apply: Warning for framework headers using double quote includes
Introduce -Wquoted-include-in-framework-header, which should fire a warning
whenever a quote include appears in a framework header and suggest a fix-it.
For instance, for header A.h added in the tests, this is how the warning looks
like:

./A.framework/Headers/A.h:2:10: warning: double-quoted include "A0.h" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]
#include "A0.h"
         ^~~~~~
         <A/A0.h>
./A.framework/Headers/A.h:3:10: warning: double-quoted include "B.h" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]
#include "B.h"
         ^~~~~
         <B.h>

This helps users to prevent frameworks from using local headers when in fact
they should be targetting system level ones.

The warning is off by default.

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

rdar://problem/37077034

llvm-svn: 335375
2018-06-22 18:05:17 +00:00
Emmett Neyman e5f4a9ff76 Implemented proto to LLVM conversion and LLVM fuzz target
Differential Revision: https://reviews.llvm.org/D48106

llvm-svn: 335374
2018-06-22 18:05:00 +00:00
Craig Topper cd18bb523c [X86][AsmParser] Check for invalid 16-bit base register in Intel syntax.
llvm-svn: 335373
2018-06-22 17:50:40 +00:00
Erich Keane 87cfcfd009 [NFC] Fix AttributeList allocated_size for ParsedType.
This if/elseif structure seems to be missing this case.
Previously, this would report a size of 1 pointer too small. 
This didn't really change anything besides failing to reclaim
a very small amount of memory.

llvm-svn: 335372
2018-06-22 17:34:44 +00:00
Vedant Kumar 059d20360a [ubsan] Add support for reporting diagnostics to a monitor process
Add support to the ubsan runtime for reporting diagnostics to a monitor
process (e.g a debugger).

The Xcode IDE uses this by setting a breakpoint on __ubsan_on_report and
collecting diagnostic information via __ubsan_get_current_report_data,
which it then surfaces to users in the editor UI.

Testing for this functionality already exists in upstream lldb, here:
lldb/packages/Python/lldbsuite/test/functionalities/ubsan

Apart from that, this is `ninja check-{a,ub}san` clean.

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

llvm-svn: 335371
2018-06-22 17:21:17 +00:00
Craig Topper 22d1db122a [X86] Don't allow ESP/RSP to be used as an index register in assembly.
Fixes PR37892

llvm-svn: 335370
2018-06-22 17:15:58 +00:00
Alina Sbirlea bee50036d3 [LoopUnswitch]Fix comparison for DomTree updates.
Summary:
In LoopUnswitch when replacing a branch Parent -> Succ with a conditional
branch Parent -> True & Parent->False, the DomTree updates should insert an edge for
each of True/False if True/False are different than Succ, and delete Parent->Succ edge
if both are different. The comparison with Succ appears to be incorect,
it's comparing with Parent instead.
There is no test failing either before or after this change, but it seems to me this is
the right way to do the update.

Reviewers: chandlerc, kuhar

Subscribers: sanjoy, jlebar, llvm-commits

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

llvm-svn: 335369
2018-06-22 17:14:35 +00:00
Andrea Di Biagio 1fa58109f9 [llvm-mca] Remove redundant call. NFC
llvm-svn: 335368
2018-06-22 17:03:40 +00:00
Easwaran Raman f997233890 [X86] Add a test to show missed opportunity to generate vfnmadd
llvm-svn: 335367
2018-06-22 17:01:13 +00:00
Steven Wu b3684db431 Add const qualifier on FieldChainInfoComparator::operator()
libcxx has user defined warning to check for non const call operator.
Silence the warning by adding the const on operator().

llvm-svn: 335366
2018-06-22 16:51:17 +00:00
Krzysztof Parzyszek 358a916aa8 Initialize LiveRegs once in BranchFolder::mergeCommonTails
llvm-svn: 335365
2018-06-22 16:38:38 +00:00
Simon Pilgrim 9d3ef8ee2b [SLPVectorizer] Support alternate opcodes in tryToVectorizeList
Enable tryToVectorizeList to support InstructionsState alternate opcode patterns at a root (build vector etc.) as well as further down the vectorization tree.

NOTE: This patch reduces some of the debug reporting if there are opcode mismatches - I can try to add it back if it proves a problem. But it could get rather messy trying to provide equivalent verbose debug strings via getSameOpcode etc.

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

llvm-svn: 335364
2018-06-22 16:37:34 +00:00
Andrea Di Biagio 21f0fdb219 [llvm-mca] Set the operand ID for implicit register reads/writes. NFC
Also, move the definition of InstRef at the end of Instruction.h to avoid a
forward declaration.

llvm-svn: 335363
2018-06-22 16:37:05 +00:00
Anastasia Stulova 7f785bb458 [OpenCL] Fixed parsing of address spaces for C++.
Added address space tokens to C++ parsing code to be able
to parse declarations that start from an address space keyword.

llvm-svn: 335362
2018-06-22 16:20:21 +00:00
Matt Davis 43de6db2f4 [llvm-mca] Introduce a sequential container of Stages
Summary:
Remove explicit stages and introduce a list of stages.

A pipeline should be composed of an arbitrary list of stages, and not any
 predefined list of stages in the Backend.  The Backend should not know of any
 particular stage, rather it should only be concerned that it has a list of
 stages, and that those stages will fulfill the contract of what it means to be
 a Stage (namely pre/post/execute a given instruction).

For now, we leave the original set of stages defined in the Backend ctor;
however, I imagine these will be moved out at a later time.

This patch makes an adjustment to the semantics of Stage::isReady.
Specifically, what the Backend really needs to know is if a Stage has
unfinished work.  With that said, it is more appropriately renamed
Stage::hasWorkToComplete().  This change will clean up the check in
Backend::run(), allowing us to query each stage to see if there is unfinished
work, regardless of what subclass a stage might be.  I feel that this change
simplifies the semantics too, but that's a subjective statement.

Given how RetireStage and ExecuteStage handle data in their preExecute(), I've
had to change the order of Retire and Execute in our stage list.  Retire must
complete any of its preExecute actions before ExecuteStage's preExecute can
take control.  This is mainly because both stages utilize the RCU.  In the
meantime, I want to see if I can adjust that or remove that coupling.

Reviewers: andreadb, RKSimon, courbet

Reviewed By: andreadb

Subscribers: tschuett, gbedwell, llvm-commits

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

llvm-svn: 335361
2018-06-22 16:17:26 +00:00
Sam McCall a68951e37e [clangd] More precise representation of symbol names/labels in the index.
Summary:
Previously, the strings matched LSP completion pretty closely.
The completion label was a single string, for instance. This made
implementing completion itself easy but makes it hard to use the names
in other way, e.g. pretty-printed name in synthesized
documentation/hover.

It also limits our introspection into completion items, which can only
be as precise as the indexed symbols. This change is a prerequisite to
improvements to overload bundling which need to inspect e.g. signature
structure.

Reviewers: ioeric

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

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

llvm-svn: 335360
2018-06-22 16:11:35 +00:00
Simon Pilgrim 213cb1b82d [SLPVectorizer] reorderAltShuffleOperands should just take InstructionsState. NFCI.
All calls were extracting the InstructionsState Opcode/AltOpcode values so we might as well pass it directly

llvm-svn: 335359
2018-06-22 16:10:26 +00:00
Anastasia Stulova bf549bf402 [Sema] Updated note for address spaces to print the type.
This allows to reuse the same diagnostic for OpenCL or CUDA.

llvm-svn: 335358
2018-06-22 15:45:08 +00:00
George Rimar 0cde82ade5 [ELF] - ICF: test we do not merge sections which relocations differs only in addend.
This is to test the following `return false` line which
was uncovered by our tests earlier:

https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L255

llvm-svn: 335357
2018-06-22 15:21:38 +00:00
Paul Robinson 9b9e25d34c Fix test again, try to keep all targets happy
llvm-svn: 335356
2018-06-22 15:19:45 +00:00
Sam Clegg ffd0aaf810 Revert "[WebAssembly] Error on mismatched function signature in final output"
This caused a lot of issues on the WebAssembly waterfall.
In particular, until with the signature of `main`.  We
probably want a better solution for main before we re-land.

Reverts rL335192

llvm-svn: 335355
2018-06-22 15:13:10 +00:00
George Rimar a99b3759bf [ELF] - Repair (re-enable) few ICF test cases.
--verbose is not used to report ICF sections since r324755,
--print-icf-sections is used instead.

These tests were at fact disabled since that time.

llvm-svn: 335354
2018-06-22 15:08:01 +00:00
Paul Robinson 6c43488030 Fix test, nop is not always 1 byte
llvm-svn: 335353
2018-06-22 15:07:26 +00:00
Kostya Kortchinsky 64d8093691 [Driver] Make scudo compatible with -fsanitize-minimal-runtime
Summary:
This is the clang side of the change, there is a compiler-rt counterpart.

Scudo works with UBSan using `-fsanitize=scudo,integer` for example, and to do
so it embeds UBSan runtime. This makes it not compatible with the UBSan minimal
runtime, but this is something we want for production purposes.

The idea is to have a Scudo minimal runtime on the compiler-rt side that will
not embed UBSan. This is basically the runtime that is currently in use for
Fuchsia, without coverage, stacktraces or symbolization. With this, Scudo
becomes compatible with `-fsanitize-minimal-runtime`.

If this approach is suitable, I'll add the tests as well, otherwise I am open
to other options.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: llvm-commits, cfe-commits

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

llvm-svn: 335352
2018-06-22 14:31:30 +00:00
George Rimar 6366c76fa5 [ELF] - ICF: Add 2 more test cases.
These test cases covers the following condition:
https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L243

It was uncovered by our tests. I was able to delete the whole `if`
and no test failed.

llvm-svn: 335351
2018-06-22 14:29:22 +00:00
Paul Robinson 11539b0969 [DWARFv5] Allow ".loc 0" to refer to the root file.
DWARF v5 explicitly represents file #0 in the line table.  Prior
versions did not, so ".loc 0" is still an error in those cases.

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

llvm-svn: 335350
2018-06-22 14:16:11 +00:00
Simon Pilgrim 1e564504bb [SLPVectorizer] Relax alternate opcodes to accept any BinaryOperator pair
SLP currently only accepts (F)Add/(F)Sub alternate counterpart ops to be merged into an alternate shuffle.

This patch relaxes this to accept any pair of BinaryOperator opcodes instead, assuming the target's cost model accepts the vectorization+shuffle.

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

llvm-svn: 335349
2018-06-22 14:04:06 +00:00
Simon Pilgrim 229a781214 [SLPVectorizer][X86] Add alternate opcode tests for simple build vector cases
llvm-svn: 335348
2018-06-22 13:53:58 +00:00
Sanjay Patel c2b37f73f5 [InstCombine] add shuffle+binops test from PR37806; NFC
This one shows another pattern that we'll need to match
in some cases, but the current ordering of folds allows
us to match this as 2 binops before simplification takes
place.

llvm-svn: 335347
2018-06-22 13:44:42 +00:00
George Rimar 50c6be9630 [ELF] - ICF: remove excessive check. NFC.
Change removes the excessive comparsion of
the relocation arrays sizes.

This code was dead, because at the higer level,
equalsConstant function contains the following check:

`A->NumRelocations != B->NumRelocations`
where NumRelocations contains the size of the relocations array.
So removed check did the same job twice.

This was found with use of code coverage analysis.

llvm-svn: 335346
2018-06-22 13:21:37 +00:00
Sanjay Patel cfd9da038c [InstCombine] add tests for shuffle-with-different-binops; NFC
llvm-svn: 335345
2018-06-22 13:19:25 +00:00
Pavel Labath 733ad45b9f Android.rules: Use libc++ by default
libstdc++ will soon be dropped from the android NDK. This patch makes
sure we are prepared for that by using libc++ in tests by default (i.e.,
except for libstdc++ data formatter tests).

Only a couple of small tweaks were needed to make this work:
- Add the libc++ include paths to CXXFLAGS only. This was necessary to
  make the tests compile with -fmodules. The modules tests have been
  disabled, but this way, they will be ready for them if they are
  enabled.
- in one test I had to add an explicit std::string copy to make sure the
  copy constructor is there for the expression evaluator to find it.

llvm-svn: 335344
2018-06-22 13:13:29 +00:00
Sanjay Patel a52963b404 [InstCombine] rearrange shuffle-of-binops logic; NFC
The commutative matcher makes things more complicated
here, and I'm planning an enhancement where this 
form is more readable.

llvm-svn: 335343
2018-06-22 12:46:16 +00:00
Simon Pilgrim 234a6f6842 [X86] Regenerate tests to include fma comments
Noticed in the review of D48467

llvm-svn: 335342
2018-06-22 12:41:48 +00:00
Tatyana Krasnukha a0fa299d68 ResolveAddress: check returned value of resolving functions.
llvm-svn: 335341
2018-06-22 12:24:57 +00:00
Gabor Buella 4cd698b0d1 [X86] Add notes to a few intrinsics
This a change corresponding to the clang change in
https://reviews.llvm.org/D45616

Reviewers: craig.topper, uriel.k, RKSimon, andrew.w.kaylor, spatel, scanon, efriedma

Reviewed By: craig.topper

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

llvm-svn: 335340
2018-06-22 12:01:43 +00:00
Gabor Buella 716863c820 [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR
Summary:
Lowering some vector comparision builtins to fcmp IR instructions.
This ignores the signaling behaviour specified in the predicate
argument of said builtins.

Affected AVX512 builtins:

__builtin_ia32_cmpps128_mask
__builtin_ia32_cmpps256_mask
__builtin_ia32_cmpps512_mask
__builtin_ia32_cmppd128_mask
__builtin_ia32_cmppd256_mask
__builtin_ia32_cmppd512_mask

Reviewers: craig.topper, uriel.k, RKSimon, andrew.w.kaylor, spatel, scanon, efriedma

Reviewed By: craig.topper, spatel, efriedma

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

llvm-svn: 335339
2018-06-22 11:59:16 +00:00
Jacek Olesiak 2b772c1136 [clang-format] Add AlwaysBreakBeforeMultilineString tests
Summary: Followup to D47393.

Reviewers: stephanemoore

Reviewed By: stephanemoore

Subscribers: benhamilton, cfe-commits

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

llvm-svn: 335338
2018-06-22 11:57:55 +00:00
George Rimar c9c0ccc8a9 [ELF] - Change how we handle suplicate -wrap. [NFC]
This avoids doing llvm::sort and std::unique for -wrap options.
I think it is more clean way.

llvm-svn: 335337
2018-06-22 11:18:11 +00:00