oota-llvm.git
11 years agoUse ParseFnAttributeValuePairs instead of ParseOptionalFuncAttrs
Bill Wendling [Fri, 8 Feb 2013 00:52:31 +0000 (00:52 +0000)]
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

11 years ago[Object][ELF] Add a way to get the dynamic symbol table section.
Michael J. Spencer [Thu, 7 Feb 2013 23:37:58 +0000 (23:37 +0000)]
[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

11 years ago[Object][ELF] Add {begin,end}_elf_dynamic_symbols to non-virtually iterate over dynam...
Michael J. Spencer [Thu, 7 Feb 2013 23:37:46 +0000 (23:37 +0000)]
[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

11 years agoHave InstCombine call SipmlifyCall when handling calls. Test case included.
Michael Ilseman [Thu, 7 Feb 2013 23:01:35 +0000 (23:01 +0000)]
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

11 years agofix 80-col violation and fix the docs.
Nadav Rotem [Thu, 7 Feb 2013 22:34:07 +0000 (22:34 +0000)]
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

11 years ago[lit] Add a display function for lit.Test.TestResult.
Daniel Dunbar [Thu, 7 Feb 2013 21:34:34 +0000 (21:34 +0000)]
[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

11 years ago[mips] Make Filler a class and reduce indentation.
Akira Hatanaka [Thu, 7 Feb 2013 21:32:32 +0000 (21:32 +0000)]
[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

11 years agoFormatting.
Eric Christopher [Thu, 7 Feb 2013 21:19:56 +0000 (21:19 +0000)]
Formatting.

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

11 years ago"Clean up" line section symbol emission by emitting the section
Eric Christopher [Thu, 7 Feb 2013 21:19:50 +0000 (21:19 +0000)]
"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

11 years ago[patch] bug 15055 Add Unistd.h to OProfileWrapper.cpp
Will Schmidt [Thu, 7 Feb 2013 20:43:33 +0000 (20:43 +0000)]
[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

11 years agoConstrain PowerPC autovectorization to fix bug 15041.
Bill Schmidt [Thu, 7 Feb 2013 20:33:57 +0000 (20:33 +0000)]
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

11 years ago[mips] Add definition of JALR instruction which has two register operands. Change the
Akira Hatanaka [Thu, 7 Feb 2013 19:48:00 +0000 (19:48 +0000)]
[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

11 years agoR600/SI: cleanup VGPR encoding
Tom Stellard [Thu, 7 Feb 2013 19:39:45 +0000 (19:39 +0000)]
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

11 years agoR600/SI: Handle VGPR64 destination in copyPhysReg().
Tom Stellard [Thu, 7 Feb 2013 19:39:43 +0000 (19:39 +0000)]
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

11 years agoR600/SI: Add pattern for mul.
Tom Stellard [Thu, 7 Feb 2013 19:39:42 +0000 (19:39 +0000)]
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

11 years agoR600/SI: simplify and fix SMRD encoding
Tom Stellard [Thu, 7 Feb 2013 19:39:40 +0000 (19:39 +0000)]
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

11 years agoR600/SI: add proper 64bit immediate support v2
Tom Stellard [Thu, 7 Feb 2013 19:39:38 +0000 (19:39 +0000)]
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

11 years agoR600: Add an explicit default processor
Tom Stellard [Thu, 7 Feb 2013 19:39:34 +0000 (19:39 +0000)]
R600: Add an explicit default processor

This is for the case when no processor is passed to the backend.  This
prevents the

'' is not a recognized processor for this target (ignoring processor)

warning from being generated by clang.

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

11 years agoIdentify and simplify idempotent intrinsics. Test case included.
Michael Ilseman [Thu, 7 Feb 2013 19:26:05 +0000 (19:26 +0000)]
Identify and simplify idempotent intrinsics. Test case included.

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

11 years agoLoop Vectorizer: Refactor Memory Cost Computation
Arnold Schwaighofer [Thu, 7 Feb 2013 19:05:21 +0000 (19:05 +0000)]
Loop Vectorizer: Refactor Memory Cost Computation

We don't want too many classes in a pass and the classes obscure the details. I
was going a little overboard with object modeling here. Replace classes by
generic code that handles both loads and stores.

No functionality change intended.

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

11 years agoADT: Correct APInt::getActiveWords for zero values
Meador Inge [Thu, 7 Feb 2013 18:36:50 +0000 (18:36 +0000)]
ADT: Correct APInt::getActiveWords for zero values

PR15138 was opened because of a segfault in the Bitcode writer.
The actual issue ended up being a bug in APInt where calls to
APInt::getActiveWords returns a bogus value when the APInt value
is 0.  This patch fixes the problem by ensuring that getActiveWords
returns 1 for 0 valued APInts.

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

11 years ago[Object][ELF] Fix crash on no dynamic section.
Michael J. Spencer [Thu, 7 Feb 2013 18:26:45 +0000 (18:26 +0000)]
[Object][ELF] Fix crash on no dynamic section.

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

11 years agoR600/SI: Use proper instructions for array/shadow samplers.
Tom Stellard [Thu, 7 Feb 2013 17:02:14 +0000 (17:02 +0000)]
R600/SI: Use proper instructions for array/shadow samplers.

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@174634 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Make sample intrinsic address parameter type overloaded.
Tom Stellard [Thu, 7 Feb 2013 17:02:13 +0000 (17:02 +0000)]
R600/SI: Make sample intrinsic address parameter type overloaded.

Handle vectors of 1 to 16 integers.

Change the intrinsic names to prevent the wrong one from being selected at
runtime due to the overloading.

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@174633 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Add basic support for more integer vector types.
Tom Stellard [Thu, 7 Feb 2013 17:02:09 +0000 (17:02 +0000)]
R600/SI: Add basic support for more integer vector types.

v1i32, v2i32, v8i32 and v16i32.

Only add VGPR register classes for integer vector types, to avoid attempts
copying from VGPR to SGPR registers, which is not possible.

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@174632 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM cost model: Add costs for vector selects
Arnold Schwaighofer [Thu, 7 Feb 2013 16:10:15 +0000 (16:10 +0000)]
ARM cost model: Add costs for vector selects

Vector selects are cheap on NEON. They get lowered to a vbsl instruction.

radar://13158753

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

11 years agoR600/SI: Add pattern for flog2
Michel Danzer [Thu, 7 Feb 2013 14:55:16 +0000 (14:55 +0000)]
R600/SI: Add pattern for flog2

22 more little piglits with radeonsi.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174615 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFDE::dumpHeader(): Forgot to fix one more formatting, ... take two!
NAKAMURA Takumi [Thu, 7 Feb 2013 14:54:42 +0000 (14:54 +0000)]
FDE::dumpHeader(): Forgot to fix one more formatting, ... take two!

Excuse me, I could not test it locally.

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

11 years agoR600: Consolidate sub register indices.
Tom Stellard [Thu, 7 Feb 2013 14:02:37 +0000 (14:02 +0000)]
R600: Consolidate sub register indices.

Use sub0-15 everywhere.

Patch by: Michel Dänzerr

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174610 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Add support for SET*_DX10 instructions
Tom Stellard [Thu, 7 Feb 2013 14:02:35 +0000 (14:02 +0000)]
R600: Add support for SET*_DX10 instructions

These instructions compare two floating point values and return an
integer true (-1) or false (0) value.

When compiling code generated by the Mesa GLSL frontend, the SET*_DX10
instructions save us four instructions for most branch decisions that
use floating-point comparisons.

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

11 years agoR600: Add tests for unsupported condition codes.
Tom Stellard [Thu, 7 Feb 2013 14:02:33 +0000 (14:02 +0000)]
R600: Add tests for unsupported condition codes.

All of the le and lt variants are unsupported.

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

11 years agoR600: Fix assembly name for SETGT_INT
Tom Stellard [Thu, 7 Feb 2013 14:02:27 +0000 (14:02 +0000)]
R600: Fix assembly name for SETGT_INT

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

11 years agoFDE::dumpHeader(): Forgot to fix one more formatting. It affected bigendian hosts.
NAKAMURA Takumi [Thu, 7 Feb 2013 10:57:42 +0000 (10:57 +0000)]
FDE::dumpHeader(): Forgot to fix one more formatting. It affected bigendian hosts.

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

11 years agoRemove this testcase until I can figure out how to properly conditionalize it.
Owen Anderson [Thu, 7 Feb 2013 07:01:54 +0000 (07:01 +0000)]
Remove this testcase until I can figure out how to properly conditionalize it.

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

11 years agoAnother attempt at getting the XFAIL line right for this test.
Owen Anderson [Thu, 7 Feb 2013 06:26:55 +0000 (06:26 +0000)]
Another attempt at getting the XFAIL line right for this test.

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

11 years ago[ReleaseNotes] tidy up organization and formatting
Sean Silva [Thu, 7 Feb 2013 05:56:46 +0000 (05:56 +0000)]
[ReleaseNotes] tidy up organization and formatting

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

11 years agoUpdate Release notes regarding TTI.
Nadav Rotem [Thu, 7 Feb 2013 05:44:58 +0000 (05:44 +0000)]
Update Release notes regarding TTI.

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

11 years agoDocument the loop vectorizer changes.
Nadav Rotem [Thu, 7 Feb 2013 05:42:31 +0000 (05:42 +0000)]
Document the loop vectorizer changes.

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

11 years agoMake sure we call externals from libraries properly when -static.
Reed Kotler [Thu, 7 Feb 2013 04:34:51 +0000 (04:34 +0000)]
Make sure we call externals from libraries properly when -static.
For example, when we are doing mips16 hard float or soft float.

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

11 years agotblgen: Diagnose duplicate includes.
Sean Silva [Thu, 7 Feb 2013 04:30:39 +0000 (04:30 +0000)]
tblgen: Diagnose duplicate includes.

A double inclusion will pretty much always be an error in TableGen, so
there's no point going on just to die with "def already defined" or
whatnot.

I'm not too thrilled about the "public: ... private: ..." to expose the
DependenciesMapTy, but I really didn't see a better way to keep that
type centralized. It's a smell that indicates that some refactoring is
needed to make this code more loosely coupled.

This should avoid all bugs of the same nature as PR15189.

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

11 years agoMoved some comments due to the recent refactoring of ObjCARC.
Michael Gottesman [Thu, 7 Feb 2013 04:12:57 +0000 (04:12 +0000)]
Moved some comments due to the recent refactoring of ObjCARC.

1. Moved a comment from ObjCARCOpts.cpp -> ObjCARCContract.cpp.
2. Removed a comment from ObjCARCOpts.cpp that was already moved to
ObjCARCAliasAnalysis.h/.cpp.

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

11 years agoEnable jumps when in -static mode.
Reed Kotler [Thu, 7 Feb 2013 03:49:51 +0000 (03:49 +0000)]
Enable jumps when in -static mode.

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

11 years agoDWARFDebugFrame.cpp: Fix formatting on i686 hosts.
NAKAMURA Takumi [Thu, 7 Feb 2013 02:02:27 +0000 (02:02 +0000)]
DWARFDebugFrame.cpp: Fix formatting on i686 hosts.

FIXME: Are they really truncated to i32 from i64 unconditionally?

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

11 years ago80-col
Michael J. Spencer [Thu, 7 Feb 2013 01:43:18 +0000 (01:43 +0000)]
80-col

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

11 years agoPreserve fast-math flags after reassociation and commutation. Update test cases
Michael Ilseman [Thu, 7 Feb 2013 01:40:15 +0000 (01:40 +0000)]
Preserve fast-math flags after reassociation and commutation. Update test cases

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

11 years agowhitespace
Michael Ilseman [Thu, 7 Feb 2013 01:27:13 +0000 (01:27 +0000)]
whitespace

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

11 years ago[Object][ELF] Do the actual devirtualization.
Michael J. Spencer [Thu, 7 Feb 2013 01:24:22 +0000 (01:24 +0000)]
[Object][ELF] Do the actual devirtualization.

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

11 years ago[Object][ELF] Devirtualize and simplify dynamic table iteration.
Michael J. Spencer [Thu, 7 Feb 2013 01:17:23 +0000 (01:17 +0000)]
[Object][ELF] Devirtualize and simplify dynamic table iteration.

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

11 years agoFix CMake detection of various cmath functions, and XFAIL the test on platforms that...
Owen Anderson [Thu, 7 Feb 2013 00:54:05 +0000 (00:54 +0000)]
Fix CMake detection of various cmath functions, and XFAIL the test on platforms that are known to be missing them.

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

11 years agoConditionalize constant folding of math intrinsics on the availability of an implemen...
Owen Anderson [Thu, 7 Feb 2013 00:21:34 +0000 (00:21 +0000)]
Conditionalize constant folding of math intrinsics on the availability of an implementation on the host.  This is a little bit unfortunate, but until someone decides to implement a full libm for APFloat, we don't have a better way to get this functionality.

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

11 years agoSignficantly generalize our ability to constant fold floating point intrinsics, inclu...
Owen Anderson [Wed, 6 Feb 2013 22:43:31 +0000 (22:43 +0000)]
Signficantly generalize our ability to constant fold floating point intrinsics, including ones on half types.

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

11 years agoFix typo
Eli Bendersky [Wed, 6 Feb 2013 22:34:46 +0000 (22:34 +0000)]
Fix typo

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

11 years ago[Support][ErrorOr] Add support for convertable types.
Michael J. Spencer [Wed, 6 Feb 2013 22:28:53 +0000 (22:28 +0000)]
[Support][ErrorOr] Add support for convertable types.

Thanks to Andrew, David, and Aaron for helping fix this.

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

11 years agoAdd a comment to the test that points to the source from which the input object
Eli Bendersky [Wed, 6 Feb 2013 22:17:40 +0000 (22:17 +0000)]
Add a comment to the test that points to the source from which the input object
file was generated.

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

11 years agoCode Custodian (trivial whitespace cleanup)
Joe Abbey [Wed, 6 Feb 2013 22:14:06 +0000 (22:14 +0000)]
Code Custodian (trivial whitespace cleanup)

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

11 years agoClean up multiple skeleton compile units if we have multiple compile
Eric Christopher [Wed, 6 Feb 2013 21:53:56 +0000 (21:53 +0000)]
Clean up multiple skeleton compile units if we have multiple compile
units coming in.

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

11 years agoRemove some dead code.
Eric Christopher [Wed, 6 Feb 2013 21:53:53 +0000 (21:53 +0000)]
Remove some dead code.

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

11 years ago[mips] Make NOP a pseudo instruction and expand it to "sll $zero, $zero, 0".
Akira Hatanaka [Wed, 6 Feb 2013 21:50:15 +0000 (21:50 +0000)]
[mips] Make NOP a pseudo instruction and expand it to "sll $zero, $zero, 0".

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

11 years agoAdd a test for checking the current .debug_frame dumping capability.
Eli Bendersky [Wed, 6 Feb 2013 20:55:06 +0000 (20:55 +0000)]
Add a test for checking the current .debug_frame dumping capability.

The test is a binary placed in test/DebugInfo/Inputs, with a source C
file used for reference/reproducing. The source's first line is a clang
build command for reproducing the binary.

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

11 years agoThis is a follow-up on r174446, now taking Atom processors into
Eli Bendersky [Wed, 6 Feb 2013 20:43:57 +0000 (20:43 +0000)]
This is a follow-up on r174446, now taking Atom processors into
account. Atoms use LEA for updating SP in prologs/epilogs, and the
exact LEA opcode depends on the data model.

Also reapplying the test case which was added and then reverted
(because of Atom failures), this time specifying explicitly the CPU in
addition to the triple. The test case now checks all variations (data
mode, cpu Atom vs. Core).

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

11 years agoCanonicalize line endings to Linux style also when the --strict-whitespace flag is...
Guy Benyei [Wed, 6 Feb 2013 20:40:38 +0000 (20:40 +0000)]
Canonicalize line endings to Linux style also when the --strict-whitespace flag is in use. This flag is supposed to affect horizontal whitespaces only.

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

11 years agoImprove comment.
Bill Wendling [Wed, 6 Feb 2013 20:05:44 +0000 (20:05 +0000)]
Improve comment.

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

11 years agoPPC calling convention cleanup.
Bill Schmidt [Wed, 6 Feb 2013 17:33:58 +0000 (17:33 +0000)]
PPC calling convention cleanup.

Most of PPCCallingConv.td is used only by the 32-bit SVR4 ABI.  Rename
things to clarify this.  Also delete some code that's been commented out
for a long time.

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

11 years agoR600: Support for indirect addressing v4
Tom Stellard [Wed, 6 Feb 2013 17:32:29 +0000 (17:32 +0000)]
R600: Support for indirect addressing v4

Only implemented for R600 so far.  SI is missing implementations of a
few callbacks used by the Indirect Addressing pass and needs code to
handle frame indices.

At the moment R600 only supports array sizes of 16 dwords or less.
Register packing of vector types is currently disabled, which means that a
vec4 is stored in T0_X, T1_X, T2_X, T3_X, rather than T0_XYZW. In order
to correctly pack registers in all cases, we will need to implement an
analysis pass for R600 that determines the correct vector width for each
array.

v2:
  - Add support for i8 zext load from stack.
  - Coding style fixes

v3:
  - Don't reserve registers for indirect addressing when it isn't
    being used.
  - Fix bug caused by LLVM limiting the number of SubRegIndex
    declarations.

v4:
  - Fix 64-bit defines

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

11 years agoImplement external weak (ELF) symbols on AArch64
Tim Northover [Wed, 6 Feb 2013 16:43:33 +0000 (16:43 +0000)]
Implement external weak (ELF) symbols on AArch64

Weakly defined symbols should evaluate to 0 if they're undefined at
link-time. This is impossible to do with the usual address generation
patterns, so we should use a literal pool entry to materlialise the
address.

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

11 years agoAdd some comments to new frame entries
Eli Bendersky [Wed, 6 Feb 2013 16:20:31 +0000 (16:20 +0000)]
Add some comments to new frame entries

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

11 years agoAdd AArch64 CRC32 instructions
Tim Northover [Wed, 6 Feb 2013 09:13:13 +0000 (09:13 +0000)]
Add AArch64 CRC32 instructions

These instructions are a late addition to the architecture, and may
yet end up behind an optional attribute, but for now they're available
at all times.

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

11 years agoAdd icache prefetch operations to AArch64
Tim Northover [Wed, 6 Feb 2013 09:04:56 +0000 (09:04 +0000)]
Add icache prefetch operations to AArch64

This adds hints to the various "prfm" instructions so that they can
affect the instruction cache as well as the data cache.

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

11 years agoInitial submission for the attribute group feature.
Bill Wendling [Wed, 6 Feb 2013 06:52:58 +0000 (06:52 +0000)]
Initial submission for the attribute group feature.

Attribute groups are of the form:

  #0 = attributes { noinline "no-sse" "cpu"="cortex-a8" alignstack=4 }

Target-dependent attributes are represented as strings. Attributes can have
optional values associated with them. E.g., the "cpu" attribute has the value
"cortex-a8".

Target-independent attributes are listed as enums inside the attribute classes.

Multiple attribute groups can be referenced by the same object. In that case,
the attributes are merged together.

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

11 years agoRemove extra blank line between closing curly brace and 'else'
Craig Topper [Wed, 6 Feb 2013 06:50:38 +0000 (06:50 +0000)]
Remove extra blank line between closing curly brace and 'else'

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

11 years agoRemove unused private field to suppress a build warning.
Craig Topper [Wed, 6 Feb 2013 06:48:10 +0000 (06:48 +0000)]
Remove unused private field to suppress a build warning.

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

11 years agoAlphabetize the function attributes.
Bill Wendling [Wed, 6 Feb 2013 06:22:58 +0000 (06:22 +0000)]
Alphabetize the function attributes.

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

11 years agoARM: Use MCTargetAsmParser::validateTargetOperandClass().
Jim Grosbach [Wed, 6 Feb 2013 06:00:11 +0000 (06:00 +0000)]
ARM: Use MCTargetAsmParser::validateTargetOperandClass().

Use the validateTargetOperandClass() hook to match literal '#0' operands in
InstAlias definitions. Previously this required per-instruction C++ munging of the
operand list, but not is handled as a natural part of the matcher. Much better.

No additional tests are required, as the pre-existing tests for these instructions
exercise the new behaviour as being functionally equivalent to the old.

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

11 years agoAllow targets to add custom asm operand matching logic.
Jim Grosbach [Wed, 6 Feb 2013 06:00:06 +0000 (06:00 +0000)]
Allow targets to add custom asm operand matching logic.

For example, ARM has several instructions with a literal '#0' immediate in the syntax
that's not represented as an actual operand. The asm matcher is expected a token
operand, but the parser will have created an immediate operand. This is currently
handled by dedicated per-instruction C++ munging of the ParsedAsmOperand list, but
will be better handled by this hook.

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

11 years agoFailing builds because a private class member is not being used after
Eli Bendersky [Wed, 6 Feb 2013 05:37:46 +0000 (05:37 +0000)]
Failing builds because a private class member is not being used after
initialization is one of the reasons I consider -werror to be shoddy.

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

11 years agoRemove this test in the meantime, since it won't pass on Atom. Atom uses lea
Eli Bendersky [Wed, 6 Feb 2013 03:15:00 +0000 (03:15 +0000)]
Remove this test in the meantime, since it won't pass on Atom. Atom uses lea
to move the stack pointer in prologs/epilogs. I will fix the test and add it
back later.

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

11 years agoAdd virtual desctructor to FrameEntry to avoid error on delete-non-virtual-dtor
Eli Bendersky [Wed, 6 Feb 2013 03:08:02 +0000 (03:08 +0000)]
Add virtual desctructor to FrameEntry to avoid error on delete-non-virtual-dtor

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

11 years agoTweak check to avoid integer overflow (for insanely large alignments)
Evan Cheng [Wed, 6 Feb 2013 02:06:33 +0000 (02:06 +0000)]
Tweak check to avoid integer overflow (for insanely large alignments)

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

11 years agoAdd a 'StringRef' version of hasAttribute.
Bill Wendling [Wed, 6 Feb 2013 01:33:42 +0000 (01:33 +0000)]
Add a 'StringRef' version of hasAttribute.

Fix the 'operator==' and 'hasAttributes' queries to take into account
target-dependent attributes.

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

11 years agoAdd methods to merge an AttrBuilder into another builder.
Bill Wendling [Wed, 6 Feb 2013 01:16:00 +0000 (01:16 +0000)]
Add methods to merge an AttrBuilder into another builder.

This is useful when parsing an object that references multiple attribute groups.

N.B. If both builders have alignments specified, then they should match!

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

11 years agoAttempt to recover gdb bot after r174445.
Manman Ren [Wed, 6 Feb 2013 00:59:41 +0000 (00:59 +0000)]
Attempt to recover gdb bot after r174445.

Failure: undefined symbol 'Lline_table_start0'.
Root-cause: we use a symbol subtraction to calculate at_stmt_list, but
the line table entries are not dumped in the assembly.
Fix: use zero instead of a symbol subtraction for Compile Unit 0.

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

11 years agoFix some formatting & add comments, following Eric's review
Eli Bendersky [Wed, 6 Feb 2013 00:20:38 +0000 (00:20 +0000)]
Fix some formatting & add comments, following Eric's review

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

11 years agoAdd the target-dependent (string) attributes from the AttrBuilder to the AttributeSet.
Bill Wendling [Tue, 5 Feb 2013 23:48:36 +0000 (23:48 +0000)]
Add the target-dependent (string) attributes from the AttrBuilder to the AttributeSet.

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

11 years agoAdd missing file to CMake list
Eli Bendersky [Tue, 5 Feb 2013 23:37:18 +0000 (23:37 +0000)]
Add missing file to CMake list

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

11 years agoTest for r174446
Eli Bendersky [Tue, 5 Feb 2013 23:31:48 +0000 (23:31 +0000)]
Test for r174446

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

11 years agoInitial support for DWARF CFI parsing and dumping in LLVM
Eli Bendersky [Tue, 5 Feb 2013 23:30:58 +0000 (23:30 +0000)]
Initial support for DWARF CFI parsing and dumping in LLVM

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

11 years agoBe consistent about the field name - AddressSize, not PointerSize. Add
Eli Bendersky [Tue, 5 Feb 2013 23:26:02 +0000 (23:26 +0000)]
Be consistent about the field name - AddressSize, not PointerSize. Add
a setter and fix some comments.

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

11 years agoPreprocess Apple llvmCore headers to reflect NDEBUG setting. <rdar://12568983>
Bob Wilson [Tue, 5 Feb 2013 22:59:42 +0000 (22:59 +0000)]
Preprocess Apple llvmCore headers to reflect NDEBUG setting. <rdar://12568983>

If an Apple llvmCore build is done without assertions, and a client uses
the llvmCore headers with assertions enabled, or vice versa, then things will
break because some of the structure sizes in the API are different.  Use the
unifdef tool to make the headers unconditionally match the way the llvmCore
libraries were built.

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

11 years agoRevert "[Support][ErrorOr] Add support for convertable types."
Andrew Trick [Tue, 5 Feb 2013 22:50:20 +0000 (22:50 +0000)]
Revert "[Support][ErrorOr] Add support for convertable types."

This reverts commit a33e1fafac7fedb1b080ef07ddf9ad6ddff3a830.

This unit test crashes on Darwon. It needs to be temporarily reverted
to unblock the test infrastructure.

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

11 years agoConvert to storing the attribute's internals as enums, integers, and strings.
Bill Wendling [Tue, 5 Feb 2013 22:37:24 +0000 (22:37 +0000)]
Convert to storing the attribute's internals as enums, integers, and strings.

The stuff we're handing are all enums (Attribute::AttrKind), integers and
strings. Don't convert them to Constants, which is an unnecessary step here. The
rest of the changes are mostly mechanical.

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

11 years agoMake sure the correct opcodes are used to SUB and ADD the stack
Eli Bendersky [Tue, 5 Feb 2013 21:53:29 +0000 (21:53 +0000)]
Make sure the correct opcodes are used to SUB and ADD the stack
pointer in function prologs/epilogs. The opcodes should depend on the
data model (LP64 vs. ILP32) rather than the architecture bit-ness.

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

11 years agoDwarf: support for LTO where a single object file can have multiple line tables
Manman Ren [Tue, 5 Feb 2013 21:52:47 +0000 (21:52 +0000)]
Dwarf: support for LTO where a single object file can have multiple line tables

We generate one line table for each compilation unit in the object file.
Reviewed by Eric and Kevin.

rdar://problem/13067005

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

11 years ago[mips] Do not use function CC_MipsN_VarArg unless the function being analyzed
Akira Hatanaka [Tue, 5 Feb 2013 21:18:11 +0000 (21:18 +0000)]
[mips] Do not use function CC_MipsN_VarArg unless the function being analyzed
is a vararg function.

The original code was examining flag OutputArg::IsFixed to determine whether
CC_MipsN_VarArg or CC_MipsN should be called. This is not correct, since this
flag is often set to false when the function being analyzed is a non-variadic
function.

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

11 years ago[objdump,readobj] Document the purpose and goals of each tool.
Michael J. Spencer [Tue, 5 Feb 2013 20:27:22 +0000 (20:27 +0000)]
[objdump,readobj] Document the purpose and goals of each tool.

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

11 years agoInstCombine: Fix and simplify the inttoptr side too.
Benjamin Kramer [Tue, 5 Feb 2013 20:22:40 +0000 (20:22 +0000)]
InstCombine: Fix and simplify the inttoptr side too.

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

11 years agoAdded missing newline to end of test case.
Michael Gottesman [Tue, 5 Feb 2013 19:39:44 +0000 (19:39 +0000)]
Added missing newline to end of test case.

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

11 years agoRemoved explicit inline as per the LLVM style guide.
Michael Gottesman [Tue, 5 Feb 2013 19:32:18 +0000 (19:32 +0000)]
Removed explicit inline as per the LLVM style guide.

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

11 years agoReapply r174343, with a fix for a scary DAG combine bug where it failed to differenti...
Owen Anderson [Tue, 5 Feb 2013 19:24:39 +0000 (19:24 +0000)]
Reapply r174343, with a fix for a scary DAG combine bug where it failed to differentiate between the alignment of the
base point of a load, and the overall alignment of the load.  This caused infinite loops in DAG combine with the
original application of this patch.

ORIGINAL COMMIT LOG:
When the target-independent DAGCombiner inferred a higher alignment for a load,
it would replace the load with one with the higher alignment.  However, it did
not place the new load in the worklist, which prevented later DAG combines in
the same phase (for example, target-specific combines) from ever seeing it.

This patch corrects that oversight, and updates some tests whose output changed
due to slightly different DAGCombine outputs.

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

11 years agoInstCombine: Harden code to work with vectors of pointers and simplify it a bit.
Benjamin Kramer [Tue, 5 Feb 2013 19:21:56 +0000 (19:21 +0000)]
InstCombine: Harden code to work with vectors of pointers and simplify it a bit.

Found by running instcombine on a fabricated test case for the constant folder.

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

11 years agoHexagon: Use TFR_cond with cmpb.[eq,gt,gtu] to handle
Jyotsna Verma [Tue, 5 Feb 2013 19:20:45 +0000 (19:20 +0000)]
Hexagon: Use TFR_cond with cmpb.[eq,gt,gtu] to handle
         zext( set[ne,eq,gt,ugt] (...) ) type of dag patterns.

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