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
Jakob Stoklund Olesen [Sat, 13 Apr 2013 19:02:16 +0000 (19:02 +0000)]
Use the correct types when matching ADDRri patterns from frame indexes.
It doesn't seem like anybody is checking types this late in isel, so no
test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179462
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Apr 2013 16:11:14 +0000 (16:11 +0000)]
GlobalDCE: Fix an oversight in my last commit that could lead to crashes.
There is a Constant with non-constant operands: blockaddress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179460
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Apr 2013 12:53:18 +0000 (12:53 +0000)]
Fix a scalability issue with complex ConstantExprs.
This is basically the same fix in three different places. We use a set to avoid
walking the whole tree of a big ConstantExprs multiple times.
For example: (select cmp, (add big_expr 1), (add big_expr 2))
We don't want to visit big_expr twice here, it may consist of thousands of
nodes.
The testcase exercises this by creating an insanely large ConstantExprs out of
a loop. It's questionable if the optimizer should ever create those, but this
can be triggered with real C code. Fixes PR15714.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179458
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 13 Apr 2013 08:09:20 +0000 (08:09 +0000)]
Spill and restore PPC CR registers using the FP when we have one
For functions that need to spill CRs, and have dynamic stack allocations, the
value of the SP during the restore is not what it was during the save, and so
we need to use the FP in these cases (as for all of the other spills and
restores, but the CR restore has a special code path because its reserved slot,
like the link register, is specified directly relative to the adjusted SP).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179457
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 13 Apr 2013 07:37:27 +0000 (07:37 +0000)]
Further generalize this scheduler test.
The order of copies depends on queue order, which is not very stable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179456
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 13 Apr 2013 07:29:21 +0000 (07:29 +0000)]
Fix a dislexic regex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179455
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 13 Apr 2013 06:12:46 +0000 (06:12 +0000)]
Add a missing REQUIRES: asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179453
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 13 Apr 2013 06:07:49 +0000 (06:07 +0000)]
MI-Sched: DEBUG formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179452
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 13 Apr 2013 06:07:45 +0000 (06:07 +0000)]
MI-Sched cleanup. If an instruction has no valid sched class, do not attempt to check for a variant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179451
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 13 Apr 2013 06:07:43 +0000 (06:07 +0000)]
X86 machine model: reduce SandyBridge and Haswell ILPWindow.
The initial values were arbitrary. I want them to be more
conservative. This represents the number of latency cycles hidden by
OOO execution. In practice, I think it should be within a small factor
of the complex floating point operation latency so the scheduler can
make some attempt to hide latency even for smallish blocks.
These are by no means the best values, just a starting point for
tuning heuristics. Some benchmarks such as TSVC run faster with this
lower value for SandyBridge. I haven't run anything on Haswell, but
it's shouldn't be 2x SB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179450
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 13 Apr 2013 06:07:40 +0000 (06:07 +0000)]
MI-Sched: schedule physreg copies.
The register allocator expects minimal physreg live ranges. Schedule
physreg copies accordingly. This is slightly tricky when they occur in
the middle of the scheduling region. For now, this is handled by
rescheduling the copy when its associated instruction is
scheduled. Eventually we may instead bundle them, but only if we can
preserve the bundles as parallel copies during regalloc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179449
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 13 Apr 2013 06:07:36 +0000 (06:07 +0000)]
Catch another case where SD fails to propagate node order.
I need to handle this for the test case in my following scheduler
commit.
Work is already under way to redesign the mechanism for node order
propagation because this case by case approach is unmaintainable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179448
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Apr 2013 02:31:34 +0000 (02:31 +0000)]
Add typenames to see if bot goes green.
I hope this brings http://lab.llvm.org:8011/builders/clang-x86_64-darwin11-self-mingw32 back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179446
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 13 Apr 2013 02:13:30 +0000 (02:13 +0000)]
[mips] Move MipsTargetLowering::lowerINTRINSIC_W_CHAIN and
lowerINTRINSIC_WO_CHAIN into MipsSETargetLowering.
No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179444
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Apr 2013 01:55:34 +0000 (01:55 +0000)]
Some versions of gcc don't like typenames in these places.
Should fix the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179441
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Apr 2013 01:45:40 +0000 (01:45 +0000)]
Finish templating MachObjectFile over endianness.
We are now able to handle big endian macho files in llvm-readobject. Thanks to
David Fang for providing the object files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179440
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 13 Apr 2013 00:55:41 +0000 (00:55 +0000)]
[mips] Reapply r179420 and r179421.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179434
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 13 Apr 2013 00:45:02 +0000 (00:45 +0000)]
[mips] Override TargetLoweringBase::isShuffleMaskLegal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179433
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Apr 2013 23:03:20 +0000 (23:03 +0000)]
[ms-inline asm] Simplify the logic by using parsePrimaryExpr. No functional
change intended. Test case previously added in r178568.
Part of rdar://
13611297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179425
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Apr 2013 22:40:07 +0000 (22:40 +0000)]
Revert r179420 and r179421.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179422
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Apr 2013 22:24:52 +0000 (22:24 +0000)]
[mips] Instruction selection patterns for carry-setting and using add
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179421
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Apr 2013 22:14:24 +0000 (22:14 +0000)]
[mips] v4i8 and v2i16 add, sub and mul instruction selection patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179420
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 22:02:26 +0000 (22:02 +0000)]
Revert r179409 because it caused some warnings and some of the build bots fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179418
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Apr 2013 21:56:23 +0000 (21:56 +0000)]
InstCombine: Check the operand types before merging fcmp ord & fcmp ord.
Fixes PR15737.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179417
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 21:16:54 +0000 (21:16 +0000)]
SLPVectorizer: add support for vectorization of diamond shaped trees. We now perform a preliminary traversal of the graph to collect values with multiple users and check where the users came from.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179414
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 21:15:03 +0000 (21:15 +0000)]
CostModel: increase the default cost of supported floating point operations from 1 to two. Fixed a few tests that changes because now the cost of one insert + a vector operation on two doubles is lower than two scalar operations on doubles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179413
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 21:11:14 +0000 (21:11 +0000)]
Add debug prints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179412
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 20:45:20 +0000 (20:45 +0000)]
Add support for additional vector instructions in the interpreter.
patch by Veselov, Yuri <Yuri.Veselov@intel.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Apr 2013 20:20:54 +0000 (20:20 +0000)]
[ms-inline asm] Move this logic into a static function as it's only applicable
when parsing MS-style inline assembly. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Apr 2013 19:51:49 +0000 (19:51 +0000)]
[ms-inline asm] Address the FIXME for ImmDisp before brackets. This
is a follow on to r179393 and r179399. Test case to be added on
the clang side.
Part of rdar://
13453209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179403
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 12 Apr 2013 19:09:09 +0000 (19:09 +0000)]
lit: Fix infinite recursion when an out-of-tree test root is located inside the source test root.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179402
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 12 Apr 2013 19:08:57 +0000 (19:08 +0000)]
lit: Add a test for discovery w/ test_exec_root (out-of-tree test root).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179401
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Apr 2013 18:54:20 +0000 (18:54 +0000)]
[ms-inline asm] Have the [ Symbol ] case fall into the more general logic. This
is a follow on to r179393. Test case to be added on the clang side.
Part of rdar://
13453209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179399
91177308-0d34-0410-b5e6-
96231b3b80d8