Commit Graph

37069 Commits

Author SHA1 Message Date
Devang Patel 1f00b535e1 Let function call return aggregate.
Now, we have very first multiple return value testcase!

llvm-svn: 47424
2008-02-21 01:54:02 +00:00
Devang Patel c6f915e40d Add -disable-output option.
llvm-svn: 47422
2008-02-21 01:41:25 +00:00
Evan Cheng 911f6bd799 Clean up some spilling code using MachineRegisterInfo.
llvm-svn: 47416
2008-02-21 00:34:19 +00:00
Devang Patel fe988eba4b XFAIL for now.
llvm-svn: 47411
2008-02-20 23:10:42 +00:00
Devang Patel b2aa6fe905 Now functions can return aggregate values.
llvm-svn: 47409
2008-02-20 22:51:28 +00:00
Devang Patel 8a24fa68ad regenerate.
llvm-svn: 47408
2008-02-20 22:40:23 +00:00
Devang Patel bd254045d0 Parse
ret i32 1, i8 2
another step towards multiple return value support.

llvm-svn: 47407
2008-02-20 22:39:45 +00:00
Devang Patel 616f0e02be What if functions can return aggregate values ?
One small step towards multiple return value support.

llvm-svn: 47406
2008-02-20 22:36:03 +00:00
Dale Johannesen c3706fcfb8 Regenerated files.
llvm-svn: 47402
2008-02-20 21:15:43 +00:00
Dale Johannesen 965155affb Support alignment within ParamAttrs in the I/O handling.
llvm-svn: 47401
2008-02-20 21:15:19 +00:00
Evan Cheng b6b69208ba Poorly named option.
llvm-svn: 47400
2008-02-20 20:57:32 +00:00
Bill Wendling eac9e5ef21 Remove one of the fixmes that I put in there. From Evan:
No need to go up more levels. A def of a register also sets its sub-registers
(so if PhysRegInfo[SuperReg] is NULL, it means SuperReg's super registers are
not previously defined).

llvm-svn: 47399
2008-02-20 20:56:45 +00:00
Anton Korobeynikov 1872ad9888 Add convenient helper to get suffix of the file
llvm-svn: 47397
2008-02-20 19:41:22 +00:00
Devang Patel cf193b8320 getresult does not support nested aggregates.
llvm-svn: 47396
2008-02-20 19:39:41 +00:00
Bill Wendling cf2d1aa485 Improve some comments explaining the "handle kills" stuff better.
llvm-svn: 47395
2008-02-20 19:35:34 +00:00
Devang Patel 6b30fd310d Verifier should use Assert1 instead of assert.
llvm-svn: 47394
2008-02-20 19:32:20 +00:00
Dan Gohman 2c61d2c503 Remove inline keywords from in-class function definitions, for
consistency.

llvm-svn: 47393
2008-02-20 19:29:58 +00:00
Devang Patel dcad9da0bc getresult type is the type of indexed aggregate element
llvm-svn: 47392
2008-02-20 19:26:55 +00:00
Devang Patel 949173da7f Regenerate.
llvm-svn: 47391
2008-02-20 19:13:10 +00:00
Devang Patel 666d45195a Specify GetResultInst index as an unsigned.
llvm-svn: 47390
2008-02-20 19:10:47 +00:00
Bill Wendling 0b72219681 Fix comment.
llvm-svn: 47389
2008-02-20 19:09:14 +00:00
Devang Patel 57b4eedad9 assert is more effective reminder then FIXME tag for unimplemented features.
llvm-svn: 47388
2008-02-20 18:37:40 +00:00
Devang Patel 3ef1b793c1 Use isValidOperands() to verify GetResultInst.
llvm-svn: 47387
2008-02-20 18:36:46 +00:00
Devang Patel 490760380c Fix typo. Add const version of getAggregateValue() accessor member function.
llvm-svn: 47386
2008-02-20 18:36:16 +00:00
Evan Cheng e43b6054b1 Temporarily backing out r47337. It breaks a number of CBE tests.
llvm-svn: 47385
2008-02-20 18:32:05 +00:00
Duncan Sands e7b462b329 LegalizeTypes support for scalarizing a vector store
and splitting extract_subvector.  This fixes nine
"make check" testcases, for example
2008-02-04-ExtractSubvector.ll and (partially)
CodeGen/Generic/vector.ll.

llvm-svn: 47384
2008-02-20 17:38:09 +00:00
Dan Gohman 34fc7dbf5b Convert Legalize to use the APInt form of ComputeMaskedBits.
llvm-svn: 47383
2008-02-20 16:57:27 +00:00
Dan Gohman 360c86aed5 Add explicit keywords.
llvm-svn: 47382
2008-02-20 16:44:09 +00:00
Dan Gohman d0ff91dac5 Convert DAGCombiner to use the APInt form of ComputeMaskedBits.
llvm-svn: 47381
2008-02-20 16:33:30 +00:00
Dan Gohman b717fdaa7b Use APInt::intersects.
llvm-svn: 47380
2008-02-20 16:30:17 +00:00
Dan Gohman 4edaff3586 Add an intersects method to APInt, to capture a common idiom.
llvm-svn: 47379
2008-02-20 16:08:11 +00:00
Anton Korobeynikov 581ba34c63 Add documentation for cl::sink stuff
llvm-svn: 47378
2008-02-20 12:38:31 +00:00
Anton Korobeynikov f275a49f7f Add 'sink' cmdline option. Patch by Mikhail Glushenkov!
llvm-svn: 47377
2008-02-20 12:38:07 +00:00
Anton Korobeynikov 5c96f98e5a Regenerate
llvm-svn: 47376
2008-02-20 12:10:37 +00:00
Anton Korobeynikov 18991d78fa Fix newly-introduced 4.3 warnings
llvm-svn: 47375
2008-02-20 12:07:57 +00:00
Anton Korobeynikov ea333124f1 Get rid of hash_map in llvmc
llvm-svn: 47374
2008-02-20 11:28:26 +00:00
Anton Korobeynikov 6f74afea32 Get rid of hash_map. Use StringMap instead
llvm-svn: 47373
2008-02-20 11:27:49 +00:00
Anton Korobeynikov bddf51bc9b And final pack of warnings silencing
llvm-svn: 47372
2008-02-20 11:27:04 +00:00
Anton Korobeynikov 1bfd121321 Make Transforms to be 4.3 warnings-clean
llvm-svn: 47371
2008-02-20 11:26:25 +00:00
Anton Korobeynikov 852e214993 Fix code style
llvm-svn: 47370
2008-02-20 11:24:05 +00:00
Anton Korobeynikov 40d67c59d5 Remove bunch of gcc 4.3-related warnings from Target
llvm-svn: 47369
2008-02-20 11:22:39 +00:00
Anton Korobeynikov 035eaacd1f Update gcc 4.3 warnings fix patch with recent head changes
llvm-svn: 47368
2008-02-20 11:10:28 +00:00
Anton Korobeynikov 579f07135a Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
llvm-svn: 47367
2008-02-20 11:08:44 +00:00
Bill Wendling b912351ec9 Added some comments and reformatted others. No functionality change.
Added two "FIXMEs" for code that looks dubious to me (but I could be
wrong).

llvm-svn: 47366
2008-02-20 09:15:16 +00:00
Bill Wendling 34c09e1a78 Fixed typo.
llvm-svn: 47365
2008-02-20 09:14:09 +00:00
Owen Anderson b4724dbda2 When performing return slot optimization, remember to inform memdep when we're removing the memcpy.
llvm-svn: 47364
2008-02-20 08:23:02 +00:00
Evan Cheng ab5729cfe6 Added memmove to interpreter external functions list. Patch by Daniel Dunbar.
llvm-svn: 47363
2008-02-20 07:55:26 +00:00
Bill Wendling 406fdbd3ad More constification of things. More comments added. No functionality
changes. (Sorry for any formatting changes that creeped in.)

llvm-svn: 47362
2008-02-20 07:36:31 +00:00
Nick Lewycky b0a2f9513f Use getConstant for ConstantInts.
llvm-svn: 47361
2008-02-20 06:58:55 +00:00
Nick Lewycky 1c44ebcf86 Add 'umax' similar to 'smax' SCEV. Closes PR2003.
Parse reversed smax and umax as smin and umin and express them with negative
or binary-not SCEVs (which are really just subtract under the hood).

Parse 'xor %x, -1' as (-1 - %x).

Remove dead code (ConstantInt::get always returns a ConstantInt).

Don't use getIntegerSCEV(-1, Ty). The first value is an int, then it gets
passed into a uint64_t. Instead, create the -1 directly from
ConstantInt::getAllOnesValue().

llvm-svn: 47360
2008-02-20 06:48:22 +00:00
Chris Lattner 2a8037b5f5 Fix an incredibly subtle bug exposed by Ted's change to APInt profiling.
AddNodeIDNode does profiling for a ConstantSDNode, but so does 
SelectionDAG::getConstant.  This profiling should be moved to a common
static function in ConstantSDNode.

llvm-svn: 47359
2008-02-20 06:28:01 +00:00
Bill Wendling 59cc15955f No functionality change:
- Constified some MachineOperand values.
 - Added/Modified some comments.

llvm-svn: 47358
2008-02-20 06:10:21 +00:00
Evan Cheng 0aa9f2a7f3 XFAIL this for now.
llvm-svn: 47355
2008-02-20 02:38:58 +00:00
Evan Cheng 7626ab33d8 Disable for now. This is pessimizing code.
llvm-svn: 47354
2008-02-20 02:29:17 +00:00
Dan Gohman 0fc9f57675 Add some comments to Intrinsic::getDeclaration to clarify how to
get declarations for overloaded intrinsics.

llvm-svn: 47353
2008-02-20 01:07:51 +00:00
Dale Johannesen 11a555e94a Add Alignment field to ParameterAttributes and
treat more or less rationally in interface
functions, subject to change.  No functional change.

llvm-svn: 47352
2008-02-19 23:51:49 +00:00
Evan Cheng 5ce8dd93ef Add hidden option -x86-fold-and-in-test to test the effect the test / and folding change.
llvm-svn: 47351
2008-02-19 23:36:51 +00:00
Devang Patel 8b51bc47a2 regenerate
llvm-svn: 47350
2008-02-19 22:27:01 +00:00
Devang Patel 0dcd198bff Parse
%b = getresult {i32, i32} %a, i32 1

llvm-svn: 47349
2008-02-19 22:26:37 +00:00
Devang Patel 295711f583 Add GetResultInst. First step for multiple return value support.
llvm-svn: 47348
2008-02-19 22:15:16 +00:00
Dale Johannesen 9bbd8ebf78 Generated files for checkin 47342.
llvm-svn: 47344
2008-02-19 21:40:51 +00:00
Dale Johannesen 151e50bf0c Forgot a file, goes with 47342.
llvm-svn: 47343
2008-02-19 21:40:10 +00:00
Dale Johannesen 89268bc6e2 Expand ParameterAttributes to 32 bits (in preparation
for adding alignment info, not there yet).  Clean up
interfaces to reference ParameterAttributes consistently.

llvm-svn: 47342
2008-02-19 21:38:47 +00:00
Ted Kremenek 901540f118 Fixed bug in APInt::Profile() where the BitWidth field was not included in the
profile of the APSInt object. This caused unexpected Profile collisions where
none should have occurred.

llvm-svn: 47338
2008-02-19 20:50:41 +00:00
Andrew Lenharth 4aa9e208fa fix some byval problems in the cbe. Closes PR2065
llvm-svn: 47337
2008-02-19 19:47:54 +00:00
Chris Lattner 90c2df5bd0 random cleanups.
llvm-svn: 47334
2008-02-19 18:49:08 +00:00
Chris Lattner a0b1cc41ef this test requires sse2
llvm-svn: 47331
2008-02-19 18:07:46 +00:00
Chris Lattner 97b9662f78 Don't fold and's into test instructions if they have multiple uses.
This compiles test-nofold.ll into:

_test:
	movl	$15, %ecx
	andl	4(%esp), %ecx
	testl	%ecx, %ecx
	movl	$42, %eax
	cmove	%ecx, %eax
	ret

instead of:
_test:
	movl	4(%esp), %eax
	movl	%eax, %ecx
	andl	$15, %ecx
	testl	$15, %eax
	movl	$42, %eax
	cmove	%ecx, %eax
	ret

llvm-svn: 47330
2008-02-19 17:37:35 +00:00
Chris Lattner 08162d9515 rename tests to avoid a test- prefix when they aren't related to the test instruction.
llvm-svn: 47329
2008-02-19 17:33:52 +00:00
Duncan Sands eec73618af Fix a compiler warning.
llvm-svn: 47328
2008-02-19 09:28:48 +00:00
Tanya Lattner a99d8b5a9a Remove llvm-upgrade and update tests.
llvm-svn: 47325
2008-02-19 08:07:33 +00:00
Chris Lattner a00c808d40 dead pass
llvm-svn: 47324
2008-02-19 07:58:11 +00:00
Chris Lattner c3591a0d48 remove the LowerSelect pass. The last client was the old Sparc backend, which is long dead by now.
llvm-svn: 47323
2008-02-19 07:49:17 +00:00
Chris Lattner 032fb2eda9 remove the lower packed pass. It can never work and even the parts that
could work don't work fully.  This fixes PR1705.  Oh yeah, we don't have
packed types anymore either ;-)

llvm-svn: 47322
2008-02-19 07:39:17 +00:00
Owen Anderson e92e303582 Refactor this method a bit, and correct a test that was completely wrong but happened to work out anyways. :-)
llvm-svn: 47321
2008-02-19 07:07:51 +00:00
Chris Lattner f7b7ba9c5a isa+cast -> dyncast.
llvm-svn: 47320
2008-02-19 06:53:20 +00:00
Chris Lattner c130e3afc4 simplify this code again, try 2 :)
llvm-svn: 47319
2008-02-19 06:52:38 +00:00
Owen Anderson e71d6e37b2 Fix a comment.
llvm-svn: 47318
2008-02-19 06:51:23 +00:00
Owen Anderson d2d7c6b309 In addition to arguments passed to it, memcpy (and all other calls) can ModRef pointers that alias their arguments as well. This fixes PR2057.
llvm-svn: 47317
2008-02-19 06:47:18 +00:00
Owen Anderson 806cbde53b Major improvements to yesterday's return slot optimization. Remove some unneccessary constraints,
and add some others that should have been in from the first place.  Document the whole thing better.

llvm-svn: 47315
2008-02-19 06:35:43 +00:00
Chris Lattner b4c6cc9587 Fix some minor issues folding undef, PR2052
llvm-svn: 47314
2008-02-19 06:22:12 +00:00
Chris Lattner 0fe6bce9ce fdiv/frem of undef can produce undef, because the undef operand
can be a SNaN.  We could be more aggressive and turn this into 
unreachable, but that is less nice, and not really worth it.

llvm-svn: 47313
2008-02-19 06:12:18 +00:00
Chris Lattner 5f9f34d070 regenerate
llvm-svn: 47312
2008-02-19 04:36:25 +00:00
Chris Lattner 95816b9dee Fix PR2060 by rejecting invalid types for integer constants.
llvm-svn: 47311
2008-02-19 04:36:07 +00:00
Owen Anderson c0c3cd8e27 Factor the profitability check for return slot optimization out into a static function.
At some point in the future, this check will become smarter.

llvm-svn: 47310
2008-02-19 03:27:34 +00:00
Owen Anderson 551b8eeb5c An sret parameter is required to be the first parameter, so there's no need to loop
over all the parameters of the callee looking for it.

llvm-svn: 47309
2008-02-19 03:15:29 +00:00
Nick Lewycky 0e2e21b8b9 Don't spew stats to stderr.
llvm-svn: 47308
2008-02-19 03:11:47 +00:00
Owen Anderson 336824f102 Cleanup some of my patches from yesterday. Refactor the check for which xform
to apply to a memcpy into processInstruction.  Also, fix a bug in the check due to
missing braces.

llvm-svn: 47307
2008-02-19 03:09:45 +00:00
Nick Lewycky b54a803a2e Fix up the run line for this new test.
llc: for the -info-output-file option:  requires a value!

llvm-svn: 47306
2008-02-19 02:58:36 +00:00
Owen Anderson ffca8e99b2 Fix Transforms/GVN/memcpy.ll, which Chris broke in r47275 by reordering the branches. memcpy's are a kind of CallInst.
llvm-svn: 47305
2008-02-19 02:53:23 +00:00
Evan Cheng 634a8f9275 New test.
llvm-svn: 47302
2008-02-19 02:09:58 +00:00
Evan Cheng 3266ff9a6f PR1909: Tail merging pass ran wild. It makes no sense to merge blocks in order to save a single instruction since a branch will be inserted for each BB.
llvm-svn: 47301
2008-02-19 02:09:37 +00:00
Evan Cheng 3b56f506e7 Me not like duplicated comments.
llvm-svn: 47300
2008-02-19 02:05:16 +00:00
Tanya Lattner e1d2df0738 Remove llvm-upgrade and update tests.
llvm-svn: 47297
2008-02-19 01:44:26 +00:00
Tanya Lattner 3f04773f78 Remove llvm-upgrade and update tests.
llvm-svn: 47296
2008-02-19 01:41:04 +00:00
Evan Cheng 6200c225e0 - When DAG combiner is folding a bit convert into a BUILD_VECTOR, it should check if it's essentially a SCALAR_TO_VECTOR. Avoid turning (v8i16) <10, u, u, u> to <10, 0, u, u, u, u, u, u>. Instead, simply convert it to a SCALAR_TO_VECTOR of the proper type.
- X86 now normalize SCALAR_TO_VECTOR to (BIT_CONVERT (v4i32 SCALAR_TO_VECTOR)). Get rid of X86ISD::S2VEC.

llvm-svn: 47290
2008-02-18 23:04:32 +00:00
Nick Lewycky fefd0202c9 Correctly fold divide-by-constant, even when faced with overflow.
llvm-svn: 47287
2008-02-18 22:48:05 +00:00
Dan Gohman c589243107 Chris pointed out that it's not necessary to set i64 MUL to Expand
on x86-32 since i64 itself is not a Legal type. And, update some
comments.

llvm-svn: 47282
2008-02-18 19:34:53 +00:00
Evan Cheng b2e4b7adde - Remove the previous check which broke coalescer-commute3.ll
- For now, conservatively ignore copy MI whose source is a physical register. Commuting its def MI can cause a physical register live interval to be live through a loop (since we know it's live coming into the def MI).

llvm-svn: 47281
2008-02-18 18:56:31 +00:00
Chris Lattner 6bb6a55f01 upgrade some tests.
llvm-svn: 47280
2008-02-18 18:46:39 +00:00