Commit Graph

9235 Commits

Author SHA1 Message Date
Bill Wendling
3180e20cda Fix for first part of PR2562. Generate the "pinsrw" instruction for inserts
into v4i16 vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53807 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-20 02:32:23 +00:00
Anton Korobeynikov
badd8df972 Unbreak build: 'DarwinTargetAsmInfo' was already taken as PPC TAI flavour.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53801 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 21:44:57 +00:00
Duncan Sands
a7360f0178 Make sure custom lowering for LegalizeTypes
returns a node with the right number of
return values.  This fixes codegen of
Generic/cast-fp.ll, Generic/fp_to_int.ll
and PowerPC/multiple-return-values.ll
when using -march=ppc32 -mattr=+64bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53794 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 16:26:02 +00:00
Anton Korobeynikov
055a76bb51 Use chars, where possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53791 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 13:16:32 +00:00
Anton Korobeynikov
ae408e6f1e Switch MIPS to new ELFTargetAsmInfo. Add few FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53790 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 13:16:11 +00:00
Anton Korobeynikov
cff2ea06af Fix a FIXME :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53789 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 13:15:46 +00:00
Anton Korobeynikov
18f6ed9c29 Use generic ELFTargetAsmInfo and DarwinTargetAsmInfo for X86 code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53788 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 13:15:21 +00:00
Anton Korobeynikov
745e864eab Add TargetAsmInfo stuff for all darwin-based targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53787 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 13:14:46 +00:00
Anton Korobeynikov
debe34bd8d Add TargetAsmInfo for all ELF-based targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 13:14:11 +00:00
Anton Korobeynikov
88bbf6941f Use aligned stack spills, where possible. This fixes PR2549.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53784 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 06:30:51 +00:00
Dan Gohman
5a11abaf2c In the CBackend, use casts to force integer add, subtract, and
multiply to be done as unsigned, so that they have well defined
behavior on overflow. This fixes PR2408.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53767 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 18:43:12 +00:00
Dan Gohman
e8be6c6391 Add a new function, ReplaceAllUsesOfValuesWith, which handles bulk
replacement of multiple values. This is slightly more efficient
than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically
could be optimized even further. However, an important property of this
new function is that it handles the case where the source value set and
destination value set overlap. This makes it feasible for isel to use
SelectNodeTo in many very common cases, which is advantageous because
SelectNodeTo avoids a temporary node and it doesn't require CSEMap
updates for users of values that don't change position.

Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to
handle operand lists more efficiently, and to correctly handle a number
of corner cases to which its new wider use exposes it.

This commit also includes a change to the encoding of post-isel opcodes
in SDNodes; now instead of being sandwiched between the target-independent
pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel
opcodes are now represented as negative values. This makes it possible
to test if an opcode is pre-isel or post-isel without having to know
the size of the current target's post-isel instruction set.

These changes speed up llc overall by 3% and reduce memory usage by 10%
on the InstructionCombining.cpp testcase with -fast and -regalloc=local.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53728 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 19:10:17 +00:00
Nate Begeman
29681a5385 Remove unnecessary readme entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 17:21:14 +00:00
Nate Begeman
e99b255b5c Fix a typo in last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53720 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 17:04:58 +00:00
Nate Begeman
30a0de94e7 SSE codegen for vsetcc nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53719 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 16:51:19 +00:00
Mon P Wang
f595266b91 When lowering certain atomics, we need to copy the memoperand from the old
atomic operation to the new one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 04:54:06 +00:00
Devang Patel
0d885d1661 Mark function used by asm block as used, otherwise optimizer may not see the use and may delete the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53692 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 17:54:34 +00:00
Scott Michel
5af8f0e67e Somehow, custom lowering of i64 multiplications got dropped along the way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53689 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 17:17:29 +00:00
Dan Gohman
2fbdf0e711 Fix the result type of X86's truncate to i8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53688 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 16:20:48 +00:00
Evan Cheng
817a6a9eaa x86-64 PIC JIT fixes: do not generate the extra load for external GV's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53661 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 01:34:02 +00:00
Evan Cheng
81fb5feede X86-64 PIC jump table values are different from x86-32 cases, they are dest - table base.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53660 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 01:33:08 +00:00
Dan Gohman
9c578eb223 TargetAsmInfo::SectionForGlobal showed up in a profile. Simplify it a little.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53639 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 18:37:51 +00:00
Bruno Cardoso Lopes
b27cb55923 Fixed call stack alignment. Improved AsmPrinter alignment issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53585 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 02:03:36 +00:00
Bruno Cardoso Lopes
43d526d162 Added Subtarget support into RegisterInfo
Added HasABICall and HasAbsoluteCall (equivalent to gcc -mabicall and 
-mno-shared). HasAbsoluteCall is not implemented but HasABICall is the 
default for o32 ABI. Now, both should help into a more accurate 
relocation types implementation. 
Added IsLinux is needed to choose between asm directives.
Instruction name strings cleanup.
AsmPrinter improved.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53551 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-14 14:42:54 +00:00
Chris Lattner
10c5d36ca9 Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53535 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-14 00:19:59 +00:00
Evan Cheng
5330192ab5 Implement llvm.atomic.cmp.swap.i32 on PPC. Patch by Gary Benson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53505 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-12 02:23:19 +00:00
Dan Gohman
cddc11e757 Add a utility function to MachineInstr for testing whether an instruction
has exactly one MachineMemOperand, and change some X86 lowering code to
make use of it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53498 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-12 00:10:52 +00:00
Dan Gohman
a54cf17661 Include a frame index in the "fixed stack" pseudo source value
instead of using the frame index for the SVOffset, which was
inconsistent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53486 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11 22:44:52 +00:00
Chris Lattner
78d60458d5 add support for returning i128, PR2532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53472 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11 20:53:00 +00:00
Dan Gohman
dc2fbddd9d Trim unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53471 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11 20:38:31 +00:00
Bill Wendling
71ca353ae6 The frame address on an x86-64 box needs to be offset by -8, not -4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53450 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11 07:18:52 +00:00
Chris Lattner
6291d69c4c Remove extraneous vertical whitespace before Eric gets the wrong idea ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53411 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-10 16:49:53 +00:00
Chris Lattner
85e7ac0353 Fix an altivec constant miscompilation that Duncan found through
his work on legalizetypes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53410 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-10 16:33:38 +00:00
Owen Anderson
c007848b5a Fix the build by adding a #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53388 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-10 01:44:27 +00:00
Evan Cheng
331e2bd942 Fix for PR2472. Use movss to set lower 32-bits of a zero XMM vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53386 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-10 01:08:23 +00:00
Anton Korobeynikov
7705ea33e4 Remove a FIXME: we really need to use const_data section on darwin for
constant pool, if relocation model is not static. This directly maps to
the way how GCC works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53370 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 21:54:26 +00:00
Anton Korobeynikov
ac2673e4ea Add FIXME for future checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53368 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 21:38:28 +00:00
Dale Johannesen
03b5ee7762 Remove extra call to DW.SetModuleInfo on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53365 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 21:33:15 +00:00
Dale Johannesen
d03772466a Emit debug info for data-only files on Cell SPU.
I cannot test this target, let me know if it breaks!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 21:25:06 +00:00
Dale Johannesen
757809a170 Emit debug into for data-only files for Linux PPC.
I cannot test this target, let me know if it breaks!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53362 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 21:24:07 +00:00
Dale Johannesen
f2452c5f48 Emit debug info for data-only files. ARM version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53360 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 21:20:54 +00:00
Dale Johannesen
7bc39e227f Emit debug info for data-only files. This version
is X86 ATT only.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53355 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 20:55:35 +00:00
Anton Korobeynikov
b126f3b534 Add missed section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53354 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 20:47:55 +00:00
Dale Johannesen
94618eb888 Emit debug info for data-only files. This version
applies to ppc Darwin only.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53353 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 20:43:39 +00:00
Anton Korobeynikov
9a06ed9359 Distinguish .const and .const_data on Darwin, when needed. This is somehow crazy :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53350 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 20:01:42 +00:00
Anton Korobeynikov
f56c2f7a4b Weak stuff always goes to coalesced sections on Darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53340 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 19:06:02 +00:00
Dan Gohman
4b9235b149 Remove #include <iostream>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53333 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 18:08:48 +00:00
Anton Korobeynikov
c5a7e40c74 Add FIXME needed to be resolved later
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53324 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:30:02 +00:00
Anton Korobeynikov
7d51edfc08 Use only 'subset' of flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53323 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:29:44 +00:00
Anton Korobeynikov
a3af0bf4ab Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53322 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:29:27 +00:00