platform/upstream/llvm.git
8 years ago[clang-tidy] Fix a regression issue introduced by r285239.
Haojian Wu [Mon, 7 Nov 2016 21:46:24 +0000 (21:46 +0000)]
[clang-tidy] Fix a regression issue introduced by r285239.

Summary:
r285239 changes the behavior of AST CXXDefaultArgExpr node.

Update `modernize-use-nullptr` to handle CXXDefaultArgExpr correctly.

Reviewers: alexfh

Subscribers: cfe-commits

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

llvm-svn: 286156

8 years ago[clang-tidy] Move incomplete type test into separate test file
Felix Berger [Mon, 7 Nov 2016 21:45:58 +0000 (21:45 +0000)]
[clang-tidy] Move incomplete type test into separate test file

Summary: Move in complete type test which does not compile into its own test file.

Reviewers: alexfh, sbenza, aaron.ballman

Subscribers: cfe-commits

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

llvm-svn: 286155

8 years ago[index] Handle properly C++14's template variables.
Argyrios Kyrtzidis [Mon, 7 Nov 2016 21:20:15 +0000 (21:20 +0000)]
[index] Handle properly C++14's template variables.

- Infer the right symbol kind.
- Provide a templated USR, similar to how we handle class templates.

rdar://28980398

llvm-svn: 286154

8 years ago[index] Make sure to mark class template symbols as having 'generic' sub-kind.
Argyrios Kyrtzidis [Mon, 7 Nov 2016 21:20:08 +0000 (21:20 +0000)]
[index] Make sure to mark class template symbols as having 'generic' sub-kind.

llvm-svn: 286153

8 years agoName some anonymous structs to avoid using a (very common) extension.
John McCall [Mon, 7 Nov 2016 21:13:27 +0000 (21:13 +0000)]
Name some anonymous structs to avoid using a (very common) extension.

llvm-svn: 286152

8 years agoUpdated ASTMerge/macro.m to use _Nullable.
Sean Callanan [Mon, 7 Nov 2016 21:10:31 +0000 (21:10 +0000)]
Updated ASTMerge/macro.m to use _Nullable.

llvm-svn: 286151

8 years ago[lit] Print negative exit codes on Windows in hex
Reid Kleckner [Mon, 7 Nov 2016 21:06:20 +0000 (21:06 +0000)]
[lit] Print negative exit codes on Windows in hex

Negative exit codes are usually exceptions. They're easier to recognize
in hex. Compare -1073741502 to 0xc0000142.

llvm-svn: 286150

8 years agoUse -fsanitize-recover instead of -mllvm -msan-keep-going: tests.
Evgeniy Stepanov [Mon, 7 Nov 2016 21:02:56 +0000 (21:02 +0000)]
Use -fsanitize-recover instead of -mllvm -msan-keep-going: tests.

Summary: Use -fsanitize-recover instead of -mllvm -msan-keep-going: unit tests.

Reviewers: eugenis

Subscribers: llvm-commits

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

Patch by Aleksey Shlyapnikov.

llvm-svn: 286149

8 years agoUse -fsanitize-recover instead of -mllvm -msan-keep-going: clang.
Evgeniy Stepanov [Mon, 7 Nov 2016 21:02:11 +0000 (21:02 +0000)]
Use -fsanitize-recover instead of -mllvm -msan-keep-going: clang.

Summary: Use -fsanitize-recover instead of -mllvm -msan-keep-going: pass -fsanitize-recover value to msan.

Reviewers: eugenis

Subscribers: cfe-commits

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

Patch by Aleksey Shlyapnikov.

llvm-svn: 286148

8 years agoAvoid tail recursion elimination across calls with operand bundles
Sanjoy Das [Mon, 7 Nov 2016 21:01:49 +0000 (21:01 +0000)]
Avoid tail recursion elimination across calls with operand bundles

Summary:
In some specific scenarios with well understood operand bundle types
(like `"deopt"`) it may be possible to go ahead and convert recursion to
iteration, but TailRecursionElimination does not have that logic today
so avoid doing the right thing for now.

I need some input on whether `"funclet"` operand bundles should also
block tail recursion elimination.  If not, I'll allow TRE across calls
with `"funclet"` operand bundles and add a test case.

Reviewers: rnk, majnemer, nlewycky, ahatanak

Subscribers: mcrosier, llvm-commits

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

llvm-svn: 286147

8 years ago[lib/Object] Modernize. NFCI.
Davide Italiano [Mon, 7 Nov 2016 21:01:42 +0000 (21:01 +0000)]
[lib/Object] Modernize. NFCI.

llvm-svn: 286146

8 years agoUse -fsanitize-recover instead of -mllvm -msan-keep-going.
Evgeniy Stepanov [Mon, 7 Nov 2016 21:00:10 +0000 (21:00 +0000)]
Use -fsanitize-recover instead of -mllvm -msan-keep-going.

Summary: Use -fsanitize-recover instead of -mllvm -msan-keep-going.

Reviewers: eugenis

Subscribers: llvm-commits

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

llvm-svn: 286145

8 years agoWhen the ASTImporter imports a source location, it avoids importing macro
Sean Callanan [Mon, 7 Nov 2016 20:42:25 +0000 (20:42 +0000)]
When the ASTImporter imports a source location, it avoids importing macro
expansions by calling getSpellingLoc(). That's great in most cases, but for
macros defined in the '<built-in>' source file, the source file is invalid
and does not import correctly, causing an assertion failure (the assertion
is Invalid SLocOffset or bad function choice).

A more reliable way to avoid this is to use getFileLoc(), which does not
return built-in locations. This avoids the crash but still preserves valid
source locations.

I've added a testcase that covers the previously crashing scenario.

https://reviews.llvm.org/D26054

llvm-svn: 286144

8 years agoAdd tests for r286139.
Jordan Rose [Mon, 7 Nov 2016 20:40:16 +0000 (20:40 +0000)]
Add tests for r286139.

llvm-svn: 286141

8 years agoFix `git-llvm` script to handle `git worktree` setups correctly
Mehdi Amini [Mon, 7 Nov 2016 20:35:02 +0000 (20:35 +0000)]
Fix `git-llvm` script to handle `git worktree` setups correctly

llvm-svn: 286140

8 years agoDisallow StringRef assignment from temporary std::strings.
Jordan Rose [Mon, 7 Nov 2016 20:34:16 +0000 (20:34 +0000)]
Disallow StringRef assignment from temporary std::strings.

Similar to r283798, this prevents accidentally referring to temporary
storage that goes out of scope by the end of the statement:

  someStringRef = getStringByValue();
  someStringRef = (Twine("-") + otherString).str();

Note that once again the constructor still has this problem:

  StringRef someStringRef = getStringByValue();

because once again we occasionally rely on this in calls:

  takesStringRef(getStringByValue());
  takesStringRef(Twine("-") + otherString);

Still, it's a step.

llvm-svn: 286139

8 years agoAdd some facilities to work with a git monorepo (experimental setup)
Mehdi Amini [Mon, 7 Nov 2016 20:00:47 +0000 (20:00 +0000)]
Add some facilities to work with a git monorepo (experimental setup)

Add a new script in llvm/utils/git-svn/. When present in the $PATH,
it enables a `git llvm` command. It is providing at this
point only the ability to push from the git monorepo: `git llvm push`.
It is intended to evolves with more features, for instance I plan on
features like `git llvm show r284955` to help working with sequential
revision numbers.
The push feature is taken from Justin Lebar's script available here:
https://github.com/jlebar/llvm-repo-tools/

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

llvm-svn: 286138

8 years ago[AArch64] Remove dead store. Found by gcc7.
Davide Italiano [Mon, 7 Nov 2016 19:11:25 +0000 (19:11 +0000)]
[AArch64] Remove dead store. Found by gcc7.

llvm-svn: 286137

8 years ago[tsan] Cast floating-point types correctly when instrumenting atomic accesses, compil...
Kuba Brecka [Mon, 7 Nov 2016 19:10:13 +0000 (19:10 +0000)]
[tsan] Cast floating-point types correctly when instrumenting atomic accesses, compiler-rt part

Although rare, atomic accesses to floating-point types seem to be valid, i.e. `%a = load atomic float ...`. The TSan instrumentation pass however tries to emit inttoptr, which is incorrect, we should use a bitcast here. Anyway, IRBuilder already has a convenient helper function for this.

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

llvm-svn: 286136

8 years ago[tsan] Cast floating-point types correctly when instrumenting atomic accesses, LLVM...
Kuba Brecka [Mon, 7 Nov 2016 19:09:56 +0000 (19:09 +0000)]
[tsan] Cast floating-point types correctly when instrumenting atomic accesses, LLVM part

Although rare, atomic accesses to floating-point types seem to be valid, i.e. `%a = load atomic float ...`. The TSan instrumentation pass however tries to emit inttoptr, which is incorrect, we should use a bitcast here. Anyway, IRBuilder already has a convenient helper function for this.

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

llvm-svn: 286135

8 years agoAMDGPU: Remove unnecessary and on conditional branch
Matt Arsenault [Mon, 7 Nov 2016 19:09:33 +0000 (19:09 +0000)]
AMDGPU: Remove unnecessary and on conditional branch

The comment explaining why this was necessary is incorrect
in its description of v_cmp's behavior for inactive workitems.

llvm-svn: 286134

8 years agoAMDGPU: Preserve vcc undef flags when inverting branch
Matt Arsenault [Mon, 7 Nov 2016 19:09:27 +0000 (19:09 +0000)]
AMDGPU: Preserve vcc undef flags when inverting branch

If the branch was on a read-undef of vcc, passes that used
analyzeBranch to invert the branch condition wouldn't preserve
the undef flag resulting in a verifier error.

Fixes verifier failures in a future commit.

Also fix verifier error when inserting copy for vccz
corruption bug.

llvm-svn: 286133

8 years agoFix memory leak caused by r286096.
Eric Liu [Mon, 7 Nov 2016 18:40:41 +0000 (18:40 +0000)]
Fix memory leak caused by r286096.

llvm-svn: 286132

8 years agoRemove Go Attribute type that was deleted from the C API in r286062.
David L. Jones [Mon, 7 Nov 2016 18:38:49 +0000 (18:38 +0000)]
Remove Go Attribute type that was deleted from the C API in r286062.

Summary:
The C++ side of the Go bindings were updated in r286085, r286086, and r286087,
but those did not remove this type.

Reviewers: djasper

Subscribers: axw

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

llvm-svn: 286131

8 years agoTest commit, deleted empty line at the end of README.txt
Stanislav Mekhanoshin [Mon, 7 Nov 2016 18:31:21 +0000 (18:31 +0000)]
Test commit, deleted empty line at the end of README.txt

llvm-svn: 286130

8 years ago[OPENMP] Fixed codegen for __real/__imag expressions in atomic
Alexey Bataev [Mon, 7 Nov 2016 18:15:02 +0000 (18:15 +0000)]
[OPENMP] Fixed codegen for __real/__imag expressions in atomic
constructs.

For __real/__imag unary expressions clang emits lvalue with the
associated type from the original complex expression, but not the
underlying builtin integer or float type. This causes crash in codegen
for atomic constructs, if __real/__imag expression are used in atomic
  constructs.

llvm-svn: 286129

8 years ago[X86] Fix test checks script to satisfy pyflakes
Zvi Rackover [Mon, 7 Nov 2016 18:08:19 +0000 (18:08 +0000)]
[X86] Fix test checks script to satisfy pyflakes

- Remove unused imports.
- Initialize the variable 'name' before its (static) uses, and rename it to a
  more descriptive name.

llvm-svn: 286128

8 years ago[MemCpyOpt] Don't emit IR in an unspecified order
Benjamin Kramer [Mon, 7 Nov 2016 17:47:28 +0000 (17:47 +0000)]
[MemCpyOpt] Don't emit IR in an unspecified order

Argument evaluation order is one of the edge cases where Clang differs
from GCC, yielding different IR depending on which compiler LLVM was
built with. Make the order deterministic and tune the test to actually
verify the order instead of trying to hide it.

llvm-svn: 286126

8 years ago[X86] Fix test checks script to handle run lines with no pipe checks
Zvi Rackover [Mon, 7 Nov 2016 17:47:21 +0000 (17:47 +0000)]
[X86] Fix test checks script to handle run lines with no pipe checks

Fixes crashes in tests such as test/CodeGen/X86/masked_gather_scatter.ll which
contains a RUN: with no pipe chain.

llvm-svn: 286125

8 years agoRevert "Add some facilities to work with a git monorepo (experimental setup)"
Mehdi Amini [Mon, 7 Nov 2016 17:43:08 +0000 (17:43 +0000)]
Revert "Add some facilities to work with a git monorepo (experimental setup)"

This reverts commit r286123, accidentally commited while testing itself...

llvm-svn: 286124

8 years agoAdd some facilities to work with a git monorepo (experimental setup)
Mehdi Amini [Mon, 7 Nov 2016 17:40:28 +0000 (17:40 +0000)]
Add some facilities to work with a git monorepo (experimental setup)

Summary:
Some changes are made to cmake, especially the addition of a new
LLVM_ENABLE_PROJECTS option that makes the build system aware of
the monorepo directory structure.

Also a new script is added in llvm/utils/git-svn/. When present in
the $PATH, it enables a `git llvm` command. It is providing at this
point only the ability to push from the git monorepo: `git llvm push`.
It is intended to evolves with more features, for instance I plan on
features like `git llvm show r284955` to help working with sequential
revision numbers.
The push feature is taken from Justin Lebar's script available here:
https://github.com/jlebar/llvm-repo-tools/

Reviewers: jlebar

Subscribers: mgorny, modocache, llvm-commits

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

llvm-svn: 286123

8 years agoFix use-of-temporary with StringRef in code coverage
Jordan Rose [Mon, 7 Nov 2016 17:28:04 +0000 (17:28 +0000)]
Fix use-of-temporary with StringRef in code coverage

The fixed code is basically identical to the same loop below, which
might indicate an opportunity for refactoring. I just wanted to fix
the use-of-temporary issue.

Caught by adding a similar check to StringRef as r283798 did for
ArrayRef. I'll be upstreaming that soon.

Reviewed by Vedant Kumar as https://reviews.llvm.org/D26317.

llvm-svn: 286122

8 years ago[www] Update the link to the 'include what you use' project
Alex Lorenz [Mon, 7 Nov 2016 16:56:19 +0000 (16:56 +0000)]
[www] Update the link to the 'include what you use' project

llvm-svn: 286121

8 years agoAMDGPU: Try to fix (non-clang?) bot builds
Matt Arsenault [Mon, 7 Nov 2016 16:52:50 +0000 (16:52 +0000)]
AMDGPU: Try to fix (non-clang?) bot builds

llvm-svn: 286120

8 years agoAdd -O0 support for @llvm.invariant.group.barrier by discarding it if it gets to...
Richard Smith [Mon, 7 Nov 2016 16:47:20 +0000 (16:47 +0000)]
Add -O0 support for @llvm.invariant.group.barrier by discarding it if it gets to ISel.

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

llvm-svn: 286119

8 years agoAMDGPU: Refactor copyPhysReg
Matt Arsenault [Mon, 7 Nov 2016 16:39:22 +0000 (16:39 +0000)]
AMDGPU: Refactor copyPhysReg

Separate the subregister splitting logic to re-use later.

llvm-svn: 286118

8 years agoFix 80-column violations. NFC.
Chad Rosier [Mon, 7 Nov 2016 16:28:04 +0000 (16:28 +0000)]
Fix 80-column violations. NFC.

llvm-svn: 286117

8 years agoFix an issue where LLDB would hang trying to launch tvOS simulator binaries
Enrico Granata [Mon, 7 Nov 2016 16:25:01 +0000 (16:25 +0000)]
Fix an issue where LLDB would hang trying to launch tvOS simulator binaries

llvm-svn: 286116

8 years ago[OpenMP] Enable ThreadSanitizer to check OpenMP programs
Jonas Hahnfeld [Mon, 7 Nov 2016 15:58:36 +0000 (15:58 +0000)]
[OpenMP] Enable ThreadSanitizer to check OpenMP programs

This patch allows ThreadSanitizer (Tsan) to verify OpenMP programs.
It means that no false positive will be reported by Tsan when
verifying an OpenMP programs.
This patch introduces annotations within the OpenMP runtime module to
provide information about thread synchronization to the Tsan runtime.

In order to enable the Tsan support when building the runtime, you must
enable the TSAN_SUPPORT option with the following environment variable:

-DLIBOMP_TSAN_SUPPORT=TRUE

The annotations will be enabled in the main shared library
(same mechanism of OMPT).

Patch by Simone Atzeni and Joachim Protze!

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

llvm-svn: 286115

8 years ago[OpenCL] Remove redundant test for OpenCL header file
Yaxun Liu [Mon, 7 Nov 2016 15:55:51 +0000 (15:55 +0000)]
[OpenCL] Remove redundant test for OpenCL header file
Differential Revision: https://reviews.llvm.org/D26302

llvm-svn: 286114

8 years ago[InstCombine] allow splat vector folds in adjustMinMax() (retry r285732)
Sanjay Patel [Mon, 7 Nov 2016 15:52:45 +0000 (15:52 +0000)]
[InstCombine] allow splat vector folds in adjustMinMax() (retry r285732)

This was reverted at r285866 because there was a crash handling a scalar
select of vectors. I added a check for that pattern and a test case based
on the example provided in the post-commit thread for r285732.

llvm-svn: 286113

8 years ago[SystemZ] Correct the SchedModel regarding vector unit / instructions.
Jonas Paulsson [Mon, 7 Nov 2016 15:45:06 +0000 (15:45 +0000)]
[SystemZ] Correct the SchedModel regarding vector unit / instructions.

* Use a generic vector unit to model the issue unit more accurately.
* Update some vector instructions that actually use the vector unit for more
  than one cycle.

Review: Ulrich Weigand
llvm-svn: 286112

8 years agoThis patch adds support for 16 bit floating point registers to the inline asm registe...
Amara Emerson [Mon, 7 Nov 2016 15:42:12 +0000 (15:42 +0000)]
This patch adds support for 16 bit floating point registers to the inline asm register selection on AArch64.

Without this patch, register allocation for the example below fails.

define half @test(half %a1, half %a2) #0 {
entry:
  %0 = tail call half asm "sqrshl ${0:h}, ${1:h}, ${2:h}", "=w,w,w" (half %a1, half %a2) #1
  ret half %0
}

Patch by Florian Hahn.

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

llvm-svn: 286111

8 years ago[AArch64] Removed the narrow load merging code in the ld/st optimizer.
Chad Rosier [Mon, 7 Nov 2016 15:27:22 +0000 (15:27 +0000)]
[AArch64] Removed the narrow load merging code in the ld/st optimizer.

This feature has been disabled for some time now, so remove cruft.

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

llvm-svn: 286110

8 years ago[SystemZ] Fixes in SchedModels for older subtargets.
Jonas Paulsson [Mon, 7 Nov 2016 14:47:25 +0000 (14:47 +0000)]
[SystemZ] Fixes in SchedModels for older subtargets.

IssueWidth updated to reflect the capacity of the issue unit correctly.
Correct number of FX and LS units modelled (2, was 1).

Review: Ulrich Weigand
llvm-svn: 286109

8 years ago[AliasSetTracker] Make AST smarter about assume intrinsics that don't actually affect...
Chad Rosier [Mon, 7 Nov 2016 14:11:45 +0000 (14:11 +0000)]
[AliasSetTracker] Make AST smarter about assume intrinsics that don't actually affect memory.

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

llvm-svn: 286108

8 years ago[Thumb1] Move padding earlier when synthesizing TBBs off of the PC
James Molloy [Mon, 7 Nov 2016 13:38:21 +0000 (13:38 +0000)]
[Thumb1] Move padding earlier when synthesizing TBBs off of the PC

When the base register (register pointing to the jump table) is the PC, we expect the jump table to directly follow the jump sequence with no intervening padding.

If there is intervening padding, the calculated offsets will not be correct. One solution would be to account for any padding in the emitted LDRB instruction, but at the moment we don't support emitting MCExprs for the load offset.

In the meantime, it's correct and only a slight amount worse to just move the padding up, from just before the jump table to just before the jump instruction sequence. We can do that by emitting code alignment before the jump sequence, as we know the number of instructions in the sequence is always 4.

llvm-svn: 286107

8 years ago[OPENMP] Fixed test on MIPS-based buildbots.
Alexey Bataev [Mon, 7 Nov 2016 13:37:34 +0000 (13:37 +0000)]
[OPENMP] Fixed test on MIPS-based buildbots.

llvm-svn: 286106

8 years ago[X86][AVX512] Add AVX512VL/AVX512BWVL vector truncation tests
Simon Pilgrim [Mon, 7 Nov 2016 13:34:29 +0000 (13:34 +0000)]
[X86][AVX512] Add AVX512VL/AVX512BWVL vector truncation tests

llvm-svn: 286105

8 years ago[X86][SSE] Drop unnecessary -mcpu argument from trunc tests
Simon Pilgrim [Mon, 7 Nov 2016 13:28:20 +0000 (13:28 +0000)]
[X86][SSE] Drop unnecessary -mcpu argument from trunc tests

cpu/triple duplication

llvm-svn: 286104

8 years ago[OPENMP] Fixed capturing of VLA variables.
Alexey Bataev [Mon, 7 Nov 2016 11:16:04 +0000 (11:16 +0000)]
[OPENMP] Fixed capturing of VLA variables.

After some changes in codegen capturing of VLA variables in OpenMP regions was broken, causing compiler crash. Patch fixes this issue.

llvm-svn: 286103

8 years agoRevert "[OPENMP] Fixed capturing of VLA variables."
Diana Picus [Mon, 7 Nov 2016 10:01:43 +0000 (10:01 +0000)]
Revert "[OPENMP] Fixed capturing of VLA variables."

This reverts commit r286098 because the modified test breaks on many of the
buildbots.

llvm-svn: 286102

8 years agoMake space for FreeBSD core file tests
Pavel Labath [Mon, 7 Nov 2016 09:58:58 +0000 (09:58 +0000)]
Make space for FreeBSD core file tests

This renames the functionalities/postmortem/linux-core to elf-core and puts the
"linux" part into the individual names of the core files. Since the tests for
linux and freebsd core files are going to be very similar, having them close
together means they can reuse most of the plumbing.

llvm-svn: 286101

8 years ago[ELF] Make InputSection<ELFT>::writeTo virtual
Eugene Leviant [Mon, 7 Nov 2016 09:04:06 +0000 (09:04 +0000)]
[ELF] Make InputSection<ELFT>::writeTo virtual

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

llvm-svn: 286100

8 years agoProtect std::experimental::optional tests under libcpp-no-exceptions
Roger Ferrer Ibanez [Mon, 7 Nov 2016 08:23:59 +0000 (08:23 +0000)]
Protect std::experimental::optional tests under libcpp-no-exceptions

In these tests there are some paths that explicitly throw, so use
the TEST_THROW macro that was proposed for this and then skip the tests
that may enter the throwing path.

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

llvm-svn: 286099

8 years ago[OPENMP] Fixed capturing of VLA variables.
Alexey Bataev [Mon, 7 Nov 2016 08:07:25 +0000 (08:07 +0000)]
[OPENMP] Fixed capturing of VLA variables.

After some changes in codegen capturing of VLA variables in OpenMP
regions was broken, causing compiler crash. Patch fixes this issue.

llvm-svn: 286098

8 years ago[AVX-512][Sema] Add more intrinsics to the checks for valid immediates for embedded...
Craig Topper [Mon, 7 Nov 2016 07:01:09 +0000 (07:01 +0000)]
[AVX-512][Sema] Add more intrinsics to the checks for valid immediates for embedded rounding control arguments.

llvm-svn: 286097

8 years agoDeduplicate replacements by FileEntry instead of file names.
Eric Liu [Mon, 7 Nov 2016 06:08:23 +0000 (06:08 +0000)]
Deduplicate replacements by FileEntry instead of file names.

Summary:
The current version does not deduplicate equivalent file paths correctly.
For example, a relative path and an absolute path are considered inequivalent.
Comparing FileEnry addresses these issues.

Reviewers: djasper

Subscribers: alexshap, klimek, cfe-commits

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

llvm-svn: 286096

8 years ago[AVR] Enable the ISel, frame analyzer, and alloca passes
Dylan McKay [Mon, 7 Nov 2016 06:02:55 +0000 (06:02 +0000)]
[AVR] Enable the ISel, frame analyzer, and alloca passes

llvm-svn: 286095

8 years agoUpdate CommandLine.rst getRegisteredOptions example
Brian Gesiak [Mon, 7 Nov 2016 02:43:01 +0000 (02:43 +0000)]
Update CommandLine.rst getRegisteredOptions example

Summary: Update the docs to match the changes in http://reviews.llvm.org/D7132

Reviewers: beanz, llvm-commits, modocache

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

llvm-svn: 286094

8 years ago[lldb] Fix -Waggressive-loop-optimizations warning
Vedant Kumar [Mon, 7 Nov 2016 02:39:37 +0000 (02:39 +0000)]
[lldb] Fix -Waggressive-loop-optimizations warning

We shouldn't access past the end of an array, even if we think that the
layout of the struct containing the array is always what we expect. The
compiler is free to optimize away the stores as undefined behavior, and
in fact, GCC 6.2.1 claims it will do exactly this.

llvm-svn: 286093

8 years ago[AVX-512] Remove masked pmovzx/pmovsx builtins and autoupgrade them to selects and...
Craig Topper [Mon, 7 Nov 2016 02:12:57 +0000 (02:12 +0000)]
[AVX-512] Remove masked pmovzx/pmovsx builtins and autoupgrade them to selects and native zext/sext.

This mostly reuses earlier autoupgrade support for the sse and avx equivalents. Just needed to add the code to add the select.

llvm-svn: 286092

8 years ago[X86] Remove GCCBuiltins from cvtsi2ss/cvtsi2sd/cvtss2sd intrinsics as they aren...
Craig Topper [Mon, 7 Nov 2016 00:13:46 +0000 (00:13 +0000)]
[X86] Remove GCCBuiltins from cvtsi2ss/cvtsi2sd/cvtss2sd intrinsics as they aren't used by clang. Add TODOs to remove these and some other unused intrinsics.

llvm-svn: 286091

8 years ago[X86] Use StringRef::startswith to reduce a few compares in the intrinsic autoupgrade...
Craig Topper [Mon, 7 Nov 2016 00:13:42 +0000 (00:13 +0000)]
[X86] Use StringRef::startswith to reduce a few compares in the intrinsic autoupgrade code.

llvm-svn: 286090

8 years ago[AVX-512] Remove 128/256 masked pshufb intrinsics. Autoupgrade them to legacy intrins...
Craig Topper [Mon, 7 Nov 2016 00:13:39 +0000 (00:13 +0000)]
[AVX-512] Remove 128/256 masked pshufb intrinsics. Autoupgrade them to legacy intrinsics and a select.

llvm-svn: 286089

8 years agoConvert some helper functions to use StringRef.
Zachary Turner [Mon, 7 Nov 2016 00:07:25 +0000 (00:07 +0000)]
Convert some helper functions to use StringRef.

I will probably submit a lot of small trivial changes
like this over the coming weeks.  The end goal is to
convert Options::SetOptionValue to take the option arg
as a StringRef, but doing so in one pass would be a huge
mess of disparate changes just to satisfy the compiler,
and with a high risk of breaking.  So I'm going to do
this in small pieces, changing seemingly random things
here and there until the final change to the signature
of Options::SetOptionValue() can be done trivially.

llvm-svn: 286088

8 years agoAlso delete the go side of the bindings deleted in r286085/r286086.
Daniel Jasper [Sun, 6 Nov 2016 23:21:22 +0000 (23:21 +0000)]
Also delete the go side of the bindings deleted in r286085/r286086.

Also delete a comment I forgot to delete.

llvm-svn: 286087

8 years agoDelete one more function that needs to go after r286062.
Daniel Jasper [Sun, 6 Nov 2016 21:20:45 +0000 (21:20 +0000)]
Delete one more function that needs to go after r286062.

llvm-svn: 286086

8 years agoRemove functions from go bindings that have been deleted in r286062.
Daniel Jasper [Sun, 6 Nov 2016 21:02:14 +0000 (21:02 +0000)]
Remove functions from go bindings that have been deleted in r286062.

llvm-svn: 286085

8 years agoReapply r286080 with a phony change in Hexagon's CMakeLists.txt
Krzysztof Parzyszek [Sun, 6 Nov 2016 20:55:57 +0000 (20:55 +0000)]
Reapply r286080 with a phony change in Hexagon's CMakeLists.txt

Cmake has not recognized that Hexagon.td has a new dependency in
HexagonPatterns.td. All changes to that file were not visible to
the build bots.

llvm-svn: 286084

8 years ago[RandomNumberGenerator] Remove MSVC 2013 compatibility hack.
Davide Italiano [Sun, 6 Nov 2016 20:55:40 +0000 (20:55 +0000)]
[RandomNumberGenerator] Remove MSVC 2013 compatibility hack.

llvm-svn: 286083

8 years agoARM: lower fpowi appropriately for Windows ARM
Saleem Abdulrasool [Sun, 6 Nov 2016 19:46:54 +0000 (19:46 +0000)]
ARM: lower fpowi appropriately for Windows ARM

This handles the last case of the builtin function calls that we would
generate code which differed from Microsoft's ABI.  Rather than
generating a call to `__pow{d,s}i2` we now promote the parameter to a
float or double and invoke `powf` or `pow` instead.

Addresses PR30825!

llvm-svn: 286082

8 years agoRevert r286080: it breaks build bots
Krzysztof Parzyszek [Sun, 6 Nov 2016 19:36:09 +0000 (19:36 +0000)]
Revert r286080: it breaks build bots

llvm-svn: 286081

8 years ago[Hexagon] Remove redundant custom selection code
Krzysztof Parzyszek [Sun, 6 Nov 2016 19:03:38 +0000 (19:03 +0000)]
[Hexagon] Remove redundant custom selection code

The clr/set/toggle-bit instructions (with the bit index given as an
immediate operand) had both, custom selection code that generated them,
and selection patterns at the same time. The selection patterns were
not used, because the custom selection code was executed first.
This patch removes the custom code in favor of the selection patterns.
The custom code handled 64-bit registers as well with an immediate bit
index, and so new patterns were added to implement that.

It was also the same case for the instruction "Rd += asr(Rs, Rt)",
except that the custom code did not offer any additional functionality,
and was simply removed.

llvm-svn: 286080

8 years ago[Hexagon] Round 5 of selection pattern simplifications
Krzysztof Parzyszek [Sun, 6 Nov 2016 18:13:14 +0000 (18:13 +0000)]
[Hexagon] Round 5 of selection pattern simplifications

Remove unnecessary type casts in patterns.

llvm-svn: 286079

8 years ago[Hexagon] Round 4 of selection pattern simplifications
Krzysztof Parzyszek [Sun, 6 Nov 2016 18:09:56 +0000 (18:09 +0000)]
[Hexagon] Round 4 of selection pattern simplifications

Give simpler or more meaningful names to pat frags and xforms.

llvm-svn: 286078

8 years ago[Hexagon] Round 3 of selection pattern simplifications
Krzysztof Parzyszek [Sun, 6 Nov 2016 18:05:14 +0000 (18:05 +0000)]
[Hexagon] Round 3 of selection pattern simplifications

Remove unnecessary C++ functions for SDNode transforms. Move more
pat frags to files where they are used.

llvm-svn: 286077

8 years ago[Hexagon] Round 2 of selection pattern simplifications
Krzysztof Parzyszek [Sun, 6 Nov 2016 17:56:48 +0000 (17:56 +0000)]
[Hexagon] Round 2 of selection pattern simplifications

Add pat frags for any-, sign-, and zero-extensions.

llvm-svn: 286076

8 years ago[SelectionDAG] Add support for vector demandedelts in XOR opcodes
Simon Pilgrim [Sun, 6 Nov 2016 16:49:19 +0000 (16:49 +0000)]
[SelectionDAG] Add support for vector demandedelts in XOR opcodes

llvm-svn: 286075

8 years ago[X86] Add knownbits vector xor test
Simon Pilgrim [Sun, 6 Nov 2016 16:36:29 +0000 (16:36 +0000)]
[X86] Add knownbits vector xor test

In preparation for demandedelts support

llvm-svn: 286074

8 years ago[AVX-512] Remove intrinsics for 128/256-bit masked variable shift. Instead upgrade...
Craig Topper [Sun, 6 Nov 2016 16:29:19 +0000 (16:29 +0000)]
[AVX-512] Remove intrinsics for 128/256-bit masked variable shift. Instead upgrade them to a select and the older AVX2 intrinsic.

llvm-svn: 286073

8 years ago[AVX-512] Remove intrinsics for 128/256-bit masked shift by immediate. Instead upgrad...
Craig Topper [Sun, 6 Nov 2016 16:29:14 +0000 (16:29 +0000)]
[AVX-512] Remove intrinsics for 128/256-bit masked shift by immediate. Instead upgrade them to a select and the older SSE/AVX2 intrinsic.

llvm-svn: 286072

8 years ago[SelectionDAG] Add support for vector demandedelts in OR opcodes
Simon Pilgrim [Sun, 6 Nov 2016 16:29:09 +0000 (16:29 +0000)]
[SelectionDAG] Add support for vector demandedelts in OR opcodes

llvm-svn: 286071

8 years ago[AVX-512] Remove intrinsics for 128/256-bit masked shift by single element in xmm...
Craig Topper [Sun, 6 Nov 2016 16:29:08 +0000 (16:29 +0000)]
[AVX-512] Remove intrinsics for 128/256-bit masked shift by single element in xmm. Instead upgrade them to a select and the older SSE/AVX2 intrinsic.

llvm-svn: 286070

8 years ago[AVX-512] Remove a 512-bit test cases from the avx512vl test file. It already exists...
Craig Topper [Sun, 6 Nov 2016 16:29:03 +0000 (16:29 +0000)]
[AVX-512] Remove a 512-bit test cases from the avx512vl test file. It already exists in the avx512f test file.

llvm-svn: 286069

8 years ago[X86] Add knownbits vector or test
Simon Pilgrim [Sun, 6 Nov 2016 16:05:59 +0000 (16:05 +0000)]
[X86] Add knownbits vector or test

In preparation for demandedelts support

llvm-svn: 286068

8 years ago[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsElementInsertion. NFCI
Simon Pilgrim [Sun, 6 Nov 2016 14:20:29 +0000 (14:20 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsElementInsertion. NFCI

Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.

llvm-svn: 286067

8 years ago[BitcodeWriter] Replace a manual byteswap with read32be.
Benjamin Kramer [Sun, 6 Nov 2016 13:26:39 +0000 (13:26 +0000)]
[BitcodeWriter] Replace a manual byteswap with read32be.

No functional change intended.

llvm-svn: 286066

8 years ago[ELF] - Change argument of computeHash to MutableArrayRef. NFC.
George Rimar [Sun, 6 Nov 2016 08:39:46 +0000 (08:39 +0000)]
[ELF] - Change argument of computeHash to MutableArrayRef. NFC.

This fixes casting warning and removes the need of that cast at all.

llvm-svn: 286065

8 years ago[ELF] - Fix linux BB after r286061.
George Rimar [Sun, 6 Nov 2016 08:26:53 +0000 (08:26 +0000)]
[ELF] - Fix linux BB after r286061.

llvm-svn: 286064

8 years ago[X86] Add a few more fptoui test cases to the vec_fp_to_int.ll. The codegen for these...
Craig Topper [Sun, 6 Nov 2016 07:50:25 +0000 (07:50 +0000)]
[X86] Add a few more fptoui test cases to the vec_fp_to_int.ll. The codegen for these test cases will be improved for AVX512 in a future commit.

llvm-svn: 286063

8 years agoKill deprecated attribute API
Amaury Sechet [Sun, 6 Nov 2016 07:48:46 +0000 (07:48 +0000)]
Kill deprecated attribute API

Summary:
This kill various depreacated API related to attribute :
 - The deprecated C API attribute based on LLVMAttribute enum.
 - The Raw attribute set format (planned to be removed in 4.0).

Reviewers: bkramer, echristo, mehdi_amini, void

Subscribers: mehdi_amini, llvm-commits

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

llvm-svn: 286062

8 years ago[ELF] - Implemented threaded --build-id computation
George Rimar [Sun, 6 Nov 2016 07:42:55 +0000 (07:42 +0000)]
[ELF] - Implemented threaded --build-id computation

Patch switches computing of --build-id hash to tree.

This is the way when input data is splitted by chunks,
hash is computed for each one in threaded/non-threaded way.
At the end hash is conputed for result tree.

With or without -threads the result hash is the same.

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

llvm-svn: 286061

8 years ago[APFloat] Make functions that produce APFloaat objects use correct semantics.
Tim Shen [Sun, 6 Nov 2016 07:38:37 +0000 (07:38 +0000)]
[APFloat] Make functions that produce APFloaat objects use correct semantics.

Summary:
Fixes PR30869.

In D25977 I meant to change all functions that care about lifetime. I
changed constructors, factory functions, but I missed member/free
functions that return new instances. This patch changes them.

Reviewers: hfinkel, kbarton, echristo, joerg

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 286060

8 years ago[AVX-512] Add missing EVEX version of pattern for (v2f64 (extloadv2f32 addr:)) -...
Craig Topper [Sun, 6 Nov 2016 04:12:52 +0000 (04:12 +0000)]
[AVX-512] Add missing EVEX version of pattern for (v2f64 (extloadv2f32 addr:)) -> VCVTPS2PDZ128rm

llvm-svn: 286059

8 years ago[AVX-512] Add avx512vl command line to the fpext test and add -show-mc-encoding to...
Craig Topper [Sun, 6 Nov 2016 04:12:49 +0000 (04:12 +0000)]
[AVX-512] Add avx512vl command line to the fpext test and add -show-mc-encoding to show where we aren't using EVEX instructions.

llvm-svn: 286058

8 years ago[AVX-512] Lower AVX cvtpd2ps intrinsic to ISD::FP_ROUND so it can use EVEX instructio...
Craig Topper [Sun, 6 Nov 2016 04:12:46 +0000 (04:12 +0000)]
[AVX-512] Lower AVX cvtpd2ps intrinsic to ISD::FP_ROUND so it can use EVEX instruction when available.

llvm-svn: 286057

8 years ago[AVX-512] Lower SSE/AVX cvtdq2ps intrinsics directly to ISD::SINT_TO_FP so they can...
Craig Topper [Sun, 6 Nov 2016 04:12:42 +0000 (04:12 +0000)]
[AVX-512] Lower SSE/AVX cvtdq2ps intrinsics directly to ISD::SINT_TO_FP so they can use EVEX instructions when available.

llvm-svn: 286056

8 years ago[AVX-512] Add -show-mc-encoding to legacy vector intrinsic tests so we can see when...
Craig Topper [Sun, 6 Nov 2016 02:03:58 +0000 (02:03 +0000)]
[AVX-512] Add -show-mc-encoding to legacy vector intrinsic tests so we can see when VEX or EVEX encoded instructions are being emitted. Make sure the tests all have an avx2 command line and an skx command line.

llvm-svn: 286055

8 years agoFix build breakage.
Rui Ueyama [Sat, 5 Nov 2016 23:14:54 +0000 (23:14 +0000)]
Fix build breakage.

llvm-svn: 286054