platform/upstream/llvm.git
8 years agoDon't quote "--hash-style gnu".
Rafael Espindola [Mon, 2 May 2016 13:00:42 +0000 (13:00 +0000)]
Don't quote "--hash-style gnu".

Otherwise lld fails to use the response file.

llvm-svn: 268225

8 years agoTypo: ToComplex -> TooComplex. NFC.
Michael Kruse [Mon, 2 May 2016 12:25:36 +0000 (12:25 +0000)]
Typo: ToComplex -> TooComplex. NFC.

llvm-svn: 268224

8 years agoRename Conjuncts -> Disjunctions. NFC.
Michael Kruse [Mon, 2 May 2016 12:25:18 +0000 (12:25 +0000)]
Rename Conjuncts -> Disjunctions. NFC.

The check for complexity compares the number of polyhedra in a set,
which are combined by disjunctions (union, "OR"),
not conjunctions (intersection, "AND").

llvm-svn: 268223

8 years ago[ScheduleOptimizer] Add -polly-opt-outer-coincidence option.
Michael Kruse [Mon, 2 May 2016 11:35:27 +0000 (11:35 +0000)]
[ScheduleOptimizer] Add -polly-opt-outer-coincidence option.

Add a command line switch to set the
isl_options_set_schedule_outer_coincidence option. ISL then tries to
build schedules where the outer member of a band satisfies the
coincidence constraints.

In practice this allows loop skewing for more parallelism in inner
loops.

llvm-svn: 268222

8 years ago[WWW] Mark task as done and me as owner of some task
Johannes Doerfert [Mon, 2 May 2016 11:21:30 +0000 (11:21 +0000)]
[WWW] Mark task as done and me as owner of some task

llvm-svn: 268221

8 years agoTypo: isToComplex -> isTooComplex. NFC.
Michael Kruse [Mon, 2 May 2016 10:44:20 +0000 (10:44 +0000)]
Typo: isToComplex -> isTooComplex. NFC.

llvm-svn: 268220

8 years ago[SystemZ] Temporarily disable codegen test int-add-12.ll.
Jonas Paulsson [Mon, 2 May 2016 10:42:47 +0000 (10:42 +0000)]
[SystemZ] Temporarily disable codegen test int-add-12.ll.

This checks for AGSI transformation, which is temporarily disabled.

llvm-svn: 268219

8 years agoReplace non-ascii character.
Simon Atanasyan [Mon, 2 May 2016 09:49:03 +0000 (09:49 +0000)]
Replace non-ascii character.

llvm-svn: 268218

8 years ago[Clang][AVX512][BuiltIn] Adding intrinsics for cvtps2pd instruction set
Michael Zuckerman [Mon, 2 May 2016 09:42:31 +0000 (09:42 +0000)]
[Clang][AVX512][BuiltIn] Adding intrinsics for cvtps2pd instruction set

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

llvm-svn: 268217

8 years ago[SystemZ] Fix in restoreCalleeSavedRegisters()
Jonas Paulsson [Mon, 2 May 2016 09:37:44 +0000 (09:37 +0000)]
[SystemZ] Fix in restoreCalleeSavedRegisters()

Only add operands for GRs to the LMG.

Reviewed by Ulrich Weigand.

llvm-svn: 268216

8 years ago[SystemZ] Mark CC defs as dead whenever possible.
Jonas Paulsson [Mon, 2 May 2016 09:37:40 +0000 (09:37 +0000)]
[SystemZ] Mark CC defs as dead whenever possible.

Marking implicit CC defs as dead everywhere except when CC is actually
defined and used explicitly, is important since the post-ra scheduler
will otherwise insert edges between instructions unnecessarily.

Also temporarily disable LA(Y)-> AGSI optimization in
foldMemoryOperandImpl(), since this inroduces a def of the CC reg,
which is illegal unless it is known to be dead.

Reviewed by Ulrich Weigand.

llvm-svn: 268215

8 years ago[Clang][avx512][builtin] Adding intrinsics for vexpand{d|q|ps|pd} instrctuon set
Michael Zuckerman [Mon, 2 May 2016 08:36:41 +0000 (08:36 +0000)]
[Clang][avx512][builtin] Adding intrinsics for vexpand{d|q|ps|pd} instrctuon set

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

llvm-svn: 268214

8 years ago[Clang][BuiltIn][avx512] Adding intrinsics for vpshufd instruction set
Michael Zuckerman [Mon, 2 May 2016 07:35:27 +0000 (07:35 +0000)]
[Clang][BuiltIn][avx512] Adding intrinsics for vpshufd instruction set

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

llvm-svn: 268213

8 years ago[X86] Fix a bug in LOCK arithmetic operation pattern matching where the wrong immedia...
Craig Topper [Mon, 2 May 2016 05:44:21 +0000 (05:44 +0000)]
[X86] Fix a bug in LOCK arithmetic operation pattern matching where the wrong immediate predicate check was being used for 64-bit instructions with 8-bit immediates.

This didn't cause a bug because the order of the patterns ensured that the 64-bit instructions with 32-bit immediates were selected first.

llvm-svn: 268212

8 years agoFix grammar and correct comment - the debug information wasn't incorrect, rather...
Eric Christopher [Mon, 2 May 2016 05:30:26 +0000 (05:30 +0000)]
Fix grammar and correct comment - the debug information wasn't incorrect, rather suboptimal.

llvm-svn: 268211

8 years ago[llvm-readobj] Dump hash as part of -version-info.
Davide Italiano [Mon, 2 May 2016 02:30:18 +0000 (02:30 +0000)]
[llvm-readobj] Dump hash as part of -version-info.

llvm-svn: 268210

8 years ago[CodeGen] Add OPC_MoveChild0-OPC_MoveChild7 opcodes to isel matching tables to optimi...
Craig Topper [Mon, 2 May 2016 01:53:30 +0000 (01:53 +0000)]
[CodeGen] Add OPC_MoveChild0-OPC_MoveChild7 opcodes to isel matching tables to optimize table size. Shaves about 12K off the X86 matcher table.

llvm-svn: 268209

8 years agoAdd support for synthetic child providers to optionally return a customized typename...
Enrico Granata [Mon, 2 May 2016 00:41:24 +0000 (00:41 +0000)]
Add support for synthetic child providers to optionally return a customized typename for display

llvm-svn: 268208

8 years ago[GlobalDCE] Modernize. Use FileCheck instead of grep.
Davide Italiano [Sun, 1 May 2016 22:51:14 +0000 (22:51 +0000)]
[GlobalDCE] Modernize. Use FileCheck instead of grep.

llvm-svn: 268207

8 years ago[InstCombine][SSE] Added support to VPERMD/VPERMPS to shuffle combine to accept UNDEF...
Simon Pilgrim [Sun, 1 May 2016 20:43:02 +0000 (20:43 +0000)]
[InstCombine][SSE] Added support to VPERMD/VPERMPS to shuffle combine to accept UNDEF elements.

llvm-svn: 268206

8 years agoDropped FIXME comment
Simon Pilgrim [Sun, 1 May 2016 20:33:25 +0000 (20:33 +0000)]
Dropped FIXME comment

llvm-svn: 268205

8 years ago[InstCombine][SSE] Added support to VPERMILVAR to shuffle combine to accept UNDEF...
Simon Pilgrim [Sun, 1 May 2016 20:22:42 +0000 (20:22 +0000)]
[InstCombine][SSE] Added support to VPERMILVAR to shuffle combine to accept UNDEF elements.

llvm-svn: 268204

8 years ago[InstCombine][AVX] Fixed PERMILVAR identity tests and added additional decode tests
Simon Pilgrim [Sun, 1 May 2016 20:06:47 +0000 (20:06 +0000)]
[InstCombine][AVX] Fixed PERMILVAR identity tests and added additional decode tests

llvm-svn: 268203

8 years ago[InstCombine][SSE] Added support to PSHUFB to shuffle combine to accept UNDEF elements.
Simon Pilgrim [Sun, 1 May 2016 19:26:21 +0000 (19:26 +0000)]
[InstCombine][SSE] Added support to PSHUFB to shuffle combine to accept UNDEF elements.

llvm-svn: 268202

8 years ago[InstCombine][SSE] Regenerate MOVSX/MOVZX tests
Simon Pilgrim [Sun, 1 May 2016 18:28:45 +0000 (18:28 +0000)]
[InstCombine][SSE] Regenerate MOVSX/MOVZX tests

llvm-svn: 268201

8 years ago[AVX512] VPACKUSWB/VPACKSSWB should not be encoded with EVEX.W=1. While there fix...
Craig Topper [Sun, 1 May 2016 17:38:32 +0000 (17:38 +0000)]
[AVX512] VPACKUSWB/VPACKSSWB should not be encoded with EVEX.W=1. While there fix the execution domain for VPACKSSDW/VPACKUSDW.

llvm-svn: 268200

8 years ago[InstCombine][AVX2] Combine VPERMD/VPERMPS intrinsics with constant masks to shufflev...
Simon Pilgrim [Sun, 1 May 2016 16:41:22 +0000 (16:41 +0000)]
[InstCombine][AVX2] Combine VPERMD/VPERMPS intrinsics with constant masks to shufflevector.

llvm-svn: 268199

8 years agoFixed MSVC 'not all control paths return a value' warning
Simon Pilgrim [Sun, 1 May 2016 15:52:31 +0000 (15:52 +0000)]
Fixed MSVC 'not all control paths return a value' warning

llvm-svn: 268198

8 years agoDocument the LLVM_ENABLE_EXPENSIVE_CHECKS cmake option introduced in r268050
Simon Pilgrim [Sun, 1 May 2016 15:27:47 +0000 (15:27 +0000)]
Document the LLVM_ENABLE_EXPENSIVE_CHECKS cmake option introduced in r268050

llvm-svn: 268197

8 years ago[clang][Builtin][AVX512] Adding intrinsics for vmovshdup and vmovsldup instruction set
Michael Zuckerman [Sun, 1 May 2016 14:43:43 +0000 (14:43 +0000)]
[clang][Builtin][AVX512] Adding intrinsics for vmovshdup and vmovsldup instruction set

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

llvm-svn: 268196

8 years agogetelementptr instruction, support index vector of EVT.
Igor Breger [Sun, 1 May 2016 13:29:12 +0000 (13:29 +0000)]
getelementptr instruction, support index vector of EVT.

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

llvm-svn: 268195

8 years agoUpdate test for r268192.
Kuba Brecka [Sun, 1 May 2016 11:32:10 +0000 (11:32 +0000)]
Update test for r268192.

llvm-svn: 268194

8 years agoImprove wording and capitalization of TSan thread names.
Kuba Brecka [Sun, 1 May 2016 11:26:06 +0000 (11:26 +0000)]
Improve wording and capitalization of TSan thread names.

llvm-svn: 268193

8 years agoAdd thread numbers into ASan thread names.
Kuba Brecka [Sun, 1 May 2016 11:23:04 +0000 (11:23 +0000)]
Add thread numbers into ASan thread names.

llvm-svn: 268192

8 years agoFix NetBSD build with CMake 3.5.2
Kamil Rytarowski [Sun, 1 May 2016 10:23:24 +0000 (10:23 +0000)]
Fix NetBSD build with CMake 3.5.2

Summary:
Building HEAD of LLDB fails in linking against DebugInfoPDB. It also prints the following warning:

```
CMake Warning (dev) in source/Plugins/SymbolFile/PDB/CMakeLists.txt:
  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "lldbPluginSymbolFilePDB" has an INTERFACE_LINK_LIBRARIES property.
  This should be preferred as the source of the link interface for this
  library but because CMP0022 is not set CMake is ignoring the property and
  using the link implementation as the link interface instead.

  INTERFACE_LINK_LIBRARIES:

    LLVMDebugInfoPDB

  Link implementation:

    (empty)
```

CMP0022 was introduced in CMake-2.8.11, bump minimal required version from 2.8 to 3.0 to gain more useful features like libexecinfo(3) detection on NetBSD.

Reviewers: emaste, zturner, labath

Subscribers: zturner, lldb-commits, joerg

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

llvm-svn: 268191

8 years agoChange AVX512 braodcastsd/ss patterns interaction with spilling . New implementation...
Igor Breger [Sun, 1 May 2016 08:40:00 +0000 (08:40 +0000)]
Change AVX512 braodcastsd/ss patterns interaction with spilling . New implementation take a scalar register and generate a vector without COPY_TO_REGCLASS (turn it into a VR128 register ) .The issue is that during register allocation we may spill a scalar value using 128-bit loads and stores, wasting cache bandwidth.

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

llvm-svn: 268190

8 years ago[AVX512] Prefer AVX512 VPACK instructions over AVX/AVX2 instructions when VLX and...
Craig Topper [Sun, 1 May 2016 06:52:19 +0000 (06:52 +0000)]
[AVX512] Prefer AVX512 VPACK instructions over AVX/AVX2 instructions when VLX and BWI are supported.

llvm-svn: 268189

8 years ago[AVX512] Add HasVLX to the 128/256-bit versions of VPACKSSDW/USDW/SSWB/USWB and VPMAD...
Craig Topper [Sun, 1 May 2016 06:24:57 +0000 (06:24 +0000)]
[AVX512] Add HasVLX to the 128/256-bit versions of VPACKSSDW/USDW/SSWB/USWB and VPMADDUBSW/VPMADDWD.

llvm-svn: 268188

8 years agoShould fix all remaining MSVC problems.
Peter Collingbourne [Sun, 1 May 2016 06:00:09 +0000 (06:00 +0000)]
Should fix all remaining MSVC problems.

llvm-svn: 268187

8 years ago[AVX512] Make sure 128/256-bit DQI versions of VAND/VANDN/VOR/VXOR are also marked...
Craig Topper [Sun, 1 May 2016 05:57:06 +0000 (05:57 +0000)]
[AVX512] Make sure 128/256-bit DQI versions of VAND/VANDN/VOR/VXOR are also marked as requiring VLX.

llvm-svn: 268186

8 years agoFurther MSVC appeasement.
Peter Collingbourne [Sun, 1 May 2016 05:39:02 +0000 (05:39 +0000)]
Further MSVC appeasement.

llvm-svn: 268185

8 years ago[X86] Add an AddedComplexity to another pattern to put it near similar in the output...
Craig Topper [Sun, 1 May 2016 05:22:15 +0000 (05:22 +0000)]
[X86] Add an AddedComplexity to another pattern to put it near similar in the output file.

llvm-svn: 268184

8 years ago[X86] Remove a seemlingly unused pattern. The same pattern appears elsewhere with...
Craig Topper [Sun, 1 May 2016 05:22:13 +0000 (05:22 +0000)]
[X86] Remove a seemlingly unused pattern. The same pattern appears elsewhere with an AddedComplexity that made this unreachable.

llvm-svn: 268183

8 years agoTry to fix MSVC build.
Peter Collingbourne [Sun, 1 May 2016 05:12:13 +0000 (05:12 +0000)]
Try to fix MSVC build.

llvm-svn: 268182

8 years ago[X86] Add AddedComplexity to keep some similar patterns near each other in the output...
Craig Topper [Sun, 1 May 2016 04:59:49 +0000 (04:59 +0000)]
[X86] Add AddedComplexity to keep some similar patterns near each other in the output file.

llvm-svn: 268181

8 years ago[X86] Remove some redundant selection patterns.
Craig Topper [Sun, 1 May 2016 04:59:46 +0000 (04:59 +0000)]
[X86] Remove some redundant selection patterns.

llvm-svn: 268180

8 years ago[AVX512] Replace vector_extract with extractelt in some patterns. They mean the same...
Craig Topper [Sun, 1 May 2016 04:59:44 +0000 (04:59 +0000)]
[AVX512] Replace vector_extract with extractelt in some patterns. They mean the same thing but vector_extract is deprecated. NFC

llvm-svn: 268179

8 years agoELF: New symbol table design.
Peter Collingbourne [Sun, 1 May 2016 04:55:03 +0000 (04:55 +0000)]
ELF: New symbol table design.

This patch implements a new design for the symbol table that stores
SymbolBodies within a memory region of the Symbol object. Symbols are mutated
by constructing SymbolBodies in place over existing SymbolBodies, rather
than by mutating pointers. As mentioned in the initial proposal [1], this
memory layout helps reduce the cache miss rate by improving memory locality.

Performance numbers:

           old(s) new(s)
Without debug info:
chrome      7.178  6.432 (-11.5%)
LLVMgold.so 0.505  0.502 (-0.5%)
clang       0.954  0.827 (-15.4%)
llvm-as     0.052  0.045 (-15.5%)
With debug info:
scylla      5.695  5.613 (-1.5%)
clang      14.396 14.143 (-1.8%)

Performance counter results show that the fewer required indirections is
indeed the cause of the improved performance. For example, when linking
chrome, stalled cycles decreases from 14,556,444,002 to 12,959,238,310, and
instructions per cycle increases from 0.78 to 0.83. We are also executing
many fewer instructions (15,516,401,933 down to 15,002,434,310), probably
because we spend less time allocating SymbolBodies.

The new mechanism by which symbols are added to the symbol table is by calling
add* functions on the SymbolTable.

In this patch, I handle local symbols by storing them inside "unparented"
SymbolBodies. This is suboptimal, but if we do want to try to avoid allocating
these SymbolBodies, we can probably do that separately.

I also removed a few members from the SymbolBody class that were only being
used to pass information from the input file to the symbol table.

This patch implements the new design for the ELF linker only. I intend to
prepare a similar patch for the COFF linker.

[1] http://lists.llvm.org/pipermail/llvm-dev/2016-April/098832.html

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

llvm-svn: 268178

8 years ago[SCEV] When printing via -analysis, dump loop disposition
Sanjoy Das [Sun, 1 May 2016 04:51:05 +0000 (04:51 +0000)]
[SCEV] When printing via -analysis, dump loop disposition

There are currently some bugs in tree around SCEV caching an incorrect
loop disposition.  Printing out loop dispositions will let us write
whitebox tests as those are fixed.

The dispositions are printed as a list in "inside out" order,
i.e. innermost loop first.

llvm-svn: 268177

8 years agoProperly name LLVMSetIsInBounds's argument. NFC
Amaury Sechet [Sun, 1 May 2016 02:23:14 +0000 (02:23 +0000)]
Properly name LLVMSetIsInBounds's argument. NFC

llvm-svn: 268176

8 years agoCapitalize align argument in the C API as per convention. NFC
Amaury Sechet [Sun, 1 May 2016 01:42:34 +0000 (01:42 +0000)]
Capitalize align argument in the C API as per convention. NFC

llvm-svn: 268175

8 years ago[AVX512] Add hasSideEffects/mayLoad/mayStore flags to some instructions.
Craig Topper [Sun, 1 May 2016 01:03:56 +0000 (01:03 +0000)]
[AVX512] Add hasSideEffects/mayLoad/mayStore flags to some instructions.

llvm-svn: 268174

8 years ago[ORC] Save AArch64 NEON state in the JIT reentry block.
Lang Hames [Sun, 1 May 2016 00:14:45 +0000 (00:14 +0000)]
[ORC] Save AArch64 NEON state in the JIT reentry block.

The earlier version of the resolver code did not save NEON state, so it would
have broken any callees that used floating point.

llvm-svn: 268173

8 years agoELF: --reproduce: quote pathnames for -L and other options.
Rui Ueyama [Sat, 30 Apr 2016 22:46:47 +0000 (22:46 +0000)]
ELF: --reproduce: quote pathnames for -L and other options.

Previously, arguments for options that take pathnames were not rewritten.

llvm-svn: 268172

8 years agoELF: --reproduce: Copy files referenced by linker scripts.
Rui Ueyama [Sat, 30 Apr 2016 22:23:29 +0000 (22:23 +0000)]
ELF: --reproduce: Copy files referenced by linker scripts.

Previuosly, only files appeared on the command line were copied.

llvm-svn: 268171

8 years agoAttempt to fix Windows buildbots.
Rui Ueyama [Sat, 30 Apr 2016 22:20:27 +0000 (22:20 +0000)]
Attempt to fix Windows buildbots.

llvm-svn: 268170

8 years agoELF: Make --reproduce to produce a response file.
Rui Ueyama [Sat, 30 Apr 2016 21:40:04 +0000 (21:40 +0000)]
ELF: Make --reproduce to produce a response file.

The aim of this patch is to make it easy to re-run the command without
updating paths in the command line. Here is a use case.

Assume that Alice is having an issue with lld and is reporting the issue
to developer Bob. Alice's current directly is /home/alice/work and her
command line is "ld.lld -o foo foo.o ../bar.o". She adds "--reproduce repro"
to the command line and re-run. Then the following text will be produced as
response.txt (notice that the paths are rewritten so that they are
relative to /home/alice/work/repro.)

  -o home/alice/work/foo home/alice/work/foo.o home/alice/bar.o

The command also produces the following files by copying inputs.

  /home/alice/repro/home/alice/work/foo.o
  /home/alice/repro/home/alice/bar.o

Alice zips the directory and send it to Bob. Bob get an archive from Alice
and extract it to his home directory as /home/bob/repro. Now his directory
have the following files.

  /home/bob/repro/response.txt
  /home/bob/repro/home/alice/work/foo.o
  /home/bob/repro/home/alice/bar.o

Bob then re-run the command with these files by the following commands.

  cd /home/bob/repro
  ld.lld @response.txt

This command will run the linker with the same command line options and
the same input files as Alice's, so it is very likely that Bob will see
the same issue as Alice saw.

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

llvm-svn: 268169

8 years ago[lit] Add %:[STpst] to represent paths without colons on Windows.
Rui Ueyama [Sat, 30 Apr 2016 21:32:12 +0000 (21:32 +0000)]
[lit] Add %:[STpst] to represent paths without colons on Windows.

Summary:
We need these variables to concatenate two absolute paths to construct
a valid path. Currently, %t\%t is, for example, expanded to C:\foo\C:\foo,
which is not a valid path because ":" is not a valid path character
on Windows. With this patch, %t will be expanded to C\foo.

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

llvm-svn: 268168

8 years agopython: add bindings for children of diagnostics
Saleem Abdulrasool [Sat, 30 Apr 2016 21:14:01 +0000 (21:14 +0000)]
python: add bindings for children of diagnostics

This exposes the Clang API bindings clang_getChildDiagnostics (which returns a
CXDiagnosticSet) and clang_getNumDiagnosticsInSet / clang_getDiagnosticInSet (to
traverse the CXDiagnosticSet), and adds a helper children property in the Python
Diagnostic wrapper.

Also, this adds the missing OVERLOAD_CANDIDATE (700) cursor type.

Patch by Hanson Wang!

llvm-svn: 268167

8 years ago[InstCombine][AVX2] Added VPERMD/VPERMPS shuffle combining placeholder tests.
Simon Pilgrim [Sat, 30 Apr 2016 20:41:52 +0000 (20:41 +0000)]
[InstCombine][AVX2] Added VPERMD/VPERMPS shuffle combining placeholder tests.

For future support for VPERMD/VPERMPS to generic shuffles combines

llvm-svn: 268166

8 years agoCodeGen: convert to range based loops
Saleem Abdulrasool [Sat, 30 Apr 2016 18:15:34 +0000 (18:15 +0000)]
CodeGen: convert to range based loops

Convert to using some range based loops, avoid unnecessary variables for
unchecked casts.  NFC.

llvm-svn: 268165

8 years ago[X86] Reduce memory usage of MemOp2RegOp and RegOp2MemOp folding maps.
Craig Topper [Sat, 30 Apr 2016 17:59:49 +0000 (17:59 +0000)]
[X86] Reduce memory usage of MemOp2RegOp and RegOp2MemOp folding maps.

llvm-svn: 268164

8 years agoAdd missing override.
Rafael Espindola [Sat, 30 Apr 2016 15:18:21 +0000 (15:18 +0000)]
Add missing override.

llvm-svn: 268163

8 years ago[ASan] Add shadow offset for SystemZ.
Marcin Koscielnicki [Sat, 30 Apr 2016 10:02:12 +0000 (10:02 +0000)]
[ASan] Add shadow offset for SystemZ.

This is the compiler-rt counterpart to D19650.

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

llvm-svn: 268162

8 years ago[ASan] Add shadow offset for SystemZ.
Marcin Koscielnicki [Sat, 30 Apr 2016 09:57:34 +0000 (09:57 +0000)]
[ASan] Add shadow offset for SystemZ.

SystemZ on Linux currently has 53-bit address space.  In theory, the hardware
could support a full 64-bit address space, but that's not supported due to
kernel limitations (it'd require 5-level page tables), and there are no plans
for that.  The default process layout stays within first 4TB of address space
(to avoid creating 4-level page tables), so any offset >= (1 << 42) is fine.
Let's use 1 << 52 here, ie. exactly half the address space.

I've originally used 7 << 50 (uses top 1/8th of the address space), but ASan
runtime assumes there's some space after the shadow area.  While this is
fixable, it's simpler to avoid the issue entirely.

Also, I've originally wanted to have the shadow aligned to 1/8th the address
space, so that we can use OR like X86 to assemble the offset.  I no longer
think it's a good idea, since using ADD enables us to load the constant just
once and use it with register + register indexed addressing.

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

llvm-svn: 268161

8 years agoFinally fix invalid-pointer-pairs.cc. This time the demangle on the Windows buildbot.
Filipe Cabecinhas [Sat, 30 Apr 2016 08:34:40 +0000 (08:34 +0000)]
Finally fix invalid-pointer-pairs.cc. This time the demangle on the Windows buildbot.

llvm-svn: 268160

8 years ago[InstCombine][AVX] Split off VPERMILVAR tests and added additional tests for UNDEF...
Simon Pilgrim [Sat, 30 Apr 2016 07:32:19 +0000 (07:32 +0000)]
[InstCombine][AVX] Split off VPERMILVAR tests and added additional tests for UNDEF mask elements

llvm-svn: 268159

8 years ago[InstCombine][AVX] VPERMILVAR to shuffle combine to use general aggregate elements...
Simon Pilgrim [Sat, 30 Apr 2016 07:23:30 +0000 (07:23 +0000)]
[InstCombine][AVX] VPERMILVAR to shuffle combine to use general aggregate elements. NFCI.

Make use of Constant::getAggregateElement instead of checking constant types - first step towards adding support for UNDEF mask elements.

llvm-svn: 268158

8 years ago[tsan] Return 0 from malloc_size for non-malloc'd pointers
Kuba Brecka [Sat, 30 Apr 2016 07:14:41 +0000 (07:14 +0000)]
[tsan] Return 0 from malloc_size for non-malloc'd pointers

In http://reviews.llvm.org/D19100, I introduced a bug: On OS X, existing programs rely on malloc_size() to detect whether a pointer comes from heap memory (malloc_size returns non-zero) or not. We have to distinguish between a zero-sized allocation (where we need to return 1 from malloc_size, due to other binary compatibility reasons, see http://reviews.llvm.org/D19100), and pointers that are not returned from malloc at all.

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

llvm-svn: 268157

8 years agoStab in the dark to fix the PS4 bot
Chris Bieneman [Sat, 30 Apr 2016 05:27:17 +0000 (05:27 +0000)]
Stab in the dark to fix the PS4 bot

r268127 is causing the PS4 bots to fail. Not sure what is causing it, but hopefully this will fix it.

llvm-svn: 268156

8 years agoDifferential Revision: http://reviews.llvm.org/D19753
Sriraman Tallam [Sat, 30 Apr 2016 04:18:52 +0000 (04:18 +0000)]
Differential Revision: reviews.llvm.org/D19753

Delete Target Option PositionIndependentExecutable as PIE is now part of module flags.

llvm-svn: 268155

8 years agoAMDGPU/SI: Remove wait state handling for SMRD in SIInsertWaits
Tom Stellard [Sat, 30 Apr 2016 04:04:48 +0000 (04:04 +0000)]
AMDGPU/SI: Remove wait state handling for SMRD in SIInsertWaits

This was supposed to be part of r268143.

llvm-svn: 268154

8 years agoReplace one more occurrence of non-standard std:launch::any. Patch from STL@microsoft.com
Eric Fiselier [Sat, 30 Apr 2016 02:30:18 +0000 (02:30 +0000)]
Replace one more occurrence of non-standard std:launch::any. Patch from STL@microsoft.com

llvm-svn: 268153

8 years ago[PowerPC/QPX] Fix the load/splat peephole with overlapping reads
Hal Finkel [Sat, 30 Apr 2016 01:59:28 +0000 (01:59 +0000)]
[PowerPC/QPX] Fix the load/splat peephole with overlapping reads

If, in between the splat and the load (which does an implicit splat), there is
a read of the splat register, then that register must have another earlier
definition. In that case, we can't replace the load's destination register with
the splat's destination register.

Unfortunately, I don't have a small or non-fragile test case.

llvm-svn: 268152

8 years agoReverting 268055 as it caused PR27579.
Amjad Aboud [Sat, 30 Apr 2016 01:44:38 +0000 (01:44 +0000)]
Reverting 268055 as it caused PR27579.

llvm-svn: 268151

8 years agoReverting 268054 & 268063 as they caused PR27579.
Amjad Aboud [Sat, 30 Apr 2016 01:44:07 +0000 (01:44 +0000)]
Reverting 268054 & 268063 as they caused PR27579.

llvm-svn: 268150

8 years agoDon't create dynamic relocations to ro segments.
Rafael Espindola [Sat, 30 Apr 2016 01:15:17 +0000 (01:15 +0000)]
Don't create dynamic relocations to ro segments.

These would just crash at runtime.

If we ever decide to support rw text segments this should make it easier
to implement as there is now a single point where we notice the problem.

I have tested this with a freebsd buildworld. It found a non pic
assembly file being linked into a .so,. With that fixed, buildworld
finished.

llvm-svn: 268149

8 years ago[LowerGuardIntrinsics] Keep track of !make.implicit metadata
Sanjoy Das [Sat, 30 Apr 2016 00:55:59 +0000 (00:55 +0000)]
[LowerGuardIntrinsics] Keep track of !make.implicit metadata

If a guard call being lowered by LowerGuardIntrinsics has the
`!make.implicit` metadata attached, then reattach the metadata to the
branch in the resulting expanded form of the intrinsic.  This allows us
to implement null checks as guards and still get the benefit of implicit
null checks.

llvm-svn: 268148

8 years ago Reroll loops with multiple IV and negative step part 3
Lawrence Hu [Sat, 30 Apr 2016 00:51:22 +0000 (00:51 +0000)]
Reroll loops with multiple IV and negative step part 3
            support multiple induction variables

    This patch enable loop reroll for the following case:
        for(int i=0;  i<N; i += 2) {
           S += *a++;
           S += *a++;
        };

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

llvm-svn: 268147

8 years ago[Orc] Fix the AArch64 resolver size.
Lang Hames [Sat, 30 Apr 2016 00:50:26 +0000 (00:50 +0000)]
[Orc] Fix the AArch64 resolver size.

llvm-svn: 268146

8 years agoDon't depend on lld creating relocations in ro segments.
Rafael Espindola [Sat, 30 Apr 2016 00:49:10 +0000 (00:49 +0000)]
Don't depend on lld creating relocations in ro segments.

We currently don't do a good job of diagnosing inputs that would require
dynamic relocations to be applied to read only segments.

I am about to improve lld in that area, but unfortunately we developed
tests that depend on the current behavior.

To make clear what is actually changing, this first patch just updates
tests to not depend on the current behavior. In most cases this just
means using a rw section instead of a ro one, but that unfortunately
changes many addresses.

llvm-svn: 268145

8 years agoFix a typo (NFC)
Vedant Kumar [Sat, 30 Apr 2016 00:32:54 +0000 (00:32 +0000)]
Fix a typo (NFC)

llvm-svn: 268144

8 years agoAMDGPU/SI: Enable the post-ra scheduler
Tom Stellard [Sat, 30 Apr 2016 00:23:06 +0000 (00:23 +0000)]
AMDGPU/SI: Enable the post-ra scheduler

Summary:
This includes a hazard recognizer implementation to replace some of
the hazard handling we had during frame index elimination.

Reviewers: arsenm

Subscribers: qcolombet, arsenm, llvm-commits

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

llvm-svn: 268143

8 years ago[LowerGuardIntrinsics] Preserve calling conv when lowering
Sanjoy Das [Sat, 30 Apr 2016 00:17:47 +0000 (00:17 +0000)]
[LowerGuardIntrinsics] Preserve calling conv when lowering

llvm-svn: 268142

8 years agoadd minimal test to show dropped metadata
Sanjay Patel [Sat, 30 Apr 2016 00:12:54 +0000 (00:12 +0000)]
add minimal test to show dropped metadata

llvm-svn: 268141

8 years ago[Release Notes] Mention Clang-tidy cert-err34-c check.
Eugene Zelenko [Sat, 30 Apr 2016 00:11:10 +0000 (00:11 +0000)]
[Release Notes] Mention Clang-tidy cert-err34-c check.

Fix order and style of Boost related notes.

llvm-svn: 268140

8 years agoremove the metadata added with r267827
Sanjay Patel [Sat, 30 Apr 2016 00:02:36 +0000 (00:02 +0000)]
remove the metadata added with r267827

We can demonstrate the 'select' bug and fix with a simpler test case.
The merged weight values are already tested in another test.

llvm-svn: 268139

8 years agoFix test's memory leaks.
Filipe Cabecinhas [Fri, 29 Apr 2016 23:42:34 +0000 (23:42 +0000)]
Fix test's memory leaks.

llvm-svn: 268138

8 years agoDelete store to Target option PositionIndependentExecutable as PIE is now set in...
Sriraman Tallam [Fri, 29 Apr 2016 23:38:53 +0000 (23:38 +0000)]
Delete store to Target option PositionIndependentExecutable as PIE is now set in module flags.

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

llvm-svn: 268137

8 years agoDocument how to recreate a binary.
Rafael Espindola [Fri, 29 Apr 2016 23:35:49 +0000 (23:35 +0000)]
Document how to recreate a binary.

llvm-svn: 268136

8 years agoFix TestEnumTypes.py for 32 bit platforms.
Chaoren Lin [Fri, 29 Apr 2016 23:34:44 +0000 (23:34 +0000)]
Fix TestEnumTypes.py for 32 bit platforms.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 268135

8 years agoDocument how to recreate a binary.
Rafael Espindola [Fri, 29 Apr 2016 23:28:36 +0000 (23:28 +0000)]
Document how to recreate a binary.

llvm-svn: 268134

8 years agoUse simpler types. NFC.
Rafael Espindola [Fri, 29 Apr 2016 23:20:30 +0000 (23:20 +0000)]
Use simpler types. NFC.

llvm-svn: 268133

8 years ago[CUDA] Copy host builtin types to NVPTXTargetInfo.
Justin Lebar [Fri, 29 Apr 2016 23:05:19 +0000 (23:05 +0000)]
[CUDA] Copy host builtin types to NVPTXTargetInfo.

Summary:
Host and device types must match, otherwise when we pass values back and
forth between the host and device, we will get the wrong result.

This patch makes NVPTXTargetInfo inherit most of its type information
from the host's target info.

Reviewers: rsmith

Subscribers: cfe-commits, jhen, tra

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

llvm-svn: 268131

8 years agoReapply r268107 after fixing a bug breaks debug build.
Xinliang David Li [Fri, 29 Apr 2016 22:59:36 +0000 (22:59 +0000)]
Reapply r268107 after fixing a bug breaks debug build.

Makes the new method to set data needed by debug dump.

llvm-svn: 268130

8 years ago[NFC] Initialize a variable to make buildbot green.
Denis Zobnin [Fri, 29 Apr 2016 22:50:16 +0000 (22:50 +0000)]
[NFC] Initialize a variable to make buildbot green.

In r268085 "[MS] Make #pragma pack use PragmaStack<> class." there was an
uninitialized variable 'Alignment', which caused the following failure:
  http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/1758
Zero-initialize the variable to fix this failure.

llvm-svn: 268129

8 years agoFix test case for incompatible sysroot warning
Chris Bieneman [Fri, 29 Apr 2016 22:44:33 +0000 (22:44 +0000)]
Fix test case for incompatible sysroot warning

r268127 broke some bots because it needs to specify a darwin target.

llvm-svn: 268128

8 years agoAdd a new warning to notify users of mismatched SDK and deployment target
Chris Bieneman [Fri, 29 Apr 2016 22:28:34 +0000 (22:28 +0000)]
Add a new warning to notify users of mismatched SDK and deployment target

Summary:
This patch adds a new driver warning -Wincompatible-sdk which notifies the user when they are mismatching the version min options and the sysroot.

The patch works by checking the sysroot (if present) for an SDK name, then matching that against the target platform. In the case of a mismatch it logs a warning.

Reviewers: bob.wilson, rsmith

Subscribers: rsmith, edward-san, cfe-commits

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

llvm-svn: 268127

8 years agoMark guards on true as "trivially dead"
Sanjoy Das [Fri, 29 Apr 2016 22:23:16 +0000 (22:23 +0000)]
Mark guards on true as "trivially dead"

This moves some logic added to EarlyCSE in rL268120 into
`llvm::isInstructionTriviallyDead`.  Adds a test case for DCE to
demonstrate that passes other than EarlyCSE can now pick up on the new
information.

llvm-svn: 268126

8 years ago[CMake] [Xcode] Improving Xcode toolchain generation to support distribution targets
Chris Bieneman [Fri, 29 Apr 2016 22:19:35 +0000 (22:19 +0000)]
[CMake] [Xcode] Improving Xcode toolchain generation to support distribution targets

This adds a new target `install-distribution-toolchain` which will install an Xcode toolchain featuring just the LLVM components specified in LLVM_DISTRIBUTION_COMPONENTS.

llvm-svn: 268125