oota-llvm.git
16 years agoAdded configure switches for PIC16 backend.
Sanjiv Gupta [Tue, 13 May 2008 17:37:32 +0000 (17:37 +0000)]
Added configure switches for PIC16 backend.

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

16 years ago- Don't treat anyext 16-bit load as a 32-bit load if it's volatile.
Evan Cheng [Tue, 13 May 2008 16:45:56 +0000 (16:45 +0000)]
- Don't treat anyext 16-bit load as a 32-bit load if it's volatile.
- Correct a pasto.

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

16 years agoAdd thin layer over StringMap to form StringSet. By Mikhail Glushenkov.
Anton Korobeynikov [Tue, 13 May 2008 15:03:16 +0000 (15:03 +0000)]
Add thin layer over StringMap to form StringSet. By Mikhail Glushenkov.

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

16 years agoMake the non-local CSE safety checks slightly more thorough.
Owen Anderson [Tue, 13 May 2008 13:41:23 +0000 (13:41 +0000)]
Make the non-local CSE safety checks slightly more thorough.

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

16 years agoAdding files for Microchip's PIC16 target.
Sanjiv Gupta [Tue, 13 May 2008 09:02:57 +0000 (09:02 +0000)]
Adding files for Microchip's PIC16 target.

A brief description about PIC16:
===============================
PIC16 is an 8-bit microcontroller with only one 8-bit register which is the
accumulator. All arithmetic/load/store operations are 8-bit only.
The architecture has two address spaces: program and data. The program memory
is divided into 2K pages and the data memory is divided into banks of 128 byte, with only 80 usable bytes, resulting in an non-contiguous data memory.

It supports direct data memory access (by specifying the address as part of the instruction) and indirect data and program memory access (in an unorthodox fashion which utilize a 16 bit pointer register).

Two classes of registers exist: (8-bit class which is only one
accumulator) (16-bit class, which contains one or more 16 bit
pointer(s))

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

16 years agoInstead of a vector load, shuffle and then extract an element. Load the element from...
Evan Cheng [Tue, 13 May 2008 08:35:03 +0000 (08:35 +0000)]
Instead of a vector load, shuffle and then extract an element. Load the element from address with an offset.
        pshufd $1, (%rdi), %xmm0
        movd %xmm0, %eax
=>
        movl 4(%rdi), %eax

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

16 years agoAdd a testcase for non-local CSE of read-only calls.
Owen Anderson [Tue, 13 May 2008 08:17:44 +0000 (08:17 +0000)]
Add a testcase for non-local CSE of read-only calls.

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

16 years agoAdd support for non-local CSE of read-only calls.
Owen Anderson [Tue, 13 May 2008 08:17:22 +0000 (08:17 +0000)]
Add support for non-local CSE of read-only calls.

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

16 years agoDerive GetResultInst from UnaryInstruction, this simplifies code and removes a FIXME.
Gabor Greif [Tue, 13 May 2008 07:09:08 +0000 (07:09 +0000)]
Derive GetResultInst from UnaryInstruction, this simplifies code and removes a FIXME.

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

16 years agoChange class' public PassInfo variables to by initialized with the
Dan Gohman [Tue, 13 May 2008 02:05:11 +0000 (02:05 +0000)]
Change class' public PassInfo variables to by initialized with the
address of the PassInfo directly instead of calling getPassInfo.
This eliminates a bunch of dynamic initializations of static data.

Also, fold RegisterPassBase into PassInfo, make a bunch of its
data members const, and rearrange some code to initialize data
members in constructors instead of using setter member functions.

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

16 years ago80 col / tabs fixes
Nate Begeman [Tue, 13 May 2008 01:48:26 +0000 (01:48 +0000)]
80 col / tabs fixes

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

16 years agoFix and encoding error in the psrad xmm, imm8 instruction.
Nate Begeman [Tue, 13 May 2008 01:47:52 +0000 (01:47 +0000)]
Fix and encoding error in the psrad xmm, imm8 instruction.

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

16 years agoOn x86, it's safe to treat i32 load anyext as a normal i32 load. Ditto for i8 anyext...
Evan Cheng [Tue, 13 May 2008 00:54:02 +0000 (00:54 +0000)]
On x86, it's safe to treat i32 load anyext as a normal i32 load. Ditto for i8 anyext load to i16.

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

16 years agoClean up the use of static and anonymous namespaces. This turned up
Dan Gohman [Tue, 13 May 2008 00:00:25 +0000 (00:00 +0000)]
Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.

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

16 years agoInitial documentation for first-class aggregates changes.
Dan Gohman [Mon, 12 May 2008 23:51:09 +0000 (23:51 +0000)]
Initial documentation for first-class aggregates changes.

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

16 years agoFix a malformed %gt;
Dan Gohman [Mon, 12 May 2008 23:38:42 +0000 (23:38 +0000)]
Fix a malformed %gt;

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

16 years agoTeach Legalize how to scalarize VSETCC
Nate Begeman [Mon, 12 May 2008 23:09:43 +0000 (23:09 +0000)]
Teach Legalize how to scalarize VSETCC
Teach X86 a few more vsetcc patterns.  Custom lowering for unsupported ones is next.

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

16 years agoXform bitconvert(build_pair(load a, load b)) to a single load if the load locations...
Evan Cheng [Mon, 12 May 2008 23:04:07 +0000 (23:04 +0000)]
Xform bitconvert(build_pair(load a, load b)) to a single load if the load locations are at the right offset from each other.

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

16 years agoNew test for tail merging
Dale Johannesen [Mon, 12 May 2008 22:59:44 +0000 (22:59 +0000)]
New test for tail merging

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

16 years agoBe more aggressive about tail-merging small blocks
Dale Johannesen [Mon, 12 May 2008 22:53:12 +0000 (22:53 +0000)]
Be more aggressive about tail-merging small blocks
if those blocks consist entirely of common instructions;
merging will not add an extra branch in this case.

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

16 years agoConstify isSourceDefinedByImplicitDef function. Otherwise, just formatting
Bill Wendling [Mon, 12 May 2008 22:15:05 +0000 (22:15 +0000)]
Constify isSourceDefinedByImplicitDef function. Otherwise, just formatting
changes that don't change functionality.

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

16 years agoConstify the machine instruction passed into the
Bill Wendling [Mon, 12 May 2008 20:54:26 +0000 (20:54 +0000)]
Constify the machine instruction passed into the
"is{Trivially,Really}ReMaterializable" methods.

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

16 years agoInitial X86 codegen support for VSETCC.
Nate Begeman [Mon, 12 May 2008 20:34:32 +0000 (20:34 +0000)]
Initial X86 codegen support for VSETCC.

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

16 years agoFurther rework of tail merge algorithm. Not quite
Dale Johannesen [Mon, 12 May 2008 20:33:57 +0000 (20:33 +0000)]
Further rework of tail merge algorithm.  Not quite
semantically identical, but little difference in
either results or execution speed; but it's much
easier to read, at least IMO.

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

16 years agoSimplify some checks
Nate Begeman [Mon, 12 May 2008 20:33:52 +0000 (20:33 +0000)]
Simplify some checks

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

16 years agoFix a copy+paste bug; pseudo-instructions shouldn't have
Dan Gohman [Mon, 12 May 2008 20:22:45 +0000 (20:22 +0000)]
Fix a copy+paste bug; pseudo-instructions shouldn't have
encoding information.

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

16 years agoPointer comparisons should use icmp, not vicmp
Nate Begeman [Mon, 12 May 2008 20:16:55 +0000 (20:16 +0000)]
Pointer comparisons should use icmp, not vicmp

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

16 years agoGo back to passing the analyses around as parameters.
Owen Anderson [Mon, 12 May 2008 20:15:55 +0000 (20:15 +0000)]
Go back to passing the analyses around as parameters.

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

16 years agoPointer comparisons should be handled by icmp, not vicmp :)
Nate Begeman [Mon, 12 May 2008 20:11:05 +0000 (20:11 +0000)]
Pointer comparisons should be handled by icmp, not vicmp :)

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

16 years agoForgot this.
Evan Cheng [Mon, 12 May 2008 20:08:05 +0000 (20:08 +0000)]
Forgot this.

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

16 years agoHard code CmpInst back to i1 for now while I go track down what in the bitcode reader...
Nate Begeman [Mon, 12 May 2008 20:01:56 +0000 (20:01 +0000)]
Hard code CmpInst back to i1 for now while I go track down what in the bitcode reader/writer is assuming i1
This was breaking a bunch of tests

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

16 years agoRefactor isConsecutiveLoad from X86 to TargetLowering so DAG combiner can make use...
Evan Cheng [Mon, 12 May 2008 19:56:52 +0000 (19:56 +0000)]
Refactor isConsecutiveLoad from X86 to TargetLowering so DAG combiner can make use of it.

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

16 years agoRevert the previous commit. Go ahead and hoist rematerializable instructions.
Bill Wendling [Mon, 12 May 2008 19:47:18 +0000 (19:47 +0000)]
Revert the previous commit. Go ahead and hoist rematerializable instructions.

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

16 years agoAdd support for vicmp/vfcmp codegen, more legalize support coming.
Nate Begeman [Mon, 12 May 2008 19:40:03 +0000 (19:40 +0000)]
Add support for vicmp/vfcmp codegen, more legalize support coming.
This is necessary to unbreak the build.

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

16 years agoOne real change - don't hoist something that's trivially rematerializable. It's
Bill Wendling [Mon, 12 May 2008 19:38:32 +0000 (19:38 +0000)]
One real change - don't hoist something that's trivially rematerializable. It's
possible for it to produce worse code than before.

The rest of this patch is code cleanup.

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

16 years agoFix build breakage
Nate Begeman [Mon, 12 May 2008 19:23:22 +0000 (19:23 +0000)]
Fix build breakage

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

16 years agoAdd two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
Nate Begeman [Mon, 12 May 2008 19:01:56 +0000 (19:01 +0000)]
Add two new instructions to the llvm IR, vicmp and vfcmp.  see updated LangRef
for details.  CodeGen support coming in a follow up patch

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

16 years agoMake firstEightPowers const.
Dan Gohman [Mon, 12 May 2008 16:38:14 +0000 (16:38 +0000)]
Make firstEightPowers const.

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

16 years agoUpdate comments.
Dan Gohman [Mon, 12 May 2008 16:34:30 +0000 (16:34 +0000)]
Update comments.

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

16 years agoFilter option names to escape symbols not allowed as C++ identifiers.
Mikhail Glushenkov [Mon, 12 May 2008 16:33:06 +0000 (16:33 +0000)]
Filter option names to escape symbols not allowed as C++ identifiers.

Makes it possible to use options with names like "Wa,".
Also fixes the -Wall option handling as a side-effect.

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

16 years agoMake it possible to choose between different compilation graph definitions at compile...
Mikhail Glushenkov [Mon, 12 May 2008 16:32:24 +0000 (16:32 +0000)]
Make it possible to choose between different compilation graph definitions at compile-time.

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

16 years agoFix some error messages; Make LLVMC pass through the exit code of a failed tool.
Mikhail Glushenkov [Mon, 12 May 2008 16:31:42 +0000 (16:31 +0000)]
Fix some error messages; Make LLVMC pass through the exit code of a failed tool.

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

16 years agoFix a compile error on compilers that still want a return value
Dan Gohman [Mon, 12 May 2008 16:17:19 +0000 (16:17 +0000)]
Fix a compile error on compilers that still want a return value
in a non-void function that calls abort.

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

16 years agoFix a missing break in the ISD::FLT_ROUNDS_ handling. Patch by giuma!
Dan Gohman [Mon, 12 May 2008 16:07:15 +0000 (16:07 +0000)]
Fix a missing break in the ISD::FLT_ROUNDS_ handling. Patch by giuma!

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

16 years agoTestcase for PR2264.
Duncan Sands [Mon, 12 May 2008 13:01:19 +0000 (13:01 +0000)]
Testcase for PR2264.

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

16 years agoMove the various analyses used by GVN into static variables so we don't have to keep...
Owen Anderson [Mon, 12 May 2008 08:15:27 +0000 (08:15 +0000)]
Move the various analyses used by GVN into static variables so we don't have to keep passing them around or refetching them.

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

16 years agoprune #includes.
Chris Lattner [Mon, 12 May 2008 01:13:53 +0000 (01:13 +0000)]
prune #includes.

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

16 years agoAdd a new SparsePropagation analysis utility, which allows you to do
Chris Lattner [Mon, 12 May 2008 01:12:24 +0000 (01:12 +0000)]
Add a new SparsePropagation analysis utility, which allows you to do
SCCP like sparse lattice analysis with relative ease.  Just pick your
lattice function and implement the transfer function and you're good.
Just make sure you don't break monotonicity ;-)

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

16 years agoMake constructors target-specific. This fixes problems where the path would
Nick Lewycky [Sun, 11 May 2008 17:37:40 +0000 (17:37 +0000)]
Make constructors target-specific. This fixes problems where the path would
include backslashes on Windows. This should fix llvm-ld problems on win32.

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

16 years agoAdd note
Anton Korobeynikov [Sun, 11 May 2008 14:33:15 +0000 (14:33 +0000)]
Add note

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

16 years agoFix various DOUTs to not call the extremely expensive Value::getName()
Chris Lattner [Sun, 11 May 2008 01:55:59 +0000 (01:55 +0000)]
Fix various DOUTs to not call the extremely expensive Value::getName()
method.  DOUT statements are disabled when assertions are off, but the
side effects of getName() are still evaluated.  Just call getNameSTart,
which is close enough and doesn't cause heap traffic.

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

16 years agoSimplify code by using SwitchInst::findCaseValue instead of reimplementing it.
Chris Lattner [Sat, 10 May 2008 23:56:54 +0000 (23:56 +0000)]
Simplify code by using SwitchInst::findCaseValue instead of reimplementing it.

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

16 years agoRemove warnings when using -Wshorten-64-to-32.
Bill Wendling [Sat, 10 May 2008 19:59:59 +0000 (19:59 +0000)]
Remove warnings when using -Wshorten-64-to-32.

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

16 years agoTestcase for PR2303.
Duncan Sands [Sat, 10 May 2008 16:43:10 +0000 (16:43 +0000)]
Testcase for PR2303.

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

16 years agoFix linking of internal aliases
Anton Korobeynikov [Sat, 10 May 2008 14:41:43 +0000 (14:41 +0000)]
Fix linking of internal aliases

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

16 years agoPrevent -W64-to-32-shortened warnings.
Bill Wendling [Sat, 10 May 2008 11:26:52 +0000 (11:26 +0000)]
Prevent -W64-to-32-shortened warnings.

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

16 years agoPrevent warnings from the -Wshorten-64-to-32 flag.
Bill Wendling [Sat, 10 May 2008 10:58:07 +0000 (10:58 +0000)]
Prevent warnings from the -Wshorten-64-to-32 flag.

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

16 years agoremove commented-out code, it is subsumed by DECLARE_TRANSPARENT_OPERAND_ACCESSORS
Gabor Greif [Sat, 10 May 2008 09:36:58 +0000 (09:36 +0000)]
remove commented-out code, it is subsumed by DECLARE_TRANSPARENT_OPERAND_ACCESSORS

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

16 years agomerge of use-diet branch to trunk
Gabor Greif [Sat, 10 May 2008 08:32:32 +0000 (08:32 +0000)]
merge of use-diet branch to trunk

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

16 years agoRe-enable loop deletion by default.
Owen Anderson [Sat, 10 May 2008 07:10:24 +0000 (07:10 +0000)]
Re-enable loop deletion by default.

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

16 years agoWhen transforming a vector_shuffle to a load, the base address must not be an undef.
Evan Cheng [Sat, 10 May 2008 06:46:49 +0000 (06:46 +0000)]
When transforming a vector_shuffle to a load, the base address must not be an undef.

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

16 years agoSet to 2.4 and regenerate configure.
Tanya Lattner [Sat, 10 May 2008 04:20:38 +0000 (04:20 +0000)]
Set to 2.4 and regenerate configure.

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

16 years agoAdd nounwind.
Evan Cheng [Sat, 10 May 2008 02:22:25 +0000 (02:22 +0000)]
Add nounwind.

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

16 years agoFor now, abort when an ISD::VAARG is encountered on x86-64, rather
Dan Gohman [Sat, 10 May 2008 01:26:14 +0000 (01:26 +0000)]
For now, abort when an ISD::VAARG is encountered on x86-64, rather
than silently generate invalid code.

llvm-gcc does not currently use VAArgInst; it lowers va_arg in the
front-end.

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

16 years agoSome clean up.
Evan Cheng [Sat, 10 May 2008 00:59:18 +0000 (00:59 +0000)]
Some clean up.

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

16 years agoIf movl top bits are undef, let it be selected to movlps, etc.
Evan Cheng [Sat, 10 May 2008 00:58:41 +0000 (00:58 +0000)]
If movl top bits are undef, let it be selected to movlps, etc.

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

16 years agoIf all sources of a PHI node are defined by an implicit_def, just emit an implicit_de...
Evan Cheng [Sat, 10 May 2008 00:17:50 +0000 (00:17 +0000)]
If all sources of a PHI node are defined by an implicit_def, just emit an implicit_def instead of a copy.

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

16 years agoCosmetic changes:
Bill Wendling [Sat, 10 May 2008 00:12:52 +0000 (00:12 +0000)]
Cosmetic changes:
 - Comment fixes.
 - Moar whitespace.
 - Made ivars "private" by default.
No functionality change.

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

16 years agoAdd a pattern to do move the low element of a v4f32 and zero extend the rest.
Evan Cheng [Fri, 9 May 2008 23:37:55 +0000 (23:37 +0000)]
Add a pattern to do move the low element of a v4f32 and zero extend the rest.

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

16 years agoRemove an evil vector bool. Cosmetic refactoring,
Dale Johannesen [Fri, 9 May 2008 23:28:24 +0000 (23:28 +0000)]
Remove an evil vector bool.  Cosmetic refactoring,
no functional change.

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

16 years agoHandle a few more cases of folding load i64 into xmm and zero top bits.
Evan Cheng [Fri, 9 May 2008 21:53:03 +0000 (21:53 +0000)]
Handle a few more cases of folding load i64 into xmm and zero top bits.
Note, some of the code will be moved into target independent part of DAG combiner in a subsequent patch.

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

16 years agoMake OpActionsCapacity multiple of 4.
Evan Cheng [Fri, 9 May 2008 21:50:23 +0000 (21:50 +0000)]
Make OpActionsCapacity multiple of 4.

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

16 years agoRewrite tail merging algorithm to handle the
Dale Johannesen [Fri, 9 May 2008 21:24:35 +0000 (21:24 +0000)]
Rewrite tail merging algorithm to handle the
case where there are multiple blocks with a large
number of common tail instructions more efficiently
(compile time optimization).

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

16 years agoput LibCallAliasAnalysis into anonymous namespace to avoid
Torok Edwin [Fri, 9 May 2008 20:35:45 +0000 (20:35 +0000)]
put LibCallAliasAnalysis into anonymous namespace to avoid
clashes on ::X

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

16 years agoSimplify test.
Evan Cheng [Fri, 9 May 2008 19:56:32 +0000 (19:56 +0000)]
Simplify test.

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

16 years agoRename Example.td to Graph.td.
Mikhail Glushenkov [Fri, 9 May 2008 19:11:28 +0000 (19:11 +0000)]
Rename Example.td to Graph.td.

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

16 years agouse doxygen comments for makeBuffer()
Nick Kledzik [Fri, 9 May 2008 18:44:41 +0000 (18:44 +0000)]
use doxygen comments for makeBuffer()

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

16 years agodon't sink invokes, even if they are readonly. This fixes a
Chris Lattner [Fri, 9 May 2008 15:07:33 +0000 (15:07 +0000)]
don't sink invokes, even if they are readonly.  This fixes a
crash on kimwitu++.

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

16 years agoFix a type and formatting.
Duncan Sands [Fri, 9 May 2008 12:20:10 +0000 (12:20 +0000)]
Fix a type and formatting.

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

16 years agoignore Output dirs
Gabor Greif [Fri, 9 May 2008 11:56:35 +0000 (11:56 +0000)]
ignore Output dirs

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

16 years agoignore AutoGenerated.inc, it is created by TableGen
Gabor Greif [Fri, 9 May 2008 11:49:54 +0000 (11:49 +0000)]
ignore AutoGenerated.inc, it is created by TableGen

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

16 years agoignore Output dir
Gabor Greif [Fri, 9 May 2008 11:44:30 +0000 (11:44 +0000)]
ignore Output dir

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

16 years agoReapply 50867: A small refactoring (extract method) + some comment fixes.
Mikhail Glushenkov [Fri, 9 May 2008 08:27:26 +0000 (08:27 +0000)]
Reapply 50867: A small refactoring (extract method) + some comment fixes.
Fixed the build breakage, sorry for that.

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

16 years agoadd support for pattern matching 'neg'
Chris Lattner [Fri, 9 May 2008 05:20:27 +0000 (05:20 +0000)]
add support for pattern matching 'neg'

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

16 years agoImplement PR2298. This transforms:
Chris Lattner [Fri, 9 May 2008 05:19:28 +0000 (05:19 +0000)]
Implement PR2298.  This transforms:
   ~x < ~y --> y < x
   -x == -y --> x == y

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

16 years agorestore doxygen comment.
Chris Lattner [Fri, 9 May 2008 04:43:13 +0000 (04:43 +0000)]
restore doxygen comment.

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

16 years ago<rdar://problem/5917641> use getMemBufferCopy if supplied buffer is not already zero...
Nick Kledzik [Fri, 9 May 2008 01:09:59 +0000 (01:09 +0000)]
<rdar://problem/5917641> use getMemBufferCopy if supplied buffer is not already zero terminated

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

16 years agoCheck for validity of aliasee pointer before dereference.
Anton Korobeynikov [Thu, 8 May 2008 23:11:06 +0000 (23:11 +0000)]
Check for validity of aliasee pointer before dereference.

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

16 years agoUse movq to move low half of XMM register and zero-extend the rest.
Evan Cheng [Thu, 8 May 2008 22:35:02 +0000 (22:35 +0000)]
Use movq to move low half of XMM register and zero-extend the rest.

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

16 years agoconservatively say that volatile stores read memory.
Chris Lattner [Thu, 8 May 2008 21:58:49 +0000 (21:58 +0000)]
conservatively say that volatile stores read memory.

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

16 years agoRevertin 50867 since it was breaking the build.
Tanya Lattner [Thu, 8 May 2008 21:54:20 +0000 (21:54 +0000)]
Revertin 50867 since it was breaking the build.

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

16 years agostore can't read from memory.
Chris Lattner [Thu, 8 May 2008 21:47:43 +0000 (21:47 +0000)]
store can't read from memory.

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

16 years agoAdd -E and -S options
Mikhail Glushenkov [Thu, 8 May 2008 20:02:36 +0000 (20:02 +0000)]
Add -E and -S options

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

16 years agoA small refactoring (extract method) + some comment fixes.
Mikhail Glushenkov [Thu, 8 May 2008 20:02:03 +0000 (20:02 +0000)]
A small refactoring (extract method) + some comment fixes.

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

16 years agoRemove dead return. Thanks to Bill for the review!
Chris Lattner [Thu, 8 May 2008 18:26:56 +0000 (18:26 +0000)]
Remove dead return.  Thanks to Bill for the review!

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

16 years agoImprove pass documentation and comments.
Gordon Henriksen [Thu, 8 May 2008 17:46:35 +0000 (17:46 +0000)]
Improve pass documentation and comments.

Patch by Matthijs Kooijman!

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

16 years agoMore than just loads can read from memory: readonly calls like strlen
Chris Lattner [Thu, 8 May 2008 17:37:37 +0000 (17:37 +0000)]
More than just loads can read from memory: readonly calls like strlen
also need to be checked for memory modifying instructions before we
can sink them.  THis fixes the second half of PR2297.

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

16 years agoMake instcombine's DSE respect loads as well as stores. It is not safe to
Chris Lattner [Thu, 8 May 2008 17:20:30 +0000 (17:20 +0000)]
Make instcombine's DSE respect loads as well as stores.  It is not safe to
delete the first store in:

store x -> p
load p
store y -> p

This is for PR2297.

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

16 years agoadd a new Instruction::mayReadFromMemory predicate, make
Chris Lattner [Thu, 8 May 2008 17:16:51 +0000 (17:16 +0000)]
add a new Instruction::mayReadFromMemory predicate, make
Instruction::mayWriteToMemory stronger for invokes.

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

16 years agoCheck linkage.
Devang Patel [Thu, 8 May 2008 15:08:39 +0000 (15:08 +0000)]
Check linkage.

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