oota-llvm.git
9 years ago[WinEHPrepare] Refactor explicit EH preparation
David Majnemer [Wed, 16 Sep 2015 18:40:24 +0000 (18:40 +0000)]
[WinEHPrepare] Refactor explicit EH preparation

Split the preparation machinery into several functions, we will want to
selectively enable/disable different parts of it for an alternative
mechanism for dealing with cross-funclet uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247834 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDisable the second verification run when performing LTO through
Teresa Johnson [Wed, 16 Sep 2015 18:06:45 +0000 (18:06 +0000)]
Disable the second verification run when performing LTO through
gold in NDEBUG mode.
Follow on patch for r247729 - LTO: Disable extra verify runs in release
builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247824 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Skip state numbering when no EH pads are present
Reid Kleckner [Wed, 16 Sep 2015 17:19:44 +0000 (17:19 +0000)]
[WinEH] Skip state numbering when no EH pads are present

Otherwise we'd try to emit the thunk that passes the LSDA to
__CxxFrameHandler3. We don't emit the LSDA if there were no landingpads,
so we'd end up with an assembler error when trying to write the COFF
object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247820 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoImprove "default_triple" specification: make it at the directory level for test/tools...
Mehdi Amini [Wed, 16 Sep 2015 17:03:12 +0000 (17:03 +0000)]
Improve "default_triple" specification: make it at the directory level for test/tools/llvm-mc

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247819 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WebAssembly] Check in an initial CFG Stackifier pass
Dan Gohman [Wed, 16 Sep 2015 16:51:30 +0000 (16:51 +0000)]
[WebAssembly] Check in an initial CFG Stackifier pass

This pass implements a simple algorithm for conversion from CFG to
wasm's structured control flow. It doesn't yet handle multiple-entry
loops; that will be added in a future patch.

It also adds initial support for switch statements.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247818 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agopropagate fast-math-flags on DAG nodes
Sanjay Patel [Wed, 16 Sep 2015 16:31:21 +0000 (16:31 +0000)]
propagate fast-math-flags on DAG nodes

After D10403, we had FMF in the DAG but disabled by default. Nick reported no crashing errors after some stress testing,
so I enabled them at r243687. However, Escha soon notified us of a bug not covered by any in-tree regression tests:
if we don't propagate the flags, we may fail to CSE DAG nodes because differing FMF causes them to not match. There is
one test case in this patch to prove that point.

This patch hopes to fix or leave a 'TODO' for all of the in-tree places where we create nodes that are FMF-capable. I
did this by putting an assert in SelectionDAG.getNode() to find any FMF-capable node that was being created without FMF
( D11807 ). I then ran all regression tests and test-suite and confirmed that everything passes.

This patch exposes remaining work to get DAG FMF to be fully functional: (1) add the flags to non-binary nodes such as
FCMP, FMA and FNEG; (2) add the flags to intrinsics; (3) use the flags as conditions for transforms rather than the
current global settings.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247815 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd assembler fatal error for undefined assembler labels in COFF writer
Reid Kleckner [Wed, 16 Sep 2015 16:26:29 +0000 (16:26 +0000)]
Add assembler fatal error for undefined assembler labels in COFF writer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247814 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agodon't repeat function names in comments; NFC
Sanjay Patel [Wed, 16 Sep 2015 16:21:08 +0000 (16:21 +0000)]
don't repeat function names in comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247813 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[sanitizer] Add MSan support for AArch64
Adhemerval Zanella [Wed, 16 Sep 2015 15:10:27 +0000 (15:10 +0000)]
[sanitizer] Add MSan support for AArch64

This patch adds support for msan on aarch64-linux for both 39 and
42-bit VMA.  The support is enabled by defining the
SANITIZER_AARCH64_VMA compiler flag to either 39 or 42 at build time
for both clang/llvm and compiler-rt.  The default VMA is 39 bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247807 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SPARC] Both GNU and Solaris as support eq as condition code for integer ops.
Joerg Sonnenberger [Wed, 16 Sep 2015 14:41:36 +0000 (14:41 +0000)]
[SPARC] Both GNU and Solaris as support eq as condition code for integer ops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247804 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SPARC] Recognize st/stx operations with %fsr argument too.
Joerg Sonnenberger [Wed, 16 Sep 2015 13:30:54 +0000 (13:30 +0000)]
[SPARC] Recognize st/stx operations with %fsr argument too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247794 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTest commit: Fixed a few typos in the comments.
David L Kreitzer [Wed, 16 Sep 2015 13:27:30 +0000 (13:27 +0000)]
Test commit: Fixed a few typos in the comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247793 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Register ARMPreAllocLoadStoreOpt pass with LLVM pass manager.
Chad Rosier [Wed, 16 Sep 2015 13:11:31 +0000 (13:11 +0000)]
[ARM] Register ARMPreAllocLoadStoreOpt pass with LLVM pass manager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247791 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-mc-fuzzer: A fuzzing tool for the MC layer.
Daniel Sanders [Wed, 16 Sep 2015 11:49:49 +0000 (11:49 +0000)]
llvm-mc-fuzzer: A fuzzing tool for the MC layer.

Summary:
Only the disassembler is supported in this patch but it has already found a few
issues in the Mips disassembler (mostly invalid instructions being successfully
disassembled).

Reviewers: kcc

Subscribers: russell.gallop, silvas, kcc, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247786 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Do not generate 64-bit pops of 32-bit GPRs.
Michael Kuperstein [Wed, 16 Sep 2015 11:27:20 +0000 (11:27 +0000)]
[X86] Do not generate 64-bit pops of 32-bit GPRs.

When trying emit a stack adjustments using pops, frame lowering selects an
arbitrary free GPR. It should always select one from an appropriate class...
This fixes PR24649.

Patch by: amjad.aboud@intel.com
Differential Revision: http://reviews.llvm.org/D12609

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247785 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Fix emitEpilogue() to make less assumptions about pops
Michael Kuperstein [Wed, 16 Sep 2015 11:18:25 +0000 (11:18 +0000)]
[X86] Fix emitEpilogue() to make less assumptions about pops

This is the mirror image of r242395.
When X86FrameLowering::emitEpilogue() looks for where to insert the %esp addition that
deallocates stack space used for local allocations, it assumes that any sequence of pop
instructions from function exit backwards consists purely of restoring callee-save registers.

This may be false, since from some point backward, the pops may be clean-up of stack space
allocated for arguments to a call.

Patch by: amjad.aboud@intel.com
Differential Revision: http://reviews.llvm.org/D12688

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247784 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][microMIPS] Implement PREFX, LHUE, LBE, LBUE, LHE, LWE, SBE, SHE and SWE instru...
Zoran Jovanovic [Wed, 16 Sep 2015 09:14:35 +0000 (09:14 +0000)]
[mips][microMIPS] Implement PREFX, LHUE, LBE, LBUE, LHE, LWE, SBE, SHE and SWE instructions
Differential Revision: http://reviews.llvm.org/D9189

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247780 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWhitespace.
NAKAMURA Takumi [Wed, 16 Sep 2015 06:36:03 +0000 (06:36 +0000)]
Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247779 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCopy back Inputs/gmlt.ll. Also DebugInfo/X86/gmlt.test uses it.
NAKAMURA Takumi [Wed, 16 Sep 2015 06:22:55 +0000 (06:22 +0000)]
Copy back Inputs/gmlt.ll. Also DebugInfo/X86/gmlt.test uses it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247777 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix test gmlt.test by moving its Inputs where expected.
Mehdi Amini [Wed, 16 Sep 2015 06:04:31 +0000 (06:04 +0000)]
Fix test gmlt.test by moving its Inputs where expected.

I couldn't see the failure as the test is XFAIL'ed on Darwin.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247776 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake the default triple optional by allowing an empty string
Mehdi Amini [Wed, 16 Sep 2015 05:34:32 +0000 (05:34 +0000)]
Make the default triple optional by allowing an empty string

When building LLVM as a (potentially dynamic) library that can be linked against
by multiple compilers, the default triple is not really meaningful.
We allow to explicitely set it to an empty string when configuring LLVM.
In this case, said "target independent" tests in the test suite that are using
the default triple are disabled by matching the newly available feature
"default_triple".

Reviewers: probinson, echristo
Differential Revision: http://reviews.llvm.org/D12660

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247775 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[NaryReassociate] Improve test CHECK
Mehdi Amini [Wed, 16 Sep 2015 05:27:46 +0000 (05:27 +0000)]
[NaryReassociate] Improve test CHECK

Add `CHECK` directives for the function calls.

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

Patch by: Volkan Keles <vkeles@apple.com>

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247774 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse range-based for loops. NFC
Craig Topper [Wed, 16 Sep 2015 03:52:35 +0000 (03:52 +0000)]
Use range-based for loops. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247772 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a spelling error in the description of a statistic. NFC
Craig Topper [Wed, 16 Sep 2015 03:52:32 +0000 (03:52 +0000)]
Fix a spelling error in the description of a statistic. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247771 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Unroll] Fix a bug in UnrolledInstAnalyzer::visitLoad.
Michael Zolotukhin [Wed, 16 Sep 2015 03:25:09 +0000 (03:25 +0000)]
[Unroll] Fix a bug in UnrolledInstAnalyzer::visitLoad.

We only checked that a global is initialized with constants, which is
incorrect. We should be checking that GlobalVariable *is* a constant,
not just initialized with it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247769 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm/CodeGen/CommandFlags.h: Prune doubleslash in #include.
NAKAMURA Takumi [Wed, 16 Sep 2015 00:10:43 +0000 (00:10 +0000)]
llvm/CodeGen/CommandFlags.h: Prune doubleslash in #include.

While packaging 3.7 for Fedora, the debug info splitting
process fell over this, so fix it upstream seems like a good plan.

This should be put in the 3.7 branch as well.

Noticed by Dave Airlie <airlied@redhat.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247757 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[IndVars] Fix PR24783.
Sanjoy Das [Tue, 15 Sep 2015 23:45:39 +0000 (23:45 +0000)]
[IndVars] Fix PR24783.

In `IndVarSimplify::ExpandSCEVIfNeeded`,
`SCEVExpander::findExistingExpansion` may return an `llvm::Value` that
differs in type from the SCEV it was asked to find an expansion for (but
computes the same value).  In such cases, we fall back on
`expandCodeFor`; and rely on LLVM to CSE the two equivalent
expressions (different only by a no-op cast) into a single computation.

I tried a few other approaches to fixing PR24783, all of which turned
out to be more complex than this current version:

 1. Move the `ExpandSCEVIfNeeded` logic into `expandCodeFor`.  This got
    problematic because currently we do not pass in the `Loop *` into
    `expandCodeFor`.  Changing the interface to do this is a more
    invasive change, and really does not make much semantic sense unless
    the SCEV being passed in is an add recurrence.

    There is also the problem of `expandCodeFor` being used in places
    other than `indvars` -- there may be performance / correctness
    issues elsewhere if `expandCodeFor` is moved from always generating
    IR from scratch to cache-like model.

 2. Have `findExistingExpansion` only return expression with the correct
    type.  This would make `isHighCostExpansionHelper` and thus
    `isHighCostExpansion` more conservative than necessary.

 3. Insert casts on the value returned by `findExistingExpansion` if
    needed using `InsertNoopCastOfTo`.  This is complicated because
    `InsertNoopCastOfTo` depends on internal state of its
    `SCEVExpander` (specifically `Builder.GetInserPoint()`), and this
    may not be set up when `ExpandSCEVIfNeeded` is called.

 4. Manually insert casts on the value returned by
    `findExistingExpansion` if needed using `InsertNoopCastOfTo` via
    `CastInst::Create`.  This is probably workable, but figuring out the
    location where the cast instruction needs to be inserted has enough
    edge cases (arguments, constants, invokes, LCSSA must be preserved)
    makes me feel what I have right now is simplest solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247749 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[IndVars] Rename variable; NFC.
Sanjoy Das [Tue, 15 Sep 2015 23:45:35 +0000 (23:45 +0000)]
[IndVars] Rename variable; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247748 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SCEVExpander] Fix comment formatting; NFC.
Sanjoy Das [Tue, 15 Sep 2015 23:45:31 +0000 (23:45 +0000)]
[SCEVExpander] Fix comment formatting; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247747 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llvm-cxxdump] Remove duplicate code check.
Davide Italiano [Tue, 15 Sep 2015 23:35:32 +0000 (23:35 +0000)]
[llvm-cxxdump] Remove duplicate code check.

We already fail with 'No such file or directory' when we try to open
the file -- if that doesn't exist. Also add a test to verify this behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247744 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReapply "LTO: Disable extra verify runs in release builds"
Duncan P. N. Exon Smith [Tue, 15 Sep 2015 23:05:59 +0000 (23:05 +0000)]
Reapply "LTO: Disable extra verify runs in release builds"

This reverts commit r247730, effectively reapplying r247729.  This time
I have an lld commit ready to follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247735 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ASan] Don't instrument globals in .preinit_array/.init_array/.fini_array
Alexey Samsonov [Tue, 15 Sep 2015 23:05:48 +0000 (23:05 +0000)]
[ASan] Don't instrument globals in .preinit_array/.init_array/.fini_array

These sections contain pointers to function that should be invoked
during startup/shutdown by __libc_csu_init and __libc_csu_fini.
Instrumenting these globals will append redzone to them, which will be
filled with zeroes. This will cause null pointer dereference at runtime.

Merge ASan regression tests for globals that should be ignored by
instrumentation pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247734 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "LTO: Disable extra verify runs in release builds"
Duncan P. N. Exon Smith [Tue, 15 Sep 2015 22:47:38 +0000 (22:47 +0000)]
Revert "LTO: Disable extra verify runs in release builds"

This temporarily reverts commit r247729, as it caused lld build
failures.  I'll recommit once I have an lld patch ready-to-go.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247730 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoLTO: Disable extra verify runs in release builds
Duncan P. N. Exon Smith [Tue, 15 Sep 2015 22:26:11 +0000 (22:26 +0000)]
LTO: Disable extra verify runs in release builds

The verifier currently runs three times in LTO: (1) after parsing, (2)
at the beginning of the optimization pipeline, and (3) at the end of it.

The first run is important, since we're not sure where the bitcode comes
from and it's nice to validate it, but in release builds the extra runs
aren't appropriate.

This commit:
  - Allows these runs to be disabled in LTOCodeGenerator.
  - Adds command-line options to llvm-lto.
  - Adds command-line options to libLTO.dylib, and disables the verifier
    by default in release builds (based on NDEBUG).

This shaves about 3.5% off the runtime of ld64 when linking
verify-uselistorder with -flto -g.

rdar://22509081

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247729 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agotest: Add "REQUIRES: native" so this test passes with no default triple configured
Justin Bogner [Tue, 15 Sep 2015 21:13:33 +0000 (21:13 +0000)]
test: Add "REQUIRES: native" so this test passes with no default triple configured

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247719 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Clean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue...
Larisse Voufo [Tue, 15 Sep 2015 19:14:05 +0000 (19:14 +0000)]
Revert "Clean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue()'s parameter MaxInstsToScan." for preliminary community discussion (See. D12886)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247716 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ShrinkWrapping] Add a test case for r247710.
Quentin Colombet [Tue, 15 Sep 2015 18:51:43 +0000 (18:51 +0000)]
[ShrinkWrapping] Add a test case for r247710.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247713 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIntroducing llvm.invariant.group.barrier intrinsic
Piotr Padlewski [Tue, 15 Sep 2015 18:32:14 +0000 (18:32 +0000)]
Introducing llvm.invariant.group.barrier intrinsic

For more info for what reason it was invented, goto:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html

invariant.group.barrier:
http://reviews.llvm.org/D12310
docs:
http://reviews.llvm.org/D11399
CodeGenPrepare:
http://reviews.llvm.org/D12875

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247711 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ShrinkWrapping] Fix an infinite loop while looking for restore point.
Quentin Colombet [Tue, 15 Sep 2015 18:19:39 +0000 (18:19 +0000)]
[ShrinkWrapping] Fix an infinite loop while looking for restore point.
This may happen when the input program itself contains an infinite loop with no
exit block. In that case, we would fail to find a block post-dominating the loop
such that this block is outside of the loop.

This fixes PR24823.
Working on reducing the test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247710 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBroaden optimization of fcmp ([us]itofp x, constant) by instcombine.
Arch D. Robison [Tue, 15 Sep 2015 17:51:59 +0000 (17:51 +0000)]
Broaden optimization of fcmp ([us]itofp x, constant) by instcombine.

The patch extends the optimization to cases where the constant's
magnitude is so small or large that the rounding of the conversion
is irrelevant.  The "so small" case includes negative zero.

Differential review: http://reviews.llvm.org/D11210

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247708 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CorrelatedValuePropagation] Infer nonnull attributes
Igor Laevsky [Tue, 15 Sep 2015 17:51:50 +0000 (17:51 +0000)]
[CorrelatedValuePropagation] Infer nonnull attributes

LazuValueInfo can prove that value is nonnull based on the context information.
Make use of this ability to infer nonnull attributes for the call arguments.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247707 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[NaryReassociate] Add support for Mul instructions
Marcello Maggioni [Tue, 15 Sep 2015 17:22:52 +0000 (17:22 +0000)]
[NaryReassociate] Add support for Mul instructions

This patch extends the current pass by handling
Mul instructions as well.

Patch by: Volkan Keles (vkeles@apple.com)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247705 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and related...
Daniel Sanders [Tue, 15 Sep 2015 16:17:27 +0000 (16:17 +0000)]
Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.

Eric has replied and has demanded the patch be reverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247702 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols;...
Sanjay Patel [Tue, 15 Sep 2015 15:26:25 +0000 (15:26 +0000)]
80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC80-cols; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247700 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agomore space; NFC
Sanjay Patel [Tue, 15 Sep 2015 15:24:42 +0000 (15:24 +0000)]
more space; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247699 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][microMIPS] Fix an issue with disassembling lwm32 instruction
Zoran Jovanovic [Tue, 15 Sep 2015 15:21:27 +0000 (15:21 +0000)]
[mips][microMIPS] Fix an issue with disassembling lwm32 instruction
Fixed microMIPS disassembler crash on test case generated by llvm-mc-fuzzer.
Differential Revision: http://reviews.llvm.org/D12881

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247698 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Add support for branch-likely pseudo-instructions
Zoran Jovanovic [Tue, 15 Sep 2015 15:06:26 +0000 (15:06 +0000)]
[mips] Add support for branch-likely pseudo-instructions
Differential Revision: http://reviews.llvm.org/D10537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247697 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SystemZ] Fix assertion failure in tryBuildVectorShuffle
Ulrich Weigand [Tue, 15 Sep 2015 14:27:46 +0000 (14:27 +0000)]
[SystemZ] Fix assertion failure in tryBuildVectorShuffle

Under certain circumstances, tryBuildVectorShuffle would attempt to
create a BUILD_VECTOR node with an invalid combination of types.
This happened when one of the components of the original BUILD_VECTOR
was itself a TRUNCATE node.  That TRUNCATE was stripped off during
intermediate processing to simplify code, but when adding the node
back to the result vector, we still need it to get the type right.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247694 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRe-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* and relate...
Daniel Sanders [Tue, 15 Sep 2015 14:08:28 +0000 (14:08 +0000)]
Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.

Summary:
This is the first patch in the series to migrate Triple's (which are ambiguous)
to TargetTuple's (which aren't).

For the moment, TargetTuple simply passes all requests to the Triple object it
holds. Once it has replaced Triple, it will start to implement the interface in
a more suitable way.

This change makes some changes to the public C++ API. In particular,
InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer()
now take TargetTuples instead of Triples. The other public C++ API's have
been left as-is for the moment to reduce patch size.

This commit also contains a trivial patch to clang to account for the C++ API
change. Thanks go to Pavel Labath for fixing LLDB for me.

Reviewers: rengolin

Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247692 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r247684 - Replace Triple with a new TargetTuple ...
Daniel Sanders [Tue, 15 Sep 2015 13:46:21 +0000 (13:46 +0000)]
Revert r247684 - Replace Triple with a new TargetTuple ...

LLDB needs to be updated in the same commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247686 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReplace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.
Daniel Sanders [Tue, 15 Sep 2015 13:17:40 +0000 (13:17 +0000)]
Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.

Summary:
This is the first patch in the series to migrate Triple's (which are ambiguous)
to TargetTuple's (which aren't).

For the moment, TargetTuple simply passes all requests to the Triple object it
holds. Once it has replaced Triple, it will start to implement the interface in
a more suitable way.

This change makes some changes to the public C++ API. In particular,
InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer()
now take TargetTuples instead of Triples. The other public C++ API's have
been left as-is for the moment to reduce patch size.

This commit also contains a trivial patch to clang to account for the C++ API
change.

Reviewers: rengolin

Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247683 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix namespace indentation and missing blank lines before 'public:' in *MCAsmInfo...
Daniel Sanders [Tue, 15 Sep 2015 12:27:06 +0000 (12:27 +0000)]
Fix namespace indentation and missing blank lines before 'public:' in *MCAsmInfo.h. NFC.

This is to reduce noise in a following commit.

Also fixes a couple missing spaces before the reference operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247679 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[GlobalsAA] Disable globals-aa by default
James Molloy [Tue, 15 Sep 2015 10:44:06 +0000 (10:44 +0000)]
[GlobalsAA] Disable globals-aa by default

Several issues have been found with it - disabling in the meantime.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247674 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][microMIPS] Implement CACHEE and PREFE instructions for microMIPS32r6
Zoran Jovanovic [Tue, 15 Sep 2015 10:05:10 +0000 (10:05 +0000)]
[mips][microMIPS] Implement CACHEE and PREFE instructions for microMIPS32r6
Differential Revision: http://reviews.llvm.org/D11632

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247670 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Added support for various EVA ASE instructions.
Daniel Sanders [Tue, 15 Sep 2015 10:02:16 +0000 (10:02 +0000)]
[mips] Added support for various EVA ASE instructions.

Summary:
Added support for the following instructions:

CACHEE, LBE, LBUE, LHE, LHUE, LWE, LLE, LWLE, LWRE, PREFE,
SBE, SHE, SWE, SCE, SWLE, SWRE, TLBINV, TLBINVF

This required adding some infrastructure for the EVA ASE.

Patch by Scott Egerton.

Reviewers: vkalintiris, dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247669 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Rename target->dest as per feedback from Chapuni on http://reviews.llvm.org...
Chris Bieneman [Tue, 15 Sep 2015 02:15:53 +0000 (02:15 +0000)]
[CMake] Rename target->dest as per feedback from Chapuni on reviews.llvm.org/D12864

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247658 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PlaceSafepoints] Make the width of a counted loop settable.
Sanjoy Das [Tue, 15 Sep 2015 01:42:48 +0000 (01:42 +0000)]
[PlaceSafepoints] Make the width of a counted loop settable.

Summary:
This change lets a `PlaceSafepoints` client change how wide the trip
count of a loop has to be for the loop to be considerd "counted", via
`CountedLoopTripWidth`.  It also removes the boolean `SkipCounted` flag
and the `upperTripBound` constant -- we can get the old behavior of
`SkipCounted` == `false` by setting `CountedLoopTripWidth` to `13` (2 ^
13 == 8192).

Reviewers: reames

Subscribers: llvm-commits, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247656 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WebAssembly] Implement int64-to-int32 conversion.
Dan Gohman [Tue, 15 Sep 2015 00:55:19 +0000 (00:55 +0000)]
[WebAssembly] Implement int64-to-int32 conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247649 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agodsymutil: Remove the now obsolete RelocMgr argument from cloneDIE. (NFC)
Adrian Prantl [Mon, 14 Sep 2015 23:27:26 +0000 (23:27 +0000)]
dsymutil: Remove the now obsolete RelocMgr argument from cloneDIE. (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247636 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llvm-cov] Disable name and path truncation
Vedant Kumar [Mon, 14 Sep 2015 23:26:36 +0000 (23:26 +0000)]
[llvm-cov] Disable name and path truncation

Change the output of llvm-cov s.t it does not truncate function names
and file paths when printing coverage reports.

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

rdar://22531141

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247635 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Refactor and cleanup generating and installing symlinks to tools.
Chris Bieneman [Mon, 14 Sep 2015 23:09:06 +0000 (23:09 +0000)]
[CMake] Refactor and cleanup generating and installing symlinks to tools.

Summary: This change generalizes symlink generation and makes symlinks to tools obey LLVM_TOOLCHAIN_TOOLS. It makes it so that if you exclude llvm-ar from LLVM_TOOLCHAIN_TOOLS you don't end up with broken symlinks to llvm-lib and llvm-ranlib in your install.

Reviewers: bogner, chapuni, rafael

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247632 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDwarfDebug: Emit dwo_id+dwo_name for DICompileUnits that provide a dwoId.
Adrian Prantl [Mon, 14 Sep 2015 22:10:22 +0000 (22:10 +0000)]
DwarfDebug: Emit dwo_id+dwo_name for DICompileUnits that provide a dwoId.
For module debugging clang emits prefabricated skeleton compile units
that can be recognized by a nonzero dwoId.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247626 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[opaque pointer types] Add an explicit value type to GlobalObject
David Blaikie [Mon, 14 Sep 2015 21:47:27 +0000 (21:47 +0000)]
[opaque pointer types] Add an explicit value type to GlobalObject

This is needed by all GlobalObjects (GlobalAlias, Function,
GlobalVariable), see the GlobalObject::getValueType which is used in
many places. If at some point that can be removed, then we can remove
this member.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247621 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRegisterPressure: constify getRegSetPressureAtPos()
Matthias Braun [Mon, 14 Sep 2015 21:06:37 +0000 (21:06 +0000)]
RegisterPressure: constify getRegSetPressureAtPos()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247616 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[opaque pointer types] Switch a few cases of getElementType over, since I had them...
David Blaikie [Mon, 14 Sep 2015 20:29:26 +0000 (20:29 +0000)]
[opaque pointer types] Switch a few cases of getElementType over, since I had them lying around anyway

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247610 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake AsmPrinter::EmitJumpTableInfo virtual
Dan Gohman [Mon, 14 Sep 2015 19:44:29 +0000 (19:44 +0000)]
Make AsmPrinter::EmitJumpTableInfo virtual

Targets that have non-traditional jump table mechanisms may need to do
something substantially different for jump tables than what
AsmPrinter::EmitJumpTableInfo does. This patch makes that function
virtual so that targets can override it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247604 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Add llvm-ar subdirectory explicitly.
Chris Bieneman [Mon, 14 Sep 2015 18:36:40 +0000 (18:36 +0000)]
[CMake] Add llvm-ar subdirectory explicitly.

This is required because ExternalProject_Add requires all targets specified in the DEPENDS argument must exist before calling ExternalProject_Add.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247592 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRegisterPressure: Simplify close{Top|Bottom}()
Matthias Braun [Mon, 14 Sep 2015 18:24:15 +0000 (18:24 +0000)]
RegisterPressure: Simplify close{Top|Bottom}()

- There are no duplicate registers in LiveRegs list we are copying from
  and so we do not need to sort the registers.
- Simply use SmallVector::apend instead of a loop between begin() and end()
  with push_back().

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247588 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombineCalls] Use isKnownNonNullAt() to check nullness of passing arguments...
Chen Li [Mon, 14 Sep 2015 18:10:43 +0000 (18:10 +0000)]
[InstCombineCalls] Use isKnownNonNullAt() to check nullness of passing arguments at callsite

Summary: This patch replaces isKnownNonNull() with isKnownNonNullAt() when checking nullness of passing arguments at callsite. In this way it can handle cases where the argument does not have nonnull attribute but has a dominating null check from the CFG. It also adds assertions in isKnownNonNull() and isKnownNonNullFromDominatingCondition() to make sure the value checked is pointer type (as defined in LLVM document). These assertions might trip failures in things which are not  covered under llvm/test, but fixes should be pretty obvious.

Reviewers: reames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247587 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[opaque pointer type] Pass GlobalAlias the actual pointer type rather than...
David Blaikie [Mon, 14 Sep 2015 18:01:59 +0000 (18:01 +0000)]
Revert "[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space"

This was a flawed change - it just caused the getElementType call to be
deferred until later, when we really need to remove it. Now that the IR
for GlobalAliases has been updated, the root cause is addressed that way
instead and this change is no longer needed (and in fact gets in the way
- because we want to pass the pointee type directly down further).

Follow up patches to push this through GlobalValue, bitcode format, etc,
will come along soon.

This reverts commit 236160.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247585 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llvm-mc] Better error handling in ENOENT case + test.
Davide Italiano [Mon, 14 Sep 2015 17:10:01 +0000 (17:10 +0000)]
[llvm-mc] Better error handling in ENOENT case + test.

This is a follow up to r247518.
As a general note, I think we could do a much better job testing for
error conditions in tools. I already anticipated in a previous mail,
but while implementing this I noticed that the code coverage we have
for error checking is pretty low. I can arbitrarily remove checks from
several tools and the suite still passes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247582 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agodsymutil: Factor out the DIE cloning into a DIECloner class. (NFC)
Adrian Prantl [Mon, 14 Sep 2015 16:46:10 +0000 (16:46 +0000)]
dsymutil: Factor out the DIE cloning into a DIECloner class. (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247577 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoImprove ISel using across lane min/max reduction
Jun Bum Lim [Mon, 14 Sep 2015 16:19:52 +0000 (16:19 +0000)]
Improve ISel using across lane min/max reduction

In vectorized integer min/max reduction code, the final "reduce" step
is sub-optimal. In AArch64, this change wll combine :
  %svn0 = vector_shuffle %0, undef<2,3,u,u>
  %smax0 = smax %0, svn0
  %svn3 = vector_shuffle %smax0, undef<1,u,u,u>
  %sc = setcc %smax0, %svn3, gt
  %n0 = extract_vector_elt %sc, #0
  %n1 = extract_vector_elt %smax0, #0
  %n2 = extract_vector_elt $smax0, #1
  %result = select %n0, %n1, n2
becomes :
  %1 = smaxv %0
  %result = extract_vector_elt %1, 0

This change extends r246790.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247575 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Unified the MipsMemSimm9GPRAsmOperand and MipsMemSimm9AsmOperand operands...
Daniel Sanders [Mon, 14 Sep 2015 15:57:24 +0000 (15:57 +0000)]
[mips] Unified the MipsMemSimm9GPRAsmOperand and MipsMemSimm9AsmOperand operands, NFC.

Summary:
These operands had the same purpose, however the MipsMemSimm9GPRAsmOperand
operand was only for micromips32r6 and the MipsMemSimm9AsmOperand did not
have a ParserMatchClass.

Patch by Scott Egerton

Reviewers: vkalintiris, dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247573 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MergeFuncs] Fix bug in merging GetElementPointers
JF Bastien [Mon, 14 Sep 2015 15:37:48 +0000 (15:37 +0000)]
[MergeFuncs] Fix bug in merging GetElementPointers

GetElementPointers must have the first argument's type compared
for structural equivalence. Previously the code erroneously compared the
pointer's type, but this code was dead because all pointer types (of the
same address space) are the same. The pointee must be compared instead
(using the type stored in the GEP, not from the pointer type which will
be erased anyway).

Author: jrkoenig
Reviewers: dschuff, nlewycky, jfb
Subscribers: nlewycky, llvm-commits
Differential revision: http://reviews.llvm.org/D12820

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247570 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Extract shifts out of multiply-by-constant
John Brawn [Mon, 14 Sep 2015 15:19:41 +0000 (15:19 +0000)]
[ARM] Extract shifts out of multiply-by-constant

Turning (op x (mul y k)) into (op x (lsl (mul y k>>n) n)) is beneficial when
we can do the lsl as a shifted operand and the resulting multiply constant is
simpler to generate.

Do this by doing the transformation when trying to select a shifted operand,
as that ensures that it actually turns out better (the alternative would be to
do it in PreprocessISelDAG, but we don't know for sure there if extracting the
shift would allow a shifted operand to be used).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247569 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReformat partially.
NAKAMURA Takumi [Mon, 14 Sep 2015 12:51:53 +0000 (12:51 +0000)]
Reformat partially.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247557 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReformat blank lines.
NAKAMURA Takumi [Mon, 14 Sep 2015 12:51:47 +0000 (12:51 +0000)]
Reformat blank lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247556 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert part of r247553, "[CMake] Reformat CLANG_TEST_DEPS." It was accidental commit.
NAKAMURA Takumi [Mon, 14 Sep 2015 12:51:01 +0000 (12:51 +0000)]
Revert part of r247553, "[CMake] Reformat CLANG_TEST_DEPS." It was accidental commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247555 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Reformat CLANG_TEST_DEPS.
NAKAMURA Takumi [Mon, 14 Sep 2015 12:41:53 +0000 (12:41 +0000)]
[CMake] Reformat CLANG_TEST_DEPS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247553 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Remove redundant nested-name-specifier. NFC
Simon Atanasyan [Mon, 14 Sep 2015 11:18:22 +0000 (11:18 +0000)]
[mips] Remove redundant nested-name-specifier. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247547 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Save a copy of MipsABIInfo in the MipsTargetStreamer to escape a dangling...
Simon Atanasyan [Mon, 14 Sep 2015 11:18:03 +0000 (11:18 +0000)]
[mips] Save a copy of MipsABIInfo in the MipsTargetStreamer to escape a dangling pointer

The MipsTargetELFStreamer can receive ABI info from many sources. For example,
from the MipsAsmParser instance. Lifetime of the MipsAsmParser can be shorter
than MipsTargetELFStreamer's lifetime. In that case we get a dangling pointer
to MipsABIInfo.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247546 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWhitespace.
NAKAMURA Takumi [Mon, 14 Sep 2015 11:14:39 +0000 (11:14 +0000)]
Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247543 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoGlobalsAAResult: Try to fix crash.
NAKAMURA Takumi [Mon, 14 Sep 2015 06:16:44 +0000 (06:16 +0000)]
GlobalsAAResult: Try to fix crash.

DeletionCallbackHandle holds GAR in its creation. It assumes;

  - It is registered as CallbackVH. It should not be moved in its life.
  - Its parent, GAR, may be moved.

To move list<DeletionCallbackHandle> GlobalsAAResult::Handles,
GAR must be updated with the destination in GlobalsAAResult(&&).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247534 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Use range-based for loops and make a helper function static. NFC
Craig Topper [Sun, 13 Sep 2015 18:01:25 +0000 (18:01 +0000)]
[TableGen] Use range-based for loops and make a helper function static. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247529 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Simplify some code by using StringRef::find instead of std::find. NFC
Craig Topper [Sun, 13 Sep 2015 18:01:20 +0000 (18:01 +0000)]
[TableGen] Simplify some code by using StringRef::find instead of std::find. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247528 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Use 'size_t' instead of 'unsigned' to better match the argument types...
Craig Topper [Sun, 13 Sep 2015 18:01:09 +0000 (18:01 +0000)]
[TableGen] Use 'size_t' instead of 'unsigned' to better match the argument types of addAsmOperand. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247527 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][MMX] Added shuffle decodes for MMX/3DNow! shuffles.
Simon Pilgrim [Sun, 13 Sep 2015 11:28:45 +0000 (11:28 +0000)]
[X86][MMX] Added shuffle decodes for MMX/3DNow! shuffles.

Added shuffle decodes for MMX PUNPCK + PSHUFW shuffles.
Added shuffle decodes for 3DNow! PSWAPD shuffles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247526 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[FunctionAttrs] Move the malloc-like test to a static helper function
Chandler Carruth [Sun, 13 Sep 2015 08:23:27 +0000 (08:23 +0000)]
[FunctionAttrs] Move the malloc-like test to a static helper function
that could be used from a new pass manager. This one makes particular
sense as a static helper as it doesn't even need TLI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247525 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[FunctionAttrs] Factor the logic to test for a known non-null return out
Chandler Carruth [Sun, 13 Sep 2015 08:17:14 +0000 (08:17 +0000)]
[FunctionAttrs] Factor the logic to test for a known non-null return out
of a method and into a re-usable static helper. We can potentially use
this function from the implementation of a new pass manager oriented
version of the pass. Also add some better documentation of exactly what
the semantic model of this routine is (it isn't trivial) and use a more
modern naming convention for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247524 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX-512: Fixed a bug in OR/XOR operations for 512-bit FP values on KNL.
Elena Demikhovsky [Sun, 13 Sep 2015 08:15:15 +0000 (08:15 +0000)]
AVX-512: Fixed a bug in OR/XOR operations for 512-bit FP values on KNL.
KNL does not have VXORPS, VORPS for 512-bit values.
I use integer VPXOR, VPOR that actually do the same.

X86ISD::FXOR/FOR are generated as a result of FSUB combining.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247523 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[FunctionAttrs] Make the per-function attribute inference a boring
Chandler Carruth [Sun, 13 Sep 2015 08:03:23 +0000 (08:03 +0000)]
[FunctionAttrs] Make the per-function attribute inference a boring
static function rather than a method. It just needed access to
TargetLibraryInfo, and this way it can be easily reused between the
current FunctionAttrs implementation and any port for the new pass
manager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247522 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[FunctionAttrs] Collect utility functions as static helpers rather than
Chandler Carruth [Sun, 13 Sep 2015 07:50:43 +0000 (07:50 +0000)]
[FunctionAttrs] Collect utility functions as static helpers rather than
methods. They don't need anything from the class anyways.

Also, collect the declarations into the private section of the pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247521 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoClean up doxygen comments in FunctionAttrs, promoting some non-doxygen
Chandler Carruth [Sun, 13 Sep 2015 06:57:25 +0000 (06:57 +0000)]
Clean up doxygen comments in FunctionAttrs, promoting some non-doxygen
comments, deleting duplicate comments, moving comments to consistently
live on the definition since these are all really internal routines,
etc. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247520 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDo some spring cleaning on FunctionAttrs.cpp with clang-format prior to
Chandler Carruth [Sun, 13 Sep 2015 06:47:20 +0000 (06:47 +0000)]
Do some spring cleaning on FunctionAttrs.cpp with clang-format prior to
other refactorings and cleanups here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247519 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llvm-mc] More meaningful error if input file doesn't exist.
Davide Italiano [Sun, 13 Sep 2015 04:09:40 +0000 (04:09 +0000)]
[llvm-mc] More meaningful error if input file doesn't exist.

Before we just printed on stderr the program name. Now at least we
print the name of the file that doesn't exist. There's probably room
for improvement of error handling in llvm-mc (and the tools in general),
but still this is a step forward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247518 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x86] enable machine combiner reassociations for 128-bit vector logical integer insts...
Sanjay Patel [Sat, 12 Sep 2015 19:47:50 +0000 (19:47 +0000)]
[x86] enable machine combiner reassociations for 128-bit vector logical integer insts (2nd try)

The changes in:
test/CodeGen/X86/machine-cp.ll
are just due to scheduling differences after some logic instructions were reassociated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247516 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CodeGen] Fix AtomicExpand invalidation issue caused by r247429.
Ahmed Bougacha [Sat, 12 Sep 2015 18:51:23 +0000 (18:51 +0000)]
[CodeGen] Fix AtomicExpand invalidation issue caused by r247429.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247514 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Renamed lowerVectorShuffleAsUnpack NFCI.
Simon Pilgrim [Sat, 12 Sep 2015 18:26:47 +0000 (18:26 +0000)]
[X86] Renamed lowerVectorShuffleAsUnpack NFCI.

Renamed to lowerVectorShuffleAsPermuteAndUnpack to make it clear that it lowers to more than just a UNPCK instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247513 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't use bashism/kshism of test ==. From Kamil Rytarowski.
Joerg Sonnenberger [Sat, 12 Sep 2015 16:30:32 +0000 (16:30 +0000)]
Don't use bashism/kshism of test ==. From Kamil Rytarowski.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247512 91177308-0d34-0410-b5e6-96231b3b80d8