Commit Graph

263412 Commits

Author SHA1 Message Date
Craig Topper f6d4dc5b4a [SelectionDAG] Set ISD::FPOWI to Expand by default
Summary:
Currently FPOWI defaults to Legal and LegalizeDAG.cpp turns Legal into Expand for this opcode because Legal is a "lie".

This patch changes the default for this opcode to Expand and removes the hack from LegalizeDAG.cpp. It also removes all the code in the targets that set this opcode to Expand themselves since they can just rely on the default.

Reviewers: spatel, RKSimon, efriedma

Reviewed By: RKSimon

Subscribers: jfb, dschuff, sbc100, jgravelle-google, nemanjai, javed.absar, andrew.w.kaylor, llvm-commits

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

llvm-svn: 304215
2017-05-30 15:27:55 +00:00
Ilya Biryukov 2260299830 [clangd] Mark results of clangd requests with a tag provided by the FileSystemProvider.
Summary:
This allows an implementation of FileSystemProvider that can track which vfs::FileSystem
were used for each of the requests.

Reviewers: bkramer, krasimir

Reviewed By: bkramer

Subscribers: klimek, cfe-commits

Tags: #clang-tools-extra

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

llvm-svn: 304214
2017-05-30 15:11:02 +00:00
Erik Verbruggen 346066b68c [libclang] Allow to suspend a translation unit.
A suspended translation unit uses significantly less memory but on the
other side does not support any other calls than
clang_reparseTranslationUnit to resume it or
clang_disposeTranslationUnit to dispose it completely.

This helps IDEs to reduce the memory footprint. The data that is freed
by a call to clang_suspendTranslationUnit will be re-generated on the
next (re)parse anyway. Used with a preamble, this allows pretty fast
resumption of the translation unit for further use (compared to disposal
of the translation unit and a parse from scratch).

Patch by Nikolai Kosjar!

llvm-svn: 304212
2017-05-30 14:25:54 +00:00
Diana Picus 6d5ac7af4a Fixup r304205 - Require PowerPC target
llvm-svn: 304211
2017-05-30 14:05:33 +00:00
Javed Absar 0841d620c5 Fix issue with test that caused bildbot failure
These tests did not specify the target. 
The failure was triggered by change - 
https://reviews.llvm.org/D33205
http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-full/builds/7314

which sets vector alignment to 8-byte for arm-targets (except for Android).
So, fixing the test to make it target specific. 

llvm-svn: 304210
2017-05-30 13:34:26 +00:00
Andrew V. Tischenko 8b04826663 This patch closes PR28513: an optimization of multiplication by different constants.
It's implemented on DAG combiner level.

llvm-svn: 304209
2017-05-30 13:00:44 +00:00
Benjamin Kramer 88d73626cd [ARM] Update long-test after r304201.
llvm-svn: 304208
2017-05-30 12:44:48 +00:00
Erik Verbruggen b34c79ff27 Allow for unfinished #if blocks in preambles
Previously, a preamble only included #if blocks (and friends like
ifdef) if there was a corresponding #endif before any declaration or
definition. The problem is that any header file that uses include guards
will not have a preamble generated, which can make code-completion very
slow.

To prevent errors about unbalanced preprocessor conditionals in the
preamble, and unbalanced preprocessor conditionals after a preamble
containing unfinished conditionals, the conditional stack is stored
in the pch file.

This fixes PR26045.

Differential Revision: http://reviews.llvm.org/D15994

llvm-svn: 304207
2017-05-30 11:54:55 +00:00
Peter Smith 626c997aff [ELF] Add .ARM.exidx sentinel section to an OutputSectionDescription
When there is a linker script with .ARM.exidx in the SECTIONS
command we must add the .ARM.exidx sentinel section to the
InputSectionDescriptions as well as to OutputSection::Sections.

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

llvm-svn: 304206
2017-05-30 11:51:02 +00:00
Benjamin Kramer c796245431 [PPC] Make altivec conversion function macros.
The second argument must be a constant, otherwise instruction selection
will fail. always_inline is not enough for isel to always fold
everything away at -O0.

Sadly the overloading turned this into a big macro mess. Fixes PR33212.

llvm-svn: 304205
2017-05-30 11:37:29 +00:00
Max Kazantsev d8fe3eb9cb [SCEV][NFC] Remove redundant params from isAvailableAtLoopEntry
Params DT and LI are redundant, because these values are contained in fields anyways.

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

llvm-svn: 304204
2017-05-30 10:54:58 +00:00
Ulrich Weigand 3f484e68cc [SystemZ] Add decimal floating-point instructions
This adds assembler / disassembler support for the decimal
floating-point instructions.  Since LLVM does not yet have
support for decimal float types, these cannot be used for
codegen at this point.

llvm-svn: 304203
2017-05-30 10:15:16 +00:00
Ulrich Weigand f32adf6944 [SystemZ] Add hexadecimal floating-point instructions
This adds assembler / disassembler support for the hexadecimal
floating-point instructions.  Since the Linux ABI does not use
any hex float data types, these are not useful for codegen.

llvm-svn: 304202
2017-05-30 10:13:23 +00:00
Javed Absar 3d92d7ab36 [ARM] Fix Neon vector type alignment to 64-bit
The maximum alignment for ARM NEON data types should be 64-bits as specified
in ARM procedure call standard document Sec. A.2 Notes.
This patch fixes it from its current larger natural default values, except
for Android (so as not to break existing ABI).
Reviewed by: Stephen Hines, Renato Golin.
Differential Revision: https://reviews.llvm.org/D33205

llvm-svn: 304201
2017-05-30 10:12:15 +00:00
Ulrich Weigand 6ceea9a4d3 [SystemZ] Add missing assembler/disassembler tests
A few instructions that are actually correctly supported in the
assembler and disassembler did not have any tests.

llvm-svn: 304200
2017-05-30 10:11:13 +00:00
Oliver Stannard 3d0f9507d5 [MC] Fix constant pools with DenseMap sentinel values
The MC ConstantPool class uses a DenseMap to track generated constants, with
the int64_t value of the constant as the key. This fails when values of
0x7fffffffffffffff or 0x7ffffffffffffffe are inserted into the constant pool, as
these are sentinel values for DenseMap.

The fix is to use std::map instead, which doesn't use sentinel values.

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

llvm-svn: 304199
2017-05-30 09:37:11 +00:00
Zoran Jovanovic 375b60de74 [mips] Expansion of LI.S and LI.D
Author: smaksimovic
Reviewers: dsanders sdardis
Introduces LI.S and LI.D pseudo instructions with floating point operands.
Differential Revision: https://reviews.llvm.org/D14390

llvm-svn: 304198
2017-05-30 09:33:43 +00:00
George Rimar fa71b2635c [ELF] - Fix comment. NFC.
llvm-svn: 304197
2017-05-30 07:51:25 +00:00
Kristof Beyls 2af1e90eb2 Fix PR33031: correct the estimate of maximum offset for instructions spilling/filling the stack.
llvm-svn: 304196
2017-05-30 06:58:41 +00:00
Daniel Berlin 2aa5dc1589 NewGVN: Compute hash value of expression on demand and use it in inequality testing.
llvm-svn: 304195
2017-05-30 06:58:18 +00:00
Daniel Berlin c8ed40400c NewGVN: Fix PR33194, memory corruption by putting temporary instructions in tables sometimes.
llvm-svn: 304194
2017-05-30 06:42:29 +00:00
Egor Churaev f59d921622 [OpenCL] Added diagnostic for implicit declaration of function in OpenCL
Reviewers: Anastasia, cfe-commits

Reviewed By: Anastasia

Subscribers: bader, yaxunl

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

llvm-svn: 304193
2017-05-30 05:57:52 +00:00
George Rimar d4096140e3 [ELF] - Do not crash when linkerscript applies fill to .bss.
I found that during visual inspection of code while wrote different patch.
Script in testcase probably have nothing common with real life, but
we segfault currently using it.

If output section is known NOBITS, there is no need to create
writers threads for doing nothing or proccess any filler logic that 
is useless here. We can just early return, that is what this patch do.

DIfferential revision: https://reviews.llvm.org/D33646

llvm-svn: 304192
2017-05-30 05:48:09 +00:00
Egor Churaev 707e37fb0d [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element
Summary:
This is the fix for patch https://reviews.llvm.org/D33353
@uweigand, could you please verify that everything will be good on SystemZ?
I added triple spir-unknown-unknown.
Thank you in advance!

Reviewers: uweigand

Reviewed By: uweigand

Subscribers: yaxunl, cfe-commits, bader, Anastasia, uweigand

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

llvm-svn: 304191
2017-05-30 05:32:03 +00:00
Richard Smith 51d09c512b Diagnose attempts to build a preprocessed module that defines an unavailable submodule.
The errors we would otherwise get are incomprehensible, as we would enter the
module but not make its contents visible to itself.

llvm-svn: 304190
2017-05-30 05:22:59 +00:00
Petr Hosek 08dfd53269 [ELF] Filter out non InputSection members from InputSections
InputSections may contain MergeInputSection members which trigger
a segmentation fault when trying to cast them to InputSection.

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

llvm-svn: 304189
2017-05-30 05:17:58 +00:00
Hiroshi Inoue d7b94d3840 [trivial] fix a typo in comment, NFC
llvm-svn: 304188
2017-05-30 05:06:46 +00:00
Galina Kistanova 5c4f1a9b02 Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
llvm-svn: 304187
2017-05-30 03:30:34 +00:00
Galina Kistanova 624b9c9a81 Added missing line continuation to HANDLE_DIEVALUE_SMALL and HANDLE_DIEVALUE_LARGE macros.
llvm-svn: 304186
2017-05-30 03:21:12 +00:00
Petr Hosek 3c6de1a66c [ELF] Use late evaluation for ALIGN in expression
While the following expression is handled fine:

  PROVIDE_HIDDEN(newsym = oldsym + address);

The following expression triggers an error because the expression
is evaluated as absolute:

  PROVIDE_HIDDEN(newsym = ALIGN(oldsym, CONSTANT(MAXPAGESIZE)) + address);

To avoid this error, we use late evaluation for ALIGN by making the
alignment an attribute of the expression itself.

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

llvm-svn: 304185
2017-05-30 03:18:28 +00:00
Galina Kistanova 0570841806 Reverted r303602, as it will be fixed in gtest.
llvm-svn: 304184
2017-05-30 03:17:10 +00:00
Richard Smith c5247e67e8 [modules] When we #include a local submodule header that we've already built,
and it has an include guard, produce callbacks for a module import, not for a
skipped non-modular header.

Fixes -E output when preprocessing a module to list these cases as a module
import, rather than suppressing the #include and losing the import side effect.

llvm-svn: 304183
2017-05-30 02:03:19 +00:00
Rafael Espindola 1da971706e Replace a few more uses of OutputSections.
llvm-svn: 304182
2017-05-30 01:36:48 +00:00
Rafael Espindola 2d9a3be2ab Keep a list of all OutputSectionCommands.
Now that we are trying to use the linker script representation as the
canonycal one, there are a few loops looking for just OutputSectionCommands.

Create a vector with just the OutputSectionCommands once that is
stable to simplify the rest of the code.

llvm-svn: 304181
2017-05-30 01:30:14 +00:00
Eric Fiselier a607ba6134 Add missing 'requires coroutines' to module map
llvm-svn: 304180
2017-05-29 23:17:28 +00:00
Joerg Sonnenberger 9375a25342 Revert r303763, results in asserts i.e. while building Ruby.
llvm-svn: 304179
2017-05-29 22:52:17 +00:00
Craig Topper 638b1021bf [TableGen] Use StringMap instead of DenseMap<StringRef> to unique CodeInit and StringInit objects. Override the allocator to keep using the BumpPtrAllocator. NFCI
StringMap is better suited to mapping strings than a DenseMap.

llvm-svn: 304178
2017-05-29 21:49:37 +00:00
Craig Topper 481ff7087f [TableGen] Introduce DagInit::getArgs that returns an ArrayRef. Use it to fix 80 column violations in arg_begin/arg_end. Remove DagInit::args and use getArgs instead. NFC
llvm-svn: 304177
2017-05-29 21:49:34 +00:00
Gor Nishanov 75a8ea5e88 CGCoroutine.cpp: (NFC) clang-format misplaced brace
llvm-svn: 304176
2017-05-29 21:15:31 +00:00
Benjamin Kramer 74de08031f [ManagedStatic] Avoid putting function pointers in template args.
This is super awkward, but GCC doesn't let us have template visible when
an argument is an inline function and -fvisibility-inlines-hidden is
used.

llvm-svn: 304175
2017-05-29 20:56:27 +00:00
Davide Italiano af66659d6b [GlobalIsel] Fix a warning with GCC 7 -Wpedantic. NFCI.
llvm-svn: 304174
2017-05-29 20:13:22 +00:00
Eric Fiselier 6e88ac2b6c Fix <experimental/coroutine> in C++03
llvm-svn: 304173
2017-05-29 19:46:16 +00:00
Eric Fiselier 3fd0228ead [coroutines] Make coroutine_handle<T>::from_address ill-formed for everything but void*.
from_address requires that the provided pointer refer to the suspended coroutine,
which doesn't have a type, or at least not one knowable by the user. Therefore
every use of `from_address` with a typed pointer is almost certainly a bug.

This behavior is a part of the TS specification, but hopefully it will be
in the future.

llvm-svn: 304172
2017-05-29 19:24:25 +00:00
Zvi Rackover c7bf2a1fae [X86] Add tests for (ix bitcast (vxi1 and ...)). NFC.
To be improved by D33311.

llvm-svn: 304171
2017-05-29 19:00:57 +00:00
Artem Dergachev 4917f894fd [analyzer] Fix immutable map factory lifetime for partial taint.
This should fix the leaks found by asan buildbot in r304162.

Also don't store a reference to the factory with every map value,
which is the only difference between ImmutableMap and ImmutableMapRef.

llvm-svn: 304170
2017-05-29 18:54:02 +00:00
Zvi Rackover 41e01b3c98 [X86] Replace undef value in flaky test
D33311 exposes the flakiness in this test. Replacing the undef placed by
bugpoint, makes it more interesting and robust.

llvm-svn: 304168
2017-05-29 18:27:00 +00:00
Benjamin Kramer e524ddeef3 Unbreak long test after r304127.
llvm-svn: 304167
2017-05-29 18:11:11 +00:00
Benjamin Kramer 94b72bfd35 [ManagedStatic] Make object_creator/object_deleter visible again.
They're now exposed as template args, which creates complications when
ManagedStatics are used across .so boundaries.

llvm-svn: 304166
2017-05-29 18:00:33 +00:00
Benjamin Kramer ca693ed79b Don't destroy ManagedStatics in a unit test.
Turns out this is very hostile towards other unit tests running in the
same process, it unregisters all flags.

llvm-svn: 304165
2017-05-29 17:25:37 +00:00
Benjamin Kramer 41b61242a4 [wasm] Fix test after r304117.
llvm-svn: 304164
2017-05-29 16:32:52 +00:00