oota-llvm.git
18 years agoDo not derive CommonPassManagerImpl from Pass.
Devang Patel [Wed, 15 Nov 2006 01:11:27 +0000 (01:11 +0000)]
Do not derive CommonPassManagerImpl from Pass.
Now BasicBlockPassManager_New is a FunctionPass,
FunctionPassManager_New is a ModulePass

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

18 years agorestore some 'magic' code that I removed: it is needed. Add comments explaining
Chris Lattner [Tue, 14 Nov 2006 22:17:10 +0000 (22:17 +0000)]
restore some 'magic' code that I removed: it is needed.  Add comments explaining
why.

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

18 years agominimal hack to get patterns whose result type is iPTR to be selected.
Chris Lattner [Tue, 14 Nov 2006 21:50:27 +0000 (21:50 +0000)]
minimal hack to get patterns whose result type is iPTR to be selected.

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

18 years agoCopy initializeAnalysisImpl() implementation from PassManagerT.
Devang Patel [Tue, 14 Nov 2006 21:49:36 +0000 (21:49 +0000)]
Copy initializeAnalysisImpl() implementation from PassManagerT.
Update LastUser to recursively walk required transitive set.

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

18 years agoremove some dead code
Chris Lattner [Tue, 14 Nov 2006 21:41:35 +0000 (21:41 +0000)]
remove some dead code

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

18 years agoAdd support for nodes that return iPTR.
Chris Lattner [Tue, 14 Nov 2006 21:32:01 +0000 (21:32 +0000)]
Add support for nodes that return iPTR.

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

18 years agochanges to get ptr_rc to be accepted in patterns. This is needed for ppc preinc
Chris Lattner [Tue, 14 Nov 2006 21:18:40 +0000 (21:18 +0000)]
changes to get ptr_rc to be accepted in patterns.  This is needed for ppc preinc
stores.

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

18 years agoRevert. This wasn't meant to be checked in.
Evan Cheng [Tue, 14 Nov 2006 19:20:33 +0000 (19:20 +0000)]
Revert. This wasn't meant to be checked in.

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

18 years agogroup load and store instructions together. No functionality change.
Chris Lattner [Tue, 14 Nov 2006 19:19:53 +0000 (19:19 +0000)]
group load and store instructions together.  No functionality change.

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

18 years agoFix predicates for unindexed stores so they don't accidentally match indexed
Chris Lattner [Tue, 14 Nov 2006 19:13:39 +0000 (19:13 +0000)]
Fix predicates for unindexed stores so they don't accidentally match indexed
stores.

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

18 years agoRework PPC64 calls. Now we have a LR8/CTR8 register which the PPC64 calls
Chris Lattner [Tue, 14 Nov 2006 18:44:47 +0000 (18:44 +0000)]
Rework PPC64 calls.  Now we have a LR8/CTR8 register which the PPC64 calls
clobber.  This allows LR8 to be save/restored correctly as a 64-bit quantity,
instead of handling it as a 32-bit quantity.  This unbreaks ppc64 codegen when
the code is actually located above the 4G boundary.

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

18 years agoremove a ton of custom selection logic no longer needed
Chris Lattner [Tue, 14 Nov 2006 18:43:11 +0000 (18:43 +0000)]
remove a ton of custom selection logic no longer needed

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

18 years agoFix a bug handling nodes with variable arguments. The code was fixed to assume
Chris Lattner [Tue, 14 Nov 2006 18:41:38 +0000 (18:41 +0000)]
Fix a bug handling nodes with variable arguments.  The code was fixed to assume
that there were two input operands before the variable operand portion.  This
*happened* to be true for all call instructions, which took a chain and a
destination, but was not true for the PPC BCTRL instruction, whose destination
is implicit.

Making this code more general allows elimination of the custom selection logic
for BCTRL.

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

18 years agoit would be nice of ctlz were lowered to bsf etc.
Chris Lattner [Tue, 14 Nov 2006 08:08:46 +0000 (08:08 +0000)]
it would be nice of ctlz were lowered to bsf etc.

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

18 years agoimplement InstCombine/shift-simplify.ll by transforming:
Chris Lattner [Tue, 14 Nov 2006 07:46:50 +0000 (07:46 +0000)]
implement InstCombine/shift-simplify.ll by transforming:
(X >> Z) op (Y >> Z)  -> (X op Y) >> Z

for all shifts and all ops={and/or/xor}.

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

18 years agonew testcase
Chris Lattner [Tue, 14 Nov 2006 07:45:36 +0000 (07:45 +0000)]
new testcase

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

18 years agoimplement InstCombine/and-compare.ll:test1. This compiles:
Chris Lattner [Tue, 14 Nov 2006 06:06:06 +0000 (06:06 +0000)]
implement InstCombine/and-compare.ll:test1.  This compiles:

typedef struct { unsigned prefix : 4; unsigned code : 4; unsigned unsigned_p : 4; } tree_common;
int foo(tree_common *a, tree_common *b) { return a->code == b->code; }

into:

_foo:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl (%eax), %eax
        xorl (%ecx), %eax
        # TRUNCATE movb %al, %al
        shrb $4, %al
        testb %al, %al
        sete %al
        movzbl %al, %eax
        ret

instead of:

_foo:
        movl 8(%esp), %eax
        movb (%eax), %al
        shrb $4, %al
        movl 4(%esp), %ecx
        movb (%ecx), %cl
        shrb $4, %cl
        cmpb %al, %cl
        sete %al
        movzbl %al, %eax
        ret

saving one cycle by eliminating a shift.

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

18 years agonew testcase
Chris Lattner [Tue, 14 Nov 2006 06:04:35 +0000 (06:04 +0000)]
new testcase

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

18 years agolower "X = seteq Y, Z" to '(shr (ctlz (xor Y, Z)), 5)' instead of
Chris Lattner [Tue, 14 Nov 2006 05:28:08 +0000 (05:28 +0000)]
lower "X = seteq Y, Z" to '(shr (ctlz (xor Y, Z)), 5)' instead of
'(shr (ctlz (sub Y, Z)), 5)'.

The use of xor better exposes the operation to bit-twiddling logic in the
dag combiner.  For example, this:

typedef struct {
  unsigned prefix : 4;
  unsigned code : 4;
  unsigned unsigned_p : 4;
} tree_common;

int foo(tree_common *a, tree_common *b) {
  return a->code == b->code;
}

Now compiles to:

_foo:
        lwz r2, 0(r4)
        lwz r3, 0(r3)
        xor r2, r3, r2
        rlwinm r2, r2, 28, 28, 31
        cntlzw r2, r2
        srwi r3, r2, 5
        blr

instead of:

_foo:
        lbz r2, 3(r4)
        lbz r3, 3(r3)
        srwi r2, r2, 4
        srwi r3, r3, 4
        subf r2, r2, r3
        cntlzw r2, r2
        srwi r3, r2, 5
        blr

saving a cycle.

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

18 years agoA shim over other AA impls to catch incorrect uses
Andrew Lenharth [Tue, 14 Nov 2006 05:21:04 +0000 (05:21 +0000)]
A shim over other AA impls to catch incorrect uses

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

18 years agoDiscard code that supported old bytecode formats. This makes the Bytecode
Reid Spencer [Tue, 14 Nov 2006 04:47:22 +0000 (04:47 +0000)]
Discard code that supported old bytecode formats. This makes the Bytecode
Reader code much easier to read and maintain. Backwards compatibility from
version 5 format has been retained. Older formats will produce an error.

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

18 years agoImplement removeDeadPasses().
Devang Patel [Tue, 14 Nov 2006 03:05:08 +0000 (03:05 +0000)]
Implement removeDeadPasses().

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

18 years agoKeep track of Last user of analysis phase.
Devang Patel [Tue, 14 Nov 2006 02:54:23 +0000 (02:54 +0000)]
Keep track of Last user of analysis phase.

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

18 years agoUse std::map to map AnalysisID and Pass.
Devang Patel [Tue, 14 Nov 2006 01:59:59 +0000 (01:59 +0000)]
Use std::map to map AnalysisID and Pass.

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

18 years agoadd a note
Chris Lattner [Tue, 14 Nov 2006 01:57:53 +0000 (01:57 +0000)]
add a note

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

18 years agominor tweaks, reject vector preinc.
Chris Lattner [Tue, 14 Nov 2006 01:38:31 +0000 (01:38 +0000)]
minor tweaks, reject vector preinc.

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

18 years agoManage analysis passes during run.
Devang Patel [Tue, 14 Nov 2006 01:23:29 +0000 (01:23 +0000)]
Manage analysis passes during run.

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

18 years agoUpdating configure script for 2.0
Tanya Lattner [Tue, 14 Nov 2006 00:59:52 +0000 (00:59 +0000)]
Updating configure script for 2.0

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

18 years agoUpdate comments.
Devang Patel [Tue, 14 Nov 2006 00:03:04 +0000 (00:03 +0000)]
Update comments.

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

18 years agoMatches MachineInstr changes.
Evan Cheng [Mon, 13 Nov 2006 23:36:35 +0000 (23:36 +0000)]
Matches MachineInstr changes.

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

18 years ago- Let MachineInstr ctors add implicit def and use operands. Other operands
Evan Cheng [Mon, 13 Nov 2006 23:34:06 +0000 (23:34 +0000)]
- Let MachineInstr ctors add implicit def and use operands. Other operands
  will be inserted before these operands. If the opcode changes (by
  setOpcode), the implicit operands are updated as well.
- Added IsKill, IsDead fields to MachineOperand in preparation for changes
  that move kill / dead info to MachineInstr's.

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

18 years agoUpdate PassManagerImpl_New::analysisCurrentlyAvailable to check all
Devang Patel [Mon, 13 Nov 2006 22:53:19 +0000 (22:53 +0000)]
Update PassManagerImpl_New::analysisCurrentlyAvailable to check all
managed passmanagers.

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

18 years agoCheck currently available anlysis in active managers.
Devang Patel [Mon, 13 Nov 2006 22:40:09 +0000 (22:40 +0000)]
Check currently available anlysis in active managers.

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

18 years agoteach the g5 hazard recognizer about update loads. This fixes
Chris Lattner [Mon, 13 Nov 2006 20:11:06 +0000 (20:11 +0000)]
teach the g5 hazard recognizer about update loads.  This fixes
Ptrdist/anagram among others.

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

18 years agoFor PR950:
Reid Spencer [Mon, 13 Nov 2006 18:00:52 +0000 (18:00 +0000)]
For PR950:
Changes for new cast instructions that are backwards compatible.

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

18 years agoDon't hard code test names into the test.
Reid Spencer [Mon, 13 Nov 2006 17:55:34 +0000 (17:55 +0000)]
Don't hard code test names into the test.

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

18 years agoFix 80 cols violations.
Reid Spencer [Mon, 13 Nov 2006 16:21:09 +0000 (16:21 +0000)]
Fix 80 cols violations.

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

18 years agoFor PR950:
Reid Spencer [Mon, 13 Nov 2006 16:13:38 +0000 (16:13 +0000)]
For PR950:
Use the notcast script in preparation for 12 casts.

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

18 years agoFor PR950:
Reid Spencer [Mon, 13 Nov 2006 16:12:25 +0000 (16:12 +0000)]
For PR950:
Use the notcast script in preparation for 12 cast instructions.

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

18 years agoMake it handle plain old cast too, for old assembly.
Reid Spencer [Mon, 13 Nov 2006 16:11:14 +0000 (16:11 +0000)]
Make it handle plain old cast too, for old assembly.

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

18 years agoHandle ptrtoint and inttoptr
Reid Spencer [Mon, 13 Nov 2006 16:09:37 +0000 (16:09 +0000)]
Handle ptrtoint and inttoptr

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

18 years agoAdd some output so the user is informed while they wait.
Reid Spencer [Mon, 13 Nov 2006 16:08:51 +0000 (16:08 +0000)]
Add some output so the user is informed while they wait.

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

18 years agoAdd a link to the GEP FAQ.
Reid Spencer [Mon, 13 Nov 2006 08:03:59 +0000 (08:03 +0000)]
Add a link to the GEP FAQ.

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

18 years agoremove redundant code
Chris Lattner [Mon, 13 Nov 2006 01:10:12 +0000 (01:10 +0000)]
remove redundant code

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

18 years agoCute example from Chris Lattner.
Nick Lewycky [Mon, 13 Nov 2006 00:23:28 +0000 (00:23 +0000)]
Cute example from Chris Lattner.

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

18 years agoInitialize some pointers to quiet the compiler (when doing build_gcc
Bill Wendling [Sun, 12 Nov 2006 11:10:39 +0000 (11:10 +0000)]
Initialize some pointers to quiet the compiler (when doing build_gcc
builds).

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

18 years agoDocument new constant expr operators, rename bitconvert as bitcast.
Reid Spencer [Sat, 11 Nov 2006 23:08:07 +0000 (23:08 +0000)]
Document new constant expr operators, rename bitconvert as bitcast.

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

18 years agoRevert premature patch.
Reid Spencer [Sat, 11 Nov 2006 23:06:47 +0000 (23:06 +0000)]
Revert premature patch.

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

18 years agoDocument new constant expr operators, rename bitconvert as bitcast.
Reid Spencer [Sat, 11 Nov 2006 22:34:59 +0000 (22:34 +0000)]
Document new constant expr operators, rename bitconvert as bitcast.

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

18 years agoMake sure stack link is set in 64-bit.
Jim Laskey [Sat, 11 Nov 2006 22:22:07 +0000 (22:22 +0000)]
Make sure stack link is set in 64-bit.

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

18 years agoXFAIL All but powerpc
Jim Laskey [Sat, 11 Nov 2006 22:14:46 +0000 (22:14 +0000)]
XFAIL All but powerpc

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

18 years agoAdd a preview of two new conversion operators: ptrtoint and inttoptr. Update
Reid Spencer [Sat, 11 Nov 2006 21:00:47 +0000 (21:00 +0000)]
Add a preview of two new conversion operators: ptrtoint and inttoptr. Update
the defintion of bitconvert correspondingly.

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

18 years agoRemvoe a do-nothing else block.
Reid Spencer [Sat, 11 Nov 2006 20:27:49 +0000 (20:27 +0000)]
Remvoe a do-nothing else block.

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

18 years agoMake an assert comment match the tested assertion.
Reid Spencer [Sat, 11 Nov 2006 20:07:59 +0000 (20:07 +0000)]
Make an assert comment match the tested assertion.

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

18 years agoMinor style fixes from review.
Reid Spencer [Sat, 11 Nov 2006 19:59:25 +0000 (19:59 +0000)]
Minor style fixes from review.

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

18 years agoimplement proper PPC64 prolog/epilog codegen.
Chris Lattner [Sat, 11 Nov 2006 19:05:28 +0000 (19:05 +0000)]
implement proper PPC64 prolog/epilog codegen.

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

18 years agoAdd a -disable-loop-extraction option to bugpoint.
Reid Spencer [Sat, 11 Nov 2006 19:05:02 +0000 (19:05 +0000)]
Add a -disable-loop-extraction option to bugpoint.

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

18 years agoFor PR998:
Reid Spencer [Sat, 11 Nov 2006 11:54:25 +0000 (11:54 +0000)]
For PR998:
Fix an infinite loop in the Linker and a few other assorted link problems.

Patch contributed by Scott Michel. Thanks, Scott!

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

18 years agoWorks for PowerPC with frame pointers.
Jim Laskey [Sat, 11 Nov 2006 10:22:56 +0000 (10:22 +0000)]
Works for PowerPC with frame pointers.

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

18 years agoAdd -lstdc++ to the link line for C++ programs.
Reid Spencer [Sat, 11 Nov 2006 10:22:48 +0000 (10:22 +0000)]
Add -lstdc++ to the link line for C++ programs.

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

18 years agoRunning with frame pointers prevented debugging, external probes and
Jim Laskey [Sat, 11 Nov 2006 10:21:58 +0000 (10:21 +0000)]
Running with frame pointers prevented debugging, external probes and
potentially some system calls/exception handling from working.  TOS must always
link to previous frame.  This is a short term workaround until alloca scheme is
reworked.

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

18 years agoAdd implicit use / def operands to created MI's.
Evan Cheng [Sat, 11 Nov 2006 10:21:44 +0000 (10:21 +0000)]
Add implicit use / def operands to created MI's.

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

18 years agoAdd methods to add implicit def use operands to a MI.
Evan Cheng [Sat, 11 Nov 2006 10:20:02 +0000 (10:20 +0000)]
Add methods to add implicit def use operands to a MI.

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

18 years agoAdd all implicit defs to FP_REG_KILL mi.
Evan Cheng [Sat, 11 Nov 2006 07:19:36 +0000 (07:19 +0000)]
Add all implicit defs to FP_REG_KILL mi.

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

18 years agoallow the offset of a preinc'd load to be the low-part of a global. This
Chris Lattner [Sat, 11 Nov 2006 04:53:30 +0000 (04:53 +0000)]
allow the offset of a preinc'd load to be the low-part of a global.  This
produces this clever code:

_millisecs:
        lis r2, ha16(_Time.1182)
        lwzu r3, lo16(_Time.1182)(r2)
        lwz r2, 4(r2)
        addic r4, r2, 1
        addze r3, r3
        blr

instead of this:

_millisecs:
        lis r2, ha16(_Time.1182)
        la r3, lo16(_Time.1182)(r2)
        lwz r2, lo16(_Time.1182)(r2)
        lwz r3, 4(r3)
        addic r4, r3, 1
        addze r3, r2
        blr

for:

long %millisecs() {
        %tmp = load long* %Time.1182            ; <long> [#uses=1]
        %tmp1 = add long %tmp, 1                ; <long> [#uses=1]
        ret long %tmp1
}

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

18 years agoMark operands as symbol lo instead of imm32 so that they print lo(x) around
Chris Lattner [Sat, 11 Nov 2006 04:51:36 +0000 (04:51 +0000)]
Mark operands as symbol lo instead of imm32 so that they print lo(x) around
globals.

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

18 years agoImplement schedulePasses().
Devang Patel [Sat, 11 Nov 2006 02:22:31 +0000 (02:22 +0000)]
Implement schedulePasses().

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

18 years agoImplement PassManagerImpl_New::add().
Devang Patel [Sat, 11 Nov 2006 02:06:21 +0000 (02:06 +0000)]
Implement PassManagerImpl_New::add().
Just add pass into the pass manager queue without processing analysis.

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

18 years agoWhile adding pass into the manager, process Analysis only if it is
Devang Patel [Sat, 11 Nov 2006 02:04:19 +0000 (02:04 +0000)]
While adding pass into the manager, process Analysis only if it is
required to do so.

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

18 years agoRemove dead code.
Devang Patel [Sat, 11 Nov 2006 01:56:39 +0000 (01:56 +0000)]
Remove dead code.

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

18 years agoCode refactoring. Move common code into CommonPassManagerImpl :)
Devang Patel [Sat, 11 Nov 2006 01:51:02 +0000 (01:51 +0000)]
Code refactoring. Move common code into CommonPassManagerImpl :)

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

18 years agoMove CommonPassManagerImpl from PassManager.h to PassManager.cpp
Devang Patel [Sat, 11 Nov 2006 01:31:05 +0000 (01:31 +0000)]
Move CommonPassManagerImpl from PassManager.h to PassManager.cpp

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

18 years agoRemove analysis that is not preserved by the pass from AvailableAnalysis.
Devang Patel [Sat, 11 Nov 2006 01:24:55 +0000 (01:24 +0000)]
Remove analysis that is not preserved by the pass from AvailableAnalysis.

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

18 years agoKeep track if analysis made available by the pass.
Devang Patel [Sat, 11 Nov 2006 01:10:19 +0000 (01:10 +0000)]
Keep track if analysis made available by the pass.

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

18 years agoInstruction name changes.
Reid Spencer [Sat, 11 Nov 2006 01:04:13 +0000 (01:04 +0000)]
Instruction name changes.

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

18 years agoEnable path completion when typing the TESTSUITE= option by allowing the
Reid Spencer [Sat, 11 Nov 2006 01:02:45 +0000 (01:02 +0000)]
Enable path completion when typing the TESTSUITE= option by allowing the
test directory to precede the test suite name. That is, it will strip off
test/ from TESTSUITE which allows path completion from the command line.

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

18 years agodisallow preinc of a frameindex. This is not profitable and causes 2-addr
Chris Lattner [Sat, 11 Nov 2006 01:00:15 +0000 (01:00 +0000)]
disallow preinc of a frameindex.  This is not profitable and causes 2-addr
pass to explode.  This fixes a bunch of llc-beta failures on ppc last night.

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

18 years agoreduce indentation by using early exits. No functionality change.
Chris Lattner [Sat, 11 Nov 2006 00:56:29 +0000 (00:56 +0000)]
reduce indentation by using early exits.  No functionality change.

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

18 years agoKeep track of analysis required by the passes. Force use of new pass
Devang Patel [Sat, 11 Nov 2006 00:42:16 +0000 (00:42 +0000)]
Keep track of analysis required by the passes. Force use of new pass
manager if a pass does not preserve analysis that is used by other
passes.

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

18 years agomove big chunks of code out-of-line, no functionality change.
Chris Lattner [Sat, 11 Nov 2006 00:39:41 +0000 (00:39 +0000)]
move big chunks of code out-of-line, no functionality change.

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

18 years agoenable this test, check ppc64 as well.
Chris Lattner [Sat, 11 Nov 2006 00:13:07 +0000 (00:13 +0000)]
enable this test, check ppc64 as well.

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

18 years agoppc64 doesn't have lwau, don't attempt to form it.
Chris Lattner [Sat, 11 Nov 2006 00:08:42 +0000 (00:08 +0000)]
ppc64 doesn't have lwau, don't attempt to form it.

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

18 years agoAllow ENABLE_OPTIMIZED=0 to turn off optimization (turn on debug).
Reid Spencer [Sat, 11 Nov 2006 00:00:31 +0000 (00:00 +0000)]
Allow ENABLE_OPTIMIZED=0 to turn off optimization (turn on debug).

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

18 years agoimplement preinc support for r+i loads on ppc64
Chris Lattner [Fri, 10 Nov 2006 23:58:45 +0000 (23:58 +0000)]
implement preinc support for r+i loads on ppc64

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

18 years agoFix InstCombine/2006-11-10-ashr-miscompile.ll a miscompilation introduced
Chris Lattner [Fri, 10 Nov 2006 23:38:52 +0000 (23:38 +0000)]
Fix InstCombine/2006-11-10-ashr-miscompile.ll a miscompilation introduced
by the shr -> [al]shr patch.  This was reduced from 176.gcc.

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

18 years agoThis testcase is miscompiled by instcombine, reduced from 176.gcc
Chris Lattner [Fri, 10 Nov 2006 23:37:54 +0000 (23:37 +0000)]
This testcase is miscompiled by instcombine, reduced from 176.gcc

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

18 years agoAdd a note.
Evan Cheng [Fri, 10 Nov 2006 22:09:17 +0000 (22:09 +0000)]
Add a note.

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

18 years agoThese are done.
Evan Cheng [Fri, 10 Nov 2006 22:03:35 +0000 (22:03 +0000)]
These are done.

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

18 years agoDon't dag combine floating point select to max and min intrinsics. Those
Evan Cheng [Fri, 10 Nov 2006 21:43:37 +0000 (21:43 +0000)]
Don't dag combine floating point select to max and min intrinsics. Those
take v4f32 / v2f64 operands and may end up causing larger spills / restores.
Added X86 specific nodes X86ISD::FMAX, X86ISD::FMIN instead.

This fixes PR996.

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

18 years agoFix a dag combiner bug exposed by my recent instcombine patch. This fixes
Chris Lattner [Fri, 10 Nov 2006 21:37:15 +0000 (21:37 +0000)]
Fix a dag combiner bug exposed by my recent instcombine patch.  This fixes
CodeGen/Generic/2006-11-10-DAGCombineMiscompile.ll and PPC gsm/toast

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

18 years agonew testcase
Chris Lattner [Fri, 10 Nov 2006 21:36:07 +0000 (21:36 +0000)]
new testcase

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

18 years agos/PassManagerAnalysisHelper/CommonPassManagerImpl
Devang Patel [Fri, 10 Nov 2006 21:33:13 +0000 (21:33 +0000)]
s/PassManagerAnalysisHelper/CommonPassManagerImpl

Inherit CommonPassManagerImpl from Pass.

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

18 years agoFix a bug in SelectScalarSSELoad. Since the load is wrapped in a
Evan Cheng [Fri, 10 Nov 2006 21:23:04 +0000 (21:23 +0000)]
Fix a bug in SelectScalarSSELoad. Since the load is wrapped in a
SCALAR_TO_VECTOR, even if the hasOneUse() check pass we may end up folding
the load into two instructions. Make sure we check the SCALAR_TO_VECTOR
has only one use as well.

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

18 years agoMust have a frame pointer argument fixed. Now fails on PowerPC.
Jim Laskey [Fri, 10 Nov 2006 17:56:29 +0000 (17:56 +0000)]
Must have a frame pointer argument fixed.  Now fails on PowerPC.

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

18 years agoMust have a frame pointer.
Jim Laskey [Fri, 10 Nov 2006 17:51:25 +0000 (17:51 +0000)]
Must have a frame pointer.

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

18 years agodform 8/9 are identical to dform 1
Chris Lattner [Fri, 10 Nov 2006 17:51:02 +0000 (17:51 +0000)]
dform 8/9 are identical to dform 1

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

18 years agoThis is XFAILed on i[0-9]86 systems not Linux
Reid Spencer [Fri, 10 Nov 2006 17:47:28 +0000 (17:47 +0000)]
This is XFAILed on i[0-9]86 systems not Linux

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

18 years agoShut up the warning.
Jim Laskey [Fri, 10 Nov 2006 14:44:12 +0000 (14:44 +0000)]
Shut up the warning.

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

18 years agoFix a potential bug.
Evan Cheng [Fri, 10 Nov 2006 09:13:37 +0000 (09:13 +0000)]
Fix a potential bug.

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

18 years agoAdd implicit def / use operands to MachineInstr.
Evan Cheng [Fri, 10 Nov 2006 08:43:01 +0000 (08:43 +0000)]
Add implicit def / use operands to MachineInstr.

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