oota-llvm.git
16 years agoFirst small tests for llvmc2.
Mikhail Glushenkov [Tue, 6 May 2008 17:24:54 +0000 (17:24 +0000)]
First small tests for llvmc2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50734 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReturn const char* instead of std::string in Tool classes
Mikhail Glushenkov [Tue, 6 May 2008 17:24:26 +0000 (17:24 +0000)]
Return const char* instead of std::string in Tool classes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50733 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd an ability to choose between different edges based on edge properties.
Mikhail Glushenkov [Tue, 6 May 2008 17:23:50 +0000 (17:23 +0000)]
Add an ability to choose between different edges based on edge properties.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50732 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRefactoring: extract method.
Mikhail Glushenkov [Tue, 6 May 2008 17:23:14 +0000 (17:23 +0000)]
Refactoring: extract method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50731 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd new edge properties: parameter_equals, element_in_list, and.
Mikhail Glushenkov [Tue, 6 May 2008 17:22:47 +0000 (17:22 +0000)]
Add new edge properties: parameter_equals, element_in_list, and.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50730 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplemented switch_on edge property.
Mikhail Glushenkov [Tue, 6 May 2008 17:22:03 +0000 (17:22 +0000)]
Implemented switch_on edge property.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50729 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCosmetic change: if( -> if (
Mikhail Glushenkov [Tue, 6 May 2008 16:37:33 +0000 (16:37 +0000)]
Cosmetic change: if( -> if (

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50728 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove ExampleWithOpt.td: this file was merged with Example.td.
Mikhail Glushenkov [Tue, 6 May 2008 16:37:12 +0000 (16:37 +0000)]
Remove ExampleWithOpt.td: this file was merged with Example.td.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50727 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore work on edge properties. Use Edge classes instead of strings in CompilationGraph.
Mikhail Glushenkov [Tue, 6 May 2008 16:36:50 +0000 (16:36 +0000)]
More work on edge properties. Use Edge classes instead of strings in CompilationGraph.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50726 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoOngoing work: add an edge typechecker, rudimentary support for edge properties.
Mikhail Glushenkov [Tue, 6 May 2008 16:36:06 +0000 (16:36 +0000)]
Ongoing work: add an edge typechecker, rudimentary support for edge properties.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50725 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoConvert internal representation to use DAG. This gives us more flexibility and enable...
Mikhail Glushenkov [Tue, 6 May 2008 16:35:25 +0000 (16:35 +0000)]
Convert internal representation to use DAG. This gives us more flexibility and enables future improvements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50724 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSmall const-correctness fix
Mikhail Glushenkov [Tue, 6 May 2008 16:34:39 +0000 (16:34 +0000)]
Small const-correctness fix

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50723 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCode reorg
Mikhail Glushenkov [Tue, 6 May 2008 16:34:12 +0000 (16:34 +0000)]
Code reorg

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50722 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTestcase for PR2292.
Duncan Sands [Tue, 6 May 2008 14:56:40 +0000 (14:56 +0000)]
Testcase for PR2292.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50718 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove tar ball from installed directory.
Bill Wendling [Tue, 6 May 2008 08:33:07 +0000 (08:33 +0000)]
Remove tar ball from installed directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50717 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR2287. Darwin passes mmx values in register in 64-mode, not Linux.
Evan Cheng [Tue, 6 May 2008 07:23:50 +0000 (07:23 +0000)]
Fix PR2287. Darwin passes mmx values in register in 64-mode, not Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50716 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix typo.
Devang Patel [Tue, 6 May 2008 05:40:11 +0000 (05:40 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50713 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix typo and indentation.
Nick Lewycky [Tue, 6 May 2008 04:03:18 +0000 (04:03 +0000)]
Fix typo and indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50706 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix renamePathOnDisk on Win32, patch from David Leon. This fixes problems with
Nick Lewycky [Tue, 6 May 2008 03:42:21 +0000 (03:42 +0000)]
Fix renamePathOnDisk on Win32, patch from David Leon. This fixes problems with
llvm-ar being unable to rename files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50702 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix typo Duncan noticed
Chris Lattner [Tue, 6 May 2008 02:31:18 +0000 (02:31 +0000)]
fix typo Duncan noticed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50699 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMatch things like 'armv5tejl-unknown-linux-gnu' for PR2290
Chris Lattner [Tue, 6 May 2008 02:29:28 +0000 (02:29 +0000)]
Match things like 'armv5tejl-unknown-linux-gnu' for PR2290

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50698 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake several variable declarations static.
Dan Gohman [Tue, 6 May 2008 01:53:16 +0000 (01:53 +0000)]
Make several variable declarations static.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50696 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove uses of llvm/System/IncludeFile.h that are no longer needed.
Dan Gohman [Tue, 6 May 2008 01:32:53 +0000 (01:32 +0000)]
Remove uses of llvm/System/IncludeFile.h that are no longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50695 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInstead of enumerating each opcode that isn't handled that
Dan Gohman [Tue, 6 May 2008 00:53:29 +0000 (00:53 +0000)]
Instead of enumerating each opcode that isn't handled that
ComputeMaskedBits handles, just use a 'default:'. This avoids
TargetLowering's list getting out of date with SelectionDAG's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50693 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCorrect the value of LowBits in srem and urem handling in
Dan Gohman [Tue, 6 May 2008 00:51:48 +0000 (00:51 +0000)]
Correct the value of LowBits in srem and urem handling in
ComputeMaskedBits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50692 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a broken doxygen comment, and reword it for clarity.
Dan Gohman [Tue, 6 May 2008 00:20:10 +0000 (00:20 +0000)]
Fix a broken doxygen comment, and reword it for clarity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50687 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEnable dead loop elimination.
Owen Anderson [Mon, 5 May 2008 23:38:07 +0000 (23:38 +0000)]
Enable dead loop elimination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50682 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a micro optzn.
Chris Lattner [Mon, 5 May 2008 23:19:45 +0000 (23:19 +0000)]
add a micro optzn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50681 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImproved generated code for atomic operators
Mon P Wang [Mon, 5 May 2008 22:56:23 +0000 (22:56 +0000)]
Improved generated code for atomic operators

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50677 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCode clean up. No functionality change.
Evan Cheng [Mon, 5 May 2008 22:12:23 +0000 (22:12 +0000)]
Code clean up. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50675 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix: Some classes were derived from a class in an anonymous namespace, but they
Bill Wendling [Mon, 5 May 2008 21:37:59 +0000 (21:37 +0000)]
Fix: Some classes were derived from a class in an anonymous namespace, but they
themselves weren't in the anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50673 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUsing "unsigned" was masking the "size_t" version of this method.
Bill Wendling [Mon, 5 May 2008 20:51:58 +0000 (20:51 +0000)]
Using "unsigned" was masking the "size_t" version of this method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50668 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a crash when threading a block that includes a MRV call result.
Chris Lattner [Mon, 5 May 2008 20:21:22 +0000 (20:21 +0000)]
Fix a crash when threading a block that includes a MRV call result.
DemoteRegToStack doesn't work with MRVs yet, because it relies on the
ability to load/store things.

This fixes PR2285.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50667 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove unused function.
Devang Patel [Mon, 5 May 2008 19:44:16 +0000 (19:44 +0000)]
Remove unused function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50664 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded addition atomic instrinsics and, or, xor, min, and max.
Mon P Wang [Mon, 5 May 2008 19:05:59 +0000 (19:05 +0000)]
Added addition atomic instrinsics and, or, xor, min, and max.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50663 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix IsLinux being uninitialized on non-Linux targets.
Dan Gohman [Mon, 5 May 2008 18:43:07 +0000 (18:43 +0000)]
Fix IsLinux being uninitialized on non-Linux targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50660 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix more -Wshorten-64-to-32 warnings.
Evan Cheng [Mon, 5 May 2008 18:30:58 +0000 (18:30 +0000)]
Fix more -Wshorten-64-to-32 warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agono need for eh info
Chris Lattner [Mon, 5 May 2008 18:24:33 +0000 (18:24 +0000)]
no need for eh info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50658 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix 80 column violations.
Evan Cheng [Mon, 5 May 2008 17:41:03 +0000 (17:41 +0000)]
Fix 80 column violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50655 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix 80col violation
Anton Korobeynikov [Mon, 5 May 2008 17:08:59 +0000 (17:08 +0000)]
Fix 80col violation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50654 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a bug in the ELF writer that caused it to produce malformed
Dan Gohman [Mon, 5 May 2008 16:48:32 +0000 (16:48 +0000)]
Fix a bug in the ELF writer that caused it to produce malformed
ELF headers. The ELF writer still isn't generally usable though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50652 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse a dedicated IsLinux flag instead of an ELFLinux TargetType.
Dan Gohman [Mon, 5 May 2008 16:11:31 +0000 (16:11 +0000)]
Use a dedicated IsLinux flag instead of an ELFLinux TargetType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50649 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd AsmPrinter support for emitting a directive to declare that
Dan Gohman [Mon, 5 May 2008 00:28:39 +0000 (00:28 +0000)]
Add AsmPrinter support for emitting a directive to declare that
the code being generated does not require an executable stack.

Also, add target-specific code to make use of this on Linux
on x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50634 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd General Dynamic TLS model for X86-64. Some parts looks really ugly (look for...
Anton Korobeynikov [Sun, 4 May 2008 21:36:32 +0000 (21:36 +0000)]
Add General Dynamic TLS model for X86-64. Some parts looks really ugly (look for tlsaddr pattern),
but should work. Work is in progress, more models will follow

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50630 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR1098 by correcting the postdominators analysis.
Owen Anderson [Sun, 4 May 2008 21:07:35 +0000 (21:07 +0000)]
Fix PR1098 by correcting the postdominators analysis.

Patch by Florian Brandner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50628 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove obsolete method.
Chris Lattner [Sun, 4 May 2008 18:14:55 +0000 (18:14 +0000)]
remove obsolete method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50622 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoregenerate
Chris Lattner [Sun, 4 May 2008 17:18:47 +0000 (17:18 +0000)]
regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50621 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse (void) instead of () in C code.
Gordon Henriksen [Sun, 4 May 2008 12:55:34 +0000 (12:55 +0000)]
Use (void) instead of () in C code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50620 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSelect vector shift with non-immediate i32 shift amount operand by first moving the...
Evan Cheng [Sun, 4 May 2008 09:15:50 +0000 (09:15 +0000)]
Select vector shift with non-immediate i32 shift amount operand by first moving the operand into the right register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50619 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoprocessStore may delete the instruction, avoid
Torok Edwin [Sun, 4 May 2008 08:51:25 +0000 (08:51 +0000)]
processStore may delete the instruction, avoid
using dyn_cast<> on already freed memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50618 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove entries from here also
Anton Korobeynikov [Sun, 4 May 2008 06:23:44 +0000 (06:23 +0000)]
Remove entries from here also

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50616 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDrop llvmc also, it will be replaced by shiny new llvmc2
Anton Korobeynikov [Sun, 4 May 2008 06:19:55 +0000 (06:19 +0000)]
Drop llvmc also, it will be replaced by shiny new llvmc2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50615 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDrop llvm2cpp, it's now a llc target
Anton Korobeynikov [Sun, 4 May 2008 06:16:50 +0000 (06:16 +0000)]
Drop llvm2cpp, it's now a llc target

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50614 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement destructor for PostDominatorTree to eliminate a memory leak.
Torok Edwin [Sat, 3 May 2008 20:25:26 +0000 (20:25 +0000)]
Implement destructor for PostDominatorTree to eliminate a memory leak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50607 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle multiple return values.
Devang Patel [Sat, 3 May 2008 01:12:15 +0000 (01:12 +0000)]
Handle multiple return values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50604 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement operator-> for ImmutableMap iterators.
Ted Kremenek [Sat, 3 May 2008 01:05:46 +0000 (01:05 +0000)]
Implement operator-> for ImmutableMap iterators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50603 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd separate intrinsics for MMX / SSE shifts with i32 integer operands. This allow...
Evan Cheng [Sat, 3 May 2008 00:52:09 +0000 (00:52 +0000)]
Add separate intrinsics for MMX / SSE shifts with i32 integer operands. This allow us to simplify the horribly complicated matching code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50601 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDo not sink getresult.
Devang Patel [Sat, 3 May 2008 00:36:30 +0000 (00:36 +0000)]
Do not sink getresult.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50600 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd assert.
Devang Patel [Fri, 2 May 2008 22:13:33 +0000 (22:13 +0000)]
Add assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50596 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoverify builtin optimization works like gcc.
Chris Lattner [Fri, 2 May 2008 22:07:34 +0000 (22:07 +0000)]
verify builtin optimization works like gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50594 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomove libcalls to the same place llvm-gcc has it.
Chris Lattner [Fri, 2 May 2008 22:05:06 +0000 (22:05 +0000)]
move libcalls to the same place llvm-gcc has it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50593 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a mistake in the computation of leading zeros for udiv.
Dan Gohman [Fri, 2 May 2008 21:30:02 +0000 (21:30 +0000)]
Fix a mistake in the computation of leading zeros for udiv.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50591 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSuppress -Wshorten-64-to-32 warnings for 64-bit hosts.
Evan Cheng [Fri, 2 May 2008 21:15:08 +0000 (21:15 +0000)]
Suppress -Wshorten-64-to-32 warnings for 64-bit hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50590 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agostrength reduce exp2 into ldexp, rdar://5852514
Chris Lattner [Fri, 2 May 2008 18:43:35 +0000 (18:43 +0000)]
strength reduce exp2 into ldexp, rdar://5852514

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50586 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a FIXME so we remember to eventually remove this code.
Chris Lattner [Fri, 2 May 2008 17:18:31 +0000 (17:18 +0000)]
add a FIXME so we remember to eventually remove this code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50582 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUndo r50574. We are already ensuring the folded load address is 16-byte aligned.
Evan Cheng [Fri, 2 May 2008 17:01:01 +0000 (17:01 +0000)]
Undo r50574. We are already ensuring the folded load address is 16-byte aligned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50578 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agospecify an arch for non-x86 hosts.
Chris Lattner [Fri, 2 May 2008 15:11:58 +0000 (15:11 +0000)]
specify an arch for non-x86 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50576 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago80 column violation.
Evan Cheng [Fri, 2 May 2008 07:53:32 +0000 (07:53 +0000)]
80 column violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50575 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNot safe folding a load + FsXORPSrr into FsXORPSrm. It's loading a FR64 value but...
Evan Cheng [Fri, 2 May 2008 07:50:58 +0000 (07:50 +0000)]
Not safe folding a load + FsXORPSrr into FsXORPSrm. It's loading a FR64 value but the load folding variant expects a 16-byte aligned address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50574 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPorting r50563 from Tak to mainline.
Bill Wendling [Fri, 2 May 2008 00:43:20 +0000 (00:43 +0000)]
Porting r50563 from Tak to mainline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50564 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a typo in a comment.
Dan Gohman [Fri, 2 May 2008 00:05:03 +0000 (00:05 +0000)]
Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50562 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse push_back(...) instead of resize(1, ...), per review feedback.
Dan Gohman [Fri, 2 May 2008 00:03:54 +0000 (00:03 +0000)]
Use push_back(...) instead of resize(1, ...), per review feedback.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50561 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate old-style syntax in some "not grep" tests.
Dan Gohman [Thu, 1 May 2008 23:50:07 +0000 (23:50 +0000)]
Update old-style syntax in some "not grep" tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50560 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix uninitialized uses of the FPC variable.
Dan Gohman [Thu, 1 May 2008 23:40:44 +0000 (23:40 +0000)]
Fix uninitialized uses of the FPC variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50558 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNew test for bug fixed in 50545.
Dale Johannesen [Thu, 1 May 2008 22:50:14 +0000 (22:50 +0000)]
New test for bug fixed in 50545.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50548 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't try to create PHIs of struct types. Fallout
Dale Johannesen [Thu, 1 May 2008 22:27:44 +0000 (22:27 +0000)]
Don't try to create PHIs of struct types.  Fallout
from x86-64 calling convention work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50545 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix an overaggressive SimplifyDemandedBits optimization on urem. This
Dan Gohman [Thu, 1 May 2008 19:13:24 +0000 (19:13 +0000)]
Fix an overaggressive SimplifyDemandedBits optimization on urem. This
fixes the 254.gap regression on x86 and the 403.gcc regression on x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50537 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdding testcase.
Bill Wendling [Thu, 1 May 2008 18:41:09 +0000 (18:41 +0000)]
Adding testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50536 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInitialize a local variable.
Ted Kremenek [Thu, 1 May 2008 17:08:00 +0000 (17:08 +0000)]
Initialize a local variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50527 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agodon't randomly miscompile seto/setuo just because we are in
Chris Lattner [Thu, 1 May 2008 07:26:11 +0000 (07:26 +0000)]
don't randomly miscompile seto/setuo just because we are in
ffastmath mode.  This fixes rdar://5902801, a miscompilation
of gcc.dg/builtins-8.c.

Bill, please pull this into Tak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50523 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago1) add '-debug' output
Chris Lattner [Thu, 1 May 2008 06:39:12 +0000 (06:39 +0000)]
1) add '-debug' output
2) Return NULL instead of false in several places for tidiness.
3) fix a bug optimizing  sprintf(p, "%c", x)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50521 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDelete the IPO simplify-libcalls and completely reimplement it as
Chris Lattner [Thu, 1 May 2008 06:25:24 +0000 (06:25 +0000)]
Delete the IPO simplify-libcalls and completely reimplement it as
a FunctionPass.  This makes it simpler, fixes dozens of bugs, adds
a couple of minor features, and shrinks is considerably: from
2214 to 1437 lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50520 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix typo
Chris Lattner [Thu, 1 May 2008 06:16:48 +0000 (06:16 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50519 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoinstcombine does memset optzns.
Chris Lattner [Thu, 1 May 2008 06:16:38 +0000 (06:16 +0000)]
instcombine does memset optzns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50518 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplifylibcalls doesn't optimize llvm.memmove, instcombine does.
Chris Lattner [Thu, 1 May 2008 06:14:24 +0000 (06:14 +0000)]
simplifylibcalls doesn't optimize llvm.memmove, instcombine does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50517 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomove some tests from libcall optimizer suite.
Chris Lattner [Thu, 1 May 2008 06:13:48 +0000 (06:13 +0000)]
move some tests from libcall optimizer suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50516 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd CreateCall3/CreateCall4 at Eric's request.
Chris Lattner [Thu, 1 May 2008 05:23:45 +0000 (05:23 +0000)]
Add CreateCall3/CreateCall4 at Eric's request.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50515 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a spiffy little "CreateCall2" method, which can be used to make
Chris Lattner [Thu, 1 May 2008 05:11:00 +0000 (05:11 +0000)]
Add a spiffy little "CreateCall2" method, which can be used to make
a function call that takes two Value*'s as arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50514 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix a bug in my previous patch, a classic =/== bug.
Chris Lattner [Wed, 30 Apr 2008 15:27:09 +0000 (15:27 +0000)]
fix a bug in my previous patch, a classic =/== bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50483 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReally commit the test checking the argument lowering behaviour on x86-64 :).
Arnold Schwaighofer [Wed, 30 Apr 2008 09:19:47 +0000 (09:19 +0000)]
Really commit the test checking the argument lowering behaviour on x86-64 :).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50478 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTail call optimization improvements:
Arnold Schwaighofer [Wed, 30 Apr 2008 09:16:33 +0000 (09:16 +0000)]
Tail call optimization improvements:

Move platform independent code (lowering of possibly overwritten
arguments, check for tail call optimization eligibility) from
target X86ISelectionLowering.cpp to TargetLowering.h and
SelectionDAGISel.cpp.

Initial PowerPC tail call implementation:

Support ppc32 implemented and tested (passes my tests and
test-suite llvm-test).
Support ppc64 implemented and half tested (passes my tests).
On ppc tail call optimization is performed if
  caller and callee are fastcc
  call is a tail call (in tail call position, call followed by ret)
  no variable argument lists or byval arguments
  option -tailcallopt is enabled
Supported:
 * non pic tail calls on linux/darwin
 * module-local tail calls on linux(PIC/GOT)/darwin(PIC)
 * inter-module tail calls on darwin(PIC)
If constraints are not met a normal call will be emitted.

A test checking the argument lowering behaviour on x86-64 was added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50477 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoset ignore property
Gabor Greif [Wed, 30 Apr 2008 08:59:22 +0000 (08:59 +0000)]
set ignore property

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50476 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofcntl.h is pretty standard on unix (without the sys/)
Gabor Greif [Wed, 30 Apr 2008 08:53:22 +0000 (08:53 +0000)]
fcntl.h is pretty standard on unix (without the sys/)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50475 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove this test to LoopDeletion, where it now passes.
Owen Anderson [Wed, 30 Apr 2008 07:17:22 +0000 (07:17 +0000)]
Move this test to LoopDeletion, where it now passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50474 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThis condition got inverted accidentally.
Owen Anderson [Wed, 30 Apr 2008 07:16:33 +0000 (07:16 +0000)]
This condition got inverted accidentally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50473 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomove lowering of llvm.memset -> store from simplify libcalls
Chris Lattner [Wed, 30 Apr 2008 06:39:11 +0000 (06:39 +0000)]
move lowering of llvm.memset -> store from simplify libcalls
to instcombine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50472 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agono reason for simplifylibcalls to simplify intrinsics, instcombine does
Chris Lattner [Wed, 30 Apr 2008 06:12:15 +0000 (06:12 +0000)]
no reason for simplifylibcalls to simplify intrinsics, instcombine does
a fine job.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50470 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove redundant check.
Chris Lattner [Wed, 30 Apr 2008 06:06:37 +0000 (06:06 +0000)]
remove redundant check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50469 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd missing #include
Chris Lattner [Wed, 30 Apr 2008 04:56:14 +0000 (04:56 +0000)]
add missing #include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50468 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a method for comparing to see if a value has a specified name.
Chris Lattner [Wed, 30 Apr 2008 03:55:40 +0000 (03:55 +0000)]
add a method for comparing to see if a value has a specified name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50465 91177308-0d34-0410-b5e6-96231b3b80d8