OSDN Git Service
Chad Rosier [Wed, 17 Apr 2013 21:14:38 +0000 (21:14 +0000)]
[ms-inline asm] These should be int64_t, not uint64_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179724
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 17 Apr 2013 21:03:53 +0000 (21:03 +0000)]
Fixed typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179721
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 17 Apr 2013 21:01:45 +0000 (21:01 +0000)]
[ms-inline asm] Add support for the minus unary operator. Previously, we were
unable to handle cases such as __asm mov eax, 8*-8.
This patch also attempts to simplify the state machine. Further, the error
reporting has been improved. Test cases included, but more will be added to
the clang side shortly.
rdar://
13668445
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179719
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 17 Apr 2013 20:48:03 +0000 (20:48 +0000)]
[objc-arc] Added descriptions for EnableARCAnnotations, EnableCheckForCFGHazards, EnableARCOptimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179718
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 17 Apr 2013 20:48:01 +0000 (20:48 +0000)]
[objc-arc] Added an option to arc-annotations for turning off CheckForCFGHazard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179717
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 17 Apr 2013 20:17:08 +0000 (20:17 +0000)]
More consistent formatting and tidying-up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179716
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 17 Apr 2013 20:10:13 +0000 (20:10 +0000)]
This patch teaches x86 fast-isel to generate the native div/idiv instructions
for the sdiv/srem/udiv/urem bitcode instructions. This is done for the i8,
i16, and i32 types, as well as i64 for the x86_64 target.
Patch by Jim Stichnoth
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179715
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Wed, 17 Apr 2013 20:04:53 +0000 (20:04 +0000)]
X86 cost model: Exit before calling getSimpleVT on non-simple VTs
getSimpleVT can only handle simple value types.
radar://
13676022
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179714
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Apr 2013 20:02:32 +0000 (20:02 +0000)]
A limit of 500 was still a bit too high for some tests.
PR15000 has a testcase where the time to compile was bordering on 30s. When I
dropped the limit value to 100, it became a much more managable 6s. The compile
time seems to increase in a roughly linear fashion based on increasing the limit
value. (See the runtimes below.)
So, let's lower the limit to 100 so that they can get a more reasonable compile
time.
Limit Value Time
----------- ----
10 0.9744s
20 1.8035s
30 2.3618s
40 2.9814s
50 3.6988s
60 4.5486s
70 4.9314s
80 5.8012s
90 6.4246s
100 7.0852s
110 7.6634s
120 8.3553s
130 9.0552s
140 9.6820s
150 9.8804s
160 10.8901s
170 10.9855s
180 12.0114s
190 12.6816s
200 13.2754s
210 13.9942s
220 13.8097s
230 14.3272s
240 15.7753s
250 15.6673s
260 16.0541s
270 16.7625s
280 17.3823s
290 18.8213s
300 18.6120s
310 20.0333s
320 19.5165s
330 20.2505s
340 20.7068s
350 21.1833s
360 22.9216s
370 22.2152s
380 23.9390s
390 23.4609s
400 24.0426s
410 24.6410s
420 26.5208s
430 27.7155s
440 26.4142s
450 28.5646s
460 27.3494s
470 29.7255s
480 29.4646s
490 30.5001s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179713
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 17 Apr 2013 18:46:12 +0000 (18:46 +0000)]
Fix treatment of ARM unallocated hint instructions.
The reference manual defines only 5 permitted values for the immediate field of the "hint" instruction:
1. nop (imm == 0)
2. yield (imm == 1)
3. wfe (imm == 2)
4. wfi (imm == 3)
5. sev (imm == 4)
Therefore, restrict the permitted values for the "hint" instruction to 0 through 4.
Patch by Mihail Popa <Mihail.Popa@arm.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179707
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Apr 2013 18:26:02 +0000 (18:26 +0000)]
Appease a gcc warning about an overflow in a constant conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179703
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 17 Apr 2013 17:51:19 +0000 (17:51 +0000)]
Don't store AttributeSet::FunctionIndex as an int.
GCC complains: Core.cpp:1449:27: warning: overflow in implicit constant conversion [-Woverflow]
I'm not sure if that's really a problem here, but using the enum type is better
style anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179696
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 17 Apr 2013 17:19:05 +0000 (17:19 +0000)]
PowerPC: Mark some more patterns as isCodeGenOnly.
A couple of recently introduced conditional branch patterns
also need to be marked as isCodeGenOnly since they cannot
be handled by the asm parser.
No change in generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179690
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 17 Apr 2013 17:17:20 +0000 (17:17 +0000)]
Make formatting more consistent and tidy-up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179689
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Wed, 17 Apr 2013 15:17:39 +0000 (15:17 +0000)]
R600: Make Export Instruction not duplicable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179686
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Wed, 17 Apr 2013 15:17:32 +0000 (15:17 +0000)]
R600: Export is emitted as a CF_NATIVE inst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179685
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Wed, 17 Apr 2013 15:17:25 +0000 (15:17 +0000)]
R600: Emit used GPRs count
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179684
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 17 Apr 2013 14:27:04 +0000 (14:27 +0000)]
Use StringSwitch instead of long chain of if-else. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179682
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 17 Apr 2013 08:29:02 +0000 (08:29 +0000)]
Create a stub for DWARF parser unittests
Moves one DWARF-specific header to include/llvm/DebugInfo from lib/.
Add a short unittest for r179095.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179678
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 17 Apr 2013 06:45:11 +0000 (06:45 +0000)]
Fix -Werror build.
Broken in r179657.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179669
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 17 Apr 2013 06:37:30 +0000 (06:37 +0000)]
This appears to be no longer necessary for the testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179667
91177308-0d34-0410-b5e6-
96231b3b80d8
Anat Shemer [Wed, 17 Apr 2013 05:34:03 +0000 (05:34 +0000)]
test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179665
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 17 Apr 2013 03:41:36 +0000 (03:41 +0000)]
PR15149/r174304 improvement - print hex for unknown dwarf language codes & add a test case
CR feedback from Rafael Espindola and Paul Robinson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179664
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 17 Apr 2013 03:18:49 +0000 (03:18 +0000)]
Fix random typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179663
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 17 Apr 2013 02:01:10 +0000 (02:01 +0000)]
Do not optimise fprintf() calls if its return value is used.
Differential Revision: http://llvm-reviews.chandlerc.com/D620
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179661
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Wed, 17 Apr 2013 00:18:04 +0000 (00:18 +0000)]
Mips assembler: Enable handling of nested expressions
This patch allows the Mips assembler to parse and emit nested
expressions as instruction operands. It also extends the
expansion of memory instructions when an offset is given as
an expression.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179657
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 17 Apr 2013 00:11:46 +0000 (00:11 +0000)]
[ms-inline asm] Add support for parsing complex immediate expressions. Test
cases to be submitted on clang side shortly.
rdar://
13663768 and PR15760
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179655
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 16 Apr 2013 23:12:56 +0000 (23:12 +0000)]
C API: Add LLVMTargetMachineEmitToMemoryBuffer()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179648
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 16 Apr 2013 23:12:51 +0000 (23:12 +0000)]
C API: Add LLVMGetBufferSize()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179647
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 16 Apr 2013 23:12:47 +0000 (23:12 +0000)]
C API: Add LLVMGetBufferStart()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179646
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 16 Apr 2013 23:12:43 +0000 (23:12 +0000)]
C API: Add LLVMAddTargetDependentFunctionAttr()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179645
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Apr 2013 20:55:47 +0000 (20:55 +0000)]
Print out the target-independent attributes in a comment before the function definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179622
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 16 Apr 2013 20:05:52 +0000 (20:05 +0000)]
[XCore] Extend test to check positve offsets are folded into addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179621
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 16 Apr 2013 19:56:55 +0000 (19:56 +0000)]
[XCore] Give test more generic name.
I intend to extend the test with more offset folding checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179620
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 16 Apr 2013 19:41:19 +0000 (19:41 +0000)]
[XCore] Convert a couple of tests to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179619
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 16 Apr 2013 18:20:10 +0000 (18:20 +0000)]
Remove unused variable from previous refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179611
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 16 Apr 2013 18:15:40 +0000 (18:15 +0000)]
[ms-inline asm] Refactor. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179610
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 16 Apr 2013 17:27:40 +0000 (17:27 +0000)]
[ms-inline asm] Remove some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179607
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 16 Apr 2013 15:41:18 +0000 (15:41 +0000)]
Cleanup naming: DataLayout s/TD/DL/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179601
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Tue, 16 Apr 2013 14:02:30 +0000 (14:02 +0000)]
Fix build failure introduced in 179591 when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179593
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Tue, 16 Apr 2013 12:02:21 +0000 (12:02 +0000)]
Implement ARM unwind opcode assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179591
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 16 Apr 2013 10:53:11 +0000 (10:53 +0000)]
llvm-objdump: Don't print contents of BSS sections: it makes no sense and crashes llvm-objdump on relocated objects with large bss
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179589
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 16 Apr 2013 08:58:59 +0000 (08:58 +0000)]
Add four new functions and one new enum to the C API:
LLVMGetThreadLocalMode - exposes GlobalVariable::getThreadLocalMode
LLVMSetThreadLocalMode - exposes GlobalVariable::setThreadLocalMode
LLVMIsExternallyInitialized - exposes GlobalVariable::isExternallyInitialized
LLVMSetExternallyInitialized - exposes GlobalVariable::setExternallyInitialized
LLVMThreadLocalMode - maps to GlobalVariable::ThreadLocalMode
Patch by Moritz Maxeiner!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179588
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 16 Apr 2013 08:35:36 +0000 (08:35 +0000)]
simplifycfg: Fix integer overflow converting switch into icmp.
If a switch instruction has a case for every possible value of its type,
with the same successor, SimplifyCFG would replace it with an icmp ult,
but the computation of the bound overflows in that case, which inverts
the test.
Patch by Jed Davis!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179587
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 16 Apr 2013 02:57:02 +0000 (02:57 +0000)]
Add 64-bit multiply and divide instructions for SPARC v9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179582
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Apr 2013 22:42:50 +0000 (22:42 +0000)]
ARM: Add VACLT and VACLE assembly aliases.
These are aliases for VACGT and VACGE, respectively, with the source
operands reversed.
rdar://
13638090
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179575
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Apr 2013 22:33:50 +0000 (22:33 +0000)]
We are not able to bitcast a pointer to an integral value.
Two return types are not equivalent if one is a pointer and the other is an
integral. This is because we cannot bitcast a pointer to an integral value.
PR15185
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179569
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Mon, 15 Apr 2013 22:21:55 +0000 (22:21 +0000)]
Mips assembler: Explicit floating point condition register recognition.
This patch allows the assembler to recognize $fcc0
as a valid register for conditional move instructions.
Corresponding test cases have been added.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179567
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 15 Apr 2013 22:21:25 +0000 (22:21 +0000)]
Fix a grammar mistake, and add a line about the two phases that the BB/SLP vectorizers have (top-down and bottom-up).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179566
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 15 Apr 2013 22:11:07 +0000 (22:11 +0000)]
Fix the internal link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179565
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 15 Apr 2013 22:10:39 +0000 (22:10 +0000)]
Update the release notes about the vectorizers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179564
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 15 Apr 2013 22:00:26 +0000 (22:00 +0000)]
SLPVectorizer: Make it a function pass and add code for hoisting the vector-gather sequence out of loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179562
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Apr 2013 20:13:59 +0000 (20:13 +0000)]
Fix silly typo that broke big endian hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179551
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Apr 2013 19:28:45 +0000 (19:28 +0000)]
Fix endianness on some MSVC versions.
Looks like it was evaluating undef == undef to true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179549
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 15 Apr 2013 17:51:35 +0000 (17:51 +0000)]
R600/SI: Emit config values in register value pairs.
Instead of emitting config values in a predefined order, the code
emitter will now emit a 32-bit register index followed by the 32-bit
config value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179546
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 15 Apr 2013 17:51:30 +0000 (17:51 +0000)]
R600/SI: Emit configuration value in the .AMDGPU.config ELF section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179545
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 15 Apr 2013 17:51:21 +0000 (17:51 +0000)]
R600: Emit ELF formatted code rather than raw ISA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179544
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Apr 2013 17:40:48 +0000 (17:40 +0000)]
Fix a typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179542
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Apr 2013 17:40:45 +0000 (17:40 +0000)]
Simplify the MCInst operator iterator declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179541
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 15 Apr 2013 17:38:06 +0000 (17:38 +0000)]
Grammar and punctuation fixes.
No content changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179540
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Apr 2013 16:46:43 +0000 (16:46 +0000)]
Try to fix the mingw builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179536
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Mon, 15 Apr 2013 16:11:25 +0000 (16:11 +0000)]
Fix bit size of v64i8 and v32i16 vector types.
Patch by Cameron McInally <cameron.mcinally@nyu.edu>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179535
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Apr 2013 16:08:02 +0000 (16:08 +0000)]
Remove getters now that we can specialize structs on the host endianness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179534
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 15 Apr 2013 15:49:13 +0000 (15:49 +0000)]
Avoid outputting temporary test file into source tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179532
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Apr 2013 15:13:10 +0000 (15:13 +0000)]
Remove unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179530
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Apr 2013 14:44:24 +0000 (14:44 +0000)]
Make the host endianness check an integer constant expression.
I will remove the isBigEndianHost function once I update clang.
The ifdef logic is designed to
* not use configure/cmake to avoid breaking -arch i686 -arch ppc.
* default to little endian
* be as small as possible
It looks like sys/endian.h is the preferred header on most modern BSD systems,
but it is better to change this in a followup patch as machine/endian.h is
available on FreeBSD, OpenBSD, NetBSD and OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179527
91177308-0d34-0410-b5e6-
96231b3b80d8
Andy Gibbs [Mon, 15 Apr 2013 12:06:32 +0000 (12:06 +0000)]
Replace uses of the deprecated std::auto_ptr with OwningPtr.
This is a rework of the broken parts in r179373 which were subsequently reverted in r179374 due to incompatibility with C++98 compilers. This version should be ok under C++98.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179520
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 15 Apr 2013 11:53:05 +0000 (11:53 +0000)]
Enable all targets by default on Visual Studio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179518
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 15 Apr 2013 07:31:37 +0000 (07:31 +0000)]
Revert "Recommit r179497 after fixing uninitialized variable." until
I can fix the testcases here:
http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/6952
This reverts commit r179512 due to testcases specifying triples
that they didn't actually mean and causing failures on other platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179513
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 15 Apr 2013 07:07:21 +0000 (07:07 +0000)]
Recommit r179497 after fixing uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179512
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 15 Apr 2013 05:56:55 +0000 (05:56 +0000)]
Document our desire to enable the loop vectorizer on -Os in future releases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179511
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 15 Apr 2013 05:53:23 +0000 (05:53 +0000)]
Docs: merge the description of the BB and SLP vectorizers and document the -fslp-vectorize-aggressive flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179510
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 15 Apr 2013 05:39:58 +0000 (05:39 +0000)]
Add an option -vectorize-slp-aggressive for running the BB vectorizer. Make -fslp-vectorize run the slp-vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179508
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 15 Apr 2013 04:54:42 +0000 (04:54 +0000)]
Rename the slp-vectorizer clang/llvm flags. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179505
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 15 Apr 2013 04:25:27 +0000 (04:25 +0000)]
SLPVectorizer: Add support for vectorizing trees that start at compare instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179504
91177308-0d34-0410-b5e6-
96231b3b80d8
Jia Liu [Mon, 15 Apr 2013 03:26:13 +0000 (03:26 +0000)]
fix include path in doc Extending LLVM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179503
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 15 Apr 2013 02:37:46 +0000 (02:37 +0000)]
Mark all PPC comparison instructions as not having side effects
Now that the CR spilling issues have been resolved, we can remove the
unmodeled-side-effect attributes from the comparison instructions (and also
mark them as isCompare). By allowing these, by default, to have unmodeled side
effects, we were hiding problems with CR spilling; but everything seems much
happier now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179502
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 15 Apr 2013 02:07:05 +0000 (02:07 +0000)]
Fix PPC64 CR spill location for callee-saved registers
This fixes an ABI bug for non-Darwin PPC64. For the callee-saved condition
registers, the spill location is specified relative to the stack pointer (SP +
8). However, this is not relative to the SP after the new stack frame is
established, but instead relative to the caller's stack pointer (it is stored
into the linkage area of the parent's stack frame).
So, like with the link register, we don't directly spill the CRs with other
callee-saved registers, but just mark them to be spilled during prologue
generation.
In practice, this reverts r179457 for PPC64 (but leaves it in place for PPC32).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179500
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sun, 14 Apr 2013 23:35:36 +0000 (23:35 +0000)]
Revert "Remove some unused triple and data layout."
This reverts commit r179497 and the accompanying commit as it broke random platforms that aren't osx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179499
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sun, 14 Apr 2013 23:32:44 +0000 (23:32 +0000)]
Remove some unused triple and data layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179498
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sun, 14 Apr 2013 23:32:40 +0000 (23:32 +0000)]
If we've specified a triple on the command line then go ahead
and use that as the default triple for the module and target
data layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179497
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Sun, 14 Apr 2013 21:18:36 +0000 (21:18 +0000)]
Use object file specific section type for initial text section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179494
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 14 Apr 2013 21:15:43 +0000 (21:15 +0000)]
Reorders two transforms that collide with each other
One performs: (X == 13 | X == 14) -> X-13 <u 2
The other: (A == C1 || A == C2) -> (A & ~(C1 ^ C2)) == C1
The problem is that there are certain values of C1 and C2 that
trigger both transforms but the first one blocks out the second,
this generates suboptimal code.
Reordering the transforms should be better in every case and
allows us to do interesting stuff like turn:
%shr = lshr i32 %X, 4
%and = and i32 %shr, 15
%add = add i32 %and, -14
%tobool = icmp ne i32 %add, 0
into:
%and = and i32 %X, 240
%tobool = icmp ne i32 %and, 224
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179493
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 14 Apr 2013 20:13:05 +0000 (20:13 +0000)]
Make the command line triple match the module triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179492
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 14 Apr 2013 09:33:08 +0000 (09:33 +0000)]
Miscellaneous cleanups for VecUtils.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179483
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 14 Apr 2013 07:42:25 +0000 (07:42 +0000)]
Document the SLP infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179480
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 14 Apr 2013 07:22:22 +0000 (07:22 +0000)]
SLP: Document the scalarization cost method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179479
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 14 Apr 2013 05:55:18 +0000 (05:55 +0000)]
Document the decision to assume that the cost of floats is twice as much as integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179478
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 14 Apr 2013 05:48:50 +0000 (05:48 +0000)]
Use i32 for all SPARC shift amounts, even in 64-bit mode.
Test case by llvm-stress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179477
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 14 Apr 2013 05:47:04 +0000 (05:47 +0000)]
Remove unused function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179476
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 14 Apr 2013 05:15:53 +0000 (05:15 +0000)]
SLPVectorizer: Add support for trees that don't start at binary operators, and add the cost of extracting values from the roots of the tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179475
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 14 Apr 2013 05:10:36 +0000 (05:10 +0000)]
Add support for the abs64 SPARC v9 code model.
For when 16 TB just isn't enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179474
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 14 Apr 2013 04:57:51 +0000 (04:57 +0000)]
Add support for the SPARC v9 abs44 code model.
This is the default model for non-PIC 64-bit code. It supports
text+data+bss linked anywhere in the low 16 TB of the address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179473
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 14 Apr 2013 04:35:19 +0000 (04:35 +0000)]
Use target flags for printing SPARC asm operands.
64-bit code models need multiple relocations that can't be inferred from
the opcode like they can in 32-bit code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179472
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 14 Apr 2013 04:35:16 +0000 (04:35 +0000)]
Also put target flags on SPARC constant pool references.
Constant pool entries are accessed exactly the same way as global
variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179471
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 14 Apr 2013 03:22:20 +0000 (03:22 +0000)]
SLPVectorizer: add initial support for reduction variable vectorization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179470
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 14 Apr 2013 01:53:23 +0000 (01:53 +0000)]
Fix patterns for 64-bit pointers.
This fixes the pic32 code model for SPARC v9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179469
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 14 Apr 2013 01:33:32 +0000 (01:33 +0000)]
Add target flags to SPARC address operands.
SDNodes and MachineOperands get target flags representing the %hi() and
%lo() assembly annotations that eventually become relocations.
Also define flags to be used by the 64-bit code models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179468
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 13 Apr 2013 23:06:15 +0000 (23:06 +0000)]
Mark all PPC CR registers to be spilled as live-in and tag MFCR appropriately
Leaving MFCR has having unmodeled side effects is not enough to prevent
unwanted instruction reordering post-RA. We could probably apply a stronger
barrier attribute, but there is a better way: Add all (not just the first) CR
to be spilled as live-in to the entry block, and add all CRs to the MFCR
instruction as implicitly killed.
Unfortunately, I don't have a small test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179465
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 13 Apr 2013 19:02:23 +0000 (19:02 +0000)]
Define SPARC code models.
Currently, only abs32 and pic32 are implemented. Add a test case for
abs32 with 64-bit code. 64-bit PIC code is currently broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179463
91177308-0d34-0410-b5e6-
96231b3b80d8