Commit Graph

37614 Commits

Author SHA1 Message Date
Anton Korobeynikov
22c9e65643 Honour aliases visibility during asm emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 21:41:14 +00:00
Anton Korobeynikov
f8342b9866 Honour aliases visibility when reading from/writing to bitcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48248 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 21:40:17 +00:00
Dan Gohman
6a6d27ac0b Add a test to ensure that all-ones vectors are materialized with pcmpeqd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48247 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 21:37:00 +00:00
Evan Cheng
c1f53c7426 Transfer physical register spill info when load / store folding happens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48246 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 21:34:46 +00:00
Dan Gohman
9736028d84 Use the correct value for InSignBit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48245 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 21:29:43 +00:00
Dan Gohman
ef5d194aaa Initial codegen support for functions and calls with multiple return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48244 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 21:11:25 +00:00
Chris Lattner
e12ecf272d Implement basic support for the 'f' register class constraint. This basically
works, but probably won't if you mix it with 't' or 'u' yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48243 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 19:50:13 +00:00
Chris Lattner
1d38677e34 coalesce away 80-bit floating point copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48241 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 19:30:09 +00:00
Chris Lattner
07f7cc3ddb convert a massive if statement to a switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48240 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 19:28:17 +00:00
Chris Lattner
fce84acbbc start handling the 'f' x87 constraint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48239 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 19:06:29 +00:00
Devang Patel
75e6f02445 Skip functions that return multiple values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48233 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 18:04:06 +00:00
Dale Johannesen
01c18a7275 The feature this is testing did not work in the general case,
and has been removed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48232 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 17:48:26 +00:00
Devang Patel
1eafa06411 Fix getOperand() for ReturnInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48229 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 17:35:03 +00:00
Devang Patel
826c49132a Become multiple return value aware.
Right now, the pass does not optimize tail recursions 
involving multiple return values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48228 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 17:33:32 +00:00
Devang Patel
9af014f80c Add TODO reminder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48227 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 17:32:05 +00:00
Dan Gohman
580b89992f Give PassManager and FunctionPassManager a common base class, with
add(Pass *) as a pure virtual member function. This will allow all
the various addPassesTo* functions in LLVM to avoid hard-coding what
type of PassManager is used. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48226 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 16:41:42 +00:00
Dan Gohman
b4b28231f7 Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48225 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 16:18:48 +00:00
Christopher Lamb
1bc1008b38 Missed part of recommit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48224 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 10:27:36 +00:00
Christopher Lamb
1fab4a6bbb Recommitting parts of r48130. These do not appear to cause the observed failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48223 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 10:09:17 +00:00
Christopher Lamb
5b4153710e Recommitting changes after more testing. These appear to cause no problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48222 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 09:33:47 +00:00
Evan Cheng
ea2378138f Use TargetRegisterInfo::getPhysicalRegisterRegClass. Remove duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48221 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 07:55:13 +00:00
Evan Cheng
fa2f786f4e If there are multiple register classes that a register belongs to, return the super-class (e.g. on x86, returns GR32, not GR32_).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48220 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 07:54:14 +00:00
Evan Cheng
9a8094159d Learn how to xfail a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48219 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 07:51:31 +00:00
Evan Cheng
676dd7c80b When the register allocator runs out of registers, spill a physical register around the def's and use's of the interval being allocated to make it possible for the interval to target a register and spill it right away and restore a register for uses. This likely generates terrible code but is before than aborting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48218 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 07:19:34 +00:00
Evan Cheng
204496d58e In 32-bit mode, mark 64-bit GPR's as unallocatable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48217 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 07:16:00 +00:00
Evan Cheng
de13acf862 XFAIL due to Dale's change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48216 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 07:15:44 +00:00
Duncan Sands
ac7613a326 Some LegalizeTypes code factorization and minor
enhancements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48215 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 06:41:14 +00:00
Chris Lattner
5d03f21744 compile: double test() {}
into:

_test:
	fldz
	ret

instead of:

_test:
	subl	$12, %esp
	#IMPLICIT_DEF %xmm0
	movsd	%xmm0, (%esp)
	fldl	(%esp)
	addl	$12, %esp
	ret



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48213 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 06:21:08 +00:00
Nick Lewycky
3c78697a3c Fix the build on gcc 4.2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48212 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 05:56:09 +00:00
Devang Patel
0dbb4a1398 fix grammer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48211 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 05:51:59 +00:00
Devang Patel
7c490d4104 Initial multiple return values support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48210 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 05:46:42 +00:00
Chris Lattner
447ff68c08 Change the model for FP Stack return to use fp operands on the
RET instruction instead of using FpSET_ST0_32.  This also generalizes
the code to handling returning of multiple FP results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48209 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 03:23:40 +00:00
Chris Lattner
c5733ac5d3 variadic instructions don't have operand info for variadic arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48208 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 03:14:42 +00:00
Dan Gohman
43ca31e3dc Upgrade this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48207 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 02:19:59 +00:00
Dan Gohman
034f60ed24 Generalize ExpandIntToFP to handle the case where the operand is legal
and it's the result that requires expansion. This code is a little confusing
because the TargetLoweringInfo tables for [US]INT_TO_FP use the operand type
(the integer type) rather than the result type. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48206 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 01:59:03 +00:00
Chris Lattner
b779580100 If a register operand comes from the variadic part of a node, don't
verify the register constraint matches what the instruction expects.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48205 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 00:59:28 +00:00
Evan Cheng
524f961742 Temporarily revert 48175.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48204 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 00:27:34 +00:00
Anton Korobeynikov
7fcb6b65c9 Fix thinko: alias always defines new symbol. Even is aliasee itself is undefined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48203 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 00:24:53 +00:00
Dan Gohman
6cf9b8adf4 More APInt-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48201 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 00:11:06 +00:00
Chris Lattner
ca796402be emit an ID # for each regclass ID. Chris doesn't like to have to count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48200 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 00:00:23 +00:00
Chris Lattner
183275a627 abort with an assert instead of a cerr to get line#
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48199 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:56:08 +00:00
Dan Gohman
ac9dff686f Use utostr instead of a stringstream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48198 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:55:07 +00:00
Scott Michel
405fba12ce - Style cleanup in IA64ISelLowering.h: add 'virtual' keyword for consistency.
- Add test pattern matching in CellSPU's icmp32.ll test harness
- Fix CellSPU fcmp.ll-generated assert.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48197 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:49:09 +00:00
Dan Gohman
45f36ea448 Correctly clone FlaggedNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48196 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:48:14 +00:00
Dan Gohman
450e7c3c54 Initialize ArgTypes directly instead of manually copying in the elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48195 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:41:23 +00:00
Dan Gohman
f25275cb3c APInt-ify this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48194 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:38:17 +00:00
Dan Gohman
e1ff8ec36f Remove an unnecessary #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48193 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:37:12 +00:00
Chris Lattner
03fdec04d1 Don't emit FP_REG_KILL into a block that just returns. Nothing
can be live out of the block anyway, so it isn't needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48192 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:34:12 +00:00
Dan Gohman
a2e9485e34 Implement more support for fp-to-i128 and i128-to-fp conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48189 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:03:31 +00:00
Dale Johannesen
82e4289fc7 Disable prolog code that aligns the stack when a
local object of >16 byte alignment exists.  It does not
work and getting it to work is not trivial, as explained
in the comment.  This fixes all the remaining ppc32
failures in the struct-layout-1 part of the gcc testsuite.

(gcc does not support this either, and the only way to
get such an object is with __attribute__((aligned)) or
generic vectors; it can't be done in a standard-conforming
program, or with Altivec.  So I think disabling it is OK.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48188 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 22:59:46 +00:00