oota-llvm.git
8 years ago[WebAssembly] Update test failure expectations
Derek Schuff [Thu, 10 Dec 2015 00:56:18 +0000 (00:56 +0000)]
[WebAssembly] Update test failure expectations

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

8 years agoPeepholeOptimizer: Ignore dead implicit defs
Dan Gohman [Thu, 10 Dec 2015 00:37:51 +0000 (00:37 +0000)]
PeepholeOptimizer: Ignore dead implicit defs

Target-specific instructions may have uninteresting physreg clobbers,
for target-specific reasons. The peephole pass doesn't need to concern
itself with such defs, as long as they're implicit and marked as dead.

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

8 years ago[WebAssembly] Fix legalization of shift operators with illegal types.
Dan Gohman [Thu, 10 Dec 2015 00:26:26 +0000 (00:26 +0000)]
[WebAssembly] Fix legalization of shift operators with illegal types.

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

8 years ago[WebAssembly] Fix copy+pastos.
Dan Gohman [Thu, 10 Dec 2015 00:22:40 +0000 (00:22 +0000)]
[WebAssembly] Fix copy+pastos.

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

8 years ago[WebAssembly] Implement anyext.
Dan Gohman [Thu, 10 Dec 2015 00:17:35 +0000 (00:17 +0000)]
[WebAssembly] Implement anyext.

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

8 years ago[X86] Enable shrink-wrapping by default, but keep it disabled for stack frames
Quentin Colombet [Wed, 9 Dec 2015 23:08:18 +0000 (23:08 +0000)]
[X86] Enable shrink-wrapping by default, but keep it disabled for stack frames
without a frame pointer when unwind may happen.
This is a workaround for a bug in the way we emit the CFI directives for
frameless unwind information. See PR25614.

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

8 years agouse range-based for loops; NFCI
Sanjay Patel [Wed, 9 Dec 2015 22:45:45 +0000 (22:45 +0000)]
use range-based for loops; NFCI

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

8 years agoSynchronize the logic for deciding to link a gv.
Rafael Espindola [Wed, 9 Dec 2015 22:44:00 +0000 (22:44 +0000)]
Synchronize the logic for deciding to link a gv.

We were deciding to not link an available_externally gv over a
declaration, but then copying over the body anyway.

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

8 years ago[PGO] Rename the profdata filename to avoid the conflict b/w tests.
Rong Xu [Wed, 9 Dec 2015 21:27:59 +0000 (21:27 +0000)]
[PGO] Rename the profdata filename to avoid the conflict b/w tests.

Two tests diag_mismatch.ll and diag_no_funcprofdata.ll generates the same
profdata filename which can conflict in current test runs. This patch
renames them to have different names.

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

8 years agoIR: Make ConstantDataArray::getFP actually return a ConstantDataArray
Justin Bogner [Wed, 9 Dec 2015 21:21:07 +0000 (21:21 +0000)]
IR: Make ConstantDataArray::getFP actually return a ConstantDataArray

The ConstantDataArray::getFP(LLVMContext &, ArrayRef<uint16_t>)
overload has had a typo in it since it was written, where it will
create a Vector instead of an Array. This obviously doesn't work at
all, but it turns out that until r254991 there weren't actually any
callers of this overload. Fix the typo and add some test coverage.

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

8 years ago[ThinLTO] Release files read when creating combined index in gold plugin
Teresa Johnson [Wed, 9 Dec 2015 21:11:42 +0000 (21:11 +0000)]
[ThinLTO] Release files read when creating combined index in gold plugin

This wasn't causing an issue since at HEAD we exit the linker completely
after creating the combined index.

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

8 years ago[Float2Int] Don't operate on vector instructions
Reid Kleckner [Wed, 9 Dec 2015 21:08:18 +0000 (21:08 +0000)]
[Float2Int] Don't operate on vector instructions

This fixes a crash bug. It's also not clear if we'd want to do this
transform for vectors.

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

8 years ago[llvm-dwp] Sink debug_types.dwo emission into the code parsing the type signatures...
David Blaikie [Wed, 9 Dec 2015 21:02:33 +0000 (21:02 +0000)]
[llvm-dwp] Sink debug_types.dwo emission into the code parsing the type signatures (NFC)

This is a preliminary change towards deduplicating type units based on
their signatures. Next change will skip emission of types when their
signature has already been seen.

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

8 years agoDon't assign a temporary string to a StringRef.
Rafael Espindola [Wed, 9 Dec 2015 20:41:10 +0000 (20:41 +0000)]
Don't assign a temporary string to a StringRef.

Should fix the windows debug and asan bots.

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

8 years agoUse WeakVH to keep track of calls with operand bundles in CloneCodeInfo
Sanjoy Das [Wed, 9 Dec 2015 20:33:52 +0000 (20:33 +0000)]
Use WeakVH to keep track of calls with operand bundles in CloneCodeInfo

`CloneAndPruneIntoFromInst` can DCE instructions after cloning them into
the new function, and so an AssertingVH is too strong.  This change
switches CloneCodeInfo to use a std::vector<WeakVH>.

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

8 years agoDelete trailing whitespace; NFC
Sanjoy Das [Wed, 9 Dec 2015 20:33:45 +0000 (20:33 +0000)]
Delete trailing whitespace; NFC

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

8 years agoDelay context construction to when/if it is needed in gold plugin (NFC)
Teresa Johnson [Wed, 9 Dec 2015 19:49:40 +0000 (19:49 +0000)]
Delay context construction to when/if it is needed in gold plugin (NFC)

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

8 years agoclang-format order of gold-plugin includes (NFC)
Teresa Johnson [Wed, 9 Dec 2015 19:45:55 +0000 (19:45 +0000)]
clang-format order of gold-plugin includes (NFC)

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

8 years ago[ThinLTO] FunctionImport pass can take a const index pointer (NFC)
Teresa Johnson [Wed, 9 Dec 2015 19:39:47 +0000 (19:39 +0000)]
[ThinLTO] FunctionImport pass can take a const index pointer (NFC)

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

8 years ago[InstCombine] fold bitcasts around an extractelement (2nd try)
Sanjay Patel [Wed, 9 Dec 2015 18:57:16 +0000 (18:57 +0000)]
[InstCombine] fold bitcasts around an extractelement (2nd try)

This is a redo of r255124 (reverted at r255126) with an added check for a
scalar destination type and an added test for the failure seen in Clang's
test/CodeGen/vector.c. The extra test shows a different missing optimization.

Original commit message:

Example:
  bitcast (extractelement (bitcast <2 x float> %X to <2 x i32>), 1) to float
    --->
  extractelement <2 x float> %X, i32 1

This is part of fixing PR25543:
https://llvm.org/bugs/show_bug.cgi?id=25543

The next step will be to generalize this fold:
trunc ( lshr ( bitcast X) ) -> extractelement (X)

Ie, I'm hoping to replace the existing transform of:
bitcast ( trunc ( lshr ( bitcast X)))
added by:
http://reviews.llvm.org/rL112232

with 2 less specific transforms to catch the case in the bug report.

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

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

8 years agoRevert "Revert r253253 and r253126: "Don't recompute LCSSA after loop-unrolling when...
Michael Zolotukhin [Wed, 9 Dec 2015 18:20:28 +0000 (18:20 +0000)]
Revert "Revert r253253 and r253126: "Don't recompute LCSSA after loop-unrolling when possible.""

The bug in IndVarSimplify was fixed in r254976, r254977, so I'm
reapplying the original patch for avoiding redundant LCSSA recomputation.

This reverts commit ffe3b434e505e403146aff00be0c177bb6d13466.

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

8 years ago[PGO] Resubmit "MST based PGO instrumentation infrastructure" (r254021)
Rong Xu [Wed, 9 Dec 2015 18:08:16 +0000 (18:08 +0000)]
[PGO] Resubmit "MST based PGO instrumentation infrastructure" (r254021)

This new patch fixes a few bugs that exposed in last submit. It also improves
the test cases.
--Original Commit Message--
This patch implements a minimum spanning tree (MST) based instrumentation for
PGO. The use of MST guarantees minimum number of CFG edges getting
instrumented. An addition optimization is to instrument the less executed
edges to further reduce the instrumentation overhead. The patch contains both the
instrumentation and the use of the profile to set the branch weights.

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

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

8 years ago[Support] Change SaturatingAdd()/SaturatingMultiply() to use pointer for returning...
Nathan Slingerland [Wed, 9 Dec 2015 17:11:28 +0000 (17:11 +0000)]
[Support] Change SaturatingAdd()/SaturatingMultiply() to use pointer for returning overflow state

Summary:
Improve SaturatingAdd()/SaturatingMultiply() to use bool * to optionally return overflow result.
This should make it clearer that the value is returned at callsites and reduces the size of the implementation.

Reviewers: davidxl, silvas

Subscribers: llvm-commits

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

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

8 years agoRevert "[InstCombine] fold bitcasts around an extractelement"
Mehdi Amini [Wed, 9 Dec 2015 16:31:39 +0000 (16:31 +0000)]
Revert "[InstCombine] fold bitcasts around an extractelement"

This reverts commit r255124.

Broke http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/4193/steps/test/logs/stdio

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

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

8 years ago[WebAssembly] Reintroduce ARGUMENT moving logic
Dan Gohman [Wed, 9 Dec 2015 16:23:59 +0000 (16:23 +0000)]
[WebAssembly] Reintroduce ARGUMENT moving logic

Reinteroduce the code for moving ARGUMENTS back to the top of the basic block.
While the ARGUMENTS physical register prevents sinking and scheduling from
moving them, it does not appear to be sufficient to prevent SelectionDAG from
moving them down in the initial schedule. This patch introduces a patch that
moves them back to the top immediately after SelectionDAG runs.

This is still hopefully a temporary solution. http://reviews.llvm.org/D14750 is
one alternative, though the review has not been favorable, and proposed
alternatives are longer-term and have other downsides.

This fixes the main outstanding -verify-machineinstrs failures, so it adds
-verify-machineinstrs to several tests.

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

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

8 years ago[InstCombine] fold bitcasts around an extractelement
Sanjay Patel [Wed, 9 Dec 2015 16:17:20 +0000 (16:17 +0000)]
[InstCombine] fold bitcasts around an extractelement

Example:
  bitcast (extractelement (bitcast <2 x float> %X to <2 x i32>), 1) to float
    --->
  extractelement <2 x float> %X, i32 1

This is part of fixing PR25543:
https://llvm.org/bugs/show_bug.cgi?id=25543

The next step will be to generalize this fold:
trunc ( lshr ( bitcast X) ) -> extractelement (X)

Ie, I'm hoping to replace the existing transform of:
bitcast ( trunc ( lshr ( bitcast X)))
added by:
http://reviews.llvm.org/rL112232

with 2 less specific transforms to catch the case in the bug report.

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

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

8 years agoChange hasUniqueInitializer() to call isStrongDefinitionForLinker() instead of !isWea...
Mehdi Amini [Wed, 9 Dec 2015 16:17:07 +0000 (16:17 +0000)]
Change hasUniqueInitializer() to call isStrongDefinitionForLinker() instead of !isWeakForLinker()

Summary:
Available_externally global variable with initializer were considered "hasInitializer()",
while obviously it can't match the description:

    Whether the global variable has an initializer, and any changes made to the
    initializer will turn up in the final executable.

since modifying the initializer of an externally available variable does not make sense.

Reviewers: pcc, rafael

Subscribers: llvm-commits

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

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

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

8 years agoRe-commit r255115, with the PredicatedScalarEvolution class moved to
Silviu Baranga [Wed, 9 Dec 2015 16:06:28 +0000 (16:06 +0000)]
Re-commit r255115, with the PredicatedScalarEvolution class moved to
ScalarEvolution.h, in order to avoid cyclic dependencies between the Transform
and Analysis modules:

[LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV expressions

Summary:
This change creates a layer over ScalarEvolution for LAA and LV, and centralizes the
usage of SCEV predicates. The SCEVPredicatedLayer takes the statically deduced knowledge
by ScalarEvolution and applies the knowledge from the SCEV predicates. The end goal is
that both LAA and LV should use this interface everywhere.

This also solves a problem involving the result of SCEV expression rewritting when
the predicate changes. Suppose we have the expression (sext {a,+,b}) and two predicates
  P1: {a,+,b} has nsw
  P2: b = 1.

Applying P1 and then P2 gives us {a,+,1}, while applying P2 and the P1 gives us
sext({a,+,1}) (the AddRec expression was changed by P2 so P1 no longer applies).
The SCEVPredicatedLayer maintains the order of transformations by feeding back
the results of previous transformations into new transformations, and therefore
avoiding this issue.

The SCEVPredicatedLayer maintains a cache to remember the results of previous
SCEV rewritting results. This also has the benefit of reducing the overall number
of expression rewrites.

Reviewers: mzolotukhin, anemet

Subscribers: jmolloy, sanjoy, llvm-commits

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

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

8 years agoARM: don't use a deleted node as the BaseReg in complex pattern.
Tim Northover [Wed, 9 Dec 2015 15:54:50 +0000 (15:54 +0000)]
ARM: don't use a deleted node as the BaseReg in complex pattern.

We mutated the DAG, which invalidated the node we were trying to use
as a base register. Sometimes we got away with it, but other times the
node really did get deleted before it was finished with.

Should fix PR25733

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

8 years agoWebAssembly: add missing failure to the list.
JF Bastien [Wed, 9 Dec 2015 15:52:57 +0000 (15:52 +0000)]
WebAssembly: add missing failure to the list.

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

8 years agoRevert r255115 until we figure out how to fix the bot failures.
Silviu Baranga [Wed, 9 Dec 2015 15:25:28 +0000 (15:25 +0000)]
Revert r255115 until we figure out how to fix the bot failures.

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

8 years ago[LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV expressions
Silviu Baranga [Wed, 9 Dec 2015 15:03:52 +0000 (15:03 +0000)]
[LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV expressions

Summary:
This change creates a layer over ScalarEvolution for LAA and LV, and centralizes the
usage of SCEV predicates. The SCEVPredicatedLayer takes the statically deduced knowledge
by ScalarEvolution and applies the knowledge from the SCEV predicates. The end goal is
that both LAA and LV should use this interface everywhere.

This also solves a problem involving the result of SCEV expression rewritting when
the predicate changes. Suppose we have the expression (sext {a,+,b}) and two predicates
  P1: {a,+,b} has nsw
  P2: b = 1.

Applying P1 and then P2 gives us {a,+,1}, while applying P2 and the P1 gives us
sext({a,+,1}) (the AddRec expression was changed by P2 so P1 no longer applies).
The SCEVPredicatedLayer maintains the order of transformations by feeding back
the results of previous transformations into new transformations, and therefore
avoiding this issue.

The SCEVPredicatedLayer maintains a cache to remember the results of previous
SCEV rewritting results. This also has the benefit of reducing the overall number
of expression rewrites.

Reviewers: mzolotukhin, anemet

Subscribers: jmolloy, sanjoy, llvm-commits

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

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

8 years agoFix cycle in selection DAG introduced by extractelement legalization
Robert Lougher [Wed, 9 Dec 2015 14:34:10 +0000 (14:34 +0000)]
Fix cycle in selection DAG introduced by extractelement legalization

During selection DAG legalization, extractelement is replaced with a load
instruction.  To do this, a temporary store to the stack is used unless an
existing store is found that can be re-used.

If re-using a store, the chain going out of the store must be replaced by
the one going out of the new load (this ensures that any stores that must
take place after the store happens after the load, else the value might
be overwritten before it is loaded).

The problem is, if the extractelement index is dependent on the store
replacing the chain will introduce a cycle in the selection DAG (the load
uses the index, and by replacing the chain we will make the index dependent
on the load).

To fix this, if the index is dependent on the store, the store is skipped.
This is conservative as we may end up creating an unnecessary extra store
to the stack.  However, the situation is not expected to occur very often.

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

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

8 years ago[AArch64] Fix FP16 vector instructions that should only accept low registers
Oliver Stannard [Wed, 9 Dec 2015 14:32:11 +0000 (14:32 +0000)]
[AArch64] Fix FP16 vector instructions that should only accept low registers

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

8 years ago[mips][ias] Range check uimm10 operands
Daniel Sanders [Wed, 9 Dec 2015 13:48:05 +0000 (13:48 +0000)]
[mips][ias] Range check uimm10 operands

Summary:

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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

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

8 years agoWebAssembly: add known failures
JF Bastien [Wed, 9 Dec 2015 13:29:32 +0000 (13:29 +0000)]
WebAssembly: add known failures

The bots are now running the torture tests properly. Bin all failures from the GCC C torture tests so that we can tackle failures and make the tree go red on regressions.

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

8 years ago[mips] Use multiclass patterns for f32/f64 comparisons and i32 selects.
Vasileios Kalintiris [Wed, 9 Dec 2015 13:24:22 +0000 (13:24 +0000)]
[mips] Use multiclass patterns for f32/f64 comparisons and i32 selects.

Summary:
Although the multiclass for i32 selects might seem redundant as it has
only one instantiation, we will use it to replace the correspondent
patterns in Mips64r6InstrInfo.td in follow-up commits.

Reviewers: dsanders

Subscribers: llvm-commits, dsanders

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

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

8 years agoRevert r254897 "[mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions"
Zlatko Buljan [Wed, 9 Dec 2015 13:07:45 +0000 (13:07 +0000)]
Revert r254897 "[mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions"

Commited patch was intended to implement LH, LHE, LHU and LHUE instructions.
After commit test-suite failed with error message in the form of:
fatal error: error in backend: Cannot select: t124: i32,ch = load<LD2[%d](tbaa=<0x94acc48>), sext from i16> t0, t2, undef:i32
For that reason I decided to revert commit r254897 and make new patch which besides implementation and standard regression tests will also have dedicated tests (CodeGen) for the above error.

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

8 years agoEarlyCSE: fix typo from rL255054.
JF Bastien [Wed, 9 Dec 2015 09:05:42 +0000 (09:05 +0000)]
EarlyCSE: fix typo from rL255054.

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

8 years agoRevert "Implement a new pass - LiveDebugValues - to compute the set of live DEBUG_VAL...
Mehdi Amini [Wed, 9 Dec 2015 08:17:42 +0000 (08:17 +0000)]
Revert "Implement a new pass - LiveDebugValues - to compute the set of live DEBUG_VALUEs at each basic block and insert them. Reviewed and accepted at: reviews.llvm.org/D11933"

This reverts commit r255096.

Break the bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/16378/

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

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

8 years agoThe current importing scheme is processing one function at a time,
Mehdi Amini [Wed, 9 Dec 2015 08:17:35 +0000 (08:17 +0000)]
The current importing scheme is processing one function at a time,
loading the source Module, linking the function in the destination
module, and destroying the source Module before repeating with the
next function to import (potentially from the same Module).

Ideally we would keep the source Module alive and import the next
Function needed from this Module. Unfortunately this is not possible
because the linker does not leave it in a usable state.

However we can do better by first computing the list of all candidates
per Module, and only then load the source Module and import all the
function we need for it.

The trick to process callees is to materialize function in the source
module when building the list of function to import, and inspect them
in their source module, collecting the list of callees for each
callee.

When we move the the actual import, we will import from each source
module exactly once. Each source module is loaded exactly once.
The only drawback it that it requires to have all the lazy-loaded
source Module in memory at the same time.

Currently this patch already improves considerably the link time,
a multithreaded link of llvm-dis on my laptop was:

  real  1m12.175s  user  6m32.430s sys  0m10.529s

and is now:

  real  0m40.697s  user  2m10.237s sys  0m4.375s

Note: this is the full link time (linker+Import+Optimizer+CodeGen)

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

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

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

8 years agoImplement a new pass - LiveDebugValues - to compute the set of live DEBUG_VALUEs...
Vikram TV [Wed, 9 Dec 2015 05:49:14 +0000 (05:49 +0000)]
Implement a new pass - LiveDebugValues - to compute the set of live DEBUG_VALUEs at each basic block and insert them. Reviewed and accepted at: reviews.llvm.org/D11933

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

8 years agoTest commit access - Fix few missing '.' in comments of LoopInterchange code.
Vikram TV [Wed, 9 Dec 2015 05:16:24 +0000 (05:16 +0000)]
Test commit access - Fix few missing '.' in comments of LoopInterchange code.

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

8 years agoFix the order of destructors in LibLTOCodeGenerator
Steven Wu [Wed, 9 Dec 2015 03:37:51 +0000 (03:37 +0000)]
Fix the order of destructors in LibLTOCodeGenerator

Summary:
The order of destructors in LTOCodeGenerator gets changed in r254696.
It is possible for LTOCodeGenerator to have a MergedModule created in
the OwnedContext, in which case the module must be destructed before
the context.

Reviewers: rafael, dexonsmith

Subscribers: llvm-commits, joker.eph

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

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

8 years ago[AArch64][ARM] Don't base interleaved op legality on type alloc size.
Ahmed Bougacha [Wed, 9 Dec 2015 01:19:50 +0000 (01:19 +0000)]
[AArch64][ARM] Don't base interleaved op legality on type alloc size.

Otherwise, we think that most types that look like they'd fit in a
legal vector type are legal (so, basically, *any* vector type with a
size between 33 and 128 bits, I think, since we use pow2 alignment;
e.g., v2i25, v3f32, ...).

DataLayout::getTypeAllocSize rounds up based on alignment.
When checking for target intrinsic legality, that's not what we want:
if rounding makes a difference, the type isn't legal, and the
target intrinsics shouldn't be used, as they are always assumed legal.

One could make the argument that alloc size is ultimately the most
relevant here, since we're dealing with LD/ST intrinsics. That's only
true if we did legalize them though; that's a problem for another day.

Use DataLayout::getTypeSizeInBits instead of getTypeAllocSizeInBits.
Type::getSizeInBits can't be used because that'd gratuitously break
pointer vector support.

Some of these uses are currently fine, because we only hit them when
the type is already known legal (e.g., r114454). Update them for
consistency. It's faster to avoid the rounding anyway!

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

8 years agoDon't drop attributes when inlining through "deopt" operand bundles
Sanjoy Das [Wed, 9 Dec 2015 01:01:28 +0000 (01:01 +0000)]
Don't drop attributes when inlining through "deopt" operand bundles

Test case attached (test case also checks that we don't drop the calling
convention, but that functionality was correct before this patch).

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

8 years agoSimplify testMergedProgram.
Rafael Espindola [Wed, 9 Dec 2015 00:55:05 +0000 (00:55 +0000)]
Simplify testMergedProgram.

It now receives and returns std::unique_ptr.

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

8 years agoSimplify memory management. NFC.
Rafael Espindola [Wed, 9 Dec 2015 00:51:06 +0000 (00:51 +0000)]
Simplify memory management. NFC.

This passes std::unique_ptr to predicates that are expected to delete
their argument.

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

8 years agoReturn std::unique_ptr from SplitFunctionsOutOfModule. NFC.
Rafael Espindola [Wed, 9 Dec 2015 00:34:10 +0000 (00:34 +0000)]
Return std::unique_ptr from SplitFunctionsOutOfModule. NFC.

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

8 years agoSimplify memory management. NFC.
Rafael Espindola [Wed, 9 Dec 2015 00:18:41 +0000 (00:18 +0000)]
Simplify memory management. NFC.

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

8 years agoX86-FMA3: Defined the ExeDomain property for Scalar FMA3 opcodes.
Vyacheslav Klochkov [Wed, 9 Dec 2015 00:12:13 +0000 (00:12 +0000)]
X86-FMA3: Defined the ExeDomain property for Scalar FMA3 opcodes.

Reviewer: Simon Pilgrim.
Differential Revision: http://reviews.llvm.org/D15317

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

8 years agoSimplify memory management a bit. NFC.
Rafael Espindola [Wed, 9 Dec 2015 00:08:22 +0000 (00:08 +0000)]
Simplify memory management a bit. NFC.

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

8 years agoReturn a std::unique_ptr from CloneModule. NFC.
Rafael Espindola [Tue, 8 Dec 2015 23:57:17 +0000 (23:57 +0000)]
Return a std::unique_ptr from CloneModule. NFC.

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

8 years ago[IndVars] Use any_of and foreach instead of explicit for loops; NFC
Sanjoy Das [Tue, 8 Dec 2015 23:52:58 +0000 (23:52 +0000)]
[IndVars] Use any_of and foreach instead of explicit for loops; NFC

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

8 years ago[OperandBundles] Have PruneEH work correct with operand bundles.
Sanjoy Das [Tue, 8 Dec 2015 23:16:52 +0000 (23:16 +0000)]
[OperandBundles] Have PruneEH work correct with operand bundles.

For an invoke with operand bundles, the [op_begin(), op_end()-3] range
can contain things other than invoke arguments.  This change teaches
PruneEH to use arg_begin() and arg_end() explicitly.

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

8 years agoDefine selection for v4f16, v8f16 scalar_to_vector
Pirama Arumuga Nainar [Tue, 8 Dec 2015 23:07:06 +0000 (23:07 +0000)]
Define selection for v4f16, v8f16 scalar_to_vector

Summary:
This fixes failure when trying to select
    insertelement <4 x half> undef, half %a, i64 0
which gets transformed to a scalar_to_vector node.

The accompanying v4 and v8 tests fail instruction selection without this
patch.

Reviewers: ab, jmolloy

Subscribers: srhines, llvm-commits

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

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

8 years agoFix/Improve Debug print in FunctionImport pass
Mehdi Amini [Tue, 8 Dec 2015 23:04:19 +0000 (23:04 +0000)]
Fix/Improve Debug print in FunctionImport pass

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

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

8 years ago[CGP] Reimplement r255055 a different way
Reid Kleckner [Tue, 8 Dec 2015 23:00:03 +0000 (23:00 +0000)]
[CGP] Reimplement r255055 a different way

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

8 years ago[SCEV] Use for-each; NFC
Sanjoy Das [Tue, 8 Dec 2015 22:53:36 +0000 (22:53 +0000)]
[SCEV] Use for-each; NFC

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

8 years agoRemove caching in FunctionImport: a Module can't be reused after being linked from
Mehdi Amini [Tue, 8 Dec 2015 22:39:40 +0000 (22:39 +0000)]
Remove caching in FunctionImport: a Module can't be reused after being linked from

The Linker destroys the source module (API change coming to make it explicit)

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

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

8 years agoRevert "[CGP] Check that we have an insert point before moving llvm.dbg.value around"
Reid Kleckner [Tue, 8 Dec 2015 22:33:23 +0000 (22:33 +0000)]
Revert "[CGP] Check that we have an insert point before moving llvm.dbg.value around"

This reverts commit r255055.

Breakage has been reported.

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

8 years ago[OperandBundles] Fix a transform in simplifycfg
Sanjoy Das [Tue, 8 Dec 2015 22:26:08 +0000 (22:26 +0000)]
[OperandBundles] Fix a transform in simplifycfg

Reviewers: pcc, majnemer, reames

Subscribers: reames, llvm-commits

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

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

8 years ago[X86][AVX] Fold loads + splats into broadcast instructions
Simon Pilgrim [Tue, 8 Dec 2015 22:17:11 +0000 (22:17 +0000)]
[X86][AVX] Fold loads + splats into broadcast instructions

On AVX and AVX2, BROADCAST instructions can load a scalar into all elements of a target vector.

This patch improves the lowering of 'splat' shuffles of a loaded vector into a broadcast - currently the lowering only works for cases where we are splatting the zero'th element, which is now generalised to any element.

Fix for PR23022

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

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

8 years ago[CMake] Ignore externalizing debuginfo for unit tests
Chris Bieneman [Tue, 8 Dec 2015 21:51:48 +0000 (21:51 +0000)]
[CMake] Ignore externalizing debuginfo for unit tests

If you externalize debug info for unit tests the test runner finds the mach-o inside the dsym bundle and tries to execute it as a test.

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

8 years ago[CGP] Check that we have an insert point before moving llvm.dbg.value around
Reid Kleckner [Tue, 8 Dec 2015 21:50:52 +0000 (21:50 +0000)]
[CGP] Check that we have an insert point before moving llvm.dbg.value around

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

8 years ago[EarlyCSE] Value forwarding for unordered atomics
Philip Reames [Tue, 8 Dec 2015 21:45:41 +0000 (21:45 +0000)]
[EarlyCSE] Value forwarding for unordered atomics

This patch teaches the fully redundant load part of EarlyCSE how to forward from atomic and volatile loads and stores, and how to eliminate unordered atomics (only). This patch does not include dead store elimination support for unordered atomics, that will follow in the near future.

The basic idea is that we allow all loads and stores to be tracked by the AvailableLoad table. We store a bit in the table which tracks whether load/store was atomic, and then only replace atomic loads with ones which were also atomic.

No attempt is made to refine our handling of ordered loads or stores. Those are still treated as full fences. We could pretty easily extend the release fence handling to release stores, but that should be a separate patch.

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

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

8 years ago[X86][SSE4A] Added fast-isel intrinsics tests
Simon Pilgrim [Tue, 8 Dec 2015 21:43:41 +0000 (21:43 +0000)]
[X86][SSE4A] Added fast-isel intrinsics tests

As discussed on PR24580, this patch adds fast-isel codegen tests to match the IR generated in clang/test/CodeGen/sse4a-builtins.c

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

8 years ago[X86][SSSE3] Added fast-isel intrinsics tests
Simon Pilgrim [Tue, 8 Dec 2015 21:32:08 +0000 (21:32 +0000)]
[X86][SSSE3] Added fast-isel intrinsics tests

As discussed on PR24580, this patch adds fast-isel codegen tests to match the IR generated in clang/test/CodeGen/ssse3-builtins.c

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

8 years ago[X86][SSE3] Added fast-isel intrinsics tests
Simon Pilgrim [Tue, 8 Dec 2015 21:27:19 +0000 (21:27 +0000)]
[X86][SSE3] Added fast-isel intrinsics tests

As discussed on PR24580, this patch adds fast-isel codegen tests to match the IR generated in clang/test/CodeGen/sse3-builtins.c

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

8 years agoFix ARMv4T (Thumb1) epilogue generation
Artyom Skrobov [Tue, 8 Dec 2015 19:59:01 +0000 (19:59 +0000)]
Fix ARMv4T (Thumb1) epilogue generation

Summary:
Before ARMv5T, Thumb1 code could not pop PC, as described at D14357 and D14986;
so we need the special fixup in the epilogue.

Reviewers: jroelofs, qcolombet

Subscribers: aemerson, llvm-commits, rengolin

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

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

8 years agoRevert "Add Available Externally linkage type to isWeakForLinker()"
Mehdi Amini [Tue, 8 Dec 2015 19:13:31 +0000 (19:13 +0000)]
Revert "Add Available Externally linkage type to isWeakForLinker()"

This reverts r255043, as per post-review concern were raised on the correctness.

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

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

8 years agoCleanup test: remove useless alignment
Mehdi Amini [Tue, 8 Dec 2015 19:02:55 +0000 (19:02 +0000)]
Cleanup test: remove useless alignment

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

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

8 years agoAdd Available Externally linkage type to isWeakForLinker()
Mehdi Amini [Tue, 8 Dec 2015 19:01:29 +0000 (19:01 +0000)]
Add Available Externally linkage type to isWeakForLinker()

Per LangRef: "Globals with available_externally linkage are
allowed to be discarded at will, and are otherwise the same
as linkonce_odr", since linkonce_odr is in this list it makes
sense to have available_externally there as well.

Reviewers: rafael

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

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

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

8 years agoX86: produce more friendly errors during MachO relocation handling
Tim Northover [Tue, 8 Dec 2015 18:31:35 +0000 (18:31 +0000)]
X86: produce more friendly errors during MachO relocation handling

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

8 years ago[ARM] Allowing SP/PC for AND/BIC mod_imm_not
Renato Golin [Tue, 8 Dec 2015 18:10:58 +0000 (18:10 +0000)]
[ARM] Allowing SP/PC for AND/BIC mod_imm_not

AND/BIC instructions do accept SP/PC, so the register class should be
more generic (rGPR -> GPR) to cope with that case. Adding more tests.

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

8 years agoadding readability-identifier-naming to llvm clang-tidy configuration.
Mike Aizatsky [Tue, 8 Dec 2015 17:44:51 +0000 (17:44 +0000)]
adding readability-identifier-naming to llvm clang-tidy configuration.

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

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

8 years ago[Hexagon] Add NewValueJump support for C4_cmpneq, C4_cmplte, C4_cmplteu
Ron Lieberman [Tue, 8 Dec 2015 16:28:32 +0000 (16:28 +0000)]
[Hexagon] Add NewValueJump support for C4_cmpneq, C4_cmplte, C4_cmplteu

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

8 years agoMove all private members together. NFC.
Rafael Espindola [Tue, 8 Dec 2015 14:54:49 +0000 (14:54 +0000)]
Move all private members together. NFC.

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

8 years ago[mips][ias] Range check uimm8 operands
Daniel Sanders [Tue, 8 Dec 2015 14:42:10 +0000 (14:42 +0000)]
[mips][ias] Range check uimm8 operands

Summary:

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

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

8 years ago[mips][ias] Range check uimm6 operands and fix a bug this revealed.
Daniel Sanders [Tue, 8 Dec 2015 13:49:19 +0000 (13:49 +0000)]
[mips][ias] Range check uimm6 operands and fix a bug this revealed.

Summary:
We don't check the size operand on ext/dext*/ins/dins* yet because the
permitted range depends on the pos argument and we can't check that using
this mechanism.

The bug was that dextu/dinsu accepted 0..31 in the pos operand instead of 32..63.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

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

8 years ago[x86][avx512] more changes in intrinsics to be align with gcc format
Asaf Badouh [Tue, 8 Dec 2015 12:34:34 +0000 (12:34 +0000)]
[x86][avx512] more changes in intrinsics to be align with gcc format

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

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

8 years ago[AArch64] Add ARMv8.2-A FP16 vector instructions
Oliver Stannard [Tue, 8 Dec 2015 12:16:10 +0000 (12:16 +0000)]
[AArch64] Add ARMv8.2-A FP16 vector instructions

ARMv8.2-A adds 16-bit floating point versions of all existing SIMD
floating-point instructions. This is an optional extension, so all of
these instructions require the FeatureFullFP16 subtarget feature.

Note that VFP without SIMD is not a valid combination for any version of
ARMv8-A, but I have ensured that these instructions all depend on both
FeatureNEON and FeatureFullFP16 for consistency.

The ".2h" vector type specifier is now legal (for the scalar pairwise
reduction instructions), so some unrelated tests have been modified as
different error messages are emitted. This is not a problem as the
invalid operands are still caught.

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

8 years agodding test for fnstsw
Michael Zuckerman [Tue, 8 Dec 2015 12:00:24 +0000 (12:00 +0000)]
dding test for fnstsw

continue of Wrong FNSTSW size operator
url: http://reviews.llvm.org/D14953

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

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

8 years ago[SCEV] Move some struct declarations inside functions; NFC
Sanjoy Das [Tue, 8 Dec 2015 04:32:54 +0000 (04:32 +0000)]
[SCEV] Move some struct declarations inside functions; NFC

Reduces the scope over which the struct is visible, making its usages
obvious.  I did not move structs in cases where this wasn't a clear
win (the struct is too large, or is grouped in some other interesting
way).

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

8 years ago[SCEV] Fix indentation; NFC
Sanjoy Das [Tue, 8 Dec 2015 04:32:51 +0000 (04:32 +0000)]
[SCEV] Fix indentation; NFC

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

8 years ago[OperandBundles] Remove unncessary constructor
Sanjoy Das [Tue, 8 Dec 2015 03:50:32 +0000 (03:50 +0000)]
[OperandBundles] Remove unncessary constructor

The StringRef constructor is unnecessary (since we're converting to
std::string anyway), and having it requires an explicit call to
StringRef's or std::string's constructor.

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

8 years ago[WebAssembly] Fix a typo in a comment.
Dan Gohman [Tue, 8 Dec 2015 03:43:03 +0000 (03:43 +0000)]
[WebAssembly] Fix a typo in a comment.

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

8 years ago[WebAssembly] Remove an unneeded static_cast.
Dan Gohman [Tue, 8 Dec 2015 03:42:50 +0000 (03:42 +0000)]
[WebAssembly] Remove an unneeded static_cast.

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

8 years ago[WebAssembly] Fix an emacs syntax highlighting comment.
Dan Gohman [Tue, 8 Dec 2015 03:36:00 +0000 (03:36 +0000)]
[WebAssembly] Fix an emacs syntax highlighting comment.

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

8 years ago[WebAssembly] Convert a file-level comment to doxygen style.
Dan Gohman [Tue, 8 Dec 2015 03:33:51 +0000 (03:33 +0000)]
[WebAssembly] Convert a file-level comment to doxygen style.

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

8 years ago[WebAssembly] Assert MRI.isSSA() in passes that depend on SSA form.
Dan Gohman [Tue, 8 Dec 2015 03:30:42 +0000 (03:30 +0000)]
[WebAssembly] Assert MRI.isSSA() in passes that depend on SSA form.

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

8 years ago[WebAssembly] Trim some unneeded #includes.
Dan Gohman [Tue, 8 Dec 2015 03:25:35 +0000 (03:25 +0000)]
[WebAssembly] Trim some unneeded #includes.

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

8 years ago[WebAssembly] Remove the override of haveFastSqrt.
Dan Gohman [Tue, 8 Dec 2015 03:22:33 +0000 (03:22 +0000)]
[WebAssembly] Remove the override of haveFastSqrt.

The default implementation in BasicTTI already checks TLI and does
the right thing.

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

8 years agoIR: Allow vectors of halfs to be ConstantDataVectors
Justin Bogner [Tue, 8 Dec 2015 03:01:16 +0000 (03:01 +0000)]
IR: Allow vectors of halfs to be ConstantDataVectors

Currently, vectors of halfs end up as ConstantVectors, but there isn't
a good reason they can't be ConstantDataVectors. This should save some
memory.

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

8 years ago[llvm-objdump/MachO] Don't cut'n'paste the same code over and over.
Davide Italiano [Tue, 8 Dec 2015 02:45:59 +0000 (02:45 +0000)]
[llvm-objdump/MachO] Don't cut'n'paste the same code over and over.

Use the appropriate helper instead.

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

8 years agoAdd a test showing that we internalize lazily linked GVs.
Rafael Espindola [Tue, 8 Dec 2015 02:38:14 +0000 (02:38 +0000)]
Add a test showing that we internalize lazily linked GVs.

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

8 years agoAsmPrinter: Use emitGlobalConstantFP to emit elements of constant data
Justin Bogner [Tue, 8 Dec 2015 02:37:48 +0000 (02:37 +0000)]
AsmPrinter: Use emitGlobalConstantFP to emit elements of constant data

It's strange to duplicate the logic for emitting FP values into
emitGlobalConstantDataSequential, and it's even stranger that we end
up printing the verbose assembly comments differently between the two
paths. Just call into emitGlobalConstantFP rather than crudely
duplicating its logic.

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

8 years agoSimplify test. NFC.
Rafael Espindola [Tue, 8 Dec 2015 02:29:45 +0000 (02:29 +0000)]
Simplify test. NFC.

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

8 years ago[CXX TLS calling convention] Add support for AArch64.
Manman Ren [Tue, 8 Dec 2015 00:14:38 +0000 (00:14 +0000)]
[CXX TLS calling convention] Add support for AArch64.

rdar://9001553

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

8 years ago[IndVars] Have getInsertPointForUses preserve LCSSA
Sanjoy Das [Tue, 8 Dec 2015 00:13:21 +0000 (00:13 +0000)]
[IndVars] Have getInsertPointForUses preserve LCSSA

Summary:
Also add a stricter post-condition for IndVarSimplify.

Fixes PR25578.  Test case by Michael Zolotukhin.

Reviewers: hfinkel, atrick, mzolotukhin

Subscribers: llvm-commits

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

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