Commit Graph

241678 Commits

Author SHA1 Message Date
Richard Smith 8df390f9eb C++ Modules TS: Add parsing and some semantic analysis support for
export-declarations. These don't yet have an effect on name visibility;
we still export everything by default.

llvm-svn: 280999
2016-09-08 23:14:54 +00:00
Vedant Kumar 10037b93e9 [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64
Differential Revision: https://reviews.llvm.org/D23643

llvm-svn: 280998
2016-09-08 22:53:19 +00:00
Albert Gutowski b6a11acb53 Implement MS _rot intrinsics
Reviewers: thakis, Prazek, compnerd, rnk

Subscribers: majnemer, cfe-commits

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

llvm-svn: 280997
2016-09-08 22:32:19 +00:00
Kostya Serebryany dec394935f [libFuzzer] add missing docs
llvm-svn: 280996
2016-09-08 22:21:13 +00:00
Dehao Chen 87823f8e4d Remove debug info when hoisting instruction from then/else branch.
Summary: The hoisted instruction is executed speculatively. It could affect the debugging experience as user would see gdb go into code that may not be expected to execute. It will also affect sample profile accuracy by assigning incorrect frequency to source within then/else branch.

Reviewers: davidxl, dblaikie, chandlerc, kcc, echristo

Subscribers: mehdi_amini, probinson, eric_niebler, andreadb, llvm-commits

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

llvm-svn: 280995
2016-09-08 21:53:33 +00:00
Rui Ueyama c442cff96e Define writeUint and use it. NFC.
llvm-svn: 280994
2016-09-08 21:46:21 +00:00
Sanjay Patel a4c6223319 [InstCombine] regenerate checks
llvm-svn: 280993
2016-09-08 21:40:21 +00:00
Matthew Simpson bfe5e1817b [LV] Ensure proper handling of multi-use case when collecting uniforms
The test case included in r280979 wasn't checking what it was supposed to be
checking for the predicated store case. Fixing the test revealed that the
multi-use case (when a pointer is used by both vectorized and scalarized memory
accesses) wasn't being handled properly. We can't skip over
non-consecutive-like pointers since they may have looked consecutive-like with
a different memory access.

llvm-svn: 280992
2016-09-08 21:38:26 +00:00
Sanjay Patel ed9fda01a3 [InstCombine] regenerate checks
llvm-svn: 280991
2016-09-08 21:32:21 +00:00
Davide Italiano e02ba98f8f [ELF] Fix DT_NEEDED value.
Differential Revision: https://reviews.llvm.org/D24363

llvm-svn: 280990
2016-09-08 21:18:38 +00:00
Ed Maste e349b6da2c ELF: clarify error when we don't know the output format
lld differs from GNU ld in that it does not have a built-in default
target emulation. Emulation is always specified via the -m option, or
obtained from the object file(s) being linked. In most cases at least
one ELF object is included in the link, so the emulation is known.

When using lld's (not yet committed) -b binary support with -r, to
convert a binary file into an ELF object we do not have a known
emulation. The error message previously emitted in this case
"-m or at least a .o file required" is accurate but does not offer
much insight. Add text to the error message to give a hint why -m or an
object file is required.

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

llvm-svn: 280989
2016-09-08 21:06:29 +00:00
Saleem Abdulrasool 0fbd53434d support: clean up MSVC support
Visual Studio 2013 (CRT version 12) added support for many C99 long long and
long double functions. Visual Studio 2015 (CRT version 14) increased C99 and C11
compliance further. Since we don't support Visual Studio versions older than
2013, we can considerably clean up the support header.

Patch by Shoaib Meenai!

llvm-svn: 280988
2016-09-08 20:52:48 +00:00
Krzysztof Parzyszek a1218728d3 [RDF] Further improve handling of multiple phis reached from shadows
llvm-svn: 280987
2016-09-08 20:48:42 +00:00
Rafael Espindola c0028d3d3b Reduce templating. NFC.
llvm-svn: 280986
2016-09-08 20:47:52 +00:00
Rui Ueyama 881406e787 Define '-undefined foo' as an alias to '-undefined=foo'.
llvm-svn: 280985
2016-09-08 20:35:29 +00:00
Vassil Vassilev 714b81c40a [modules] Apply ODR merging for function scoped tags only in C++ mode.
In C mode, if we have a visible declaration but not a visible definition, a tag
defined in the declaration should be have a visible definition. In C++ we rely
on the ODR merging, whereas in C we cannot because each declaration of a
function gets its own set of declarations in its prototype scope.

Patch developed in collaboration with Richard Smith!

llvm-svn: 280984
2016-09-08 20:34:41 +00:00
Ed Maste 2b68ada188 ELF: Report original emulation name in "unknown emulation" error
A trailing _fbsd is stripped from emulation names, but if the result was
still not a valid emulation the error was somewhat confusing.

For example,

% ld.lld -m elf_amd64_fbsd
unknown emulation: elf_amd64

Use the original emulation name in error messages.

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

llvm-svn: 280983
2016-09-08 19:36:22 +00:00
Ed Maste 21e2be6403 ELF: accept -m elf_amd64 as an alias for -m elf_x86_64
In the FreeBSD world x86_64 still has its original name, amd64. Accept
it as an alias.

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

llvm-svn: 280982
2016-09-08 19:30:47 +00:00
Vedant Kumar 0b33f2c003 [llvm-cov] Fix issues with segment highlighting in the html view
The text and html coverage views take different approaches to emitting
highlighted regions. That's because this problem is easier in the text
view: there's no need to worry about escaping text or adding tooltip
content to a highlighted snippet.

Unfortunately, the html view didn't get region highlighting quite right.

This patch fixes the situation, bringing parity between the two views.

llvm-svn: 280981
2016-09-08 19:18:23 +00:00
Evgeniy Stepanov 55f9f18cb2 Fix tsan-go build.
Disable the new abort-in-SIGABRT code under SANITIZER_GO.

llvm-svn: 280980
2016-09-08 19:16:01 +00:00
Matthew Simpson 408a3abcfe [LV] Don't mark pointers used by scalarized memory accesses uniform
Previously, all consecutive pointers were marked uniform after vectorization.
However, if a consecutive pointer is used by a memory access that is eventually
scalarized, the pointer won't remain uniform after all. An example is
predicated stores. Even though a predicated store may be consecutive, it will
still be scalarized, making it's pointer operand non-uniform.

This patch updates the logic in collectLoopUniforms to consider the cases where
a memory access may be scalarized. If a memory access may be scalarized, its
pointer operand is not marked uniform. The determination of whether a given
memory instruction will be scalarized or not has been moved into a common
function that is used by the vectorizer, cost model, and legality analysis.

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

llvm-svn: 280979
2016-09-08 19:11:07 +00:00
Zachary Turner 22b652dbf8 [pdb] Make YamlTypeDumperCallbacks reuse *this.
Previously we were making new instances of YamlTypeDumperCallbacks
in order to recurse down and serialize / deserialize nested
records such as field lists.  This meant you could not pass
context from a higher operation to a lower operation because
it would be using a new instance of the visitor callback
delegate.

YAMLIO library was updated to support context-sensitive mappings,
so now we can reuse the same instance of the visitor callback
delegate even for nested operations.

llvm-svn: 280978
2016-09-08 18:36:55 +00:00
Zachary Turner 35377f88f5 [YAMLIO] Add the ability to map with context.
mapping a yaml field to an object in code has always been
a stateless operation.  You could still pass state by using the
`setContext` function of the YAMLIO object, but this represented
global state for the entire yaml input.  In order to have
context-sensitive state, it is necessary to pass this state in
at the granularity of an individual mapping.

This patch adds support for this type of context-sensitive state.
You simply pass an additional argument of type T to the
`mapRequired` or `mapOptional` functions, and provided you have
specialized a `MappingContextTraits<U, T>` class with the
appropriate mapping function, you can pass this context into
the mapping function.

Reviewed By: chandlerc
Differential Revision: https://reviews.llvm.org/D24162

llvm-svn: 280977
2016-09-08 18:22:44 +00:00
Bill Seurer ba7c5cfbbb [powerpc] Move #if to appease warnings-as-errors tests
Previous patch added a #if which causes some unused identifier warnings.

llvm-svn: 280976
2016-09-08 18:09:47 +00:00
Ahmed Bougacha 7d61594f33 Revert "Resubmit "Add a test for clang-tidy using the clang-cl driver.""
This reverts commit r280839.
It's problematic on OS X, where the '/Users/...' paths are interpreted
as '/U' options.

Investigation ongoing in http://llvm.org/PR30328.

llvm-svn: 280975
2016-09-08 18:02:14 +00:00
Matt Arsenault d745c28945 AMDGPU: Sign extend constants when splitting them
This will confuse later passes which try to look at the
immediate value and don't truncate first.

llvm-svn: 280974
2016-09-08 17:44:36 +00:00
Krzysztof Parzyszek a696b1b641 [Hexagon] Expand sext- and zextloads of vector types, not just extloads
Recent change exposed this issue, breaking the Hexagon buildbots.

llvm-svn: 280973
2016-09-08 17:42:14 +00:00
Matt Arsenault be90f70d3a AMDGPU: Try to commute when selecting s_addk_i32/s_mulk_i32
llvm-svn: 280972
2016-09-08 17:35:41 +00:00
Eric Christopher 98ddbdb563 AArch64 .arch directive - Include default arch attributes with extensions.
Fix the .arch asm parser to use the full set of features for the architecture
and any extensions on the command line. Add and update testcases accordingly
as well as add an extension that was used but not supported.

llvm-svn: 280971
2016-09-08 17:27:03 +00:00
Matt Arsenault bbb47da8a1 AMDGPU: Support commuting with immediate in src0
llvm-svn: 280970
2016-09-08 17:19:29 +00:00
Renato Golin 6f605133dd Revert "[XRay] ARM 32-bit no-Thumb support in compiler-rt"
This reverts commit r280890, as the related LLVM commit broke the thumb bots.

llvm-svn: 280969
2016-09-08 17:13:15 +00:00
Renato Golin 0f1fcd6fc6 Revert "[XRay] ARM 32-bit no-Thumb support in Clang"
This reverts commit r280889, as the original LLVM commits broke the thumb
buildbots.

llvm-svn: 280968
2016-09-08 17:12:32 +00:00
Renato Golin 049f387112 Revert "[XRay] ARM 32-bit no-Thumb support in LLVM"
And associated commits, as they broke the Thumb bots.

This reverts commit r280935.
This reverts commit r280891.
This reverts commit r280888.

llvm-svn: 280967
2016-09-08 17:10:39 +00:00
Balaram Makam c6cebf727c [LoopDataPrefetch] Use range based for loop; NFCI
Switch to range based for loop.
No functional change, but more readable code.

llvm-svn: 280966
2016-09-08 17:08:20 +00:00
Pavel Labath cfc7ae6616 Fix MSVC error from r280919
MSVC did not understand my brace-initializer syntax. :/

llvm-svn: 280965
2016-09-08 16:58:30 +00:00
Sanjay Patel 1c608f4323 [InstCombine] return a vector-safe true/false constant
I introduced this potential bug by missing this diff in:
https://reviews.llvm.org/rL280873

...however, I'm not sure how to reach this code path with a regression test.
We may be able to remove this code and assume that the transform to a constant
is always handled by InstSimplify?

llvm-svn: 280964
2016-09-08 16:54:02 +00:00
Dehao Chen ebb715b119 Add unittest for r280760
llvm-svn: 280963
2016-09-08 16:53:40 +00:00
Reid Kleckner 490ccc9cc7 Fix linker warning about sanitizer_common_nolibc functions on Windows
llvm-svn: 280962
2016-09-08 16:46:06 +00:00
Matt Arsenault fbfd828d2a Replace nextafter implementation
This one passes conformance.

llvm-svn: 280961
2016-09-08 16:37:56 +00:00
Simon Pilgrim 073472a2bf [InstCombine][X86] Regenerate masked memory op combine tests
llvm-svn: 280960
2016-09-08 16:32:37 +00:00
Simon Pilgrim cd7b2830b9 [InstCombine][X86] Regenerate vperm2f128/vperm2i128 combine tests
llvm-svn: 280959
2016-09-08 16:30:46 +00:00
Reid Kleckner dd16896324 Really fix warnings about passing -std=gnu99 to MSVC
llvm-svn: 280958
2016-09-08 16:25:34 +00:00
Simon Pilgrim 3b1ecbe66c [InstCombine][X86] Regenerate insertps combine tests
llvm-svn: 280957
2016-09-08 16:15:21 +00:00
Vedant Kumar 2c5c878312 [Coverage] Delete some dead code (NFC)
llvm-svn: 280956
2016-09-08 16:14:14 +00:00
Jason Henline 5755bb42ff Add streamexecutor-config
Summary:
Similar to llvm-config, gets command-line flags that are needed to build
applications linking against StreamExecutor.

Reviewers: jprice, jlebar

Subscribers: beanz, parallel_libs-commits

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

llvm-svn: 280955
2016-09-08 16:12:33 +00:00
Qin Zhao 0ab52b97e8 Revert "[ESan][MIPS] Adds support for MIPS64"
Summary:
This reverts commit 62b3eecdbe72af0255f0639b0446087a47efbf48. (D23799)

The CL cause 13 ESan test failure on x86_64:
Failing Tests (13):
    EfficiencySanitizer-x86_64 :: TestCases/large-stack-linux.c
    EfficiencySanitizer-x86_64 :: TestCases/libc-intercept.c
    EfficiencySanitizer-x86_64 :: TestCases/mmap-shadow-conflict.c
    EfficiencySanitizer-x86_64 :: TestCases/struct-simple.cpp
    EfficiencySanitizer-x86_64 :: TestCases/verbose-simple.c
    EfficiencySanitizer-x86_64 :: TestCases/workingset-early-fault.c
    EfficiencySanitizer-x86_64 :: TestCases/workingset-memset.cpp
    EfficiencySanitizer-x86_64 :: TestCases/workingset-midreport.cpp
    EfficiencySanitizer-x86_64 :: TestCases/workingset-samples.cpp
    EfficiencySanitizer-x86_64 :: TestCases/workingset-signal-posix.cpp
    EfficiencySanitizer-x86_64 :: TestCases/workingset-simple.cpp
    EfficiencySanitizer-x86_64 :: Unit/circular_buffer.cpp
    EfficiencySanitizer-x86_64 :: Unit/hashtable.cpp

  Unexpected Failures: 13

Reviewers: bruening, slthakur

Subscribers: sdardis, kubabrecka, beanz

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

llvm-svn: 280954
2016-09-08 16:09:46 +00:00
Francis Ricci 0b6f487c63 [compiler-rt] Don't use -fPIC when building for Windows
Summary: This flag doesn't make sense on Windows systems.

Reviewers: beanz, kubabrecka, compnerd

Subscribers: dberris, llvm-commits, beanz

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

llvm-svn: 280953
2016-09-08 15:57:22 +00:00
Sam Kolton 1b746d1b9d [TableGen] AsmMatcher: Add AsmVariantName to Instruction class.
Summary:
This allows specifying instructions that are available only in specific assembler variant. If AsmVariantName is specified then instruction will be presented only in MatchTable for this variant. If not specified then assembler variants will be determined based on AsmString.
Also this allows splitting assembler match tables in same way as it is done in dissasembler.

Reviewers: ab, tstellarAMD, craig.topper, vpykhtin

Subscribers: wdng

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

llvm-svn: 280952
2016-09-08 15:50:52 +00:00
Reid Kleckner 1361c0c6ef Remove restriction that 'sret' must be on the first parameter
On Windows, it is often applied to the second parameter, and the x86
backend is prepared to deal with sret appearing on any parameter.

Other backends assume it only appears on parameter zero, but those are
target-specific requirements, and not an IR-level rule.

llvm-svn: 280951
2016-09-08 15:45:27 +00:00
Reid Kleckner cb5c98b14a Give an x86 assembler test a triple
llvm-svn: 280950
2016-09-08 15:40:43 +00:00