oota-llvm.git
18 years agoComment out dead variables
Chris Lattner [Fri, 12 May 2006 17:57:54 +0000 (17:57 +0000)]
Comment out dead variables

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

18 years agoWhen reading the symbol table, make sure to delete the ArchiveMember
Reid Spencer [Fri, 12 May 2006 17:56:20 +0000 (17:56 +0000)]
When reading the symbol table, make sure to delete the ArchiveMember
created by reading the symbol table.

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

18 years agoRemove dead var
Chris Lattner [Fri, 12 May 2006 17:50:35 +0000 (17:50 +0000)]
Remove dead var

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

18 years agoRemove dead variable
Chris Lattner [Fri, 12 May 2006 17:41:45 +0000 (17:41 +0000)]
Remove dead variable

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

18 years agoremove dead variable.
Chris Lattner [Fri, 12 May 2006 17:33:59 +0000 (17:33 +0000)]
remove dead variable.

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

18 years agoRemove dead variable.
Chris Lattner [Fri, 12 May 2006 17:31:21 +0000 (17:31 +0000)]
Remove dead variable.

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

18 years agoAvoid defining dead result
Chris Lattner [Fri, 12 May 2006 17:29:40 +0000 (17:29 +0000)]
Avoid defining dead result

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

18 years agoRemove dead return value.
Chris Lattner [Fri, 12 May 2006 17:28:36 +0000 (17:28 +0000)]
Remove dead return value.

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

18 years agoCompile:
Chris Lattner [Fri, 12 May 2006 17:03:46 +0000 (17:03 +0000)]
Compile:

        %tmp152 = setgt uint %tmp144, %tmp149           ; <bool> [#uses=1]
        %tmp159 = setlt uint %tmp144, %tmp149           ; <bool> [#uses=1]
        %bothcond2 = or bool %tmp152, %tmp159           ; <bool> [#uses=1]

To setne, not setune, which causes an assertion fault.

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

18 years agoFix PowerPC/2006-05-12-rlwimi-crash.ll
Chris Lattner [Fri, 12 May 2006 16:29:37 +0000 (16:29 +0000)]
Fix PowerPC/2006-05-12-rlwimi-crash.ll

Nate, please verify that if InsertMask is 0, rlwimi shouldn't be used.
This fixes the crash and causes no PPC testsuite regressions.

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

18 years agonew testcase for a recent rlwimi crash.
Chris Lattner [Fri, 12 May 2006 16:28:13 +0000 (16:28 +0000)]
new testcase for a recent rlwimi crash.

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

18 years agoNoop instruction
Evan Cheng [Fri, 12 May 2006 07:47:00 +0000 (07:47 +0000)]
Noop instruction

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

18 years agoUnused instruction
Evan Cheng [Fri, 12 May 2006 07:42:01 +0000 (07:42 +0000)]
Unused instruction

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

18 years agoAdd a method to generate a string representation from a TargetData.
Owen Anderson [Fri, 12 May 2006 07:01:44 +0000 (07:01 +0000)]
Add a method to generate a string representation from a TargetData.

This continues the work on PR 761.

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

18 years agoRefactor a bunch of includes so that TargetMachine.h doesn't have to include
Owen Anderson [Fri, 12 May 2006 06:33:49 +0000 (06:33 +0000)]
Refactor a bunch of includes so that TargetMachine.h doesn't have to include
TargetData.h.  This should make recompiles a bit faster with my current
TargetData tinkering.

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

18 years agoFix some tabbing issues.
Owen Anderson [Fri, 12 May 2006 06:06:55 +0000 (06:06 +0000)]
Fix some tabbing issues.

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

18 years agoBacking out fix for PR770. Need to re-apply it after live range splitting is possible
Evan Cheng [Fri, 12 May 2006 06:06:34 +0000 (06:06 +0000)]
Backing out fix for PR770. Need to re-apply it after live range splitting is possible

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

18 years agoDuh. That could take a long time.
Evan Cheng [Fri, 12 May 2006 06:05:18 +0000 (06:05 +0000)]
Duh. That could take a long time.

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

18 years agoAdd a new constructor to TargetData that builds a TargetData from its
Owen Anderson [Fri, 12 May 2006 05:49:47 +0000 (05:49 +0000)]
Add a new constructor to TargetData that builds a TargetData from its
string representation.

This is part of PR 761.

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

18 years agoTwo simplifications for token factor nodes: simplify tf(x,x) -> x.
Chris Lattner [Fri, 12 May 2006 05:01:37 +0000 (05:01 +0000)]
Two simplifications for token factor nodes: simplify tf(x,x) -> x.
simplify tf(x,y,y,z) -> tf(x,y,z).

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

18 years agoNew scheduling test case.
Evan Cheng [Fri, 12 May 2006 01:59:17 +0000 (01:59 +0000)]
New scheduling test case.

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

18 years agoAdd capability to scheduler to commute nodes for profit.
Evan Cheng [Fri, 12 May 2006 01:58:24 +0000 (01:58 +0000)]
Add capability to scheduler to commute nodes for profit.
If a two-address code whose first operand has uses below, it should be commuted
when possible.

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

18 years agoTypo! How did we commute nodes before?!
Evan Cheng [Fri, 12 May 2006 01:46:26 +0000 (01:46 +0000)]
Typo! How did we commute nodes before?!

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

18 years agoFor extra sanity checking, fill free'd memory with garbage so we know that
Chris Lattner [Fri, 12 May 2006 00:03:12 +0000 (00:03 +0000)]
For extra sanity checking, fill free'd memory with garbage so we know that
people aren't reusing machine code buffers at all.

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

18 years agoFix some bugs in the freelist manipulation code.
Chris Lattner [Thu, 11 May 2006 23:56:57 +0000 (23:56 +0000)]
Fix some bugs in the freelist manipulation code.

Finally, implement ExecutionEngine::freeMachineCodeForFunction.

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

18 years agoRefactor scheduler code. Move register-reduction list scheduler to a
Evan Cheng [Thu, 11 May 2006 23:55:42 +0000 (23:55 +0000)]
Refactor scheduler code. Move register-reduction list scheduler to a
separate file. Added an initial implementation of top-down register pressure
reduction list scheduler.

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

18 years agoSignificantly revamp allocation of machine code to use free lists, real
Chris Lattner [Thu, 11 May 2006 23:08:08 +0000 (23:08 +0000)]
Significantly revamp allocation of machine code to use free lists, real
allocation policies and much more.  All this complexity, and we have no
functionality change, woo! :)

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

18 years agoRefactor some code, making it simpler.
Chris Lattner [Thu, 11 May 2006 17:11:52 +0000 (17:11 +0000)]
Refactor some code, making it simpler.
When doing the initial pass of constant folding, if we get a constantexpr,
simplify the constant expr like we would do if the constant is folded in the
normal loop.

This fixes the missed-optimization regression in
Transforms/InstCombine/getelementptr.ll last night.

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

18 years agoAdd MOV16_rm / MOV32_rm and MOV16_mr / MOV32_mr to isLoadFromStackSlot and isStoreToS...
Evan Cheng [Thu, 11 May 2006 07:33:49 +0000 (07:33 +0000)]
Add MOV16_rm / MOV32_rm and MOV16_mr / MOV32_mr to isLoadFromStackSlot and isStoreToStackSlot

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

18 years agoAlso add super- register class info.
Evan Cheng [Thu, 11 May 2006 07:31:44 +0000 (07:31 +0000)]
Also add super- register class info.

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

18 years agoAlso add super- register classes info.
Evan Cheng [Thu, 11 May 2006 07:30:26 +0000 (07:30 +0000)]
Also add super- register classes info.

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

18 years agoSet weight of zero length intervals to infinite to prevent them from being
Evan Cheng [Thu, 11 May 2006 07:29:24 +0000 (07:29 +0000)]
Set weight of zero length intervals to infinite to prevent them from being
spilled.

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

18 years agoBacking out previous check-in.
Evan Cheng [Thu, 11 May 2006 07:28:16 +0000 (07:28 +0000)]
Backing out previous check-in.

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

18 years agoFix some problems linking stuff in libTarget.
Owen Anderson [Thu, 11 May 2006 03:10:15 +0000 (03:10 +0000)]
Fix some problems linking stuff in libTarget.

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

18 years agoIf the live interval legnth is essentially zero, i.e. in every live range
Evan Cheng [Wed, 10 May 2006 22:30:41 +0000 (22:30 +0000)]
If the live interval legnth is essentially zero, i.e. in every live range
the use follows def immediately, it doesn't make sense to spill it and
hope it will be easier to allocate for this LI.

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

18 years agoUpdate test case
Evan Cheng [Wed, 10 May 2006 19:53:05 +0000 (19:53 +0000)]
Update test case

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

18 years agoTwo changes:
Chris Lattner [Wed, 10 May 2006 19:00:36 +0000 (19:00 +0000)]
Two changes:

1. Implement InstCombine/deadcode.ll by not adding instructions in unreachable
   blocks (due to constants in conditional branches/switches) to the worklist.
   This causes them to be deleted before instcombine starts up, leading to
   better optimization.

2. In the prepass over instructions, do trivial constprop/dce as we go.  This
   has the effect of improving the effectiveness of #1.  In addition, it
   *significantly* speeds up instcombine on test cases with large amounts of
   constant folding code (for example, that produced by code specialization
   or partial evaluation).  In one example, it speeds up instcombine from
   0.0589s to 0.0224s with a release build (a 2.6x speedup).

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

18 years agoNew testcase, check that dead code doesn't pessimize instcombine
Chris Lattner [Wed, 10 May 2006 18:56:04 +0000 (18:56 +0000)]
New testcase, check that dead code doesn't pessimize instcombine

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

18 years agoFix the PowerPC JIT-only failure on UnitTests/Vector/sumarray-dbl, which is
Chris Lattner [Wed, 10 May 2006 06:38:32 +0000 (06:38 +0000)]
Fix the PowerPC JIT-only failure on UnitTests/Vector/sumarray-dbl, which is
really a bad codegen bug that LLC happens to get lucky with. I must chat with
Nate for the proper fix.

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

18 years agoTemplatify RegReductionPriorityQueue
Evan Cheng [Wed, 10 May 2006 06:16:44 +0000 (06:16 +0000)]
Templatify RegReductionPriorityQueue

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

18 years agoAdd alloca/malloc ctors that don't take array sizes.
Chris Lattner [Wed, 10 May 2006 04:38:35 +0000 (04:38 +0000)]
Add alloca/malloc ctors that don't take array sizes.

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

18 years agoAdd an assertion for a common error
Chris Lattner [Wed, 10 May 2006 04:32:43 +0000 (04:32 +0000)]
Add an assertion for a common error

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

18 years agoWatch out for the following case:
Evan Cheng [Wed, 10 May 2006 02:47:57 +0000 (02:47 +0000)]
Watch out for the following case:
1. Use expects a chain output.
2. Node is expanded into multiple target ops.
3. One of the inner node produces a chain, the outer most one doesn't.

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

18 years agoFix a load folding bug. It is exposed by a multi- resulting instructions
Evan Cheng [Wed, 10 May 2006 00:05:46 +0000 (00:05 +0000)]
Fix a load folding bug. It is exposed by a multi- resulting instructions
def : Pat<> pattern.

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

18 years agoFix PR773
Nate Begeman [Tue, 9 May 2006 18:20:51 +0000 (18:20 +0000)]
Fix PR773

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

18 years agoThis method doesn't need to be virtual, thanks to Reid for pointing this out.
Chris Lattner [Tue, 9 May 2006 17:29:17 +0000 (17:29 +0000)]
This method doesn't need to be virtual, thanks to Reid for pointing this out.

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

18 years agoFix a regression in my patch from last night that broke the llvmgcc4 build on
Chris Lattner [Tue, 9 May 2006 16:41:59 +0000 (16:41 +0000)]
Fix a regression in my patch from last night that broke the llvmgcc4 build on
ppc

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

18 years agoIndent .data/.text in the .s file
Chris Lattner [Tue, 9 May 2006 16:15:00 +0000 (16:15 +0000)]
Indent .data/.text in the .s file

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

18 years agoAnother instruction scheduling test case
Evan Cheng [Tue, 9 May 2006 07:20:24 +0000 (07:20 +0000)]
Another instruction scheduling test case

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

18 years agoAdd pseudo dependency to force a def&use operand to be scheduled last (unless
Evan Cheng [Tue, 9 May 2006 07:13:34 +0000 (07:13 +0000)]
Add pseudo dependency to force a def&use operand to be scheduled last (unless
the distance between the def and another use is much longer). This is under
option control for now "-sched-lower-defnuse".

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

18 years agoDebugging info
Evan Cheng [Tue, 9 May 2006 06:55:15 +0000 (06:55 +0000)]
Debugging info

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

18 years agoRemove a completed entry.
Evan Cheng [Tue, 9 May 2006 06:54:05 +0000 (06:54 +0000)]
Remove a completed entry.

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

18 years agoTest case for PR770
Evan Cheng [Tue, 9 May 2006 06:48:12 +0000 (06:48 +0000)]
Test case for PR770

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

18 years agoPR 770 - permit coallescing of registers in subset register classes.
Evan Cheng [Tue, 9 May 2006 06:37:48 +0000 (06:37 +0000)]
PR 770 - permit coallescing of registers in subset register classes.

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

18 years agoAdded sub- register classes information.
Evan Cheng [Tue, 9 May 2006 06:35:30 +0000 (06:35 +0000)]
Added sub- register classes information.

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

18 years agoAdd sub-register class information.
Evan Cheng [Tue, 9 May 2006 06:34:26 +0000 (06:34 +0000)]
Add sub-register class information.

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

18 years agoImplement MASM sections correctly, without a "has masm sections flag" and a bunch...
Chris Lattner [Tue, 9 May 2006 05:33:48 +0000 (05:33 +0000)]
Implement MASM sections correctly, without a "has masm sections flag" and a bunch of special case code.

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

18 years agoImplement MASM sections correctly, without a "has masm sections flag" and a
Chris Lattner [Tue, 9 May 2006 05:33:28 +0000 (05:33 +0000)]
Implement MASM sections correctly, without a "has masm sections flag" and a
bunch of special case code.

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

18 years agoOh yeah, there are two of these now, unify both.
Chris Lattner [Tue, 9 May 2006 05:24:50 +0000 (05:24 +0000)]
Oh yeah, there are two of these now, unify both.

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

18 years agoSetting SwitchToSectionDirective properly in the MASM backend permits a bunch
Chris Lattner [Tue, 9 May 2006 05:23:12 +0000 (05:23 +0000)]
Setting SwitchToSectionDirective properly in the MASM backend permits a bunch
of code to be unified.

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

18 years agoMASM doesn't have one of these.
Chris Lattner [Tue, 9 May 2006 05:21:47 +0000 (05:21 +0000)]
MASM doesn't have one of these.

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

18 years agoDon't prefix section directives with a tab. Doing so causes blank lines to
Chris Lattner [Tue, 9 May 2006 05:19:59 +0000 (05:19 +0000)]
Don't prefix section directives with a tab.  Doing so causes blank lines to
be emitted to the .s file.

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

18 years agoMake the masm codepath work like the normal code path.
Chris Lattner [Tue, 9 May 2006 05:15:58 +0000 (05:15 +0000)]
Make the masm codepath work like the normal code path.

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

18 years agoPreserve prior behavior
Chris Lattner [Tue, 9 May 2006 05:15:24 +0000 (05:15 +0000)]
Preserve prior behavior

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

18 years agoThe MASM asmprinter has been fixed, these hacks are no longer needed.
Chris Lattner [Tue, 9 May 2006 05:13:34 +0000 (05:13 +0000)]
The MASM asmprinter has been fixed, these hacks are no longer needed.

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

18 years agoFix the MASM asmprinter's lies. It does not want to emit code to .text/.data
Chris Lattner [Tue, 9 May 2006 05:12:53 +0000 (05:12 +0000)]
Fix the MASM asmprinter's lies.  It does not want to emit code to .text/.data
it wants it emitted to _text/_data.

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

18 years agoSplit SwitchSection into SwitchTo{Text|Data}Section methods.
Chris Lattner [Tue, 9 May 2006 04:59:56 +0000 (04:59 +0000)]
Split SwitchSection into SwitchTo{Text|Data}Section methods.

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

18 years agoSplit SwitchSection into the SwitchTo{Text|Data}Section functions, to better
Chris Lattner [Tue, 9 May 2006 04:59:30 +0000 (04:59 +0000)]
Split SwitchSection into the SwitchTo{Text|Data}Section functions, to better
support assemblers that distinguish the two.

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

18 years agoSome notes and thoughts to myself
Chris Lattner [Tue, 9 May 2006 04:58:46 +0000 (04:58 +0000)]
Some notes and thoughts to myself

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

18 years agoPatch to make some xforms preserve each other. Patch contributed by
Chris Lattner [Tue, 9 May 2006 04:13:41 +0000 (04:13 +0000)]
Patch to make some xforms preserve each other.  Patch contributed by
Domagoj Babic!

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

18 years agoUse the -dumpversion option to llvm-gcc which gives us just the version #
Reid Spencer [Tue, 9 May 2006 00:31:01 +0000 (00:31 +0000)]
Use the -dumpversion option to llvm-gcc which gives us just the version #
and is unlikely to change in future releases. This also simplifies the
parsing of the full and major llvm-gcc version numbers in the script.

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

18 years agoMove some methods out of line so that MutexGuard.h isn't needed in a public header.
Chris Lattner [Mon, 8 May 2006 22:00:52 +0000 (22:00 +0000)]
Move some methods out of line so that MutexGuard.h isn't needed in a public header.

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

18 years agoMove methods out of line so that MutexGuard.h isn't required in the header.
Chris Lattner [Mon, 8 May 2006 22:00:26 +0000 (22:00 +0000)]
Move methods out of line so that MutexGuard.h isn't required in the header.

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

18 years agoAnother bad case I noticed
Chris Lattner [Mon, 8 May 2006 21:39:45 +0000 (21:39 +0000)]
Another bad case I noticed

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

18 years agoadd a note
Chris Lattner [Mon, 8 May 2006 21:24:21 +0000 (21:24 +0000)]
add a note

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

18 years agoMake the case I just checked in stronger. Now we compile this:
Chris Lattner [Mon, 8 May 2006 21:18:59 +0000 (21:18 +0000)]
Make the case I just checked in stronger.  Now we compile this:

short test2(short X, short x) {
  int Y = (short)(X+x);
  return Y >> 1;
}

to:

_test2:
        add r2, r3, r4
        extsh r2, r2
        srawi r3, r2, 1
        blr

instead of:

_test2:
        add r2, r3, r4
        extsh r2, r2
        srwi r2, r2, 1
        extsh r3, r2
        blr

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

18 years agoImplement and_sext.ll:test3, generating:
Chris Lattner [Mon, 8 May 2006 20:59:41 +0000 (20:59 +0000)]
Implement and_sext.ll:test3, generating:

_test4:
        srawi r3, r3, 16
        blr

instead of:

_test4:
        srwi r2, r3, 16
        extsh r3, r2
        blr

for:

short test4(unsigned X) {
  return (X >> 16);
}

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

18 years agonew testcase
Chris Lattner [Mon, 8 May 2006 20:58:58 +0000 (20:58 +0000)]
new testcase

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

18 years agoYet more readme updating
Nate Begeman [Mon, 8 May 2006 20:54:02 +0000 (20:54 +0000)]
Yet more readme updating

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

18 years agoCompile this:
Chris Lattner [Mon, 8 May 2006 20:51:54 +0000 (20:51 +0000)]
Compile this:

short test4(unsigned X) {
  return (X >> 16);
}

to:

_test4:
        movl 4(%esp), %eax
        sarl $16, %eax
        ret

instead of:

_test4:
        movl $-65536, %eax
        andl 4(%esp), %eax
        sarl $16, %eax
        ret

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

18 years agoNew note about something bad happening in target independent optimizers
Nate Begeman [Mon, 8 May 2006 20:08:28 +0000 (20:08 +0000)]
New note about something bad happening in target independent optimizers

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

18 years agoProving once again that I am not as smart as the compiler
Nate Begeman [Mon, 8 May 2006 19:09:24 +0000 (19:09 +0000)]
Proving once again that I am not as smart as the compiler

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

18 years agoFold more shifts into inserts, and update the README
Nate Begeman [Mon, 8 May 2006 17:38:32 +0000 (17:38 +0000)]
Fold more shifts into inserts, and update the README

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

18 years agoFold shifts with undef operands.
Chris Lattner [Mon, 8 May 2006 17:29:49 +0000 (17:29 +0000)]
Fold shifts with undef operands.

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

18 years agoWhen tracking demanded bits, if any bits from the sext of an SRA are demanded,
Chris Lattner [Mon, 8 May 2006 17:22:53 +0000 (17:22 +0000)]
When tracking demanded bits, if any bits from the sext of an SRA are demanded,
then so is the input sign bit.  This fixes mediabench/g721 on X86.

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

18 years agoMake emission of jump tables a bit less conservative; they are now required
Nate Begeman [Mon, 8 May 2006 16:51:36 +0000 (16:51 +0000)]
Make emission of jump tables a bit less conservative; they are now required
to be only 31.25% dense, rather than 75% dense.

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

18 years agoFixing truncate. Previously we were emitting truncate from r16 to r8 as
Evan Cheng [Mon, 8 May 2006 08:01:26 +0000 (08:01 +0000)]
Fixing truncate. Previously we were emitting truncate from r16 to r8 as
movw. That is we promote the destination operand to r16. So
        %CH = TRUNC_R16_R8 %BP
is emitted as
        movw %bp, %cx.

This is incorrect. If %cl is live, it would be clobbered.
Ideally we want to do the opposite, that is emitted it as
        movb ??, %ch
But this is not possible since %bp does not have a r8 sub-register.

We are now defining a new register class R16_ which is a subclass of R16
containing only those 16-bit registers that have r8 sub-registers (i.e.
AX - DX). We isel the truncate to two instructions, a MOV16to16_ to copy the
value to the R16_ class, followed by a TRUNC_R16_R8.

Due to bug 770, the register colaescer is not going to coalesce between R16 and
R16_. That will be fixed later so we can eliminate the MOV16to16_. Right now, it
can only be eliminated if we are lucky that source and destination registers are
the same.

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

18 years agoMove the definition of value_use_iterator::getOperandNo to User.h where the
Chris Lattner [Mon, 8 May 2006 05:59:36 +0000 (05:59 +0000)]
Move the definition of value_use_iterator::getOperandNo to User.h where the
definition of the User class is available, this fixes the  build with some
compiler versions.

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

18 years agoUpdate some stuff now that the new rlwimi code has gone in
Nate Begeman [Mon, 8 May 2006 02:52:38 +0000 (02:52 +0000)]
Update some stuff now that the new rlwimi code has gone in

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

18 years agoFix PR772
Nate Begeman [Mon, 8 May 2006 01:35:01 +0000 (01:35 +0000)]
Fix PR772

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

18 years agoRemove unncessary include
Nate Begeman [Mon, 8 May 2006 01:33:11 +0000 (01:33 +0000)]
Remove unncessary include

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

18 years agoThis test passes now, remove xfail marker
Chris Lattner [Sun, 7 May 2006 18:16:31 +0000 (18:16 +0000)]
This test passes now, remove xfail marker

Change test to be a positive test instead of a negative test

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

18 years agoTypo's
Evan Cheng [Sun, 7 May 2006 10:10:20 +0000 (10:10 +0000)]
Typo's

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

18 years agoUnlike Unix, Windows won't let a file be implicitly replaced via renaming without...
Jeff Cohen [Sun, 7 May 2006 02:51:51 +0000 (02:51 +0000)]
Unlike Unix, Windows won't let a file be implicitly replaced via renaming without explicit permission.

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

18 years agoNew rlwimi implementation, which is superior to the old one. There are
Nate Begeman [Sun, 7 May 2006 00:23:38 +0000 (00:23 +0000)]
New rlwimi implementation, which is superior to the old one. There are
still a couple missed optimizations, but we now generate all the possible
rlwimis for multiple inserts into the same bitfield.  More regression tests
to come.

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

18 years agoUse ComputeMaskedBits to determine # sign bits as a fallback. This allows us
Chris Lattner [Sat, 6 May 2006 23:48:13 +0000 (23:48 +0000)]
Use ComputeMaskedBits to determine # sign bits as a fallback.  This allows us
to handle all kinds of stuff, including silly things like:
sextinreg(setcc,i16) -> setcc.

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

18 years agoAdd some more sign propagation cases
Chris Lattner [Sat, 6 May 2006 23:40:29 +0000 (23:40 +0000)]
Add some more sign propagation cases

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

18 years agoApply bug fix supplied by Greg Pettyjohn for a bug he found: '<invalid>' is not...
Jeff Cohen [Sat, 6 May 2006 23:25:53 +0000 (23:25 +0000)]
Apply bug fix supplied by Greg Pettyjohn for a bug he found:  '<invalid>' is not a legal path on Windows.

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

18 years agoSimplify some code, add a couple minor missed folds
Chris Lattner [Sat, 6 May 2006 23:06:26 +0000 (23:06 +0000)]
Simplify some code, add a couple minor missed folds

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

18 years agoconstant fold sign_extend_inreg
Chris Lattner [Sat, 6 May 2006 23:05:41 +0000 (23:05 +0000)]
constant fold sign_extend_inreg

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