oota-llvm.git
10 years ago[PM] Remove extraneous space that I left in there.
Chandler Carruth [Fri, 22 Nov 2013 12:26:40 +0000 (12:26 +0000)]
[PM] Remove extraneous space that I left in there.

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

10 years ago[PM] Teach the analysis managers to pass themselves as arguments to the
Chandler Carruth [Fri, 22 Nov 2013 12:11:02 +0000 (12:11 +0000)]
[PM] Teach the analysis managers to pass themselves as arguments to the
run methods of the analysis passes.

Also generalizes and re-uses the SFINAE for transformation passes so
that users can write an analysis pass and only accept an analysis
manager if that is useful to their pass.

This completes the plumbing to make an analysis manager available
through every pass's run method if desired so that passes no longer need
to be constructed around them.

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

10 years ago[PM] Reverse the template arguments 'PassT' and 'AnalysisManagerT' in
Chandler Carruth [Fri, 22 Nov 2013 11:55:38 +0000 (11:55 +0000)]
[PM] Reverse the template arguments 'PassT' and 'AnalysisManagerT' in
several templates. The previous order didn't make any sense as it
separated 'IRUnitT' and 'AnalysisManagerT', the types which are
essentially paired and passed along together throughout the layers.

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

10 years agoAdd support for Cortex-A12.
Richard Barton [Fri, 22 Nov 2013 11:53:16 +0000 (11:53 +0000)]
Add support for Cortex-A12.

Patch by Oliver Stannard!

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

10 years ago[PM] Remove the IRUnitT typedef requirement for analysis passes.
Chandler Carruth [Fri, 22 Nov 2013 11:46:33 +0000 (11:46 +0000)]
[PM] Remove the IRUnitT typedef requirement for analysis passes.

Since the analysis managers were split into explicit function and module
analysis managers, it is now completely trivial to specify this when
building up the concept and model types explicitly, and it is impossible
to end up with a type error at run time. We instantiate a template when
registering a pass that will enforce the requirement at a type-system
level, and we produce a dynamic error on all the other query paths to
the analysis manager if the pass in question isn't registered.

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

10 years ago[PM] Fix the analysis templates' usage of IRUnitT.
Chandler Carruth [Fri, 22 Nov 2013 11:34:43 +0000 (11:34 +0000)]
[PM] Fix the analysis templates' usage of IRUnitT.

This is supposed to be the whole type of the IR unit, and so we
shouldn't pass a pointer to it but rather the value itself. In turn, we
need to provide a 'Module *' as that type argument (for example). This
will become more relevant with SCCs or other units which may not be
passed as a pointer type, but also brings consistency with the
transformation pass templates.

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

10 years ago[mips][msa] Float vector constants cannot use ldi.[wd] directly. Bitcast from the...
Daniel Sanders [Fri, 22 Nov 2013 11:24:50 +0000 (11:24 +0000)]
[mips][msa] Float vector constants cannot use ldi.[wd] directly. Bitcast from the appropriate integer vector type.

Fixes an instruction selection failure detected by llvm-stress.

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

10 years agoRevert r195318 as it causes miscompilation (PR18029)
Kostya Serebryany [Fri, 22 Nov 2013 10:30:39 +0000 (10:30 +0000)]
Revert r195318 as it causes miscompilation (PR18029)

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

10 years agoFix a Cygwin build failure caused by enum values starting with '_', which is conflict...
Hao Liu [Fri, 22 Nov 2013 09:24:41 +0000 (09:24 +0000)]
Fix a Cygwin build failure caused by enum values starting with '_', which is conflicted with some platform macros.
This patch only renames variables, no functional change.

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

10 years agoFix the bugs about AArch64 Load/Store vector types and bitcast between i64 and vector...
Hao Liu [Fri, 22 Nov 2013 08:47:22 +0000 (08:47 +0000)]
Fix the bugs about AArch64 Load/Store vector types and bitcast between i64 and vector types.
e.g. "%tmp = load <2 x i64>* %ptr" can't be selected.
     "%tmp = bitcast i64 %in to <2 x i32>" can't be selected.

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

10 years agoRevert last change by haoliu because of buildbot failure.
Hao Liu [Fri, 22 Nov 2013 08:34:54 +0000 (08:34 +0000)]
Revert last change by haoliu because of buildbot failure.

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

10 years agoFix a Cygwin build failure caused by enum values starting with '_', which is conflict...
Hao Liu [Fri, 22 Nov 2013 08:17:16 +0000 (08:17 +0000)]
Fix a Cygwin build failure caused by enum values starting with '_', which is conflicted with some platform macros.
This solution only renames variables, no functional change.

NOTE: This is a candidate for the 3.4 branch.

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

10 years ago[block-freq] Update data in test case to be unsigned long long to fix mingw build.
Michael Gottesman [Fri, 22 Nov 2013 05:00:51 +0000 (05:00 +0000)]
[block-freq] Update data in test case to be unsigned long long to fix mingw build.

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

10 years ago[block-freq] Add a method to loop info for returning all loop latches for a specific...
Michael Gottesman [Fri, 22 Nov 2013 05:00:48 +0000 (05:00 +0000)]
[block-freq] Add a method to loop info for returning all loop latches for a specific loop.

We already have a method for returning one loop latch but for some
reason no one has committed one for returning loop latches in the case
where there are multiple latches.

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

10 years agoFor AArch64 back-end instruction selection, lower Neon_Lowxxx with EXTRCT_SUBREG.
Jiangning Liu [Fri, 22 Nov 2013 02:45:13 +0000 (02:45 +0000)]
For AArch64 back-end instruction selection, lower Neon_Lowxxx with EXTRCT_SUBREG.

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

10 years agoTweak 3 tests in llvm/test/CodeGen/X86 to add -mcpu=generic since r195383.
NAKAMURA Takumi [Fri, 22 Nov 2013 02:28:04 +0000 (02:28 +0000)]
Tweak 3 tests in llvm/test/CodeGen/X86 to add -mcpu=generic since r195383.

They failed on bdver2 buildslave.

FIXME: FileCheck-ize them.

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

10 years agoSLP Vectorizer: Extract cost will only be added once even if the scalar has multiple...
Yi Jiang [Fri, 22 Nov 2013 01:57:02 +0000 (01:57 +0000)]
SLP Vectorizer: Extract cost will only be added once even if the scalar has multiple external uses.

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

10 years ago[PM] Simplify how the SFINAE for AnalysisResultModel is applied by
Chandler Carruth [Fri, 22 Nov 2013 00:48:49 +0000 (00:48 +0000)]
[PM] Simplify how the SFINAE for AnalysisResultModel is applied by
factoring it out into the default template argument so clients don't
have to even think about it.

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

10 years agoFix a typo where we were creating <def,kill> operands instead of
Lang Hames [Fri, 22 Nov 2013 00:46:32 +0000 (00:46 +0000)]
Fix a typo where we were creating <def,kill> operands instead of
<def,dead> ones.

Add an assertion to make sure we catch this in the future.

Fixes <rdar://problem/15464559>.

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

10 years ago[PM] Switch analysis managers to be threaded through the run methods
Chandler Carruth [Fri, 22 Nov 2013 00:43:29 +0000 (00:43 +0000)]
[PM] Switch analysis managers to be threaded through the run methods
rather than the constructors of passes.

This simplifies the APIs of passes significantly and removes an error
prone pattern where the *same* manager had to be given to every
different layer. With the new API the analysis managers themselves will
have to be cross connected with proxy analyses that allow a pass at one
layer to query for the analysis manager of another layer. The proxy will
both expose a handle to the other layer's manager and it will provide
the invalidation hooks to ensure things remain consistent across layers.
Finally, the outer-most analysis manager has to be passed to the run
method of the outer-most pass manager. The rest of the propagation is
automatic.

I've used SFINAE again to allow passes to completely disregard the
analysis manager if they don't need or want to care. This helps keep
simple things simple for users of the new pass manager.

Also, the system specifically supports passing a null pointer into the
outer-most run method if your pass pipeline neither needs nor wants to
deal with analyses. I find this of dubious utility as while some
*passes* don't care about analysis, I'm not sure there are any
real-world users of the pass manager itself that need to avoid even
creating an analysis manager. But it is easy to support, so there we go.

Finally I renamed the module proxy for the function analysis manager to
the more verbose but less confusing name of
FunctionAnalysisManagerModuleProxy. I hate this name, but I have no idea
what else to name these things. I'm expecting in the fullness of time to
potentially have the complete cross product of types at the proxy layer:

{Module,SCC,Function,Loop,Region}AnalysisManager{Module,SCC,Function,Loop,Region}Proxy

(except for XAnalysisManagerXProxy which doesn't make any sense)

This should make it somewhat easier to do the next phases which is to
build the upward proxy and get its invalidation correct, as well as to
make the invalidation within the Module -> Function mapping pass be more
fine grained so as to invalidate fewer fuction analyses.

After all of the proxy analyses are done and the invalidation working,
I'll finally be able to start working on the next two fun fronts: how to
adapt an existing pass to work in both the legacy pass world and the new
one, and building the SCC, Loop, and Region counterparts. Fun times!

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

10 years agoR600: Implement TargetInstrInfo::isLegalToSplitMBBAt()
Tom Stellard [Fri, 22 Nov 2013 00:41:08 +0000 (00:41 +0000)]
R600: Implement TargetInstrInfo::isLegalToSplitMBBAt()

Splitting a basic block will create a new ALU clause, so we need to make
sure we aren't moving uses of registers that are local to their
current clause into a new one.

I had a test case for this, but unfortunately unrelated schedule changes
invalidated it, and I wasn't been able to come up with another one.

NOTE: This is a candidate for the 3.4 branch.

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

10 years agoSelectionDAG: Optimize expansion of vec_type = BITCAST scalar_type
Tom Stellard [Fri, 22 Nov 2013 00:41:05 +0000 (00:41 +0000)]
SelectionDAG: Optimize expansion of vec_type = BITCAST scalar_type

The legalizer can now do this type of expansion for more
type combinations without loading and storing to and
from the stack.

NOTE: This is a candidate for the 3.4 branch.

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

10 years agoSplit SETCC if VSELECT requires splitting too.
Tom Stellard [Fri, 22 Nov 2013 00:39:23 +0000 (00:39 +0000)]
Split SETCC if VSELECT requires splitting too.

This patch is a rewrite of the original patch commited in r194542. Instead of
relying on the type legalizer to do the splitting for us, we now peform the
splitting ourselves in the DAG combiner. This is necessary for the case where
the vector mask is a legal type after promotion and still wouldn't require
splitting.

Patch by: Juergen Ributzka

NOTE: This is a candidate for the 3.4 branch.

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

10 years agoIn Dwarf 3 (and Dwarf 2) attributes whose value are offsets into a
Eric Christopher [Thu, 21 Nov 2013 23:46:41 +0000 (23:46 +0000)]
In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into a
section use the form DW_FORM_data4 whilst in Dwarf 4 and later they
use the form DW_FORM_sec_offset.

This patch updates the places where such attributes are generated to
use the appropriate form depending on the Dwarf version. The DIE entries
affected have the following tags:
DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames,
DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base

It also adds a hidden command line option "--dwarf-version=<uint>"
to llc which allows the version of Dwarf to be generated to override
what is specified in the metadata; this makes it possible to update
existing tests to check the debugging information generated for both
Dwarf 4 (the default) and Dwarf 3 using the same metadata.

Patch (slightly modified) by Keith Walker!

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

10 years agoSHLD/SHRD are VectorPath (microcode) instructions known to have poor latency on certa...
Ekaterina Romanova [Thu, 21 Nov 2013 23:21:26 +0000 (23:21 +0000)]
SHLD/SHRD are VectorPath (microcode) instructions known to have poor latency on certain architectures. While generating SHLD/SHRD instructions is acceptable when optimizing for size, optimizing for speed on these platforms should be implemented using alternative sequences of instructions composed of add, adc, shr, shl, or and lea which are directPath instructions. These alternative instructions not only have a lower latency but they also increase the decode bandwidth by allowing simultaneous decoding of a third directPath instruction.

AMD's processors family K7, K8, K10, K12, K15 and K16 are known to have SHLD/SHRD instructions with very poor latency. Optimization guides for these processors recommend using an alternative sequence of instructions. For these AMD's processors, I disabled folding (or (x << c) | (y >> (64 - c))) when we are not optimizing for size.

It might be beneficial to disable this folding for some of the Intel's processors. However, since I couldn't find specific recommendations regarding using SHLD/SHRD instructions on Intel's processors, I haven't disabled this peephole for Intel.

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

10 years agoIntroduce two command-line flags for the instrumentation pass to control whether...
Peter Collingbourne [Thu, 21 Nov 2013 23:20:54 +0000 (23:20 +0000)]
Introduce two command-line flags for the instrumentation pass to control whether the labels of pointers should be ignored in load and store instructions

The new command line flags are -dfsan-ignore-pointer-label-on-store and -dfsan-ignore-pointer-label-on-load. Their default value matches the current labelling scheme.

Additionally, the function __dfsan_union_load is marked as readonly.

Patch by Lorenzo Martignoni!

Differential Revision: http://llvm-reviews.chandlerc.com/D2187

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

10 years agoMove member variable up to where the rest of non-DWARF5 variables reside.
Eric Christopher [Thu, 21 Nov 2013 22:56:11 +0000 (22:56 +0000)]
Move member variable up to where the rest of non-DWARF5 variables reside.

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

10 years agoCMake: Some changes to package version names:
Hans Wennborg [Thu, 21 Nov 2013 22:47:21 +0000 (22:47 +0000)]
CMake: Some changes to package version names:

- Allow overriding PACKAGE_VERSION from the command-line
- Use PACKAGE_VERSION to set CPACK_PACKAGE_VERSION (used by the Win installer)
- Don't include the version number in the CPack install dir or registry key.

Differential revision: http://llvm-reviews.chandlerc.com/D2245

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

10 years agoRemove dangling documentation. llvm-prof was deleted a while ago.
Benjamin Kramer [Thu, 21 Nov 2013 19:32:37 +0000 (19:32 +0000)]
Remove dangling documentation. llvm-prof was deleted a while ago.

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

10 years ago[ARM] add the overlooked tests for Cortex-A7 build attributes
Artyom Skrobov [Thu, 21 Nov 2013 16:22:39 +0000 (16:22 +0000)]
[ARM] add the overlooked tests for Cortex-A7 build attributes

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

10 years ago[mips][msa] Fix a corner case in performORCombine() when combining nodes into VSELECT.
Daniel Sanders [Thu, 21 Nov 2013 16:11:31 +0000 (16:11 +0000)]
[mips][msa] Fix a corner case in performORCombine() when combining nodes into VSELECT.

Mask == ~InvMask asserts if the width of Mask and InvMask differ.
The combine isn't valid (with two exceptions, see below) if the widths differ
so test for this before testing Mask == ~InvMask.

In the specific cases of Mask=~0 and InvMask=0, as well as Mask=0 and
InvMask=~0, the combine is still valid. However, there are more appropriate
combines that could be used in these cases such as folding x & 0 to 0, or
x & ~0 to x.

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

10 years ago[ARM] add basic Cortex-A7 support to LLVM backend
Artyom Skrobov [Thu, 21 Nov 2013 14:03:21 +0000 (14:03 +0000)]
[ARM] add basic Cortex-A7 support to LLVM backend

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

10 years agoAdd support for legalizing SETNE/SETEQ by inverting the condition code and the result...
Daniel Sanders [Thu, 21 Nov 2013 13:24:49 +0000 (13:24 +0000)]
Add support for legalizing SETNE/SETEQ by inverting the condition code and the result of the comparison.

Summary:
LegalizeSetCCCondCode can now legalize SETEQ and SETNE by returning the inverse
condition and requesting that the caller invert the result of the condition.

The caller of LegalizeSetCCCondCode must handle the inverted CC, and they do
so as follows:
  SETCC, BR_CC:
    Invert the result of the SETCC with SelectionDAG::getNOT()
  SELECT_CC:
    Swap the true/false operands.

This is necessary for MSA which lacks an integer SETNE instruction.

Reviewers: resistor

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2229

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

10 years ago[msan] Propagate condition origin in select instruction.
Evgeniy Stepanov [Thu, 21 Nov 2013 12:00:24 +0000 (12:00 +0000)]
[msan] Propagate condition origin in select instruction.

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

10 years ago[mips][msa/dsp] Only do DSP combines if DSP is enabled.
Daniel Sanders [Thu, 21 Nov 2013 11:40:14 +0000 (11:40 +0000)]
[mips][msa/dsp] Only do DSP combines if DSP is enabled.

Fixes a crash (null pointer dereferenced) when MSA is enabled.

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

10 years agoUse multiple filecheck prefixes in msan instrumentation tests.
Evgeniy Stepanov [Thu, 21 Nov 2013 11:37:16 +0000 (11:37 +0000)]
Use multiple filecheck prefixes in msan instrumentation tests.

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

10 years agoWhitespace.
NAKAMURA Takumi [Thu, 21 Nov 2013 11:08:31 +0000 (11:08 +0000)]
Whitespace.

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

10 years ago[PM] Fix typo and trailing space.
Chandler Carruth [Thu, 21 Nov 2013 11:04:53 +0000 (11:04 +0000)]
[PM] Fix typo and trailing space.

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

10 years agoRevert r195317 (and r195333), "Teach ISel not to optimize 'optnone' functions."
NAKAMURA Takumi [Thu, 21 Nov 2013 10:55:15 +0000 (10:55 +0000)]
Revert r195317 (and r195333), "Teach ISel not to optimize 'optnone' functions."

It broke, at least, i686 target. It is reproducible with "llc -mtriple=i686-unknown".

FYI, it didn't appear to add either "-O0" or "-fast-isel".

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

10 years ago[PM] Widen the interface for invalidate on an analysis result now that
Chandler Carruth [Thu, 21 Nov 2013 10:53:05 +0000 (10:53 +0000)]
[PM] Widen the interface for invalidate on an analysis result now that
it is completely optional, and sink the logic for handling the preserved
analysis set into it.

This allows us to implement the delegation logic desired in the proxy
module analysis for the function analysis manager where if the proxy
itself is preserved we assume the set of functions hasn't changed and we
do a fine grained invalidation by walking the functions in the module
and running the invalidate for them all at the manager level and letting
it try to invalidate any passes.

This in turn makes it blindingly obvious why we should hoist the
invalidate trait and have two collections of results. That allows
handling invalidation for almost all analyses without indirect calls and
it allows short circuiting when the preserved set is all.

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

10 years ago[OCaml] Unbreak make install by providing ocamldoc target
Peter Zotov [Thu, 21 Nov 2013 10:10:16 +0000 (10:10 +0000)]
[OCaml] Unbreak make install by providing ocamldoc target

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

10 years agoadd 'REQUIRES: asserts' to a test that uses 'llc -debug'; this fixes the no-asserts...
Kostya Serebryany [Thu, 21 Nov 2013 09:28:16 +0000 (09:28 +0000)]
add 'REQUIRES: asserts' to a test that uses 'llc -debug'; this fixes the no-asserts build

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

10 years ago[PM] Add support for using SFINAE to reflect on an analysis's result
Chandler Carruth [Thu, 21 Nov 2013 09:10:21 +0000 (09:10 +0000)]
[PM] Add support for using SFINAE to reflect on an analysis's result
type and detect whether or not it provides an 'invalidate' member the
analysis manager should use.

This lets the overwhelming common case of *not* caring about custom
behavior when an analysis is invalidated be the the obvious default
behavior with no code written by the author of an analysis. Only when
they write code specifically to handle invalidation does it get used.

Both cases are actually covered by tests here. The test analysis uses
the default behavior, and the proxy module analysis actually has custom
behavior on invalidation that is firing correctly. (In fact, this is the
analysis which was the primary motivation for having custom invalidation
behavior in the first place.)

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

10 years agoImplemented Neon scalar vdup_lane intrinsics.
Ana Pazos [Thu, 21 Nov 2013 08:16:15 +0000 (08:16 +0000)]
Implemented Neon scalar vdup_lane intrinsics.

Fixed scalar dup alias and added test case.

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

10 years agoImplemented Neon scalar by element intrinsics.
Ana Pazos [Thu, 21 Nov 2013 07:37:04 +0000 (07:37 +0000)]
Implemented Neon scalar by element intrinsics.

Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane,
vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics.

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

10 years agoDon't speculate loads under ThreadSanitizer
Kostya Serebryany [Thu, 21 Nov 2013 07:29:28 +0000 (07:29 +0000)]
Don't speculate loads under ThreadSanitizer

Summary:
Don't speculate loads under ThreadSanitizer.
This fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=40
Also discussed here: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/067929.html

Reviewers: chandlerc

Reviewed By: chandlerc

CC: llvm-commits, dvyukov
Differential Revision: http://llvm-reviews.chandlerc.com/D2227

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

10 years agoThe basic problem is that some mainstream programs cannot deal with the way
Bill Wendling [Thu, 21 Nov 2013 07:04:30 +0000 (07:04 +0000)]
The basic problem is that some mainstream programs cannot deal with the way
clang optimizes tail calls, as in this example:

int foo(void);
int bar(void) {
 return foo();
}

where the call is transformed to:

  calll .L0$pb
.L0$pb:
  popl  %eax
.Ltmp0:
  addl  $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax
  movl  foo@GOT(%eax), %eax
  popl  %ebp
  jmpl  *%eax                   # TAILCALL

However, the GOT references must all be resolved at dlopen() time, and so this
approach cannot be used with lazy dynamic linking (e.g. using RTLD_LAZY), which
usually populates the PLT with stubs that perform the actual resolving.

This patch changes X86TargetLowering::LowerCall() to skip tail call
optimization, if the called function is a global or external symbol.

Patch by Dimitry Andric!

PR15086

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

10 years agoTeach ISel not to optimize 'optnone' functions.
Paul Robinson [Thu, 21 Nov 2013 06:33:32 +0000 (06:33 +0000)]
Teach ISel not to optimize 'optnone' functions.

Based on work by Andrea Di Biagio.

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

10 years agoDereference the node iterator when dumping the PBQP graph structure in DOT
Lang Hames [Thu, 21 Nov 2013 06:30:14 +0000 (06:30 +0000)]
Dereference the node iterator when dumping the PBQP graph structure in DOT
format.

Thanks to Arnaud A. de Grandmaison for the patch!

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

10 years agoAdd, to constant islands, long jumps similar to ARM far branch.
Reed Kotler [Thu, 21 Nov 2013 05:13:23 +0000 (05:13 +0000)]
Add, to constant islands, long jumps similar to ARM far branch.

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

10 years agollvm-cov: Don't assume FileChecksum was generated.
Yuchen Wu [Thu, 21 Nov 2013 04:53:39 +0000 (04:53 +0000)]
llvm-cov: Don't assume FileChecksum was generated.

For cases where emitProfileArcs() was called but emitProfileNotes() was
not, set the CfgChecksum to 0.

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

10 years agollvm-cov: Formatting change.
Yuchen Wu [Thu, 21 Nov 2013 04:12:10 +0000 (04:12 +0000)]
llvm-cov: Formatting change.

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

10 years agollvm-cov: Fixed some bugs related to file checksum.
Yuchen Wu [Thu, 21 Nov 2013 04:01:05 +0000 (04:01 +0000)]
llvm-cov: Fixed some bugs related to file checksum.

Added call to update CfgChecksum. Made FileChecksum a vector, separate
for each source file.

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

10 years ago[PM] Add a module analysis pass proxy for the function analysis manager.
Chandler Carruth [Thu, 21 Nov 2013 02:11:31 +0000 (02:11 +0000)]
[PM] Add a module analysis pass proxy for the function analysis manager.

This proxy will fill the role of proxying invalidation events down IR
unit layers so that when a module changes we correctly invalidate
function analyses. Currently this is a very coarse solution -- any
change blows away the entire thing -- but the next step is to make
invalidation handling more nuanced so that we can propagate specific
amounts of invalidation from one layer to the next.

The test is extended to place a module pass between two function pass
managers each of which have preserved function analyses which get
correctly invalidated by the module pass that might have changed what
functions are even in the module.

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

10 years agoMove DebugInfoOffset member near the other data member it helps describe.
Eric Christopher [Thu, 21 Nov 2013 01:29:16 +0000 (01:29 +0000)]
Move DebugInfoOffset member near the other data member it helps describe.

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

10 years agoReflow some documentation and remove whitespace comments. Move
Eric Christopher [Thu, 21 Nov 2013 01:29:13 +0000 (01:29 +0000)]
Reflow some documentation and remove whitespace comments. Move
DebugInfoOffset data member up with the rest of the data members.

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

10 years agoAdd more documenation for the lookup tables data members.
Eric Christopher [Thu, 21 Nov 2013 01:16:31 +0000 (01:16 +0000)]
Add more documenation for the lookup tables data members.

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

10 years agoReorder language in the CompileUnit description and add a comment.
Eric Christopher [Thu, 21 Nov 2013 01:14:00 +0000 (01:14 +0000)]
Reorder language in the CompileUnit description and add a comment.

Language may only be a temporary addition.

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

10 years agoUpdate comment.
Eric Christopher [Thu, 21 Nov 2013 01:01:30 +0000 (01:01 +0000)]
Update comment.

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

10 years agoConstify the DIEs used for pubname and pubtype tables. Propagate
Eric Christopher [Thu, 21 Nov 2013 00:48:22 +0000 (00:48 +0000)]
Constify the DIEs used for pubname and pubtype tables. Propagate
through findAttribute etc.

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

10 years agoYAML I/O add support for validate()
Nick Kledzik [Thu, 21 Nov 2013 00:28:07 +0000 (00:28 +0000)]
YAML I/O add support for validate()

MappingTrait template specializations can now have a validate() method which
performs semantic checking. For details, see <http://llvm.org/docs/YamlIO.html>.

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

10 years agorevert r194655
Nick Kledzik [Thu, 21 Nov 2013 00:20:10 +0000 (00:20 +0000)]
revert r194655

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

10 years agoPPC popcnt[dw] do not have record forms
Hal Finkel [Wed, 20 Nov 2013 20:54:55 +0000 (20:54 +0000)]
PPC popcnt[dw] do not have record forms

The instruction definitions incorrectly specified that popcntd and popcntw have
record forms; they do not. This mistake was causing invalid code generation.

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

10 years agoAdd loop rerolling code owner
Hal Finkel [Wed, 20 Nov 2013 20:54:33 +0000 (20:54 +0000)]
Add loop rerolling code owner

I am the code owner of the loop reroller.

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

10 years agoMachineBlockPlacement: Strengthen the source order bias when picking an exit block.
Benjamin Kramer [Wed, 20 Nov 2013 19:08:44 +0000 (19:08 +0000)]
MachineBlockPlacement: Strengthen the source order bias when picking an exit block.

We now only allow breaking source order if the exit block frequency is
significantly higher than the other exit block. The actual bias is
currently under a flag so the best cut-off can be found; the flag
defaults to the old behavior. The idea is to get some benchmark coverage
over different values for the flag and pick the best one.

When we require the new frequency to be at least 20% higher than the old
frequency I see a 5% speedup on zlib's deflate when compressing a random
file on x86_64/westmere. Hal reported a small speedup on Fhourstones on
a BG/Q and no regressions in the test suite.

The test case is the full long_match function from zlib's deflate. I was
reluctant to add it for previous tweaks to branch probabilities because
it's large and potentially fragile, but changed my mind since it's an
important use case and more likely to break with all the current work
going into the PGO infrastructure.

Differential Revision: http://llvm-reviews.chandlerc.com/D2202

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

10 years agoDwarfCompileUnit: Initialize DebugInfoOffset.
David Blaikie [Wed, 20 Nov 2013 18:52:39 +0000 (18:52 +0000)]
DwarfCompileUnit: Initialize DebugInfoOffset.

While not strictly necessary (the class has an invariant that
"setDebugInfoOffset" is called before "getDebugInfoOffset" - anyone
client that actually gets the default zero offset is buggy/broken) this
is consistent with the code as originally written and the removal of the
initialization was an accident in r195166.

Suggested by Manman Ren.

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

10 years agoCR feedback for r195166: Add comments regarding type unit mapping and type units...
David Blaikie [Wed, 20 Nov 2013 18:40:16 +0000 (18:40 +0000)]
CR feedback for r195166: Add comments regarding type unit mapping and type units disabling cross-CU sharing.

Changes suggested by Manman Ren.

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

10 years agoMake the moved-from SmallPtrSet be a valid, empty, small-state object.
Chandler Carruth [Wed, 20 Nov 2013 18:29:56 +0000 (18:29 +0000)]
Make the moved-from SmallPtrSet be a valid, empty, small-state object.
Enhance the tests to actually require moves in C++11 mode, in addition
to testing the moved-from state. Further enhance the tests to cover
copy-assignment into a moved-from object and moving a large-state
object. (Note that we can't really test small-state vs. large-state as
that isn't an observable property of the API really.) This should finish
addressing review on r195239.

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

10 years agoAdd a test for assignment operator behavior which was changed in
Chandler Carruth [Wed, 20 Nov 2013 18:21:25 +0000 (18:21 +0000)]
Add a test for assignment operator behavior which was changed in
r195239, as well as a comment about the fact that assigning over
a moved-from object was in fact tested. Addresses some of the review
feedback on r195239.

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

10 years ago[mips][msa] Pseudo instructions require HasMSA too. Inherit from MSAPseudo instead...
Daniel Sanders [Wed, 20 Nov 2013 14:32:28 +0000 (14:32 +0000)]
[mips][msa] Pseudo instructions require HasMSA too. Inherit from MSAPseudo instead of MipsPseudo

There's no test case for this commit. This is because it is doubtful that the
incorrect behaviour can actually trigger. When MSA is not enabled, the type
legalizer should have eliminated all occurrences of patterns the affected
pseudo-instruction could possibly match before instruction selection occurs.

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

10 years agoFileCheck: fix a bug with multiple --check-prefix options. Similar to r194565
Daniel Sanders [Wed, 20 Nov 2013 13:25:05 +0000 (13:25 +0000)]
FileCheck: fix a bug with multiple --check-prefix options. Similar to r194565

Summary:
Directives are being ignored, when they occur between a partial-word false
match and any match on another prefix.

For example, with FOO and BAR prefixes:
   _FOO
   FOO: foo
   BAR: bar
FileCheck incorrectly matches:
   fog
   bar

This happens because FOO falsely matched as a partial word at '_FOO' and was
ignored while BAR matched at 'BAR:'. The match of BAR is incorrectly returned
as the 'first match' causing the FOO directive to be discarded.

Fixed this the same way as r194565 (D2166) did for a similar test case.
The partial-word false match should be counted as a match for the purposes of
finding the first match of a prefix, but should be returned as a false match
using CheckTy::CheckNone so that it isn't treated as a directive.

Fixes PR17995

Reviewers: samsonov, arsenm

Reviewed By: samsonov

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2228

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

10 years agollvm/CMakeLists.txt: Update LLVM_VERSION_MINOR to 5.
NAKAMURA Takumi [Wed, 20 Nov 2013 13:11:48 +0000 (13:11 +0000)]
llvm/CMakeLists.txt: Update LLVM_VERSION_MINOR to 5.

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

10 years ago[mips][msa] Remove unused instruction class MSA_I8_X_DESC_BASE
Daniel Sanders [Wed, 20 Nov 2013 13:01:10 +0000 (13:01 +0000)]
[mips][msa] Remove unused instruction class MSA_I8_X_DESC_BASE

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

10 years ago[PM] Add the preservation system to the new pass manager.
Chandler Carruth [Wed, 20 Nov 2013 11:31:50 +0000 (11:31 +0000)]
[PM] Add the preservation system to the new pass manager.

This adds a new set-like type which represents a set of preserved
analysis passes. The set is managed via the opaque PassT::ID() void*s.
The expected convenience templates for interacting with specific passes
are provided. It also supports a symbolic "all" state which is
represented by an invalid pointer in the set. This state is nicely
saturating as it comes up often. Finally, it supports intersection which
is used when finding the set of preserved passes after N different
transforms.

The pass API is then changed to return the preserved set rather than
a bool. This is much more self-documenting than the previous system.
Returning "none" is a conservatively correct solution just like
returning "true" from todays passes and not marking any passes as
preserved. Passes can also be dynamically preserved or not throughout
the run of the pass, and whatever gets returned is the binding state.
Finally, preserving "all" the passes is allowed for no-op transforms
that simply can't harm such things.

Finally, the analysis managers are changed to instead of blindly
invalidating all of the analyses, invalidate those which were not
preserved. This should rig up all of the basic preservation
functionality. This also correctly combines the preservation moving up
from one IR-layer to the another and the preservation aggregation across
N pass runs. Still to go is incrementally correct invalidation and
preservation across IR layers incrementally during N pass runs. That
will wait until we have a device for even exposing analyses across IR
layers.

While the core of this change is obvious, I'm not happy with the current
testing, so will improve it to cover at least some of the invalidation
that I can test easily in a subsequent commit.

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

10 years agoGive SmallPtrSet move semantics when we have R-value references.
Chandler Carruth [Wed, 20 Nov 2013 11:14:33 +0000 (11:14 +0000)]
Give SmallPtrSet move semantics when we have R-value references.
Somehow, this ADT got missed which is moderately terrifying considering
the efficiency of move for it.

The code to implement move semantics for it is pretty horrible
currently but was written to reasonably closely match the rest of the
code. Unittests that cover both copying and moving (at a basic level)
added.

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

10 years agoX86ISelLowering.cpp: Mark a variable VT as LLVM_ATTRIBUTE_UNUSED. [-Wunused-variable]
NAKAMURA Takumi [Wed, 20 Nov 2013 10:55:22 +0000 (10:55 +0000)]
X86ISelLowering.cpp: Mark a variable VT as LLVM_ATTRIBUTE_UNUSED. [-Wunused-variable]

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

10 years agoWhitespace.
NAKAMURA Takumi [Wed, 20 Nov 2013 10:55:15 +0000 (10:55 +0000)]
Whitespace.

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

10 years agoUpdate to reflect the next release.
Bill Wendling [Wed, 20 Nov 2013 10:10:50 +0000 (10:10 +0000)]
Update to reflect the next release.

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

10 years agoFixed compilation error.
Elena Demikhovsky [Wed, 20 Nov 2013 09:23:22 +0000 (09:23 +0000)]
Fixed compilation error.

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

10 years agoAVX-512: Concat 4 128-bit vectors in one 512-bit vector.
Elena Demikhovsky [Wed, 20 Nov 2013 09:10:40 +0000 (09:10 +0000)]
AVX-512: Concat 4 128-bit vectors in one 512-bit vector.

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

10 years agoAdd -triple option.
Bill Wendling [Wed, 20 Nov 2013 04:55:20 +0000 (04:55 +0000)]
Add -triple option.

The -triple option is used to create a named tarball of the release binaries.

Also disable the RPATH modifications on Mac OS X. It's not needed.

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

10 years ago[PM] Make the function pass manager more regular.
Chandler Carruth [Wed, 20 Nov 2013 04:39:16 +0000 (04:39 +0000)]
[PM] Make the function pass manager more regular.

The FunctionPassManager is now itself a function pass. When run over
a function, it runs all N of its passes over that function. This is the
1:N mapping in the pass dimension only. This allows it to be used in
either a ModulePassManager or potentially some other manager that
works on IR units which are supersets of Functions.

This commit also adds the obvious adaptor to map from a module pass to
a function pass, running the function pass across every function in the
module.

The test has been updated to use this new pattern.

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

10 years agollvm-cov: Added file checksum to gcno and gcda files.
Yuchen Wu [Wed, 20 Nov 2013 04:15:05 +0000 (04:15 +0000)]
llvm-cov: Added file checksum to gcno and gcda files.

Instead of permanently outputting "MVLL" as the file checksum, clang
will create gcno and gcda checksums by hashing the destination block
numbers of every arc. This allows for llvm-cov to check if the two gcov
files are synchronized.

Regenerated the test files so they contain the checksum. Also added
negative test to ensure error when the checksums don't match.

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

10 years ago[PM] Split the analysis manager into a function-specific interface and
Chandler Carruth [Wed, 20 Nov 2013 04:01:38 +0000 (04:01 +0000)]
[PM] Split the analysis manager into a function-specific interface and
a module-specific interface. This is the first of many steps necessary
to generalize the infrastructure such that we can support both
a Module-to-Function and Module-to-SCC-to-Function pass manager
nestings.

After a *lot* of attempts that never worked and didn't even make it to
a committable state, it became clear that I had gotten the layering
design of analyses flat out wrong. Four days later, I think I have most
of the plan for how to correct this, and I'm starting to reshape the
code into it. This is just a baby step I'm afraid, but starts separating
the fundamentally distinct concepts of function analysis passes and
module analysis passes so that in subsequent steps we can effectively
layer them, and have a consistent design for the eventual SCC layer.

As part of this, I've started some interface changes to make passes more
regular. The module pass accepts the module in the run method, and some
of the constructor parameters are gone. I'm still working out exactly
where constructor parameters vs. method parameters will be used, so
I expect this to fluctuate a bit.

This actually makes the invalidation less "correct" at this phase,
because now function passes don't invalidate module analysis passes, but
that was actually somewhat of a misfeature. It will return in a better
factored form which can scale to other units of IR. The documentation
has gotten less verbose and helpful.

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

10 years agoPPC: Optimize rldicl generation for masked shifts
Hal Finkel [Wed, 20 Nov 2013 01:10:15 +0000 (01:10 +0000)]
PPC: Optimize rldicl generation for masked shifts

Masking operations (where only some number of the low bits are being kept) are
selected to rldicl(x, 0, mb). If x is a logical right shift (which would become
rldicl(y, 64-n, n)), we might be able to fold the two instructions together:

  rldicl(rldicl(x, 64-n, n), 0, mb) -> rldicl(x, 64-n, mb) for n <= mb

The right shift is really a left rotate followed by a mask, and if the explicit
mask is a more-restrictive sub-mask of the mask implied by the shift, only one
rldicl is needed.

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

10 years agoRemove polymorphic destruction for DIE. DIEBlocks are owned elsewhere
Eric Christopher [Wed, 20 Nov 2013 00:54:31 +0000 (00:54 +0000)]
Remove polymorphic destruction for DIE. DIEBlocks are owned elsewhere
and not polymorphically deleted and they are the only thing that derive
from DIE.

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

10 years agoRemove capability for polymorphic destruction from LexicalScope
Eric Christopher [Wed, 20 Nov 2013 00:54:28 +0000 (00:54 +0000)]
Remove capability for polymorphic destruction from LexicalScope
and LexicalScopes, we're not using it.

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

10 years agoGrammar.
Eric Christopher [Wed, 20 Nov 2013 00:54:25 +0000 (00:54 +0000)]
Grammar.

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

10 years agoFormatting, 80-col, trailing whitespace.
Eric Christopher [Wed, 20 Nov 2013 00:54:19 +0000 (00:54 +0000)]
Formatting, 80-col, trailing whitespace.

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

10 years agolong line correction
Jack Carter [Wed, 20 Nov 2013 00:32:32 +0000 (00:32 +0000)]
long line correction

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

10 years agolong line correction
Jack Carter [Wed, 20 Nov 2013 00:12:44 +0000 (00:12 +0000)]
long line correction

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

10 years agoExpose the fence instruction via the C API.
Filip Pizlo [Wed, 20 Nov 2013 00:07:49 +0000 (00:07 +0000)]
Expose the fence instruction via the C API.

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

10 years agoFixed an extra for(typo) in the comments
Aditya Nandakumar [Tue, 19 Nov 2013 23:51:32 +0000 (23:51 +0000)]
Fixed an extra for(typo) in the comments

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

10 years agolong lines and white space correction
Jack Carter [Tue, 19 Nov 2013 23:43:22 +0000 (23:43 +0000)]
long lines and white space correction

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

10 years agoDebugInfo: Partial implementation of DWARF type units.
David Blaikie [Tue, 19 Nov 2013 23:08:21 +0000 (23:08 +0000)]
DebugInfo: Partial implementation of DWARF type units.

Emit DW_TAG_type_units into the debug_info section using compile unit
headers. This is bogus/unusable by debuggers, but testable and provides
more isolated review.

Subsequent patches will include support for type unit headers and
emission into the debug_types section, as well as comdat grouping the
types based on their hash. Also the CompileUnit type will be renamed
'Unit' and relevant portions pulled out into respective CompileUnit and
TypeUnit types.

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

10 years agoDebugInfo: Constify accelerator table handling, and separate type accelarator inserti...
David Blaikie [Tue, 19 Nov 2013 22:51:04 +0000 (22:51 +0000)]
DebugInfo: Constify accelerator table handling, and separate type accelarator insertion in preparation for a second use of this code from type units.

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

10 years agoSLPVectorizer: Fix stale for Value pointer array
Arnold Schwaighofer [Tue, 19 Nov 2013 22:20:20 +0000 (22:20 +0000)]
SLPVectorizer: Fix stale for Value pointer array

We are slicing an array of Value pointers and process those slices in a loop.
The problem is that we might invalidate a later slice by vectorizing a former
slice.

Use a WeakVH to track the pointer. If the pointer is deleted or RAUW'ed we can
tell.

The test case will only fail when running with libgmalloc.

radar://15498655

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

10 years agoSLPVectorizer: Fix whitespace errors
Arnold Schwaighofer [Tue, 19 Nov 2013 22:20:18 +0000 (22:20 +0000)]
SLPVectorizer: Fix whitespace errors

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

10 years ago[mips] Resolve relocation for the stubs in MCJIT when load address is known
Petar Jovanovic [Tue, 19 Nov 2013 21:56:00 +0000 (21:56 +0000)]
[mips] Resolve relocation for the stubs in MCJIT when load address is known

Instead of processing relocation for branch to stubs right away, emit a
modified relocation and add it to queue to be resolved later when final load
address is known.
This resolves seven MIPS MCJIT issues that were caused by missing relocation
fixups at the end.

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

10 years ago[DAG] Refactor vector splitting code in SelectionDAG. No functional change intended.
Juergen Ributzka [Tue, 19 Nov 2013 21:20:17 +0000 (21:20 +0000)]
[DAG] Refactor vector splitting code in SelectionDAG. No functional change intended.

Reviewed by Tom

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