platform/upstream/llvm.git
6 years agoRevert "Revert "[analyzer] Quickfix: do not overflow in calculating offset in RegionM...
George Karpenkov [Tue, 27 Feb 2018 00:05:04 +0000 (00:05 +0000)]
Revert "Revert "[analyzer] Quickfix: do not overflow in calculating offset in RegionManager""

This reverts commit c4cc41166d93178a3ddd4b2b5a685cf74a459247.

Revert and fix uninitialized read.

llvm-svn: 326152

6 years ago[Driver] Add SafeStack to a map of incompatible sanitizers
Petr Hosek [Tue, 27 Feb 2018 00:01:26 +0000 (00:01 +0000)]
[Driver] Add SafeStack to a map of incompatible sanitizers

This allows reporting an error when user tries to use SafeStack with
incompatible sanitizers.

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

llvm-svn: 326151

6 years agoFix build for iOS/ARM ("__Unwind_RaiseException" is not available for armv7).
Kuba Mracek [Mon, 26 Feb 2018 23:39:04 +0000 (23:39 +0000)]
Fix build for iOS/ARM ("__Unwind_RaiseException" is not available for armv7).

llvm-svn: 326150

6 years ago[asan] Fix build for Android
Vitaly Buka [Mon, 26 Feb 2018 23:23:07 +0000 (23:23 +0000)]
[asan] Fix build for Android

llvm-svn: 326149

6 years ago[InstCombine, InstSimplify] add tests with undef elements in constant FP vectors...
Sanjay Patel [Mon, 26 Feb 2018 23:23:02 +0000 (23:23 +0000)]
[InstCombine, InstSimplify] add tests with undef elements in constant FP vectors; NFC

llvm-svn: 326148

6 years ago[AArch64] Harden test cases
Evandro Menezes [Mon, 26 Feb 2018 23:19:25 +0000 (23:19 +0000)]
[AArch64] Harden test cases

NFC

llvm-svn: 326147

6 years ago[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings...
Eugene Zelenko [Mon, 26 Feb 2018 23:15:52 +0000 (23:15 +0000)]
[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

llvm-svn: 326146

6 years agoFix which Darwin versions have ObjC runtime with full subscripting support.
Volodymyr Sapsai [Mon, 26 Feb 2018 23:10:23 +0000 (23:10 +0000)]
Fix which Darwin versions have ObjC runtime with full subscripting support.

Update min deployment target in some tests so that they don't try
to link against libarclite and don't fail when it's not available.

rdar://problem/29253617

Reviewers: vsk, kubamracek

Reviewed By: vsk

Subscribers: jkorous-apple, cfe-commits

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

llvm-svn: 326145

6 years agoFix codeview-column-info.c test with a triple
Reid Kleckner [Mon, 26 Feb 2018 23:06:40 +0000 (23:06 +0000)]
Fix codeview-column-info.c test with a triple

llvm-svn: 326144

6 years agoFix which Darwin versions have ObjC runtime with full subscripting support.
Volodymyr Sapsai [Mon, 26 Feb 2018 23:04:57 +0000 (23:04 +0000)]
Fix which Darwin versions have ObjC runtime with full subscripting support.

Update min deployment target in some tests so that they don't try
to link against libarclite and don't fail when it's not available.

rdar://problem/29253617

Reviewers: vsk, kubamracek

Reviewed By: vsk

Subscribers: jkorous-apple, cfe-commits

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

llvm-svn: 326143

6 years ago[GISel]: Don't assert when constraining RegisterOperands which are uses.
Aditya Nandakumar [Mon, 26 Feb 2018 22:56:21 +0000 (22:56 +0000)]
[GISel]: Don't assert when constraining RegisterOperands which are uses.

Currently we assert that only non target specific opcodes can have
missing RegisterClass constraints in the MCDesc. The backend can have
instructions with register operands but don't have RegisterClass
constraints (say using unknown_class) in which case the instruction
defining the register will constrain it.
Change the assert to only fire if a def has no regclass.

https://reviews.llvm.org/D43409

llvm-svn: 326142

6 years agoRe-land "Emit proper CodeView when -gcodeview is passed without the cl driver."
Reid Kleckner [Mon, 26 Feb 2018 22:55:33 +0000 (22:55 +0000)]
Re-land "Emit proper CodeView when -gcodeview is passed without the cl driver."

Reverts r326116 and re-lands r326113 with a fix to ASan so that it
enables column info in its test suite.

llvm-svn: 326141

6 years agoAdd a sanity check for inline testcases.
Adrian Prantl [Mon, 26 Feb 2018 22:40:20 +0000 (22:40 +0000)]
Add a sanity check for inline testcases.

When writing an inline test, there is no way to make sure that any of
the inline commands are actually executed, so this patch adds a sanity
check that at least one breakpoint was hit. This avoids a test with no
breakpoints being hit passing.

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

llvm-svn: 326140

6 years agoRevert r326134 due to broken buildbot
Ed Maste [Mon, 26 Feb 2018 22:36:41 +0000 (22:36 +0000)]
Revert r326134 due to broken buildbot

llvm-svn: 326139

6 years ago[ValueTracking] Teach cannotBeOrderedLessThanZeroImpl to handle vector constants.
Craig Topper [Mon, 26 Feb 2018 22:33:17 +0000 (22:33 +0000)]
[ValueTracking] Teach cannotBeOrderedLessThanZeroImpl to handle vector constants.

Summary: This allows vector fabs to be removed in more cases.

Reviewers: spatel, arsenm, RKSimon

Reviewed By: spatel

Subscribers: wdng, llvm-commits

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

llvm-svn: 326138

6 years agoKeep flags from phantom synthetic sections.
Rafael Espindola [Mon, 26 Feb 2018 22:32:15 +0000 (22:32 +0000)]
Keep flags from phantom synthetic sections.

This fixes pr36475.

I think this code can be simplified a bit, but I would like to check
in the more direct fix if we are in agreement on the direction and
then refactor.

This is not something that bfd does. The issue is not noticed in bfd
because it keeps fewer sections from the linkerscript in the output.

The reasons why it seems reasonable to do this:

- As George noticed, we would still keep the flags if the output
  section had both an empty synthetic section and a regular section
- We need an heuristic to find the flags of output sections. Using the
  flags of a synthetic section that would have been there seems a
  reasonable heuristic.

llvm-svn: 326137

6 years ago[analyzer] Exploration strategy prioritizing unexplored nodes first
George Karpenkov [Mon, 26 Feb 2018 22:14:18 +0000 (22:14 +0000)]
[analyzer] Exploration strategy prioritizing unexplored nodes first

See D42775 for discussion.  Turns out, just exploring nodes which
weren't explored first is not quite enough, as e.g. the first quick
traversal resulting in a report can mark everything as "visited", and
then subsequent traversals of the same region will get all the pitfalls
of DFS.
Priority queue-based approach in comparison shows much greater
increase in coverage and even performance, without sacrificing memory.

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

llvm-svn: 326136

6 years ago[analyzer] Do not analyze bison-generated files
George Karpenkov [Mon, 26 Feb 2018 22:14:16 +0000 (22:14 +0000)]
[analyzer] Do not analyze bison-generated files

Bison/YACC generated files result in a very large number of (presumably)
false positives from the analyzer.
These false positives are "true" in a sense of the information analyzer
sees: assuming that the lexer can return any token at any point a number
of uninitialized reads does occur.
(naturally, the analyzer can not capture a complex invariant that
certain tokens can only occur under certain conditions).

Current fix simply stops analysis on those files.
I have examined a very large number of such auto-generated files, and
they do all start with such a comment.
Conversely, user code is very unlikely to contain such a comment.

rdar://33608161

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

llvm-svn: 326135

6 years agoMark test_*int*_t_dwarf as failing on FreeBSD
Ed Maste [Mon, 26 Feb 2018 22:12:24 +0000 (22:12 +0000)]
Mark test_*int*_t_dwarf as failing on FreeBSD

Further investigation required; tests will be enabled on the buildbot
worker soon. Marking failing tests for now in order to start with a
green buildbot while investigation takes place.

llvm.org/pr36527

llvm-svn: 326134

6 years ago[X86][SSE] Reduce FADD/FSUB/FMUL costs on later targets (PR36280)
Simon Pilgrim [Mon, 26 Feb 2018 22:10:17 +0000 (22:10 +0000)]
[X86][SSE] Reduce FADD/FSUB/FMUL costs on later targets (PR36280)

Agner's tables indicate that for SSE42+ targets (Core2 and later) we can reduce the FADD/FSUB/FMUL costs down to 1, which should fix the Himeno benchmark.

Note: the AVX512 FDIV costs look rather dodgy, but this isn't part of this patch.

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

llvm-svn: 326133

6 years ago[asan] Intercept std::rethrow_exception indirectly
Vitaly Buka [Mon, 26 Feb 2018 21:40:19 +0000 (21:40 +0000)]
[asan] Intercept std::rethrow_exception indirectly

Summary:
Fixes Bug 32434
See https://bugs.llvm.org/show_bug.cgi?id=32434

Short summary:
std::rethrow_exception does not use __cxa_throw to rethrow the exception, so if
it is called from uninstrumented code, it will leave the stack poisoned. This
can lead to false positives.

Long description:

For functions which don't return normally (e.g. via exceptions), asan needs to
unpoison the entire stack. It is not known before a call to such a function
where execution will continue, some function which don't contain cleanup code
like destructors might be skipped. After stack unwinding, execution might
continue in uninstrumented code.

If the stack has been poisoned before such a function is called, but the stack
is unwound during the unconventional return, then zombie redzones (entries) for
no longer existing stack variables can remain in the shadow memory. Normally,
this is avoided by asan generating a call to asan_handle_no_return before all
functions marked as [[noreturn]]. This asan_handle_no_return unpoisons the
entire stack. Since these [[noreturn]] functions can be called from
uninstrumented code, asan also introduces interceptor functions which call
asan_handle_no_return before running the original [[noreturn]] function;
for example, cxa_throw is intercepted.

If a [[noreturn]] function is called from uninstrumented code (so the stack is
left poisoned) and additionally, execution continues in uninstrumented code, new
stack variables might be introduced and overlap with the stack variables
which have been removed during stack unwinding. Since the redzones are not
cleared nor overwritten by uninstrumented code, they remain but now contain
invalid data.

Now, if the redzones are checked against the new stack variables, false
positive reports can occur. This can happen for example by the uninstrumented
code calling an intercepted function such as memcpy, or an instrumented
function.

Intercepting std::rethrow_exception directly is not easily possible since it
depends on the C++ standard library implementation (e.g. libcxx vs libstdc++)
and the mangled name it produces for this function. As a rather simple
workaround, we're intercepting _Unwind_RaiseException for libstdc++. For
libcxxabi, we can intercept the ABI function __cxa_rethrow_primary_exception.

Patch by Robert Schneider.

Reviewers: kcc, eugenis, alekseyshl, vitalybuka

Reviewed By: vitalybuka

Subscribers: llvm-commits

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

llvm-svn: 326132

6 years agoRevert "[analyzer] Quickfix: do not overflow in calculating offset in RegionManager"
George Karpenkov [Mon, 26 Feb 2018 21:32:57 +0000 (21:32 +0000)]
Revert "[analyzer] Quickfix: do not overflow in calculating offset in RegionManager"

This reverts commit df306c4c5ab4a6b8d3c47432346d1f9b90c328b4.

Reverting until I can figured out the reasons for failures.

llvm-svn: 326131

6 years agoPartial fix for TestConflictingSymbol.py on Windows
Adrian McCarthy [Mon, 26 Feb 2018 21:22:39 +0000 (21:22 +0000)]
Partial fix for TestConflictingSymbol.py on Windows

Without this fix, the test ERRORs because the link of the inferior fails. This
patch adds the LLDB_TEST_API macro where needed and uses the new -2 magic
value for num_expected_locations to account for lazy-loading of module symbols
on Windows.

With this fix, the test itself still fails:  conflicting_symbol isn't in the
debug info nor the export table, and Windows binaries don't have an equivalent
of the ELF .symtab.  We need to understand why the test works to keep the
symbol out of the debug info.  In the mean time, having the test fail at this
point is a better indication of the remaining problem than a build error.

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

llvm-svn: 326130

6 years ago[DebugInfo] Remove target-specific instructions in test
Scott Linder [Mon, 26 Feb 2018 21:21:19 +0000 (21:21 +0000)]
[DebugInfo] Remove target-specific instructions in test

This AsmParser test is target-agnostic, but contained some target-specific
instructions, which broke on SystemZ.

llvm-svn: 326129

6 years ago[X86] Add constant folding to combineMOVMSK.
Craig Topper [Mon, 26 Feb 2018 21:17:33 +0000 (21:17 +0000)]
[X86] Add constant folding to combineMOVMSK.

There's still some shortcoming in our ability to combine binops of constants with different sizes separated by an extend. I'll try to look at that next.

llvm-svn: 326128

6 years ago[opt-viewer] Kill parser processes before moving onto rendering
Adam Nemet [Mon, 26 Feb 2018 21:15:51 +0000 (21:15 +0000)]
[opt-viewer] Kill parser processes before moving onto rendering

The main benefit is that they release the memory they were holding onto.

llvm-svn: 326127

6 years agoopt-diff: Support splitting to multiple output files
Adam Nemet [Mon, 26 Feb 2018 21:15:51 +0000 (21:15 +0000)]
opt-diff: Support splitting to multiple output files

When reading the resulting files back with opt-viewer, they will be parsed in
parallel.

llvm-svn: 326126

6 years ago[opt-viewer] Set title for the source pages
Adam Nemet [Mon, 26 Feb 2018 21:15:50 +0000 (21:15 +0000)]
[opt-viewer] Set title for the source pages

llvm-svn: 326125

6 years agoopt-viewer: also find thinlto opt.yaml files
Adam Nemet [Mon, 26 Feb 2018 21:15:49 +0000 (21:15 +0000)]
opt-viewer: also find thinlto opt.yaml files

llvm-svn: 326124

6 years agoopt-viewer: output index first
Adam Nemet [Mon, 26 Feb 2018 21:15:47 +0000 (21:15 +0000)]
opt-viewer: output index first

One can start looking at the index while the pages are still generating

llvm-svn: 326123

6 years ago[analyzer] Quickfix: do not overflow in calculating offset in RegionManager
George Karpenkov [Mon, 26 Feb 2018 21:03:06 +0000 (21:03 +0000)]
[analyzer] Quickfix: do not overflow in calculating offset in RegionManager

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

rdar://37159026

A proper fix would be much harder, and would involve changing the
appropriate code in ExprEngine to be aware of the size limitations of
the type used for addressing.

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

llvm-svn: 326122

6 years ago[Darwin] Specify DWARF 2/4 when running apple accelerator tests.
Davide Italiano [Mon, 26 Feb 2018 20:56:45 +0000 (20:56 +0000)]
[Darwin] Specify DWARF 2/4 when running apple accelerator tests.

These sections will be retired. Also, explicitly list llvm-objdump
as a dependency. This should've been done in the previous commit,
but I failed to squash the two changes together.

Thanks to Adrian for pointing the first problem out in a comment.

llvm-svn: 326121

6 years ago[libcxx] [test] Fix MSVC warnings and errors.
Stephan T. Lavavej [Mon, 26 Feb 2018 20:47:46 +0000 (20:47 +0000)]
[libcxx] [test] Fix MSVC warnings and errors.

test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp
test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp
test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp
test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp
test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp
test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp
Fix MSVC x64 truncation warnings.
warning C4267: conversion from 'size_t' to 'int', possible loss of data

test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
Fix MSVC uninitialized memory warning.
warning C6001: Using uninitialized memory 'vl'.

test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp
Include <cassert> for the assert() macro.

Fixes D43273.

llvm-svn: 326120

6 years ago[X86] Add a custom legalization for (i16 (bitcast v16i1)) and (i32 (bitcast v32i1...
Craig Topper [Mon, 26 Feb 2018 20:32:27 +0000 (20:32 +0000)]
[X86] Add a custom legalization for (i16 (bitcast v16i1)) and (i32 (bitcast v32i1)) without AVX512 to prevent scalarization

Summary:
We have an early DAG combine to turn these patterns into MOVMSK, but that combine doesn't work if the vXi1 type has more elements than the widest legal vXi8 type. Type legalization will eventually split it down to v16i1 or v32i1 and then the bitcast gets legalized to a truncstore and a scalar load. The truncstore will get lowered to a series of extracts and bit math.

This patch adds a custom legalization to use a sign extend and MOVMSK instead. This prevents the eventual scalarization.

Reviewers: spatel, RKSimon, zvi

Reviewed By: RKSimon

Subscribers: mgorny, llvm-commits

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

llvm-svn: 326119

6 years agoFix for LLVM r326109
David Zarzycki [Mon, 26 Feb 2018 20:21:30 +0000 (20:21 +0000)]
Fix for LLVM r326109

llvm-svn: 326118

6 years ago[SLP] Added new test + fixed some checks, NFC.
Alexey Bataev [Mon, 26 Feb 2018 20:01:24 +0000 (20:01 +0000)]
[SLP] Added new test + fixed some checks, NFC.

llvm-svn: 326117

6 years agoRevert "Emit proper CodeView when -gcodeview is passed without the cl driver."
Zachary Turner [Mon, 26 Feb 2018 19:51:29 +0000 (19:51 +0000)]
Revert "Emit proper CodeView when -gcodeview is passed without the cl driver."

This reverts commit e17911006548518634fad66bb8648bcad49a1d64.

This is failing on ASAN bots because asan expects column info,
and it's also failing on some linux bots for unknown reasons which
i need to investigate.

llvm-svn: 326116

6 years ago[InstCombine] Add test cases with vector constants to fpextend.ll
Craig Topper [Mon, 26 Feb 2018 19:36:37 +0000 (19:36 +0000)]
[InstCombine] Add test cases with vector constants to fpextend.ll

llvm-svn: 326115

6 years ago[InstCombine] Switch to using FileCheck instead of grep. Auto-generate checks. NFC
Craig Topper [Mon, 26 Feb 2018 19:36:36 +0000 (19:36 +0000)]
[InstCombine] Switch to using FileCheck instead of grep. Auto-generate checks. NFC

llvm-svn: 326114

6 years agoEmit proper CodeView when -gcodeview is passed without the cl driver.
Zachary Turner [Mon, 26 Feb 2018 19:25:39 +0000 (19:25 +0000)]
Emit proper CodeView when -gcodeview is passed without the cl driver.

Windows debuggers don't work properly when column info is emitted
with lines.  We handled this by checking if the driver mode was
cl, but it's possible to cause the gcc driver to emit codeview as
well, and in that path we were emitting column info with codeview.

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

llvm-svn: 326113

6 years agoAdd "lldb-test breakpoint" command and convert the case-sensitivity test to use it
Pavel Labath [Mon, 26 Feb 2018 18:50:16 +0000 (18:50 +0000)]
Add "lldb-test breakpoint" command and convert the case-sensitivity test to use it

Summary:
The command takes two input arguments: a module to use as a debug target
and a file containing a list of commands. The command will execute each
of the breakpoint commands in the file and dump the breakpoint state
after each one.

The commands are expected to be breakpoint set/remove/etc. commands, but
I explicitly allow any lldb command here, so you can do things like
change setting which impact breakpoint resolution, etc. There is also a
"-persistent" flag, which causes lldb-test to *not* automatically clear
the breakpoint list after each command. Right now I don't use it, but
the idea behind it was that it could be used to test more complex
combinations of breakpoint commands (set+modify, set+disable, etc.).

Right now the command prints out only the basic breakpoint state, but
more information can be easily added there.  To enable easy matching of
the "at least one breakpoint location found" state, the command
explicitly prints out the string "At least one breakpoint location.".

To enable testing of breakpoints set with an absolute paths, I add the
ability to perform rudimentary substitutions on the commands: right now
the string %p is replaced by the directory which contains the command
file (so, under normal circumstances, this will perform the same
substitution as lit would do for %p).

I use this command to rewrite the TestBreakpointCaseSensitivity test --
the test was checking about a dozen breakpoint commands, but it was
launching a new process for each one, so it took about 90 seconds to
run. The new test takes about 0.3 seconds for me, which is approximately
a 300x speedup.

Reviewers: davide, zturner, jingham

Subscribers: luporl, lldb-commits

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

llvm-svn: 326112

6 years agoFix-up for r326106: FindAvailableMemoryRange needs a nullptr as its 5th argument.
Kuba Mracek [Mon, 26 Feb 2018 18:44:43 +0000 (18:44 +0000)]
Fix-up for r326106: FindAvailableMemoryRange needs a nullptr as its 5th argument.

llvm-svn: 326111

6 years agoFix for LLVM r326109
David Zarzycki [Mon, 26 Feb 2018 18:42:30 +0000 (18:42 +0000)]
Fix for LLVM r326109

llvm-svn: 326110

6 years ago[ADT] Simplify and optimize StringSwitch
David Zarzycki [Mon, 26 Feb 2018 18:41:26 +0000 (18:41 +0000)]
[ADT] Simplify and optimize StringSwitch

This change improves incremental rebuild performance on dual Xeon 8168
machines by 54%. This change also improves run time code gen by not
forcing the case values to be lvalues.

llvm-svn: 326109

6 years ago[Driver] Forward opt-remark hotness threshold to LTO
Adam Nemet [Mon, 26 Feb 2018 18:38:11 +0000 (18:38 +0000)]
[Driver] Forward opt-remark hotness threshold to LTO

llvm-svn: 326108

6 years ago[LTO] Support filtering by hotness threshold
Adam Nemet [Mon, 26 Feb 2018 18:37:45 +0000 (18:37 +0000)]
[LTO] Support filtering by hotness threshold

This wires up -pass-remarks-hotness-threshold to LTO and ThinLTO.

Next is to change the clang driver to pass this
with -fdiagnostics-hotness-threshold.

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

llvm-svn: 326107

6 years ago[asan] Be more careful and verbose when allocating dynamic shadow memory
Kuba Mracek [Mon, 26 Feb 2018 18:33:21 +0000 (18:33 +0000)]
[asan] Be more careful and verbose when allocating dynamic shadow memory

FindAvailableMemoryRange can currently overwrite existing memory (by restricting the VM below addresses that are already used). This patch adds a check to make sure we don't restrict the VM space too much. We are also now more explicit about why the lookup failed and print out verbose values.

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

llvm-svn: 326106

6 years ago[MSan] Print current stack on CHECK violation
Alex Shlyapnikov [Mon, 26 Feb 2018 18:27:24 +0000 (18:27 +0000)]
[MSan] Print current stack on CHECK violation

Summary:
Print current stack on CHECK violation to aid debugging and
match other sanitizers functionality.

Reviewers: eugenis

Subscribers: delcypher, llvm-commits, #sanitizers

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

llvm-svn: 326105

6 years ago[X86][AVX] createPSADBW - support 256-bit cases on AVX1 via SplitBinaryOpsAndApply
Simon Pilgrim [Mon, 26 Feb 2018 18:17:25 +0000 (18:17 +0000)]
[X86][AVX] createPSADBW - support 256-bit cases on AVX1 via SplitBinaryOpsAndApply

llvm-svn: 326104

6 years ago[DebugInfo] Support DWARF v5 source code embedding extension
Scott Linder [Mon, 26 Feb 2018 17:32:31 +0000 (17:32 +0000)]
[DebugInfo] Support DWARF v5 source code embedding extension

In DWARF v5 the Line Number Program Header is extensible, allowing values with
new content types. This vendor extension to DWARF v5 allows source text to be
embedded directly in the line tables of the debug line section.

Add new flag (-g[no-]embed-source) to Driver and CC1 which indicates
that source should be passed through to LLVM during CodeGen.

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

llvm-svn: 326102

6 years agoAMDGPU/GlobalISel: Make f64 constants legal
Matt Arsenault [Mon, 26 Feb 2018 17:20:43 +0000 (17:20 +0000)]
AMDGPU/GlobalISel: Make f64 constants legal

llvm-svn: 326101

6 years ago[scudo] Make some tests less Linux-y
Kostya Kortchinsky [Mon, 26 Feb 2018 17:14:44 +0000 (17:14 +0000)]
[scudo] Make some tests less Linux-y

Summary:
Start making the Scudo tests less Linux-y:
- `malloc_usable_size` doesn't exist everywhere, so replace them with
  `__sanitizer_get_allocated_size` which we provide;
- move all the `memalign` related tests into `memalign.c` since it's also not
  available everywhere.

I also noticed that the `memalign.c` was missing a line in one of the loops.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: delcypher, #sanitizers, llvm-commits

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

llvm-svn: 326100

6 years ago[CodeGen][DebugInfo] Refactor duplicated code, NFC
Scott Linder [Mon, 26 Feb 2018 16:31:08 +0000 (16:31 +0000)]
[CodeGen][DebugInfo] Refactor duplicated code, NFC

llvm-svn: 326099

6 years ago[InstCombine] allow fdiv folds with less than fully 'fast' ops
Sanjay Patel [Mon, 26 Feb 2018 16:02:45 +0000 (16:02 +0000)]
[InstCombine] allow fdiv folds with less than fully 'fast' ops

Note: gcc appears to allow this fold with -freciprocal-math alone,
but clang/llvm require more than that with this patch. The wording
in the definitions seems fuzzy enough that it could go either way,
but we'll err on the conservative side of FMF interpretation.

This patch also changes the newly created fmul to have FMF propagated
by the last fdiv rather than intersecting the FMF of the fdivs. This
matches the behavior of other folds near here. The new fmul is only
used to produce an intermediate op for the final fdiv result, so it
shouldn't be any stricter than that result. The previous behavior
could result in dropping FMF via other folds in instcombine or CSE.

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

llvm-svn: 326098

6 years ago[X86][AVX] Add AVX1 PSAD tests
Simon Pilgrim [Mon, 26 Feb 2018 15:55:25 +0000 (15:55 +0000)]
[X86][AVX] Add AVX1 PSAD tests

Cleanup check-prefixes to share more AVX/AVX512 codegen checks

llvm-svn: 326097

6 years agoRevert r326092: [gtest] Add PrintTo overload for StringRef.
Ilya Biryukov [Mon, 26 Feb 2018 15:54:59 +0000 (15:54 +0000)]
Revert r326092: [gtest] Add PrintTo overload for StringRef.

It seems to break the following buildbot:
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/24729

Will resubmit after investigating and fixing it.

llvm-svn: 326096

6 years agoFix tabs/spaces indentation problem in TestUnicodeSymbols.py
Adrian McCarthy [Mon, 26 Feb 2018 15:53:31 +0000 (15:53 +0000)]
Fix tabs/spaces indentation problem in TestUnicodeSymbols.py

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

llvm-svn: 326095

6 years ago[CodeGen] Don't omit any redundant information in -debug output
Francis Visoiu Mistrih [Mon, 26 Feb 2018 15:23:42 +0000 (15:23 +0000)]
[CodeGen] Don't omit any redundant information in -debug output

In r322867, we introduced IsStandalone when printing MIR in -debug
output. The default behaviour for that was:

1) If any of MBB, MI, or MO are -debug-printed separately, don't omit any
redundant information.

2) When -debug-printing a MF entirely, don't print any redundant
information.

3) When printing MIR, don't print any redundant information.

I'd like to change 2) to:

2) When -debug-printing a MF entirely, don't omit any redundant information.

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

llvm-svn: 326094

6 years ago[X86][SSE] Regenerate PSAD tests
Simon Pilgrim [Mon, 26 Feb 2018 15:21:58 +0000 (15:21 +0000)]
[X86][SSE] Regenerate PSAD tests

Fixes scary typo in a check that lost the end digit off a reg#...

llvm-svn: 326093

6 years ago[gtest] Add PrintTo overload for StringRef.
Ilya Biryukov [Mon, 26 Feb 2018 15:19:26 +0000 (15:19 +0000)]
[gtest] Add PrintTo overload for StringRef.

Summary:
It was printed using code for generic containers before, resulting in
unreadable output.

Reviewers: sammccall, labath

Reviewed By: sammccall, labath

Subscribers: labath, zturner, llvm-commits

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

llvm-svn: 326092

6 years agoRe-land: "[Support] Replace HashString with djbHash."
Jonas Devlieghere [Mon, 26 Feb 2018 15:16:42 +0000 (15:16 +0000)]
Re-land: "[Support] Replace HashString with djbHash."

This patch removes the HashString function from StringExtraces and
replaces its uses with calls to djbHash from DJB.h.

This change is *almost* NFC. While the algorithm is identical, the
djbHash implementation in StringExtras used 0 as its default seed while
the implementation in DJB uses 5381. The latter has been shown to result
in less collisions and improved avalanching and is used by the DWARF
accelerator tables.

Because some test were implicitly relying on the hash order, I've
reverted to using zero as a seed for the following two files:

  lld/include/lld/Core/SymbolTable.h
  llvm/lib/Support/StringMap.cpp

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

llvm-svn: 326091

6 years ago[ELF] - Fix variable name and mistype in comment. NFC.
George Rimar [Mon, 26 Feb 2018 15:16:03 +0000 (15:16 +0000)]
[ELF] - Fix variable name and mistype in comment. NFC.

llvm-svn: 326090

6 years agoRe-commit r324991 "Fix for PR32992. Static const classes not exported."
Hans Wennborg [Mon, 26 Feb 2018 15:03:59 +0000 (15:03 +0000)]
Re-commit r324991 "Fix for PR32992. Static const classes not exported."

Fix for PR32992. Static const classes not exported.

Patch by zahiraam!

(This re-lands the commit, but using S.MarkVariableReferenced instead of
S.PendingInstantiations.push_back, and with an additional test.)

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

llvm-svn: 326089

6 years ago[AMDGPU] Scratch setup fix on AMDPAL gfx9+ merge shader
Tim Renouf [Mon, 26 Feb 2018 14:46:43 +0000 (14:46 +0000)]
[AMDGPU] Scratch setup fix on AMDPAL gfx9+ merge shader

Summary:
With OS type AMDPAL, the scratch descriptor is hardwired to be loaded
from offset 0 of the global information table, whose low pointer is
passed in s0. For a merge shader on gfx9+, it needs to be s8 instead, as
the hardware reserves s0-s7.

Reviewers: kzhuravl

Subscribers: arsenm, nhaehnle, dstuttard, llvm-commits, t-tye, yaxunl, wdng, kzhuravl

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

llvm-svn: 326088

6 years ago[LiveIntervals] Handle moving up dead partial write
Tim Renouf [Mon, 26 Feb 2018 14:42:13 +0000 (14:42 +0000)]
[LiveIntervals] Handle moving up dead partial write

Summary:
In the test case, the machine scheduler moves a dead write to a subreg
up into the middle of a segment of the overall reg's live range, where
the segment had liveness only for other subregs in the reg.
handleMoveUp created an invalid live range, causing an assert a bit
later.

This commit fixes it to handle that situation. The segment is split in
two at the insertion point, and the part after the split, and any
subsequent segments up to the old position, are changed to be defined by
the moved def.

V2: Better test.

Subscribers: MatzeB, nhaehnle, llvm-commits

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

Change-Id: Ibc42445ddca84e79ad1f616401015d22bc63832e
llvm-svn: 326087

6 years agoResolve build bot problems in unittests/Format/FormatTest.cpp
Bjorn Pettersson [Mon, 26 Feb 2018 14:14:11 +0000 (14:14 +0000)]
Resolve build bot problems in unittests/Format/FormatTest.cpp

Summary:
Make the new GetStyleWithEmptyFileName test case independent
of the file system used when running the test. Since the
test is supposed to use the fallback "Google" style we now
use a InMemoryFileSystem to make sure that we do not accidentaly
find a .clang-format file in the real file system. That could
for example happen when having the build directory inside the
llvm och clang repo (as there is a .clang-format file inside
the repos).

Reviewers: vsapsai, jolesiak, krasimir, benhamilton

Reviewed By: krasimir

Subscribers: uabelho, twoh, klimek, cfe-commits

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

llvm-svn: 326086

6 years agoTest commit
David Zarzycki [Mon, 26 Feb 2018 13:05:18 +0000 (13:05 +0000)]
Test commit

llvm-svn: 326085

6 years agoSkip two more ioctl interceptors for NetBSD
Kamil Rytarowski [Mon, 26 Feb 2018 13:00:40 +0000 (13:00 +0000)]
Skip two more ioctl interceptors for NetBSD

Don't intercept:
 - HFSC_IF_ATTACH
 - HFSC_MOD_CLASS

These operations conflict on NetBSD 32-bit with:
 - PRIQ_IF_ATTACH
 - PRIQ_MOD_CLASS

Sponsored by <The NetBSD Foundation>

llvm-svn: 326084

6 years agoExplicitly initialize ForceEnableInt128 to avoid UB
Ilya Biryukov [Mon, 26 Feb 2018 12:06:05 +0000 (12:06 +0000)]
Explicitly initialize ForceEnableInt128 to avoid UB

This fixes an uninitialized value read found by msan.

llvm-svn: 326083

6 years agoRevert "[Support] Replace HashString with djbHash."
Jonas Devlieghere [Mon, 26 Feb 2018 12:05:18 +0000 (12:05 +0000)]
Revert "[Support] Replace HashString with djbHash."

It looks like some of our tests depend on the ordering of hashed values.
I'm reverting my changes while I try to reproduce and fix this locally.

Failing builds:

  lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/18388
  lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/6743
  lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/15607

llvm-svn: 326082

6 years ago[Support] Replace HashString with djbHash.
Jonas Devlieghere [Mon, 26 Feb 2018 11:30:13 +0000 (11:30 +0000)]
[Support] Replace HashString with djbHash.

This removes the HashString function from StringExtraces and replaces
its uses with calls to djbHash from DJB.h

This is *almost* NFC. While the algorithm is identical, the djbHash
implementation in StringExtras used 0 as its seed while the
implementation in DJB uses 5381. The latter has been shown to result in
less collisions and improved avalanching.

https://reviews.llvm.org/D43615
(cherry picked from commit 77f7f965bc9499a9ae768a296ca5a1f7347d1d2c)

llvm-svn: 326081

6 years ago[WebAssembly] Relax constexpr for old standard libraries.
Benjamin Kramer [Mon, 26 Feb 2018 11:07:25 +0000 (11:07 +0000)]
[WebAssembly] Relax constexpr for old standard libraries.

This will still be constexpr when the standard library supports it, but
doesn't force constexpr. Old libraries will get a global constructor,
which is not too bad.

llvm-svn: 326080

6 years ago[LV] Move isLegalMasked* functions from Legality to CostModel
Renato Golin [Mon, 26 Feb 2018 11:06:36 +0000 (11:06 +0000)]
[LV] Move isLegalMasked* functions from Legality to CostModel

All SIMD architectures can emulate masked load/store/gather/scatter
through element-wise condition check, scalar load/store, and
insert/extract. Therefore, bailing out of vectorization as legality
failure, when they return false, is incorrect. We should proceed to cost
model and determine profitability.

This patch is to address the vectorizer's architectural limitation
described above. As such, I tried to keep the cost model and
vectorize/don't-vectorize behavior nearly unchanged. Cost model tuning
should be done separately.

Please see
http://lists.llvm.org/pipermail/llvm-dev/2018-January/120164.html for
RFC and the discussions.

Closes D43208.

Patch by: Hideki Saito <hideki.saito@intel.com>

llvm-svn: 326079

6 years ago[LoopInterchange] Add test case for D43236.
Florian Hahn [Mon, 26 Feb 2018 10:46:25 +0000 (10:46 +0000)]
[LoopInterchange] Add test case for D43236.

llvm-svn: 326078

6 years ago[LoopInterchange] Loops with empty dependency matrix are safe.
Florian Hahn [Mon, 26 Feb 2018 10:45:25 +0000 (10:45 +0000)]
[LoopInterchange] Loops with empty dependency matrix are safe.

The dependency matrix is only empty if no conflicting load/store
instructions have been found. In that case, it is safe to interchange.

For the LLVM test-suite, after this change around 1900 loops are
interchanged, whereas it is 15 before this change. On cortex-a57,
this gives an improvement of -0.57% on the geomean execution
time of SPEC2006, SPEC2000 and the test-suite. There are a
few small perf regressions, but I think we can improve on those
by making the cost model better.

Reviewers: karthikthecool, mcrosier

Reviewed by: karthikthecool

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

llvm-svn: 326077

6 years agoThe final step to close D41278 [MachineCombiner] Improve debug output (NFC).
Andrew V. Tischenko [Mon, 26 Feb 2018 09:43:21 +0000 (09:43 +0000)]
The final step to close D41278 [MachineCombiner] Improve debug output (NFC).
Differential Revision: https://reviews.llvm.org/D41278

llvm-svn: 326074

6 years agoisl: "isl_schedule_get_map: handle trees with divergent filter node parameters"
Tobias Grosser [Mon, 26 Feb 2018 09:26:41 +0000 (09:26 +0000)]
isl: "isl_schedule_get_map: handle trees with divergent filter node parameters"

Also un-revert (isl_pw_*_alloc: add missing check for compatible spaces, Wed Sep
6 12:18:04 2017 +0200).

This patch is a proposed fix to avoid asserts due to stricter space checking
within isl, which resulted in failures when converting a schedule tree to
a schedule map.

llvm-svn: 326073

6 years ago[SCEV] Factor out getUsedLoops
Serguei Katkov [Mon, 26 Feb 2018 09:26:41 +0000 (09:26 +0000)]
[SCEV] Factor out getUsedLoops

The patch introduces the new function in ScalarEvolution to get
all loops used in specified SCEV.

This is a preparation for re-writing isKnownPredicate utility as
described in https://reviews.llvm.org/D42417.

Reviewers: sanjoy, mkazantsev, reames
Reviewed By: sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43504

llvm-svn: 326072

6 years ago[SCEV] Introduce SCEVPostIncRewriter
Serguei Katkov [Mon, 26 Feb 2018 08:40:18 +0000 (08:40 +0000)]
[SCEV] Introduce SCEVPostIncRewriter

The patch introduces the SCEVPostIncRewriter rewriter which
is similar to SCEVInitRewriter but rewrites AddRec with post increment
value of this AddRec.

This is a preparation for re-writing isKnownPredicate utility as
described in https://reviews.llvm.org/D42417.

Reviewers: sanjoy, mkazantsev, reames
Reviewed By: sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43499

llvm-svn: 326071

6 years ago[clangd] don't insert new includes if either original header or canonical header...
Eric Liu [Mon, 26 Feb 2018 08:32:13 +0000 (08:32 +0000)]
[clangd] don't insert new includes if either original header or canonical header is already included.

Summary:
Changes:
o Store both the original header and the canonical header in LSP command.
o Also check that both original and canonical headers are not already included
by comparing both resolved header path and written literal includes.

This addresses the use case where private IWYU pragma is defined in a private
header while it would still be preferrable to include the private header, in the
internal implementation file. If we have seen that the priviate header is already
included, we don't try to insert the canonical include.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits

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

llvm-svn: 326070

6 years ago[XCore] Return true in enableMultipleCopyHints().
Jonas Paulsson [Mon, 26 Feb 2018 08:03:32 +0000 (08:03 +0000)]
[XCore]  Return true in enableMultipleCopyHints().

Enable multiple COPY hints to eliminate more COPYs during register allocation.

Note that this is something all targets should do, see
https://reviews.llvm.org/D38128.

Review: Robert Lytton
llvm-svn: 326069

6 years ago[X86] Add avx1 command line to madd.ll to show splitting and concatenating 256-bit...
Craig Topper [Mon, 26 Feb 2018 07:48:17 +0000 (07:48 +0000)]
[X86] Add avx1 command line to madd.ll to show splitting and concatenating 256-bit operations.

llvm-svn: 326068

6 years ago[SCEV] Extends the SCEVInitRewriter
Serguei Katkov [Mon, 26 Feb 2018 07:08:56 +0000 (07:08 +0000)]
[SCEV] Extends the SCEVInitRewriter

The patch introduces an additional parameter IgnoreOtherLoops to SCEVInitRewriter.
if it is equal to true then rewriter will not invalidate result in case
SCEV depends on other loops then specified during creation.

The patch does not change the default behavior.
This is a preparation for re-writing isKnownPredicate utility as
described in https://reviews.llvm.org/D42417.

Reviewers: sanjoy, mkazantsev, reames
Reviewed By: sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43498

llvm-svn: 326067

6 years ago[X86] Don't use getZExtValue when we have no idea how large the input elements are.
Craig Topper [Mon, 26 Feb 2018 04:43:24 +0000 (04:43 +0000)]
[X86] Don't use getZExtValue when we have no idea how large the input elements are.

llvm-svn: 326066

6 years ago[X86] Use SelectionDAG::SplitVectorOperand to simplify some code. NFC
Craig Topper [Mon, 26 Feb 2018 02:16:34 +0000 (02:16 +0000)]
[X86] Use SelectionDAG::SplitVectorOperand to simplify some code. NFC

llvm-svn: 326065

6 years ago[X86] Simplify the ReplaceNodeResults code for X86ISD::AVG.
Craig Topper [Mon, 26 Feb 2018 02:16:33 +0000 (02:16 +0000)]
[X86] Simplify the ReplaceNodeResults code for X86ISD::AVG.

This code seemed to try to widen to 128, 256, or 512 bit vectors, but we only create X86ISD::AVG with a power of 2 number of elements. This means the only nodes that need to be legalized are less than 128-bits and need to be widened up to 128 bits.

llvm-svn: 326064

6 years ago[X86] Remove VT.isSimple() check from detectAVGPattern.
Craig Topper [Mon, 26 Feb 2018 02:16:31 +0000 (02:16 +0000)]
[X86] Remove VT.isSimple() check from detectAVGPattern.

Which types are considered 'simple' is a function of the requirements of all targets that LLVM supports. That shouldn't directly affect what types we are able to handle. The remainder of this code checks that the number of elements is a power of 2 and takes care of splitting down to a legal size.

llvm-svn: 326063

6 years ago[www] Update link to analyzer's "Building a Checker in 24 hours" video
Devin Coughlin [Mon, 26 Feb 2018 00:39:25 +0000 (00:39 +0000)]
[www] Update link to analyzer's "Building a Checker in 24 hours" video

The video is now uploaded to YouTube.

llvm-svn: 326062

6 years agoTableGen: Remove VarInit::getFieldType
Nicolai Haehnle [Sun, 25 Feb 2018 20:50:17 +0000 (20:50 +0000)]
TableGen: Remove VarInit::getFieldType

It is redundant with the implementation in TypedInit.

Change-Id: I8ab1fb5c77e4923f7eb3ffae5889f0f8af6093b4

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: wdng, llvm-commits

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

llvm-svn: 326061

6 years agoTableGen: Get rid of Init::getFieldInit
Nicolai Haehnle [Sun, 25 Feb 2018 20:50:11 +0000 (20:50 +0000)]
TableGen: Get rid of Init::getFieldInit

Summary:
FieldInit will just rely on the standardized resolving mechanism to give
us DefInits for folding, thus simplifying the code.

Unlike the removal of resolveListElementReference, this shouldn't have
performance implications, because DefInits do not recurse inside their
record.

Change-Id: Id4544c774c9d9ee92f293615af6ecff706453f21

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: wdng, llvm-commits

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

llvm-svn: 326060

6 years agoTableGen: Remove Init::resolveListElementReference
Nicolai Haehnle [Sun, 25 Feb 2018 20:50:04 +0000 (20:50 +0000)]
TableGen: Remove Init::resolveListElementReference

Summary:
Resolving a VarListElementInit should just resolve the list and then
take its element. This eliminates a lot of duplicated logic and
simplifies the next steps of refactoring resolveReferences.

This does potentially cause sub-elements of the entire list to be
resolved resulting in more work, but I didn't notice a measurable
change in performance, and a later patch adds a caching mechanism that
covers at least the common case of `var[i]` in a more generic way.

Change-Id: I7b59185b855c7368585c329c31e5be38c5749dac

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: wdng, llvm-commits

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

llvm-svn: 326059

6 years agoWhen diagnosing the arguments to alloc_size, report the failing argument using a...
Aaron Ballman [Sun, 25 Feb 2018 20:40:06 +0000 (20:40 +0000)]
When diagnosing the arguments to alloc_size, report the failing argument using a 1-based index instead of a 0-based index for consistency.

Patch by Joel Denny.

llvm-svn: 326058

6 years agoFix a failing assertion with the pointer_with_type_tag attribute when the function...
Aaron Ballman [Sun, 25 Feb 2018 20:28:10 +0000 (20:28 +0000)]
Fix a failing assertion with the pointer_with_type_tag attribute when the function the attribute appertains to is variadic.

Patch by Joel Denny.

llvm-svn: 326057

6 years ago[DebugInfo] Stable sort symbols to remove non-deterministic ordering
Mandeep Singh Grang [Sun, 25 Feb 2018 19:52:34 +0000 (19:52 +0000)]
[DebugInfo] Stable sort symbols to remove non-deterministic ordering

Summary: This fixes failure in DebugInfo/X86/multiple-aranges.ll uncovered by D39245.

Reviewers: rafael, echristo, probinson

Reviewed By: probinson

Subscribers: probinson, llvm-commits, JDevlieghere

Tags: #debug-info

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

llvm-svn: 326056

6 years agoSwitch the default behavior of the Clang<> spelling to opt-in to the C2x attribute...
Aaron Ballman [Sun, 25 Feb 2018 15:34:17 +0000 (15:34 +0000)]
Switch the default behavior of the Clang<> spelling to opt-in to the C2x attribute spellings. NFC to the attribute spellings themselves.

The Clang<> spelling helper generates a spelling for C++11, GNU, and C2x attribute spellings. Previously, users had to manually opt in to the C2x spelling while we cautiously added attributes to that spelling. Now that majority of attributes are exposed in C2x, we can switch the default.

llvm-svn: 326055

6 years agoDocument why the consumed attributes (consumable, callable_when, et al) are not expos...
Aaron Ballman [Sun, 25 Feb 2018 14:54:25 +0000 (14:54 +0000)]
Document why the consumed attributes (consumable, callable_when, et al) are not exposed with a C2x spelling. NFC.

llvm-svn: 326054

6 years agoAdd a C2x spelling for the external_source_symbol and internal_linkage attributes...
Aaron Ballman [Sun, 25 Feb 2018 14:43:45 +0000 (14:43 +0000)]
Add a C2x spelling for the external_source_symbol and internal_linkage attributes in the clang vendor namespace.

Both of these attributes have existing meaning in C code, so there was no reason to exclude them from using the new spelling.

llvm-svn: 326053

6 years agoAdd a C++11 and C2x spelling for the type safety attribute (argument_with_type_tag...
Aaron Ballman [Sun, 25 Feb 2018 14:01:04 +0000 (14:01 +0000)]
Add a C++11 and C2x spelling for the type safety attribute (argument_with_type_tag, pointer_with_type_tag, and type_tag_for_datatype) in the clang vendor namespace.

The TypeTagForDatatype attribute had custom parsing rules that previously prevented it from being supported with square bracket notation. The ArgumentWithTypeTag attribute previously had unnecessary custom parsing that could be handled declaratively.

llvm-svn: 326052

6 years ago[clangd] Address FIXME and fix comment
Kirill Bobyrev [Sun, 25 Feb 2018 07:21:16 +0000 (07:21 +0000)]
[clangd] Address FIXME and fix comment

* Address a FIXME by warning the user that both -run-synchronously and -j X are
  passed.
* Fix a comment to suppress clang-tidy warning by passing the correct argument
  name.

Reviewers: ioeric

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

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

llvm-svn: 326051

6 years ago[InstSimplify] Add test cases for removal of vector fabs on known positive.
Craig Topper [Sun, 25 Feb 2018 06:51:52 +0000 (06:51 +0000)]
[InstSimplify] Add test cases for removal of vector fabs on known positive.

llvm-svn: 326050