oota-llvm.git
18 years agoremove reference to dead method
Chris Lattner [Thu, 28 Sep 2006 00:38:19 +0000 (00:38 +0000)]
remove reference to dead method

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

18 years agoremove dead method
Chris Lattner [Thu, 28 Sep 2006 00:37:43 +0000 (00:37 +0000)]
remove dead method

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

18 years agoUse the new ManagedStatic class to explicitly manage static variables, eliminating...
Chris Lattner [Thu, 28 Sep 2006 00:35:06 +0000 (00:35 +0000)]
Use the new ManagedStatic class to explicitly manage static variables, eliminating static ctors/dtors

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

18 years agonew helper class to provide more explicit management of static ctor/dtors.
Chris Lattner [Thu, 28 Sep 2006 00:31:55 +0000 (00:31 +0000)]
new helper class to provide more explicit management of static ctor/dtors.

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

18 years agore-re-revert this, back to the right revision. It currently breaks bisort/mst
Chris Lattner [Thu, 28 Sep 2006 00:11:54 +0000 (00:11 +0000)]
re-re-revert this, back to the right revision.  It currently breaks bisort/mst
in olden among others.

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

18 years agoPEI now place callee save spills closest to the address pointed to by the
Evan Cheng [Thu, 28 Sep 2006 00:10:27 +0000 (00:10 +0000)]
PEI now place callee save spills closest to the address pointed to by the
incoming stack. This allows X86 backend to use push / pop in epilogue /
prologue.

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

18 years ago- Added a hook processFunctionBeforeCalleeSaveScn(). This is called by PEI just
Evan Cheng [Thu, 28 Sep 2006 00:07:19 +0000 (00:07 +0000)]
- Added a hook processFunctionBeforeCalleeSaveScn(). This is called by PEI just
before it determines which callee-save registers are to be spilled. This allows
the target to make changes such as forcing certain physical registers to be
spilled.
- Modified comments. It's important to note the order of registers in the array
returns by getCalleeSaveRegs() determines the order of callee save spill code.

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

18 years agore-revert this patch, bisort and mst are still broken in Olden.
Chris Lattner [Thu, 28 Sep 2006 00:04:21 +0000 (00:04 +0000)]
re-revert this patch, bisort and mst are still broken in Olden.

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

18 years agoReapplying this patch. With the newest commits, the error in Olden/bisort
Bill Wendling [Wed, 27 Sep 2006 22:37:35 +0000 (22:37 +0000)]
Reapplying this patch. With the newest commits, the error in Olden/bisort
has disappeared.

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

18 years agosilence warnings in release build
Chris Lattner [Wed, 27 Sep 2006 18:29:38 +0000 (18:29 +0000)]
silence warnings in release build

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

18 years agoFix DFS walk.
Devang Patel [Wed, 27 Sep 2006 17:18:05 +0000 (17:18 +0000)]
Fix DFS walk.
Fix http://llvm.org/bugs/show_bug.cgi?id=923

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

18 years agoTemporarily revert this. This breaks Olden/bisort on PPC
Chris Lattner [Wed, 27 Sep 2006 16:59:16 +0000 (16:59 +0000)]
Temporarily revert this.  This breaks Olden/bisort on PPC

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

18 years agoMake sure C++ protection shows up in debug info
Jim Laskey [Wed, 27 Sep 2006 16:55:19 +0000 (16:55 +0000)]
Make sure C++ protection shows up in debug info

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

18 years agoThis:
Chris Lattner [Wed, 27 Sep 2006 16:44:09 +0000 (16:44 +0000)]
This:
AggregateString += "\0\0";

Doesn't add two nuls to the AggregateString (for obvious reasons), which
broke the asmprinter when the first character of an asm string was not
literal text.

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

18 years agoPR878: Instead of calculating the vreg to PHI use count everytime we get
Bill Wendling [Wed, 27 Sep 2006 09:04:15 +0000 (09:04 +0000)]
PR878: Instead of calculating the vreg to PHI use count everytime we get
a function, do it up front in linear time (going through all of the
instructions once). We create a map out of them. Then it's no problem to
use the information in it during elimination...

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

18 years agoset DEBUG_TYPE right
Chris Lattner [Wed, 27 Sep 2006 04:58:23 +0000 (04:58 +0000)]
set DEBUG_TYPE right

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

18 years agoAdd http://llvm.org/bugs/show_bug.cgi?id=923 test case.
Devang Patel [Wed, 27 Sep 2006 02:58:44 +0000 (02:58 +0000)]
Add llvm.org/bugs/show_bug.cgi?id=923 test case.

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

18 years agoUse abstract private/comment directives, to increase portability to ppc/linux
Chris Lattner [Wed, 27 Sep 2006 02:55:21 +0000 (02:55 +0000)]
Use abstract private/comment directives, to increase portability to ppc/linux

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

18 years agoAdd support for ${:private} which prints "L" on darwin.
Chris Lattner [Wed, 27 Sep 2006 00:06:07 +0000 (00:06 +0000)]
Add support for ${:private} which prints "L" on darwin.

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

18 years agoAdd support for ${:comment}, which expands to the current target's comment
Chris Lattner [Tue, 26 Sep 2006 23:59:50 +0000 (23:59 +0000)]
Add support for ${:comment}, which expands to the current target's comment
character, and ${:uid} which expands to a unique ID for the MachineInstr.
More can be added if/when they are needed.

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

18 years agoActually, name the method PrintSpecial to match other stuff in AsmPrinter.h
Chris Lattner [Tue, 26 Sep 2006 23:47:10 +0000 (23:47 +0000)]
Actually, name the method PrintSpecial to match other stuff in AsmPrinter.h

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

18 years agoAdd support for ${:foo} syntax, where "foo" is passed into "printSpecial" and
Chris Lattner [Tue, 26 Sep 2006 23:45:08 +0000 (23:45 +0000)]
Add support for ${:foo} syntax, where "foo" is passed into "printSpecial" and
has no associated operand.  This is useful for portably encoding stuff like
the comment character into an asm string.

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

18 years agoRename function. It's determining which callee-save registers to save.
Evan Cheng [Tue, 26 Sep 2006 22:29:31 +0000 (22:29 +0000)]
Rename function. It's determining which callee-save registers to save.

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

18 years agoComments on JumpTableness
Andrew Lenharth [Tue, 26 Sep 2006 20:02:30 +0000 (20:02 +0000)]
Comments on JumpTableness

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

18 years agoLoad chain check is not needed
Jim Laskey [Tue, 26 Sep 2006 17:44:58 +0000 (17:44 +0000)]
Load chain check is not needed

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

18 years agoChain can be any operand
Jim Laskey [Tue, 26 Sep 2006 09:32:41 +0000 (09:32 +0000)]
Chain can be any operand

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

18 years agoWrong size for load
Jim Laskey [Tue, 26 Sep 2006 08:14:06 +0000 (08:14 +0000)]
Wrong size for load

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

18 years agoCan't move a load node if it's chain is not used.
Jim Laskey [Tue, 26 Sep 2006 07:37:42 +0000 (07:37 +0000)]
Can't move a load node if it's chain is not used.

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

18 years agoVarious random and minor code cleanups.
Chris Lattner [Tue, 26 Sep 2006 03:57:53 +0000 (03:57 +0000)]
Various random and minor code cleanups.

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

18 years agotest that the no_dead_strip directive is emitted on darwin-x86
Chris Lattner [Tue, 26 Sep 2006 03:44:20 +0000 (03:44 +0000)]
test that the no_dead_strip directive is emitted on darwin-x86

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

18 years agoprint the preds of each MBB
Chris Lattner [Tue, 26 Sep 2006 03:41:59 +0000 (03:41 +0000)]
print the preds of each MBB

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

18 years agoCompile:
Chris Lattner [Tue, 26 Sep 2006 03:39:53 +0000 (03:39 +0000)]
Compile:
int x __attribute__((used));

to:

        .data
.comm _x,4              ; 'x'
        .no_dead_strip  _x

on both x86 and ppc darwin targets.

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

18 years agoAdd support for targets that want to do something with the llvm.used list,
Chris Lattner [Tue, 26 Sep 2006 03:38:18 +0000 (03:38 +0000)]
Add support for targets that want to do something with the llvm.used list,
because they have an aggressive linker that does dead code stripping.

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

18 years agoorder this properly to avoid warnings in TargetAsmInfo.cpp. Add a comment
Chris Lattner [Mon, 25 Sep 2006 22:38:36 +0000 (22:38 +0000)]
order this properly to avoid warnings in TargetAsmInfo.cpp.  Add a comment
in a format that matches every other ivars in this class.

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

18 years agoAccidental enable of bad code
Jim Laskey [Mon, 25 Sep 2006 21:11:32 +0000 (21:11 +0000)]
Accidental enable of bad code

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

18 years agoFix chain dropping in load and drop unused stores in ret blocks.
Jim Laskey [Mon, 25 Sep 2006 19:32:58 +0000 (19:32 +0000)]
Fix chain dropping in load and drop unused stores in ret blocks.

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

18 years agoRegression test for PR#922.
John Criswell [Mon, 25 Sep 2006 19:12:01 +0000 (19:12 +0000)]
Regression test for PR#922.

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

18 years agomore notes
Chris Lattner [Mon, 25 Sep 2006 17:12:14 +0000 (17:12 +0000)]
more notes

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

18 years agoCore antialiasing for load and store.
Jim Laskey [Mon, 25 Sep 2006 16:29:54 +0000 (16:29 +0000)]
Core antialiasing for load and store.

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

18 years agoFix
Andrew Lenharth [Mon, 25 Sep 2006 14:04:53 +0000 (14:04 +0000)]
Fix

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

18 years agoFix jump tables to match gcc (and the ABI and whatnot)
Andrew Lenharth [Sun, 24 Sep 2006 19:46:56 +0000 (19:46 +0000)]
Fix jump tables to match gcc (and the ABI and whatnot)

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

18 years agoAdd support for other relocation bases to jump tables, as well as custom asm directives
Andrew Lenharth [Sun, 24 Sep 2006 19:45:58 +0000 (19:45 +0000)]
Add support for other relocation bases to jump tables, as well as custom asm directives

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

18 years agobasic jump table test
Andrew Lenharth [Sun, 24 Sep 2006 19:42:02 +0000 (19:42 +0000)]
basic jump table test

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

18 years agojump table note
Andrew Lenharth [Sun, 24 Sep 2006 13:13:10 +0000 (13:13 +0000)]
jump table note

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

18 years agoPIC jump table entries are always 32-bit. This fixes PIC jump table support on X86-64.
Evan Cheng [Sun, 24 Sep 2006 05:22:38 +0000 (05:22 +0000)]
PIC jump table entries are always 32-bit. This fixes PIC jump table support on X86-64.

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

18 years agoEnable 'predsimplify' optimization.
Nick Lewycky [Sun, 24 Sep 2006 00:08:16 +0000 (00:08 +0000)]
Enable 'predsimplify' optimization.

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

18 years agoStyle changes only. Remove dead code, fix a comment.
Nick Lewycky [Sat, 23 Sep 2006 15:13:08 +0000 (15:13 +0000)]
Style changes only. Remove dead code, fix a comment.

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

18 years agoBe far more careful when splitting a loop header, either to form a preheader
Chris Lattner [Sat, 23 Sep 2006 08:19:21 +0000 (08:19 +0000)]
Be far more careful when splitting a loop header, either to form a preheader
or when splitting loops with a common header into multiple loops.  In particular
the old code would always insert the preheader before the old loop header.  This
is disasterous in cases where the loop hasn't been rotated.  For example, it can
produce code like:

        .. outside the loop...
        jmp LBB1_2      #bb13.outer
LBB1_1: #bb1
        movsd 8(%esp,%esi,8), %xmm1
        mulsd (%edi), %xmm1
        addsd %xmm0, %xmm1
        addl $24, %edi
        incl %esi
        jmp LBB1_3      #bb13
LBB1_2: #bb13.outer
        leal (%edx,%eax,8), %edi
        pxor %xmm1, %xmm1
        xorl %esi, %esi
LBB1_3: #bb13
        movapd %xmm1, %xmm0
        cmpl $4, %esi
        jl LBB1_1       #bb1

Note that the loop body is actually LBB1_1 + LBB1_3, which means that the
loop now contains an uncond branch WITHIN it to jump around the inserted
loop header (LBB1_2).  Doh.

This patch changes the preheader insertion code to insert it in the right
spot, producing this code:

        ... outside the loop, fall into the header ...
LBB1_1: #bb13.outer
        leal (%edx,%eax,8), %esi
        pxor %xmm0, %xmm0
        xorl %edi, %edi
        jmp LBB1_3      #bb13
LBB1_2: #bb1
        movsd 8(%esp,%edi,8), %xmm0
        mulsd (%esi), %xmm0
        addsd %xmm1, %xmm0
        addl $24, %esi
        incl %edi
LBB1_3: #bb13
        movapd %xmm0, %xmm1
        cmpl $4, %edi
        jl LBB1_2       #bb1

Totally crazy, no branch in the loop! :)

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

18 years agoTeach UpdateDomInfoForRevectoredPreds to handle revectored preds that are not
Chris Lattner [Sat, 23 Sep 2006 07:40:52 +0000 (07:40 +0000)]
Teach UpdateDomInfoForRevectoredPreds to handle revectored preds that are not
reachable, making it general purpose enough for use by InsertPreheaderForLoop.
Eliminate custom dominfo updating code in InsertPreheaderForLoop, using
UpdateDomInfoForRevectoredPreds instead.

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

18 years agoremove misleading comment
Chris Lattner [Sat, 23 Sep 2006 06:09:45 +0000 (06:09 +0000)]
remove misleading comment

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

18 years agoadd method, correct comment
Chris Lattner [Sat, 23 Sep 2006 04:03:45 +0000 (04:03 +0000)]
add method, correct comment

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

18 years agoDelete dead code; fix 80 col violations.
Evan Cheng [Fri, 22 Sep 2006 21:43:59 +0000 (21:43 +0000)]
Delete dead code; fix 80 col violations.

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

18 years agoadd a note
Rafael Espindola [Fri, 22 Sep 2006 11:36:17 +0000 (11:36 +0000)]
add a note

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

18 years agoUse "%llvmgxx" instead of "llvm-g++".
Bill Wendling [Fri, 22 Sep 2006 07:09:01 +0000 (07:09 +0000)]
Use "%llvmgxx" instead of "llvm-g++".

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

18 years agoTestcase for better rotate left and mask support
Nate Begeman [Fri, 22 Sep 2006 05:49:57 +0000 (05:49 +0000)]
Testcase for better rotate left and mask support

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

18 years agoRegression testcase for PR855.
Bill Wendling [Fri, 22 Sep 2006 05:34:25 +0000 (05:34 +0000)]
Regression testcase for PR855.

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

18 years agoFold AND and ROTL more often
Nate Begeman [Fri, 22 Sep 2006 05:01:56 +0000 (05:01 +0000)]
Fold AND and ROTL more often

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

18 years agoremove extra white spaces.
Devang Patel [Fri, 22 Sep 2006 01:07:57 +0000 (01:07 +0000)]
remove extra white spaces.

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

18 years agoUse iterative algorith to assign DFS number. This reduces
Devang Patel [Fri, 22 Sep 2006 01:05:33 +0000 (01:05 +0000)]
Use iterative algorith to assign DFS number. This reduces
call stack depth.

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

18 years agodon't allow 'imm' or specific imms, like '1' on the LHS of a binop.
Chris Lattner [Thu, 21 Sep 2006 20:46:13 +0000 (20:46 +0000)]
don't allow 'imm' or specific imms, like '1' on the LHS of a binop.
This shrinks X86GenDAGISel by ~330 lines.

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

18 years agoMake it work for DAG combine of multi-value nodes.
Evan Cheng [Thu, 21 Sep 2006 19:04:05 +0000 (19:04 +0000)]
Make it work for DAG combine of multi-value nodes.

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

18 years agoFit to 80 columns.
Chris Lattner [Thu, 21 Sep 2006 18:28:27 +0000 (18:28 +0000)]
Fit to 80 columns.

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

18 years agocore corrections
Jim Laskey [Thu, 21 Sep 2006 17:35:47 +0000 (17:35 +0000)]
core corrections

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

18 years agoUse abstract class to facilitate dlopen() interface.
Devang Patel [Thu, 21 Sep 2006 17:22:55 +0000 (17:22 +0000)]
Use abstract class to facilitate dlopen() interface.

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

18 years agoBasic "in frame" alias analysis.
Jim Laskey [Thu, 21 Sep 2006 16:28:59 +0000 (16:28 +0000)]
Basic "in frame" alias analysis.

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

18 years agomore condition codes
Rafael Espindola [Thu, 21 Sep 2006 13:06:26 +0000 (13:06 +0000)]
more condition codes

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

18 years agoif a constant can't be an immediate, add it to the constant pool
Rafael Espindola [Thu, 21 Sep 2006 11:29:52 +0000 (11:29 +0000)]
if a constant can't be an immediate, add it to the constant pool

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

18 years agofold (aext (and (trunc x), cst)) -> (and x, cst).
Chris Lattner [Thu, 21 Sep 2006 06:40:43 +0000 (06:40 +0000)]
fold (aext (and (trunc x), cst)) -> (and x, cst).

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

18 years agoCheck the right value type. This fixes 186.crafty on x86
Chris Lattner [Thu, 21 Sep 2006 06:17:39 +0000 (06:17 +0000)]
Check the right value type.  This fixes 186.crafty on x86

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

18 years agoimplemented
Chris Lattner [Thu, 21 Sep 2006 06:14:54 +0000 (06:14 +0000)]
implemented

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

18 years agoCompile:
Chris Lattner [Thu, 21 Sep 2006 06:14:31 +0000 (06:14 +0000)]
Compile:

int %test(ulong *%tmp) {
        %tmp = load ulong* %tmp         ; <ulong> [#uses=1]
        %tmp.mask = shr ulong %tmp, ubyte 50            ; <ulong> [#uses=1]
        %tmp.mask = cast ulong %tmp.mask to ubyte
        %tmp2 = and ubyte %tmp.mask, 3          ; <ubyte> [#uses=1]
        %tmp2 = cast ubyte %tmp2 to int         ; <int> [#uses=1]
        ret int %tmp2
}

to:

_test:
        movl 4(%esp), %eax
        movl 4(%eax), %eax
        shrl $18, %eax
        andl $3, %eax
        ret

instead of:

_test:
        movl 4(%esp), %eax
        movl 4(%eax), %eax
        shrl $18, %eax
        # TRUNCATE movb %al, %al
        andb $3, %al
        movzbl %al, %eax
        ret

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

18 years agoGeneralize (zext (truncate x)) and (sext (truncate x)) folding to work when
Chris Lattner [Thu, 21 Sep 2006 06:00:20 +0000 (06:00 +0000)]
Generalize (zext (truncate x)) and (sext (truncate x)) folding to work when
the src/dst are not the same size.  This catches things like "truncate
32-bit X to 8 bits, then zext to 16", which happens a bit on X86.

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

18 years agoFit in 80-cols
Chris Lattner [Thu, 21 Sep 2006 05:46:00 +0000 (05:46 +0000)]
Fit in 80-cols

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

18 years agoFix Transforms/IndVarsSimplify/2006-09-20-LFTR-Crash.ll
Chris Lattner [Thu, 21 Sep 2006 05:12:20 +0000 (05:12 +0000)]
Fix Transforms/IndVarsSimplify/2006-09-20-LFTR-Crash.ll

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

18 years agonew testcase
Chris Lattner [Thu, 21 Sep 2006 05:11:01 +0000 (05:11 +0000)]
new testcase

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

18 years agoFix compile error.
Nick Lewycky [Thu, 21 Sep 2006 02:08:31 +0000 (02:08 +0000)]
Fix compile error.

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

18 years agoDon't rewrite ConstantExpr::get.
Nick Lewycky [Thu, 21 Sep 2006 01:05:35 +0000 (01:05 +0000)]
Don't rewrite ConstantExpr::get.

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

18 years agoOnce we're down to "setcc type constant1, constant2", at least come up
Nick Lewycky [Wed, 20 Sep 2006 23:02:24 +0000 (23:02 +0000)]
Once we're down to "setcc type constant1, constant2", at least come up
with the right answer.

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

18 years agoAdding codegeneration for StdCall & FastCall calling conventions
Anton Korobeynikov [Wed, 20 Sep 2006 22:03:51 +0000 (22:03 +0000)]
Adding codegeneration for StdCall & FastCall calling conventions

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

18 years agoAccount for pseudo-ops correctly
Andrew Lenharth [Wed, 20 Sep 2006 20:08:52 +0000 (20:08 +0000)]
Account for pseudo-ops correctly

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

18 years agoThe DarwinAsmPrinter need not check for isDarwin. createPPCAsmPrinterPass
Chris Lattner [Wed, 20 Sep 2006 17:12:19 +0000 (17:12 +0000)]
The DarwinAsmPrinter need not check for isDarwin.  createPPCAsmPrinterPass
should create the right asmprinter subclass.

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

18 years agoWrap some darwin'isms with isDarwin checks.
Chris Lattner [Wed, 20 Sep 2006 17:07:15 +0000 (17:07 +0000)]
Wrap some darwin'isms with isDarwin checks.

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

18 years agoUse a total ordering to compare instructions.
Nick Lewycky [Wed, 20 Sep 2006 17:04:01 +0000 (17:04 +0000)]
Use a total ordering to compare instructions.
Fixes infinite loop in resolve().

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

18 years agosimplify
Andrew Lenharth [Wed, 20 Sep 2006 15:37:57 +0000 (15:37 +0000)]
simplify

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

18 years agocatch constants more often
Andrew Lenharth [Wed, 20 Sep 2006 15:05:49 +0000 (15:05 +0000)]
catch constants more often

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

18 years agocatch another constant
Andrew Lenharth [Wed, 20 Sep 2006 15:04:55 +0000 (15:04 +0000)]
catch another constant

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

18 years agoclarify with test case
Andrew Lenharth [Wed, 20 Sep 2006 14:48:00 +0000 (14:48 +0000)]
clarify with test case

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

18 years agoAdd Note
Andrew Lenharth [Wed, 20 Sep 2006 14:40:01 +0000 (14:40 +0000)]
Add Note

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

18 years agoTrim the home directory from the dejagnu test
Jim Laskey [Wed, 20 Sep 2006 09:20:22 +0000 (09:20 +0000)]
Trim the home directory from the dejagnu test

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

18 years agoitem done
Chris Lattner [Wed, 20 Sep 2006 06:41:56 +0000 (06:41 +0000)]
item done

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

18 years agoCompile:
Chris Lattner [Wed, 20 Sep 2006 06:41:35 +0000 (06:41 +0000)]
Compile:
int test3(int a, int b) { return (a < 0) ? a : 0; }

to:

_test3:
        srawi r2, r3, 31
        and r3, r2, r3
        blr

instead of:

_test3:
        cmpwi cr0, r3, 1
        li r2, 0
        blt cr0, LBB2_2 ;entry
LBB2_1: ;entry
        mr r3, r2
LBB2_2: ;entry
        blr

This implements: PowerPC/select_lt0.ll:seli32_a_a

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

18 years agonew testcase
Chris Lattner [Wed, 20 Sep 2006 06:40:37 +0000 (06:40 +0000)]
new testcase

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

18 years agoadd a note
Chris Lattner [Wed, 20 Sep 2006 06:32:10 +0000 (06:32 +0000)]
add a note

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

18 years agoFold the full generality of (any_extend (truncate x))
Chris Lattner [Wed, 20 Sep 2006 06:29:17 +0000 (06:29 +0000)]
Fold the full generality of (any_extend (truncate x))

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

18 years agoTwo things:
Chris Lattner [Wed, 20 Sep 2006 06:19:26 +0000 (06:19 +0000)]
Two things:
1. teach SimplifySetCC that '(srl (ctlz x), 5) == 0' is really x != 0.
2. Teach visitSELECT_CC to use SimplifySetCC instead of calling it and
   ignoring the result.  This allows us to compile:

bool %test(ulong %x) {
  %tmp = setlt ulong %x, 4294967296
  ret bool %tmp
}

to:

_test:
        cntlzw r2, r3
        cmplwi cr0, r3, 1
        srwi r2, r2, 5
        li r3, 0
        beq cr0, LBB1_2 ;
LBB1_1: ;
        mr r3, r2
LBB1_2: ;
        blr

instead of:

_test:
        addi r2, r3, -1
        cntlzw r2, r2
        cntlzw r3, r3
        srwi r2, r2, 5
        cmplwi cr0, r2, 0
        srwi r2, r3, 5
        li r3, 0
        bne cr0, LBB1_2 ;
LBB1_1: ;
        mr r3, r2
LBB1_2: ;
        blr

This isn't wonderful, but it's an improvement.

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

18 years agoThis is already done
Chris Lattner [Wed, 20 Sep 2006 04:59:33 +0000 (04:59 +0000)]
This is already done

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

18 years agoWe went through all that trouble to compute whether it was safe to transform
Chris Lattner [Wed, 20 Sep 2006 04:44:59 +0000 (04:44 +0000)]
We went through all that trouble to compute whether it was safe to transform
this comparison, but never checked it.  Whoops, no wonder we miscompiled
177.mesa!

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

18 years agoImprove PPC64 equality comparisons like PPC32 comparisons.
Chris Lattner [Wed, 20 Sep 2006 04:33:27 +0000 (04:33 +0000)]
Improve PPC64 equality comparisons like PPC32 comparisons.

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

18 years agoTwo improvements:
Chris Lattner [Wed, 20 Sep 2006 04:25:47 +0000 (04:25 +0000)]
Two improvements:

1. Codegen this comparison:
     if (X == 0x8000)

as:

        cmplwi cr0, r3, 32768
        bne cr0, LBB1_2 ;cond_next

instead of:

        lis r2, 0
        ori r2, r2, 32768
        cmpw cr0, r3, r2
        bne cr0, LBB1_2 ;cond_next

2. Codegen this comparison:
      if (X == 0x12345678)

as:

        xoris r2, r3, 4660
        cmplwi cr0, r2, 22136
        bne cr0, LBB1_2 ;cond_next

instead of:

        lis r2, 4660
        ori r2, r2, 22136
        cmpw cr0, r3, r2
        bne cr0, LBB1_2 ;cond_next

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

18 years agoAdd a note that we should match rlwnm better
Chris Lattner [Wed, 20 Sep 2006 03:59:25 +0000 (03:59 +0000)]
Add a note that we should match rlwnm better

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