oota-llvm.git
18 years agoOnly count instructions as code size, not constant pools and other per-function stuff.
Chris Lattner [Fri, 16 Jun 2006 18:09:26 +0000 (18:09 +0000)]
Only count instructions as code size, not constant pools and other per-function stuff.

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

18 years agoSimplify interpreter construction.
Chris Lattner [Fri, 16 Jun 2006 18:08:38 +0000 (18:08 +0000)]
Simplify interpreter construction.

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

18 years agoDocument the subtarget features better, make sure that 64-bit mode, 64-bit
Chris Lattner [Fri, 16 Jun 2006 17:50:12 +0000 (17:50 +0000)]
Document the subtarget features better, make sure that 64-bit mode, 64-bit
support, and 64-bit register use are all consistent with each other.

Add a new "IsPPC" feature, to distinguish ppc32 vs ppc64 targets, use this
to configure TargetData differently.  This not makes ppc64 blow up on lots
of stuff :)

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

18 years agoRename some subtarget features. A CPU now can *have* 64-bit instructions,
Chris Lattner [Fri, 16 Jun 2006 17:34:12 +0000 (17:34 +0000)]
Rename some subtarget features.  A CPU now can *have* 64-bit instructions,
can in 32-bit mode we can choose to optionally *use* 64-bit registers.

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

18 years agoapple's compiler works too
Chris Lattner [Fri, 16 Jun 2006 17:20:33 +0000 (17:20 +0000)]
apple's compiler works too

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

18 years agoPR# not associated with XFAIL
Jim Laskey [Fri, 16 Jun 2006 16:57:43 +0000 (16:57 +0000)]
PR# not associated with XFAIL

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

18 years agodebug info is alive again
Jim Laskey [Fri, 16 Jun 2006 16:50:24 +0000 (16:50 +0000)]
debug info is alive again

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

18 years agoThis test isn't implemented yet
Chris Lattner [Fri, 16 Jun 2006 16:36:50 +0000 (16:36 +0000)]
This test isn't implemented yet

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

18 years agoAdd a error message to cbu to match bu
Andrew Lenharth [Fri, 16 Jun 2006 14:43:36 +0000 (14:43 +0000)]
Add a error message to cbu to match bu

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

18 years agomove header
Andrew Lenharth [Fri, 16 Jun 2006 14:33:53 +0000 (14:33 +0000)]
move header

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

18 years agoadd decimal form of LLVMDebugVersion
Jim Laskey [Fri, 16 Jun 2006 13:45:38 +0000 (13:45 +0000)]
add decimal form of LLVMDebugVersion

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

18 years ago1. Revise vector debug support.
Jim Laskey [Fri, 16 Jun 2006 13:14:03 +0000 (13:14 +0000)]
1. Revise vector debug support.

2. Update docs for vector debug support and new version control.

3. Simplify serialization of DebugDescInfo subclasses.

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

18 years agoMore libcall transformations:
Evan Cheng [Fri, 16 Jun 2006 08:36:35 +0000 (08:36 +0000)]
More libcall transformations:
printf("%s\n", str) -> puts(str)
printf("%c", c) -> putchar(c)
Also fixed fprintf(file, "%c", c) -> fputc(c, file)

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

18 years agoSimplify fprintf(file, "%s", str) to fputs(str, file).
Evan Cheng [Fri, 16 Jun 2006 04:52:30 +0000 (04:52 +0000)]
Simplify fprintf(file, "%s", str) to fputs(str, file).

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

18 years agoFirst baby step towards ppc64 support. This adds a new -march=ppc64 backend
Chris Lattner [Fri, 16 Jun 2006 01:37:27 +0000 (01:37 +0000)]
First baby step towards ppc64 support.  This adds a new -march=ppc64 backend
that is currently just like ppc32 :)

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

18 years agoFix Regression/Linker/2006-06-15-GlobalVarAnment.ll
Chris Lattner [Fri, 16 Jun 2006 01:24:04 +0000 (01:24 +0000)]
Fix Regression/Linker/2006-06-15-GlobalVarAnment.ll

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

18 years agoNew testcase, the linker is not merging alignments right.
Chris Lattner [Fri, 16 Jun 2006 01:20:58 +0000 (01:20 +0000)]
New testcase, the linker is not merging alignments right.

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

18 years agoOnly print the stack trace if it was requested. Previously, any call into
Reid Spencer [Fri, 16 Jun 2006 00:00:57 +0000 (00:00 +0000)]
Only print the stack trace if it was requested. Previously, any call into
the Signals module that registered the handlers would cause the stack trace
to be generated. Now, you must explicitly call PrintStackTraceOnErrorSignal
in order for that to happen.

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

18 years agoTeach the local allocator to know that live-in values (e.g. arguments) are
Chris Lattner [Thu, 15 Jun 2006 22:21:53 +0000 (22:21 +0000)]
Teach the local allocator to know that live-in values (e.g. arguments) are
live at function entry.  This prevents it from using arg registers for other
purposes before the arguments are used.

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

18 years agoAdd a note that Nate noticed.
Chris Lattner [Thu, 15 Jun 2006 21:33:31 +0000 (21:33 +0000)]
Add a note that Nate noticed.

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

18 years ago1. Support standard dwarf format (was bootstrapping in Apple format.)
Jim Laskey [Thu, 15 Jun 2006 20:51:43 +0000 (20:51 +0000)]
1. Support standard dwarf format (was bootstrapping in Apple format.)

2. Add vector support.

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

18 years agoWas pointed out that structure alignment and type alignment are not the same
Jim Laskey [Thu, 15 Jun 2006 19:37:14 +0000 (19:37 +0000)]
Was pointed out that structure alignment and type alignment are not the same
thing.  Doubles still need to be special cased.

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

18 years agoMake sure global doubles and vectors are aligned properly.
Jim Laskey [Thu, 15 Jun 2006 19:35:07 +0000 (19:35 +0000)]
Make sure global doubles and vectors are aligned properly.

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

18 years agoAdd some more matcher classes for shifts.
Chris Lattner [Thu, 15 Jun 2006 19:25:28 +0000 (19:25 +0000)]
Add some more matcher classes for shifts.

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

18 years agoImplement Transforms/InstCombine/bswap.ll, turning common shift/and/or bswap
Chris Lattner [Thu, 15 Jun 2006 19:07:26 +0000 (19:07 +0000)]
Implement Transforms/InstCombine/bswap.ll, turning common shift/and/or bswap
idioms into bswap intrinsics.

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

18 years agonew testcase, instcombine should turn these into llvm.bswap intrinsics.
Chris Lattner [Thu, 15 Jun 2006 19:06:42 +0000 (19:06 +0000)]
new testcase, instcombine should turn these into llvm.bswap intrinsics.

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

18 years agoFix building on case-sensitive file systems, grr :)
Chris Lattner [Thu, 15 Jun 2006 17:31:22 +0000 (17:31 +0000)]
Fix building on case-sensitive file systems, grr :)

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

18 years agoActually add instructions to the list of defined values so it gets
Reid Spencer [Thu, 15 Jun 2006 16:09:59 +0000 (16:09 +0000)]
Actually add instructions to the list of defined values so it gets
recognized as such!  This prevents the CppWriter from treating every
operand as a forward reference and making a mess of the output.

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

18 years agoAlignment of globals has not been quite right. Needed to drop the pointer type
Jim Laskey [Thu, 15 Jun 2006 13:10:58 +0000 (13:10 +0000)]
Alignment of globals has not been quite right.  Needed to drop the pointer type
to get the alignment of the element type.

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

18 years agoVector extract / insert index operand should have ptr type.
Evan Cheng [Thu, 15 Jun 2006 08:19:05 +0000 (08:19 +0000)]
Vector extract / insert index operand should have ptr type.

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

18 years agoType of extract_element index operand should be iPTR.
Evan Cheng [Thu, 15 Jun 2006 08:18:06 +0000 (08:18 +0000)]
Type of extract_element index operand should be iPTR.

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

18 years agoType of vector extract / insert index operand should be iPTR.
Evan Cheng [Thu, 15 Jun 2006 08:14:54 +0000 (08:14 +0000)]
Type of vector extract / insert index operand should be iPTR.

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

18 years agoConsistency. EXTRACT_ELEMENT index operand should have ptr type.
Evan Cheng [Thu, 15 Jun 2006 08:11:54 +0000 (08:11 +0000)]
Consistency. EXTRACT_ELEMENT index operand should have ptr type.

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

18 years agoAssert. Rather than silently stop printing.
Evan Cheng [Thu, 15 Jun 2006 08:10:56 +0000 (08:10 +0000)]
Assert. Rather than silently stop printing.

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

18 years agoAvoid undesirable behavior when assert is not enabled.
Evan Cheng [Thu, 15 Jun 2006 08:10:27 +0000 (08:10 +0000)]
Avoid undesirable behavior when assert is not enabled.

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

18 years agoInstructions with variable operands (variable_ops) can have a number required
Evan Cheng [Thu, 15 Jun 2006 07:22:16 +0000 (07:22 +0000)]
Instructions with variable operands (variable_ops) can have a number required
operands. e.g.
def CALL32r : I<0xFF, MRM2r, (ops GR32:$dst, variable_ops),
                "call {*}$dst", [(X86call GR32:$dst)]>;
TableGen should emit operand informations for the "required" operands.

Added a target instruction info flag M_VARIABLE_OPS to indicate the target
instruction may have more operands in addition to the minimum required
operands.

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

18 years agoAllow more use of iPTR in patterns.
Evan Cheng [Thu, 15 Jun 2006 00:16:37 +0000 (00:16 +0000)]
Allow more use of iPTR in patterns.

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

18 years agoX86 call instructions can take variable number of operands. Parameters of
Evan Cheng [Wed, 14 Jun 2006 22:24:55 +0000 (22:24 +0000)]
X86 call instructions can take variable number of operands. Parameters of
vector types are passed via XMM registers.

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

18 years agoAdded support for variable_ops.
Evan Cheng [Wed, 14 Jun 2006 22:22:20 +0000 (22:22 +0000)]
Added support for variable_ops.

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

18 years agoadd a note
Chris Lattner [Wed, 14 Jun 2006 21:26:18 +0000 (21:26 +0000)]
add a note

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

18 years agonew testcase, not currently working.
Chris Lattner [Wed, 14 Jun 2006 21:24:57 +0000 (21:24 +0000)]
new testcase, not currently working.

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

18 years agoFix support for optional input flag.
Evan Cheng [Wed, 14 Jun 2006 19:27:50 +0000 (19:27 +0000)]
Fix support for optional input flag.

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

18 years agoAdd argument registers to the end of call operand list (partial fix).
Evan Cheng [Wed, 14 Jun 2006 18:17:40 +0000 (18:17 +0000)]
Add argument registers to the end of call operand list (partial fix).

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

18 years agoChange versioning to per debug info descriptor (merged with tag.)
Jim Laskey [Wed, 14 Jun 2006 14:45:39 +0000 (14:45 +0000)]
Change versioning to per debug info descriptor (merged with tag.)

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

18 years agoPlace dwarf headers at earliest possible point. Well behaved when skipping
Jim Laskey [Wed, 14 Jun 2006 11:35:03 +0000 (11:35 +0000)]
Place dwarf headers at earliest possible point.  Well behaved when skipping
functions.

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

18 years agoFix Transforms/LoopUnswitch/2006-06-13-SingleEntryPHI.ll, a loop unswitch
Chris Lattner [Wed, 14 Jun 2006 04:46:17 +0000 (04:46 +0000)]
Fix Transforms/LoopUnswitch/2006-06-13-SingleEntryPHI.ll, a loop unswitch
bug exposed by the recent lcssa work.

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

18 years agonew testcase, distilled from povray
Chris Lattner [Wed, 14 Jun 2006 04:45:45 +0000 (04:45 +0000)]
new testcase, distilled from povray

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

18 years agoWhen asked not to delete useless PHIs, really don't delete them, no matter how
Owen Anderson [Wed, 14 Jun 2006 04:43:14 +0000 (04:43 +0000)]
When asked not to delete useless PHIs, really don't delete them, no matter how
redundant they are.

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

18 years agoUse the PotDoms map to memoize 'dominating value' lookup. With this patch,
Chris Lattner [Wed, 14 Jun 2006 01:13:57 +0000 (01:13 +0000)]
Use the PotDoms map to memoize 'dominating value' lookup.  With this patch,
LCSSA is still the slowest pass when gccas'ing 252.eon, but now it only takes
39s instead of 289s. :)

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

18 years agogetOperandNum(): error if specified operand number is out of range.
Evan Cheng [Tue, 13 Jun 2006 21:47:27 +0000 (21:47 +0000)]
getOperandNum(): error if specified operand number is out of range.

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

18 years agoFix another instance where PHI nodes need special treatment.
Owen Anderson [Tue, 13 Jun 2006 20:50:09 +0000 (20:50 +0000)]
Fix another instance where PHI nodes need special treatment.

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

18 years agoUpdate isLCSSAForm to handle PHI nodes specially for live-out detection. This
Owen Anderson [Tue, 13 Jun 2006 20:45:22 +0000 (20:45 +0000)]
Update isLCSSAForm to handle PHI nodes specially for live-out detection.  This
is the same as the recent patch to LCSSA.cpp.

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

18 years agoI am sure I had commited this workaround before. Perhaps soon I should sort it all out
Andrew Lenharth [Tue, 13 Jun 2006 20:34:47 +0000 (20:34 +0000)]
I am sure I had commited this workaround before.  Perhaps soon I should sort it all out

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

18 years agoFix a bug that was causing major slowdowns in povray. This was due to LCSSA
Owen Anderson [Tue, 13 Jun 2006 19:37:18 +0000 (19:37 +0000)]
Fix a bug that was causing major slowdowns in povray.  This was due to LCSSA
not handling PHI nodes correctly when determining if a value was live-out.

This patch reduces the number of detected live-out variables in the testcase
from 6565 to 485.

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

18 years agoIt really helps to be returning to the correct place
Andrew Lenharth [Tue, 13 Jun 2006 18:27:39 +0000 (18:27 +0000)]
It really helps to be returning to the correct place

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

18 years agoPort some bugfixes in shift handling from SimplifyDemandedBits over to
Chris Lattner [Tue, 13 Jun 2006 16:52:37 +0000 (16:52 +0000)]
Port some bugfixes in shift handling from SimplifyDemandedBits over to
ComputeMaskedBits.  DemandedMasks and KnownZero/One masks should never have
bits set out of the range of the base datatype.

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

18 years agoMy original test case was bogus. Reverting to crasher case.
Jim Laskey [Tue, 13 Jun 2006 15:22:49 +0000 (15:22 +0000)]
My original test case was bogus.  Reverting to crasher case.

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

18 years agoTests to make sure that ComputeMaskedBits discards bits for shifts.
Jim Laskey [Tue, 13 Jun 2006 13:10:44 +0000 (13:10 +0000)]
Tests to make sure that ComputeMaskedBits discards bits for shifts.

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

18 years agoTargetLowering::ComputeMaskedBits was not clearing reciprocal bits on shifts.
Jim Laskey [Tue, 13 Jun 2006 13:08:58 +0000 (13:08 +0000)]
TargetLowering::ComputeMaskedBits was not clearing reciprocal bits on shifts.

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

18 years agoCygwin support: use _alloca to allocate stack if > 4k. Patch by Anton Korobeynikov.
Evan Cheng [Tue, 13 Jun 2006 05:14:44 +0000 (05:14 +0000)]
Cygwin support: use _alloca to allocate stack if > 4k. Patch by Anton Korobeynikov.

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

18 years agoTeach bugpoint to kill optimization passes that run over the timeout limit,
Chris Lattner [Tue, 13 Jun 2006 03:10:48 +0000 (03:10 +0000)]
Teach bugpoint to kill optimization passes that run over the timeout limit,
which allows it to debug optimizer infinite loops.  This patch is contributed
by Nick Lewycky, thanks!

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

18 years agoDecribe the "implementation" keyword.
Chris Lattner [Tue, 13 Jun 2006 03:05:47 +0000 (03:05 +0000)]
Decribe the "implementation" keyword.

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

18 years agoGaar! Don't use r11 for CR save/restore, use R0. R11 can be register
Chris Lattner [Mon, 12 Jun 2006 23:59:16 +0000 (23:59 +0000)]
Gaar!  Don't use r11 for CR save/restore, use R0.  R11 can be register
allocated, thus live across the save/reload.  This fixes

llc-beta /MultiSource/Applications/spiff/spiff
llc-beta /MultiSource/Benchmarks/sim/sim:
llc-beta /MultiSource/Benchmarks/Ptrdist/bc/bc
llc-beta /MultiSource/Benchmarks/McCat/12-IOtest/iotest:
llc-beta /MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow
llc-beta /MultiSource/Benchmarks/Fhourstones-3.1/fhourstones3.1
llc-beta /MultiSource/Benchmarks/mediabench/adpcm/rawdaudio/rawdaudio
llc-beta /MultiSource/Benchmarks/mediabench/adpcm/rawcaudio/rawcaudio
llc-beta /MultiSource/Benchmarks/mediabench/g721/g721encode/encode
llc-beta /MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/cjpeg

and probably others, with -regalloc=local.

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

18 years agoFix spilling and reloading of CR regs to reload the right values. This fixes
Chris Lattner [Mon, 12 Jun 2006 21:50:57 +0000 (21:50 +0000)]
Fix spilling and reloading of CR regs to reload the right values.  This fixes
Olden/power (and probably others) with -regalloc=local.

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

18 years agoReapply my 6/9 changes. The bug Evan saw no longer occurs.
Owen Anderson [Mon, 12 Jun 2006 21:49:21 +0000 (21:49 +0000)]
Reapply my 6/9 changes.  The bug Evan saw no longer occurs.

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

18 years agoFix an infinite loop on Transforms/SimplifyCFG/2006-06-12-InfLoop.ll
Chris Lattner [Mon, 12 Jun 2006 20:18:01 +0000 (20:18 +0000)]
Fix an infinite loop on Transforms/SimplifyCFG/2006-06-12-InfLoop.ll

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

18 years agoTEstcase that makes simplifycfg infloop.
Chris Lattner [Mon, 12 Jun 2006 20:17:44 +0000 (20:17 +0000)]
TEstcase that makes simplifycfg infloop.

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

18 years agoAdd a new -compileflags options, remove old externals location specifiers.
Chris Lattner [Mon, 12 Jun 2006 19:03:17 +0000 (19:03 +0000)]
Add a new -compileflags options, remove old externals location specifiers.
People should just use -with-externals.

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

18 years agoMake sure to update the CFG correctly if a switch only has a default dest.
Chris Lattner [Mon, 12 Jun 2006 18:25:29 +0000 (18:25 +0000)]
Make sure to update the CFG correctly if a switch only has a default dest.
This fixes CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll

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

18 years agoNew testcase that crashes llc
Chris Lattner [Mon, 12 Jun 2006 18:24:32 +0000 (18:24 +0000)]
New testcase that crashes llc

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

18 years agoLet the alpha breakage begin. First Formals and RET. next Calls
Andrew Lenharth [Mon, 12 Jun 2006 18:09:24 +0000 (18:09 +0000)]
Let the alpha breakage begin.  First Formals and RET.  next Calls

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

18 years agoStart on my todo list
Andrew Lenharth [Mon, 12 Jun 2006 16:07:18 +0000 (16:07 +0000)]
Start on my todo list

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

18 years agolower more then 4 formal arguments. The offset is currently hard coded.
Rafael Espindola [Mon, 12 Jun 2006 12:28:08 +0000 (12:28 +0000)]
lower more then 4 formal arguments. The offset is currently hard coded.
implement SelectFrameIndex

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

18 years agoFix for 2006-06-26-MultipleExitsSingleBlock.
Owen Anderson [Mon, 12 Jun 2006 07:10:16 +0000 (07:10 +0000)]
Fix for 2006-06-26-MultipleExitsSingleBlock.

If a single exit block has multiple predecessors within the loop, it will
appear in the exit blocks list more than once.  LCSSA needs to take that into
account so that it doesn't double process that exit block.

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

18 years agoMake sure that LCSSA works properly when it encounters an exit block that has
Owen Anderson [Mon, 12 Jun 2006 07:05:47 +0000 (07:05 +0000)]
Make sure that LCSSA works properly when it encounters an exit block that has
more than one predecessor inside the loop.

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

18 years agoRe-commit the safe parts of my 6/9 patch. Still working on fixing the unsafe parts.
Owen Anderson [Sun, 11 Jun 2006 19:22:28 +0000 (19:22 +0000)]
Re-commit the safe parts of my 6/9 patch.  Still working on fixing the unsafe parts.

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

18 years agoBack out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison ...
Evan Cheng [Sun, 11 Jun 2006 09:32:57 +0000 (09:32 +0000)]
Back out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others).

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

18 years agoAdd a missing assertion that would have helped out Reid
Chris Lattner [Sat, 10 Jun 2006 04:16:23 +0000 (04:16 +0000)]
Add a missing assertion that would have helped out Reid

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

18 years agoWork around a nasty tblgen bug where it doesn't add operands for varargs
Chris Lattner [Sat, 10 Jun 2006 01:15:02 +0000 (01:15 +0000)]
Work around a nasty tblgen bug where it doesn't add operands for varargs
nodes correctly.

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

18 years agoFix a problem exposed by the local allocator. CALL instructions are not marked
Chris Lattner [Sat, 10 Jun 2006 01:14:28 +0000 (01:14 +0000)]
Fix a problem exposed by the local allocator.  CALL instructions are not marked
as using incoming argument registers, so the local allocator would clobber them
between their set and use.  To fix this, we give the call instructions a variable
number of uses in the CALL MachineInstr itself, so live variables understands
the live ranges of these register arguments.

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

18 years agoWrap to 80 cols
Chris Lattner [Fri, 9 Jun 2006 23:59:44 +0000 (23:59 +0000)]
Wrap to 80 cols

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

18 years agoAfter telling GCC to type of the input file with -x asm/-x c, switch back to
Chris Lattner [Fri, 9 Jun 2006 21:31:53 +0000 (21:31 +0000)]
After telling GCC to type of the input file with -x asm/-x c, switch back to
-x none, to not foul up autodetection of .a file or .dylibs.

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

18 years agoDon't pull in environ, not always safe. Global variables are bad anyway.
Evan Cheng [Fri, 9 Jun 2006 20:43:11 +0000 (20:43 +0000)]
Don't pull in environ, not always safe. Global variables are bad anyway.
Use execve when explicit environment variables ptr is available. Otherwise
just use execv.

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

18 years agoAdd LCSSA as a requirement for LoopUnswitch, and assert that LoopUnswitch preserves
Owen Anderson [Fri, 9 Jun 2006 18:40:32 +0000 (18:40 +0000)]
Add LCSSA as a requirement for LoopUnswitch, and assert that LoopUnswitch preserves
LCSSA.

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

18 years agoMake Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert
Owen Anderson [Fri, 9 Jun 2006 18:33:30 +0000 (18:33 +0000)]
Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert
on this.

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

18 years agoComments to appease sabre.
Evan Cheng [Fri, 9 Jun 2006 06:25:10 +0000 (06:25 +0000)]
Comments to appease sabre.

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

18 years agoMinor compilation speed improvement.
Evan Cheng [Fri, 9 Jun 2006 06:24:42 +0000 (06:24 +0000)]
Minor compilation speed improvement.

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

18 years agoRewriteExpr, either the new PHI node of induction variable or the
Evan Cheng [Fri, 9 Jun 2006 00:12:42 +0000 (00:12 +0000)]
RewriteExpr, either the new PHI node of induction variable or the
post-increment value, should be first cast to the appropriated type (to the
type of the common expr). Otherwise, the rewrite of a use based on (common +
iv) may end up with an incorrect type.

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

18 years agoUpdate some comments, and expose LCSSAID in preparation for having other passes
Owen Anderson [Thu, 8 Jun 2006 20:02:53 +0000 (20:02 +0000)]
Update some comments, and expose LCSSAID in preparation for having other passes
require LCSSA.

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

18 years agoFix X86/inline-asm.ll:test2, a case where an input value was implicitly
Chris Lattner [Thu, 8 Jun 2006 18:27:11 +0000 (18:27 +0000)]
Fix X86/inline-asm.ll:test2, a case where an input value was implicitly
truncated.

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

18 years agoAdd new testcase
Chris Lattner [Thu, 8 Jun 2006 18:26:48 +0000 (18:26 +0000)]
Add new testcase

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

18 years agoFix Regression/CodeGen/X86/inline-asm.ll, a case where inline asm causes
Chris Lattner [Thu, 8 Jun 2006 18:22:48 +0000 (18:22 +0000)]
Fix Regression/CodeGen/X86/inline-asm.ll, a case where inline asm causes
implement extension of a register.

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

18 years agoNew testcase, using "AX" as i32.
Chris Lattner [Thu, 8 Jun 2006 18:20:13 +0000 (18:20 +0000)]
New testcase, using "AX" as i32.

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

18 years agoSquelch a warning about signed/unsigned.
Reid Spencer [Thu, 8 Jun 2006 18:08:43 +0000 (18:08 +0000)]
Squelch a warning about signed/unsigned.

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

18 years agoAdd support for "m" inline asm constraints.
Chris Lattner [Thu, 8 Jun 2006 18:03:49 +0000 (18:03 +0000)]
Add support for "m" inline asm constraints.

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

18 years agoFix an assert-on-inline-inline-asm bug.
Chris Lattner [Thu, 8 Jun 2006 18:00:47 +0000 (18:00 +0000)]
Fix an assert-on-inline-inline-asm bug.

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

18 years agoFor PR804:
Reid Spencer [Thu, 8 Jun 2006 17:00:08 +0000 (17:00 +0000)]
For PR804:
Change the file size field of StatusInfo to be uint64_t instead of size_t
so that we know it is always 64 bits. This prevents some overflow on
systems where size_t is 32 bits when it ought to be 64.

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

18 years agoRemove dead code.
Vladimir Prus [Thu, 8 Jun 2006 16:03:13 +0000 (16:03 +0000)]
Remove dead code.

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

18 years agoNew method BasicBlock::getFirstNonPHI.
Vladimir Prus [Thu, 8 Jun 2006 15:46:18 +0000 (15:46 +0000)]
New method BasicBlock::getFirstNonPHI.

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

18 years agoThis no longer needs plugins, this it doesn't need all of VMCore.
Chris Lattner [Thu, 8 Jun 2006 00:25:44 +0000 (00:25 +0000)]
This no longer needs plugins, this it doesn't need all of VMCore.

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