Commit Graph

89496 Commits

Author SHA1 Message Date
Andrew Trick
6050edfe3e LSR IVChain improvement.
Handle chains in which the same offset is used for both loads and
stores to the same array.

Fixes rdar://11410078.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174789 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-09 01:11:01 +00:00
Jakub Staszak
4fa57932c7 Remove #includes from the commonly used LoopInfo.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174786 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-09 01:04:28 +00:00
Manman Ren
f2d89ff5c8 Dwarf: do not use line_table_start in at_stmt_list since we do not always emit
line table entries in assembly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174785 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-09 00:41:44 +00:00
Jakob Stoklund Olesen
ec7b25d753 Remove the old liveness algorithm.
This is part of the plan to delete LiveVariables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174783 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-09 00:04:07 +00:00
Sergei Larin
68b2faf6be Enable *BasicBlockPass::createPrinterPass()
Enables raw_ostream I/O for BasicBlockPass.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174776 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 23:37:41 +00:00
Jakob Stoklund Olesen
ea871523ec Turn on -new-live-intervals by default.
This uses a liveness algorithm that does not depend on data from the
LiveVariables analysis, it is the first step towards removing
LiveVariables completely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174774 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 23:18:37 +00:00
Jordan Rose
dbdebe2736 CMake: Use check_symbol_exists instead of check_cxx_symbol_exists.
check_cxx_symbol_exists requires CMake 2.8.6, so even though I
recommended it to Owen it's probably better to stay away for now.
This check is not technically correct because we're checking <math.h>
but then using <cmath> in the actual code, but if we run into problems we
can do the same sort of dance as isinf() and isnan() where we check /both/
headers and then write a wrapper header around them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174773 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 23:17:31 +00:00
Richard Smith
d31bd24b40 configure: when performing a compiler feature test for a -Wno-foo flag, attempt
to use -Wfoo instead of -Wno-foo. This works around a bug in some versions of
gcc, where it will silently accept an unknown -Wno-foo option, but will
generate an error for a compile which uses -Wno-foo if that compile also
triggers any warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174770 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 22:55:10 +00:00
Tom Stellard
1c66a18f84 ReleaseNotes: Add section for R600 backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174764 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 22:24:41 +00:00
Tom Stellard
d66bd704cc R600: Dump the function name when TargetLowering::LowerCall() fails
Also output a more useful error message.

NOTE: This is a candidate for the Mesa stable branch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174763 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 22:24:40 +00:00
Tom Stellard
f4e471a49e R600: rework flow creation in the structurizer v2
This fixes a couple of bugs and incorrect assumptions,
in total four more piglit tests now pass.

v2: fix small bug in the dominator updating

Patch by: Christian König

Signed-off-by: Christian König <christian.koenig@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174762 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 22:24:38 +00:00
Tom Stellard
27f5d06181 R600: fix loop analyses in the structurizer
Patch by: Christian König

Intersecting loop handling was wrong.

Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174761 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 22:24:37 +00:00
Tom Stellard
13cf6cb57a R600: fix PHI value adding in the structurizer
Otherwise we sometimes produce invalid code.

Patch by: Christian König

Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174760 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 22:24:35 +00:00
Dan Gohman
d3da6d5dda Minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174756 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 22:01:47 +00:00
Sean Silva
cb64462c79 [docs] Tweaks for clarity, readability, and correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174749 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 21:51:26 +00:00
Bob Wilson
58446916b7 Revert "Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>"
This reverts r171041. This was a nice idea that didn't work out well.
Clang warnings need to be associated with warning groups so that they can
be selectively disabled, promoted to errors, etc. This simplistic patch didn't
allow for that. Enhancing it to provide some way for the backend to specify
a front-end warning type seems like overkill for the few uses of this, at
least for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174748 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 21:48:29 +00:00
Reed Kotler
b2d1275188 Add the 16 bit version of addiu. To the assembler, the 16 and 32 bit are the
same so we put in the comment field an indicator when we think we are
emitting the 16 bit version. For the direct object emitter, the difference is 
important as well as for other passes which need an accurate count of 
program size. There will be other similar putbacks to this for various
instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174747 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 21:42:56 +00:00
Hal Finkel
089a5f8a8c DAGCombiner: Constant folding around pre-increment loads/stores
Previously, even when a pre-increment load or store was generated,
we often needed to keep a copy of the original base register for use
with other offsets. If all of these offsets are constants (including
the offset which was combined into the addressing mode), then this is
clearly unnecessary. This change adjusts these other offsets to use the
new incremented address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174746 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 21:35:47 +00:00
Hal Finkel
0cf5d396c1 BBVectorize: Use TTI->getAddressComputationCost
This is a follow-up to the cost-model change in r174713 which splits
the cost of a memory operation between the address computation and the
actual memory access. In r174713, this cost is always added to the
memory operation cost, and so BBVectorize will do the same.

Currently, this new cost function is used only by ARM, and I don't
have any ARM test cases for BBVectorize. Assistance in generating some
good ARM test cases for BBVectorize would be greatly appreciated!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174743 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 21:13:39 +00:00
Bill Schmidt
63c61e51b0 More modifications to PowerPC doc links
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174742 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 21:08:22 +00:00
Bob Wilson
8f637adbd3 Revert 172027 and 174336. Remove diagnostics about over-aligned stack objects.
Aside from the question of whether we report a warning or an error when we
can't satisfy a requested stack object alignment, the current implementation
of this is not good.  We're not providing any source location in the diagnostics
and the current warning is not connected to any warning group so you can't
control it.  We could improve the source location somewhat, but we can do a
much better job if this check is implemented in the front-end, so let's do that
instead.  <rdar://problem/13127907>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174741 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 20:35:15 +00:00
Hal Finkel
b1301e48b5 Update PowerPC links in CompilerWriterInfo.rst
This updates the current references to links that work for me.
In the future, we should update the list of references itself to provide
information on newer architecture variants.

Thanks to Sean Silva for pointing out that the current links were broken!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174739 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 20:24:46 +00:00
Bill Schmidt
0f58dbae4a Refine fix to bug 15041.
Thanks to help from Nadav and Hal, I have a more reasonable (and even
correct!) approach.  This specifically penalizes the insertelement
and extractelement operations for the performance hit that will occur
on PowerPC processors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174725 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 18:19:17 +00:00
Chad Rosier
33daeab1bb [SimplifyLibCalls] Library call simplification doen't work if the call site
isn't using the default calling convention.  However, if the transformation is
from a call to inline IR, then the calling convention doesn't matter.
rdar://13157990

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174724 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 18:00:14 +00:00
Jakob Stoklund Olesen
9de31bd829 Typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174723 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 17:43:32 +00:00
David Tweed
0b821eff4c The patch to fix some issues in r174543 fixed the lines failing the test, but missed a couple
of lines which weren't being explicitly looked at and were printing incorrect results. These
values clearly must lie within 32 bits, so the casts are definitely safe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174717 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 16:35:10 +00:00
Arnold Schwaighofer
fb55a8fd7c ARM cost model: Address computation in vector mem ops not free
Adds a function to target transform info to query for the cost of address
computation. The cost model analysis pass now also queries this interface.
The code in LoopVectorize adds the cost of address computation as part of the
memory instruction cost calculation. Only there, we know whether the instruction
will be scalarized or not.
Increase the penality for inserting in to D registers on swift. This becomes
necessary because we now always assume that address computation has a cost and
three is a closer value to the architecture.

radar://13097204

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174713 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 14:50:48 +00:00
Alexey Samsonov
f64edf8d80 Update tests for DWARF parser: store sources next to pre-built object files and provide build instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 14:34:33 +00:00
Michael Kuperstein
bcf60de5eb Test Commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174709 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 12:58:29 +00:00
Bill Wendling
baad55c3ab Parse the attribute group reference on a function.
Attribute references are of this form:

  define void @foo() #0 #1 #2 { ... }

Parse them for function attributes. If there's more than one reference, then
they are merged together.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174697 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 06:32:06 +00:00
Reed Kotler
61b97b8c17 When Mips16 frames grow large, the immediate field may exceed the maximum
allowed size for the instruction. This code uses RegScavenger to fix this.
We sometimes need 2 registers for Mips16 so we must handle things
differently than how register scavenger is normally used.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174696 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 03:57:41 +00:00
Andrew Trick
d2bcda7706 Revert "Have InstCombine call SipmlifyCall when handling calls. Test case included."
This reverts commit 3854a5d90f.

This causes a clang unit test to hang: vtable-available-externally.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174692 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 01:55:39 +00:00
Michael J. Spencer
dc0f8a3fd9 [readobj] Fix memory leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174687 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 01:05:48 +00:00
Bill Wendling
ea007fa608 Use ParseFnAttributeValuePairs instead of ParseOptionalFuncAttrs
The functionality of ParseOptionalFuncAttrs was there in
ParseFnAttributeValuePairs. So just use that instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174686 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 00:52:31 +00:00
Michael J. Spencer
d1824f2f46 [Object][ELF] Add a way to get the dynamic symbol table section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174682 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 23:37:58 +00:00
Michael J. Spencer
2e0742f76c [Object][ELF] Add {begin,end}_elf_dynamic_symbols to non-virtually iterate over dynamic symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174681 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 23:37:46 +00:00
Michael Ilseman
3854a5d90f Have InstCombine call SipmlifyCall when handling calls. Test case included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174675 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 23:01:35 +00:00
Nadav Rotem
4fae15e664 fix 80-col violation and fix the docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174671 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 22:34:07 +00:00
Daniel Dunbar
83a4cb51ce [lit] Add a display function for lit.Test.TestResult.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174667 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 21:34:34 +00:00
Akira Hatanaka
5dd41c95f3 [mips] Make Filler a class and reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174666 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 21:32:32 +00:00
Eric Christopher
e0501e866c Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174664 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 21:19:56 +00:00
Eric Christopher
7a0103c30d "Clean up" line section symbol emission by emitting the section
syms before constructing the compile units so we're not emitting
section references to sections not there already.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174663 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 21:19:50 +00:00
Will Schmidt
df5b3305c7 [patch] bug 15055 Add Unistd.h to OProfileWrapper.cpp
Add #include <unistd.h> to OProfileWrapper.cpp.   This provides the declarations for 'read' and 'close' that are otherwise missing, and result in 'error: <foo> was not declared in this scope'.

This matches the issue as reported in bug 15055 "Can no longer compile LLVM with --with-oprofile"





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174661 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 20:43:33 +00:00
Bill Schmidt
8f7dc823bf Constrain PowerPC autovectorization to fix bug 15041.
Certain vector operations don't vectorize well with the current
PowerPC implementation.  Element insert/extract performs poorly
without VSX support because Altivec requires going through memory.
SREM, UREM, and VSELECT all produce bad scalar code.

There's a lot of work to do for the cost model before
autovectorization will be tuned well, and this is not an attempt to
address the larger problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174660 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 20:33:57 +00:00
Akira Hatanaka
0c66403efd [mips] Add definition of JALR instruction which has two register operands. Change the
original JALR instruction with one register operand to be a pseudo-instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174657 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 19:48:00 +00:00
Tom Stellard
184f5c1545 R600/SI: cleanup VGPR encoding
Remove all the unused code.

Patch by: Christian König

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174656 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 19:39:45 +00:00
Tom Stellard
60fc58262f R600/SI: Handle VGPR64 destination in copyPhysReg().
Allows nexuiz to run with radeonsi.

Patch by: Michel Dänzer

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174655 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 19:39:43 +00:00
Tom Stellard
e7384db6f6 R600/SI: Add pattern for mul.
20 more little piglits with radeonsi.

Patch by: Michel Dänzer

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174654 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 19:39:42 +00:00
Tom Stellard
fc207d8f57 R600/SI: simplify and fix SMRD encoding
The _SGPR variants where wrong.

Patch by: Christian König

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174653 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 19:39:40 +00:00
Tom Stellard
75ddd4cd4c R600/SI: add proper 64bit immediate support v2
v2: rebased on current upstream

Patch by: Christian König

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174652 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 19:39:38 +00:00