Commit Graph

86193 Commits

Author SHA1 Message Date
Benjamin Kramer
8999f4777b LoopSimplify: Preserve DependenceAnalysis.
This is currently true, but may change when DA grows more aggressive caching.
Without this setting it's impossible to use DA from a LoopPass because DA is a
function pass and cannot be properly scheduled in between LoopPasses. The
LoopManager reacts to this with an infinite loop which made this really annoying
to debug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166788 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 17:40:50 +00:00
Benjamin Kramer
b2b2273ef4 Fix SCEV cache invalidation in LCSSA and LoopSimplify.
The LoopSimplify bug is pretty harmless because the loop goes from unanalyzable
to analyzable but the LCSSA bug is very nasty. It only comes into play with a
specific order of the LoopPassManager worklist and can cause actual
miscompilations, when a SCEV refers to a value that has been replaced with PHI
node. SCEVExpander may then insert code into the wrong place, either violating
domination or randomly miscompiling stuff.

Comes with an extensive test case reduced from the test-suite with
bugpoint+SCEVValidator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166787 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 17:31:43 +00:00
Benjamin Kramer
ff18310274 Add a basic verifier for SCEV's backedge taken counts.
Enabled with -verify-scev. This could be extended significantly but hopefully
catches the common cases now. Note that it's not enabled by default in any
configuration because the way it tries to distinguish SCEVs is still fragile and
may produce false positives. Also the test-suite isn't clean yet, one example
is that it fails if a pass drops an NSW bit but it's still present in SCEV's
cached. Cleaning up all those cases will take some time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166786 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 17:31:32 +00:00
Nadav Rotem
12145f0339 Fix a crash in SimpliftDemandedBits of vectors of pointers.
PR14183.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166785 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 17:17:05 +00:00
Akira Hatanaka
af8082206b Make sure I is not the end iterator when isInsideBundle is called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166784 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 17:11:42 +00:00
Reed Kotler
eac3b65b00 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166780 91177308-0d34-0410-b5e6-96231b3b80d8 2012-10-26 16:18:19 +00:00
Chad Rosier
6e43157b5d [ms-inline asm] Have the target AsmParser create the asmrewrite for the offsetof
operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166779 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 16:09:20 +00:00
Renato Golin
e5372d6565 Better handling of OpcodeToISD using enum/switch.
Patch by Pasi Parviainen <pasi.parviainen@iki.fi>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166773 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 12:24:52 +00:00
Joerg Sonnenberger
475832cc0f Don't explicitly require RTTI and EH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166772 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 12:15:29 +00:00
Adhemerval Zanella
edf5e9a1d5 PowerPC: Fix for rldcl/rldicl/rldicr MC emission
This patch fixes the rldcl/rldicl/rldicr instruction emission. The issue is
the MDForm_1 instruction defines the PowerISA MB field from 'rldicl'
with the name MBE, but RLDCL/RLDICL/RLDICR definition uses as 'MB'.

It end up by generatint the 'rldicl' enconding at 
'lib/Target/PowerPC/PPCGenMCCodeEmitter.inc' to use the fourth argument as the
third. The patch changes it by adjusting to use the fourth argument as
intended.

Fixes PR14180.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166770 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 12:09:58 +00:00
David Tweed
6f20194cdb Minor enhancement to build process notes for ARM platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166769 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 12:09:47 +00:00
Joerg Sonnenberger
975bc072ae Adjust llvm-ar and llvm-ranlib to not depend on exception handling.
Always use an exit code of 1, but print the help message if useful.
Remove the exception handling tag in llvm-as, llvm-dis and
llvm-bcanalyzer, where it isn't used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166767 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 10:49:15 +00:00
Nicolas Geoffray
0bd10f2af3 Remove GC roots that reference dead objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166763 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 09:15:55 +00:00
Nicolas Geoffray
8b1b4136a0 Fix CPP backend for method attributes by creating a block where a new AttrBuilder is defined for each attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166762 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 09:14:38 +00:00
Bill Wendling
f098be4f86 Alphabetize the enum list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166760 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 07:08:58 +00:00
Reed Kotler
a81be80b0e Implement carry for subtract/add for mips16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166755 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 04:46:26 +00:00
Nick Lewycky
4734fe19f6 Hoist out some work done inside a loop doing a linear scan over all
instructions in a block. GetUnderlyingObject is more expensive than it looks as
it can, for instance, call SimplifyInstruction.

This might have some behavioural changes in odd corner cases, but only because
of some strange artefacts of the original implementation. If you were relying
on those, we can fix that by replacing this with a smarter algorithm. Change
passes the existing tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166754 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 04:43:47 +00:00
Hal Finkel
dc330f75b7 Use VTTI->getNumberOfParts in BBVectorize.
This change reflects VTTI refactoring; no functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166752 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 04:28:06 +00:00
Hal Finkel
102a7c088c Add VectorTargetTransform::getNumberOfParts.
As discussed on IRC, add VectorTargetTransform::getNumberOfParts
to provide a stable interface to the vector legalization splitting factor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166751 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 04:28:02 +00:00
Nick Lewycky
6b0db5f372 Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166750 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 04:27:49 +00:00
Reed Kotler
28a6214b59 implement large (>16 bit) constant loading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166749 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 03:09:34 +00:00
Rafael Espindola
d2930d364a Fix unexpected passes. These test do work with LTO on linux. I tested both
a cmake and an autoconf build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166748 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 02:19:02 +00:00
Reed Kotler
30675b12fd fix test setgek.ll so that it will not give false "make check"
failure in some cases


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166747 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 01:29:42 +00:00
Rafael Espindola
fffb72470d libLTO has a bug in that it will keep every symbol if none is needed. We used
to hack around this in the gold plugin by deleting a module if no symbol was
needed. Unfortunately, the hack is wrong in the case of o module having no
visible symbols but still having side effects via static constructors.

The bug will have to be fixed in libLTO itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166745 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 00:29:57 +00:00
Rafael Espindola
cadc38a4b1 Port testcase to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166742 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 00:14:11 +00:00
Hal Finkel
822ab00847 Disable generation of pointer vectors by BBVectorize.
Once vector-of-pointer support works, then this can be reverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166741 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 00:05:26 +00:00
Nadav Rotem
0636291137 Revert 166726 because it may have broken a number of SPEC tests. PR14183.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166739 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 23:51:48 +00:00
Hal Finkel
82149a9106 BBVectorize, when using VTTI, should not form types that will be split.
This is needed so that perl's SHA can be compiled (otherwise
BBVectorize takes far too long to find its fixed point).

I'll try to come up with a reduced test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166738 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 23:47:16 +00:00
Kaelyn Uhrain
12413ae7cb Fix anonymous namespace issue introduced by r166714:
include/llvm/MC/MCTargetAsmParser.h:46:8: error: 'llvm::ParseInstructionInfo' has a field 'llvm::ParseInstructionInfo::AsmRewrites' whose type uses the anonymous namespace [-Werror]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166729 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 22:09:49 +00:00
Nadav Rotem
4f3c676102 Fix a crash in ValueTracking. Add support for vectors of pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166726 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 21:52:52 +00:00
Chad Rosier
ec13022c39 [ms-inline asm] Perform field lookups with the dot operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166724 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 21:51:10 +00:00
Nadav Rotem
b6cbb6215c Fix the cost-model test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166722 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 21:42:50 +00:00
Reed Kotler
4c5a6dab17 implement mips16 patterns for select nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166721 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 21:33:30 +00:00
Hal Finkel
32ff623c8b Add CPU model to BBVectorize cost-model tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166720 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 21:31:51 +00:00
Kaelyn Uhrain
50a6102397 Don't return false when the function's return type is a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166719 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 21:25:08 +00:00
Nadav Rotem
402a4d616f Add the cpu model to the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166718 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 21:18:42 +00:00
Hal Finkel
65309660fa Begin incorporating target information into BBVectorize.
This is the first of several steps to incorporate information from the new
TargetTransformInfo infrastructure into BBVectorize. Two things are done here:

 1. Target information is used to determine if it is profitable to fuse two
    instructions. This means that the cost of the vector operation must not
    be more expensive than the cost of the two original operations. Pairs that
    are not profitable are no longer considered (because current cost information
    is incomplete, for intrinsics for example, equal-cost pairs are still
    considered).

 2. The 'cost savings' computed for the profitability check are also used to
    rank the DAGs that represent the potential vectorization plans. Specifically,
    for nodes of non-trivial depth, the cost savings is used as the node
    weight.

The next step will be to incorporate the shuffle costs into the DAG weighting;
this will give the edges of the DAG weights as well. Once that is done, when
target information is available, we should be able to dispense with the
depth heuristic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166716 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 21:12:23 +00:00
Nadav Rotem
3ef9dfa685 LoopVectorize: Teach the cost model to query scalar costs as scalar types and not vectors of 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166715 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 21:03:48 +00:00
Chad Rosier
6a020a7117 [ms-inline asm] Add support for creating AsmRewrites in the target specific
AsmParser logic.  To be used/tested in a subsequent commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166714 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 20:41:34 +00:00
Joerg Sonnenberger
61131ab15f Remove exception handling usage from tblgen.
Most places can use PrintFatalError as the unwinding mechanism was not
used for anything other than printing the error. The single exception
was CodeGenDAGPatterns.cpp, where intermediate errors during type
resolution were ignored to simplify incremental platform development.
This use is replaced by an error flag in TreePattern and bailout earlier
in various places if it is set. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166712 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 20:33:17 +00:00
Jakob Stoklund Olesen
e5a7a68dfa Also optimize large switch statements.
The isValueEqualityComparison() guard at the top of SimplifySwitch()
only applies to some of the possible transformations.

The newer transformations work just fine on large switches, and the
check on predecessor count is nonsensical.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166710 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 18:51:15 +00:00
Michael Liao
ed2507a9da Add 'const' qualifier on member functions not changing its fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 18:35:04 +00:00
Nadav Rotem
1e19e46139 Minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166706 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 18:17:48 +00:00
Micah Villmow
a85ee5521d Update the release notes to note the change from TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166702 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 18:06:47 +00:00
Michael Liao
8d7cd1d8fc Add test for ATOM ISA SSSE3
- Remove SSE4.1 feature in other ATOM-based test cases



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166699 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 17:50:05 +00:00
Chad Rosier
5e6b37fa3d [ms-inline asm] Add error handling to the ParseIntelDotOperator() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166698 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 17:37:43 +00:00
David Blaikie
a8a0a155de Remove unused member & unnecessary semicolon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166694 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 17:04:55 +00:00
Joerg Sonnenberger
0eafc7fc37 In preparation for removing exception handling in tablegen, add
PrintFatalError, which combines PrintError with exit(1).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166690 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 16:35:18 +00:00
Benjamin Kramer
8e4e007409 DependenceAnalysis: Push #includes down into the implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166688 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 16:15:22 +00:00
NAKAMURA Takumi
0b031cb717 llvm/utils/TableGen/CMakeLists.txt: Update corresponding to r166685.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166686 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 15:57:56 +00:00