platform/upstream/llvm.git
8 years agoARM: fix handling of SUB immediates in peephole opt.
Tim Northover [Mon, 2 May 2016 18:30:08 +0000 (18:30 +0000)]
ARM: fix handling of SUB immediates in peephole opt.

We were negating an immediate that was going to be used in a SUBri form
unnecessarily. Since ADD/SUB are very similar we *can* do that, but we have to
change the SUB to an ADD at the same time. This also applies to ADD, and allows
us to handle a slightly larger range of immediates for those two operations.

rdar://25992245

llvm-svn: 268276

8 years agoAttempt to fix Windows bots.
Rui Ueyama [Mon, 2 May 2016 18:16:14 +0000 (18:16 +0000)]
Attempt to fix Windows bots.

llvm-svn: 268275

8 years agoAdd an argument to ValueObject::GetSyntheticBase that allows for name customization...
Enrico Granata [Mon, 2 May 2016 18:13:18 +0000 (18:13 +0000)]
Add an argument to ValueObject::GetSyntheticBase that allows for name customization on the generated value

llvm-svn: 268274

8 years agoFix --reproduce for --export-dynamic-symbol.
Rui Ueyama [Mon, 2 May 2016 18:12:09 +0000 (18:12 +0000)]
Fix --reproduce for --export-dynamic-symbol.

--export-dynamic-symbol doesn't take path.

llvm-svn: 268273

8 years ago[NVPTX] Fix sign/zero-extending ldg/ldu instruction selection
Justin Holewinski [Mon, 2 May 2016 18:12:02 +0000 (18:12 +0000)]
[NVPTX] Fix sign/zero-extending ldg/ldu instruction selection

Summary:
We don't have sign-/zero-extending ldg/ldu instructions defined,
so we need to emulate them with explicit CVTs. We were originally
handling the i8 case, but not any other cases.

Fixes PR26185

Reviewers: jingyue, jlebar

Subscribers: jholewinski

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

llvm-svn: 268272

8 years ago[codeview] Don't dump type stream bytes unless asked to
Reid Kleckner [Mon, 2 May 2016 18:10:00 +0000 (18:10 +0000)]
[codeview] Don't dump type stream bytes unless asked to

llvm-svn: 268271

8 years agoPDB - Instead of hardcoding stream numbers, use an enum.
Zachary Turner [Mon, 2 May 2016 18:09:21 +0000 (18:09 +0000)]
PDB - Instead of hardcoding stream numbers, use an enum.

llvm-svn: 268270

8 years ago[CFLAA] Fix a use-of-invalid-pointer bug.
George Burgess IV [Mon, 2 May 2016 18:09:19 +0000 (18:09 +0000)]
[CFLAA] Fix a use-of-invalid-pointer bug.

As shown in the diff, we used to add to CFLAA's cache by doing
`Cache[Fn] = buildSetsFrom(Fn)`. `buildSetsFrom(Fn)` may cause `Cache`
to reallocate its underlying storage, if this happens and `Cache[Fn]`
was evaluated prior to `buildSetsFrom(Fn)`, then we'll store the result
to a bad address.

Patch by Jia Chen.

llvm-svn: 268269

8 years agoParse PDB Name Hash Table
Zachary Turner [Mon, 2 May 2016 18:09:14 +0000 (18:09 +0000)]
Parse PDB Name Hash Table

PDB has a lot of similar data structures.  We already have code
for parsing a Name Map, but PDB seems to have a different but
very similar structure that is a hash table.  This is the
beginning of code needed in order to parse the name hash table,
but it is not yet complete.  It parses the basic metadata of
the hash table, the bucket array, and the names buffer, but
doesn't use any of these fields yet as the data structure
requires a non-trivial amount of work to understand.

llvm-svn: 268268

8 years agoAMDGPU: Move R600 specific code out of AMDGPUISelLowering.cpp
Tom Stellard [Mon, 2 May 2016 18:05:17 +0000 (18:05 +0000)]
AMDGPU: Move R600 specific code out of AMDGPUISelLowering.cpp

Reviewers: arsenm

Subscribers: jvesely, arsenm, llvm-commits

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

llvm-svn: 268267

8 years agoReversePostOrderFunctionAttrs is not modifying the call graph, let's preserve it.
Mehdi Amini [Mon, 2 May 2016 18:03:33 +0000 (18:03 +0000)]
ReversePostOrderFunctionAttrs is not modifying the call graph, let's preserve it.

When running cc1 with -flto=thin, it is followed by GlobalOpt, which
requires the callgraph. This saves rebuilding one.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268266

8 years agoAMDGPU/SI: Fix bug in SIInstrInfo::insertWaitStates() uncovered by r268260
Tom Stellard [Mon, 2 May 2016 18:02:24 +0000 (18:02 +0000)]
AMDGPU/SI: Fix bug in SIInstrInfo::insertWaitStates() uncovered by r268260

We can't use MI->getDebugLoc() when MI is an iterator that could be
MBB.end().

llvm-svn: 268265

8 years ago[clang-tidy] Cleaning namespaces to be more consistant across checkers.
Etienne Bergeron [Mon, 2 May 2016 18:00:29 +0000 (18:00 +0000)]
[clang-tidy] Cleaning namespaces to be more consistant across checkers.

Summary:
The goal of the patch is to bring checkers in their appropriate namespace.
This path doesn't change any behavior.

Reviewers: alexfh

Subscribers: cfe-commits

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

llvm-svn: 268264

8 years agoI forgot to check in the test case for the changes I made to synthetic children yeste...
Enrico Granata [Mon, 2 May 2016 17:57:14 +0000 (17:57 +0000)]
I forgot to check in the test case for the changes I made to synthetic children yesterday. Do so now

llvm-svn: 268263

8 years ago[include-fixer] Fix Clang-tidy modernize-use-override and some Include What You Use...
Eugene Zelenko [Mon, 2 May 2016 17:49:00 +0000 (17:49 +0000)]
[include-fixer] Fix Clang-tidy modernize-use-override and some Include What You Use warnings.

Differential revision: http://reviews.llvm.org/D19755

llvm-svn: 268262

8 years agoExpand aggregate arguments more often on 32-bit Windows
Reid Kleckner [Mon, 2 May 2016 17:41:07 +0000 (17:41 +0000)]
Expand aggregate arguments more often on 32-bit Windows

Before this change, we would pass all non-HFA record arguments on
Windows with byval. Byval often blocks optimizations and results in bad
code generation. Windows now uses the existing workaround that other
x86_32 platforms use.

I also expanded the workaround to handle C++ records with constructors
on Windows. On non-Windows platforms, we have to keep generating the
same LLVM IR prototypes if we want our bitcode to be ABI compatible.
Otherwise we will encounter mismatch issues like PR21573.

Essentially fixes PR27522 in Clang instead of LLVM.

Reviewers: hans

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

llvm-svn: 268261

8 years agoAMDGPU/SI: Use the hazard recognizer to break SMEM soft clauses
Tom Stellard [Mon, 2 May 2016 17:39:06 +0000 (17:39 +0000)]
AMDGPU/SI: Use the hazard recognizer to break SMEM soft clauses

Summary:
Add support for detecting hazards in SMEM soft clauses, so that we only
break the clauses when necessary, either by adding s_nop or re-ordering
other alu instructions.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 268260

8 years agoAMDGPU: llvm.SI.fs.constant is a source of divergence
Nicolai Haehnle [Mon, 2 May 2016 17:37:01 +0000 (17:37 +0000)]
AMDGPU: llvm.SI.fs.constant is a source of divergence

Summary:
This intrinsic is used to get flat-shaded fragment shader inputs. Those are
uniform across a primitive, but a fragment shader wave may process pixels from
multiple primitives (as indicated by the prim_mask), and so that's where
divergence can arise.

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

llvm-svn: 268259

8 years agoQuote arguments for --reproduce.
Rui Ueyama [Mon, 2 May 2016 17:34:17 +0000 (17:34 +0000)]
Quote arguments for --reproduce.

llvm-svn: 268258

8 years agoScheduleDAGInstrs.cpp: Don't peel the iterator when it points the end. This will...
NAKAMURA Takumi [Mon, 2 May 2016 17:29:55 +0000 (17:29 +0000)]
ScheduleDAGInstrs.cpp: Don't peel the iterator when it points the end. This will fix the crash in r268143.

llvm-svn: 268257

8 years ago[WebAssembly] Rename memory_size intrinsic to current_memory
Derek Schuff [Mon, 2 May 2016 17:26:19 +0000 (17:26 +0000)]
[WebAssembly] Rename memory_size intrinsic to current_memory

This follows the recent change in the wasm spec.

llvm-svn: 268256

8 years ago[WebAssembly] Rename memory_size intrinsic to current_memory
Derek Schuff [Mon, 2 May 2016 17:25:22 +0000 (17:25 +0000)]
[WebAssembly] Rename memory_size intrinsic to current_memory

This follows the recent renaming in the wasm spec.

llvm-svn: 268255

8 years ago[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block includin...
Hans Wennborg [Mon, 2 May 2016 17:22:54 +0000 (17:22 +0000)]
[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block including lifetime intrinsics

Make it possible that TryToSimplifyUncondBranchFromEmptyBlock merges empty
basic block including lifetime intrinsics as well as phi nodes and
unconditional branch into its successor or predecessor(s).

If successor of empty block has single predecessor, all contents including
lifetime intrinsics are sinked into the successor. Otherwise, they are
hoisted into its predecessor(s) and then merged into the predecessor(s).

Patch by Josh Yoon <josh.yoon@samsung.com>!

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

llvm-svn: 268254

8 years ago[clang-tidy] Add modernize-make-shared check
Piotr Padlewski [Mon, 2 May 2016 16:56:39 +0000 (16:56 +0000)]
[clang-tidy] Add modernize-make-shared check

Because modernize-make-shared do almost the same job as
modernize-make-unique, I refactored common code to MakeSmartPtrCheck.

http://reviews.llvm.org/D19183

llvm-svn: 268253

8 years agoMove createReversePostOrderFunctionAttrsPass right after the inliner is done
Mehdi Amini [Mon, 2 May 2016 16:53:16 +0000 (16:53 +0000)]
Move createReversePostOrderFunctionAttrsPass right after the inliner is done

This is where it was originally, until LoopVersioningLICM was
inserted before in r259986, I don't believe it was on purpose.

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268252

8 years ago[LLE] Fix typo from r263058
Adam Nemet [Mon, 2 May 2016 16:52:00 +0000 (16:52 +0000)]
[LLE] Fix typo from r263058

This was meant to check unit stride for both the load and the store.

Thanks to Roman Shirokiy for noticing this.

llvm-svn: 268251

8 years agoAdd llvm-pdbdump to the tool substitutions list in lit. NFC.
Pete Cooper [Mon, 2 May 2016 16:51:26 +0000 (16:51 +0000)]
Add llvm-pdbdump to the tool substitutions list in lit.  NFC.

This adds llvm-pdbdump to the list of tools which get printed with
the full path in verbose mode.  This makes it easier to take the
whole run line from verbose output and run it again without prepending
with the builds bin directory.

llvm-svn: 268250

8 years agoFixed signed/unsigned comparison warning.
Simon Pilgrim [Mon, 2 May 2016 16:45:02 +0000 (16:45 +0000)]
Fixed signed/unsigned comparison warning.

llvm-svn: 268249

8 years agoRemove extra whitespace. NFC.
Chad Rosier [Mon, 2 May 2016 16:45:00 +0000 (16:45 +0000)]
Remove extra whitespace. NFC.

llvm-svn: 268248

8 years agoAMDGPU/SI: Use hazard recognizer to detect DPP hazards
Tom Stellard [Mon, 2 May 2016 16:23:09 +0000 (16:23 +0000)]
AMDGPU/SI: Use hazard recognizer to detect DPP hazards

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 268247

8 years agoremove blank lines
Sanjay Patel [Mon, 2 May 2016 15:49:09 +0000 (15:49 +0000)]
remove blank lines

llvm-svn: 268246

8 years ago[InstCombine] regenerate checks
Sanjay Patel [Mon, 2 May 2016 15:32:10 +0000 (15:32 +0000)]
[InstCombine] regenerate checks

llvm-svn: 268245

8 years ago[InstCombine] regenerate checks
Sanjay Patel [Mon, 2 May 2016 15:25:49 +0000 (15:25 +0000)]
[InstCombine] regenerate checks

llvm-svn: 268244

8 years ago[sanitizer] Fix a crash in SizeClassAllocator32 with an out-of-range pointer
Kuba Brecka [Mon, 2 May 2016 15:23:01 +0000 (15:23 +0000)]
[sanitizer] Fix a crash in SizeClassAllocator32 with an out-of-range pointer

This happens on a 64-bit platform that uses SizeClassAllocator32 (e.g. ASan on AArch64). When querying a large invalid pointer, `__sanitizer_get_allocated_size(0xdeadbeefdeadbeef)`, an assertion will fail.  This patch changes PointerIsMine to return false if the pointer is outside of [kSpaceBeg, kSpaceBeg + kSpaceSize).

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

llvm-svn: 268243

8 years ago[InstCombine] regenerate checks
Sanjay Patel [Mon, 2 May 2016 15:21:41 +0000 (15:21 +0000)]
[InstCombine] regenerate checks

llvm-svn: 268242

8 years ago[InstCombine] regenerate checks
Sanjay Patel [Mon, 2 May 2016 15:18:13 +0000 (15:18 +0000)]
[InstCombine] regenerate checks

llvm-svn: 268241

8 years agoForce llvm-ar to use the gnu format.
Rafael Espindola [Mon, 2 May 2016 15:16:43 +0000 (15:16 +0000)]
Force llvm-ar to use the gnu format.

Should fix the bots. Otherwise we try to create a thin bsd anchive.

llvm-svn: 268240

8 years ago[InstCombine] regenerate checks
Sanjay Patel [Mon, 2 May 2016 15:06:55 +0000 (15:06 +0000)]
[InstCombine] regenerate checks

llvm-svn: 268239

8 years ago[sanitizer] Don't reuse the main thread in ThreadRegistry
Kuba Brecka [Mon, 2 May 2016 15:06:08 +0000 (15:06 +0000)]
[sanitizer] Don't reuse the main thread in ThreadRegistry

There is a hard-to-reproduce crash happening on OS X that involves terminating the main thread (dispatch_main does that, see discussion at http://reviews.llvm.org/D18496) and later reusing the main thread's ThreadContext. This patch disables reuse of the main thread. I believe this problem exists only on OS X, because on other systems the main thread cannot be terminated without exiting the process.

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

llvm-svn: 268238

8 years ago[X86][SSE] Dropped X86ISD::FGETSIGNx86 and use MOVMSK instead for FGETSIGN lowering
Simon Pilgrim [Mon, 2 May 2016 14:58:22 +0000 (14:58 +0000)]
[X86][SSE] Dropped X86ISD::FGETSIGNx86 and use MOVMSK instead for FGETSIGN lowering

movmsk.ll tests are unchanged.

llvm-svn: 268237

8 years agoCleanup comments. NFC.
Chad Rosier [Mon, 2 May 2016 14:56:21 +0000 (14:56 +0000)]
Cleanup comments. NFC.

llvm-svn: 268236

8 years agoCleanup comments. NFC.
Chad Rosier [Mon, 2 May 2016 14:50:30 +0000 (14:50 +0000)]
Cleanup comments. NFC.

llvm-svn: 268235

8 years agoSilence unused variable warnings; NFC.
Aaron Ballman [Mon, 2 May 2016 14:48:03 +0000 (14:48 +0000)]
Silence unused variable warnings; NFC.

llvm-svn: 268234

8 years agoCleanup comments. NFC.
Chad Rosier [Mon, 2 May 2016 14:32:17 +0000 (14:32 +0000)]
Cleanup comments. NFC.

llvm-svn: 268233

8 years ago[InstCombine] regenerate checks
Sanjay Patel [Mon, 2 May 2016 14:21:55 +0000 (14:21 +0000)]
[InstCombine] regenerate checks

llvm-svn: 268232

8 years agoDon't include the output dir in the response file.
Rafael Espindola [Mon, 2 May 2016 14:12:35 +0000 (14:12 +0000)]
Don't include the output dir in the response file.

With this it is possible to use chroot/fakechroot to have a completely
reproducible link even when thin archives or linker scripts have
absolute paths.

llvm-svn: 268231

8 years ago[CLANG][AVX512][BUILTIN]movap{d|s}{128|256|512}
Michael Zuckerman [Mon, 2 May 2016 14:02:01 +0000 (14:02 +0000)]
[CLANG][AVX512][BUILTIN]movap{d|s}{128|256|512}

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

llvm-svn: 268230

8 years agoCopy thin archive members with --reproduce.
Rafael Espindola [Mon, 2 May 2016 13:54:10 +0000 (13:54 +0000)]
Copy thin archive members with --reproduce.

llvm-svn: 268229

8 years ago[ELF] - keep alive all non-text sections referenced by .eh_frame
George Rimar [Mon, 2 May 2016 13:49:42 +0000 (13:49 +0000)]
[ELF] - keep alive all non-text sections referenced by .eh_frame

Patch implements one of suggestions from Rafael Ávila de Espíndola,
to fix segfault after section that contains personality being
garbage collected.

Suggestion was just to keep alive all non executable sections
referenced by .eh_frame.

This fixes PR27529.

Differential revision: http://reviews.llvm.org/D19656

llvm-svn: 268228

8 years agoEnable the X86 call frame optimization for the 64-bit targets that allow it.
David L Kreitzer [Mon, 2 May 2016 13:45:25 +0000 (13:45 +0000)]
Enable the X86 call frame optimization for the 64-bit targets that allow it.
Fixes PR27241.

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

llvm-svn: 268227

8 years agoExpose a getFullName for thin archive members.
Rafael Espindola [Mon, 2 May 2016 13:45:06 +0000 (13:45 +0000)]
Expose a getFullName for thin archive members.

It will be used in lld.

llvm-svn: 268226

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