oota-llvm.git
18 years agoNew test case: use lea for imul by some constants.
Evan Cheng [Sat, 25 Feb 2006 10:16:10 +0000 (10:16 +0000)]
New test case: use lea for imul by some constants.

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

18 years agolea.ll is XFAIL until we implement convertToThreeAddress.
Evan Cheng [Sat, 25 Feb 2006 10:15:22 +0000 (10:15 +0000)]
lea.ll is XFAIL until we implement convertToThreeAddress.

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

18 years ago* Cleaned up addressing mode matching code.
Evan Cheng [Sat, 25 Feb 2006 10:09:08 +0000 (10:09 +0000)]
* Cleaned up addressing mode matching code.
* Cleaned up and tweaked LEA cost analysis code. Removed some hacks.
* Handle ADD $X, c to MOV32ri $X+c. These patterns cannot be autogen'd and
  they need to be matched before LEA.

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

18 years agoUpdates.
Evan Cheng [Sat, 25 Feb 2006 10:04:07 +0000 (10:04 +0000)]
Updates.

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

18 years ago* Allow mul, shl nodes to be codegen'd as LEA (if appropriate).
Evan Cheng [Sat, 25 Feb 2006 10:02:21 +0000 (10:02 +0000)]
* Allow mul, shl nodes to be codegen'd as LEA (if appropriate).
* Add patterns to handle GlobalAddress, ConstantPool, etc.
  MOV32ri to materialize these nodes in registers.
  ADD32ri to handle %reg + GA, etc.
  MOV32mi to handle store GA, etc. to memory.

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

18 years agoConstantPoolIndex is now the displacement field of addressing mode.
Evan Cheng [Sat, 25 Feb 2006 09:56:50 +0000 (09:56 +0000)]
ConstantPoolIndex is now the displacement field of addressing mode.

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

18 years agoAdded a common about the need for X86ISD::Wrapper.
Evan Cheng [Sat, 25 Feb 2006 09:55:19 +0000 (09:55 +0000)]
Added a common about the need for X86ISD::Wrapper.

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

18 years agoAdded an offset field to ConstantPoolSDNode.
Evan Cheng [Sat, 25 Feb 2006 09:54:52 +0000 (09:54 +0000)]
Added an offset field to ConstantPoolSDNode.

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

18 years agothis fails, mark it as such
Chris Lattner [Sat, 25 Feb 2006 08:18:43 +0000 (08:18 +0000)]
this fails, mark it as such

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

18 years agoFix a bug that Evan exposed with some changes he's making, and that was
Chris Lattner [Sat, 25 Feb 2006 02:17:31 +0000 (02:17 +0000)]
Fix a bug that Evan exposed with some changes he's making, and that was
exposed with a fastcc problem (breaking pcompress2 on x86 with -enable-x86-fastcc).

When reloading a reused reg, make sure to invalidate the reloaded reg, and
check to see if there are any other pending uses of the same register.

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

18 years agoRemove debugging printout :)
Chris Lattner [Sat, 25 Feb 2006 02:03:40 +0000 (02:03 +0000)]
Remove debugging printout :)

Add a minor compile time win, no codegen change.

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

18 years agoRefactor some code from being inline to being out in a new class with methods.
Chris Lattner [Sat, 25 Feb 2006 01:51:33 +0000 (01:51 +0000)]
Refactor some code from being inline to being out in a new class with methods.
This gets rid of two gotos, which is always nice, and also adds some comments.

No functionality change, this is just a refactor.

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

18 years agoFix an obvious bug exposed when we are doing
Evan Cheng [Sat, 25 Feb 2006 01:37:02 +0000 (01:37 +0000)]
Fix an obvious bug exposed when we are doing
ADD X, 4
==>
MOV32ri $X+4, ...

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

18 years agoAdd memory printing support for PPC. Input memory operands now work with
Chris Lattner [Fri, 24 Feb 2006 20:27:40 +0000 (20:27 +0000)]
Add memory printing support for PPC.  Input memory operands now work with
inline asms! :)

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

18 years agoUse the PrintAsmMemoryOperand to print addressing modes.
Chris Lattner [Fri, 24 Feb 2006 20:21:58 +0000 (20:21 +0000)]
Use the PrintAsmMemoryOperand to print addressing modes.

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

18 years agoAdd a PrintAsmMemoryOperand method for printing addresses
Chris Lattner [Fri, 24 Feb 2006 20:21:12 +0000 (20:21 +0000)]
Add a PrintAsmMemoryOperand method for printing addresses

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

18 years agoPass all the flags to the asm printer, not just the # operands.
Chris Lattner [Fri, 24 Feb 2006 19:50:58 +0000 (19:50 +0000)]
Pass all the flags to the asm printer, not just the # operands.

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

18 years agorename NumOps -> NumVals to avoid shadowing a NumOps var in an outer scope.
Chris Lattner [Fri, 24 Feb 2006 19:18:20 +0000 (19:18 +0000)]
rename NumOps -> NumVals to avoid shadowing a NumOps var in an outer scope.

Add support for addressing modes.

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

18 years agoRefactor operand adding out to a new AddOperand method
Chris Lattner [Fri, 24 Feb 2006 18:54:03 +0000 (18:54 +0000)]
Refactor operand adding out to a new AddOperand method

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

18 years agoadd a method
Chris Lattner [Fri, 24 Feb 2006 18:53:51 +0000 (18:53 +0000)]
add a method

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

18 years agoFix a problem that Nate noticed that boils down to an over conservative check
Chris Lattner [Fri, 24 Feb 2006 18:05:58 +0000 (18:05 +0000)]
Fix a problem that Nate noticed that boils down to an over conservative check
in the code that does "select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y)))".
We now compile this loop:

LBB1_1: ; no_exit
        add r6, r2, r3
        subf r3, r2, r3
        cmpwi cr0, r2, 0
        addi r7, r5, 4
        lwz r2, 0(r5)
        addi r4, r4, 1
        blt cr0, LBB1_4 ; no_exit
LBB1_3: ; no_exit
        mr r3, r6
LBB1_4: ; no_exit
        cmpwi cr0, r4, 16
        mr r5, r7
        bne cr0, LBB1_1 ; no_exit

into this instead:

LBB1_1: ; no_exit
        srawi r6, r2, 31
        add r2, r2, r6
        xor r6, r2, r6
        addi r7, r5, 4
        lwz r2, 0(r5)
        addi r4, r4, 1
        add r3, r3, r6
        cmpwi cr0, r4, 16
        mr r5, r7
        bne cr0, LBB1_1 ; no_exit

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

18 years agoAdd pointer and reference types. Added short-term code to ignore NULL types
Jim Laskey [Fri, 24 Feb 2006 16:46:40 +0000 (16:46 +0000)]
Add pointer and reference types.  Added short-term code to ignore NULL types
(to allow llvm-gcc4 to build.)

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

18 years agoGet VC++ building again.
Jeff Cohen [Fri, 24 Feb 2006 02:52:40 +0000 (02:52 +0000)]
Get VC++ building again.

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

18 years agoImplement (most of) selection of inline asm memory operands.
Chris Lattner [Fri, 24 Feb 2006 02:13:54 +0000 (02:13 +0000)]
Implement (most of) selection of inline asm memory operands.

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

18 years agoSelect inline asm memory operands.
Chris Lattner [Fri, 24 Feb 2006 02:13:31 +0000 (02:13 +0000)]
Select inline asm memory operands.

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

18 years agoImplement selection of inline asm memory operands
Chris Lattner [Fri, 24 Feb 2006 02:13:12 +0000 (02:13 +0000)]
Implement selection of inline asm memory operands

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

18 years agoAdd some hooks for selecting memory addresses.
Chris Lattner [Fri, 24 Feb 2006 02:12:52 +0000 (02:12 +0000)]
Add some hooks for selecting memory addresses.

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

18 years agoLower C_Memory operands.
Chris Lattner [Fri, 24 Feb 2006 01:11:24 +0000 (01:11 +0000)]
Lower C_Memory operands.

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

18 years agoRecognize memory operand codes
Chris Lattner [Fri, 24 Feb 2006 01:10:46 +0000 (01:10 +0000)]
Recognize memory operand codes

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

18 years agoAdd C_Memory operand type
Chris Lattner [Fri, 24 Feb 2006 01:10:14 +0000 (01:10 +0000)]
Add C_Memory operand type

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

18 years agoParse the %*# constraint modifiers
Chris Lattner [Thu, 23 Feb 2006 23:36:53 +0000 (23:36 +0000)]
Parse the %*# constraint modifiers

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

18 years agoadd a new flag
Chris Lattner [Thu, 23 Feb 2006 23:36:23 +0000 (23:36 +0000)]
add a new flag

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

18 years agoAdded basic support for typedefs.
Jim Laskey [Thu, 23 Feb 2006 22:37:30 +0000 (22:37 +0000)]
Added basic support for typedefs.

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

18 years agoPPC JIT relocation model should be DynamicNoPIC.
Evan Cheng [Thu, 23 Feb 2006 22:18:07 +0000 (22:18 +0000)]
PPC JIT relocation model should be DynamicNoPIC.

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

18 years ago- Clean up the lowering and selection code of ConstantPool, GlobalAddress,
Evan Cheng [Thu, 23 Feb 2006 20:41:18 +0000 (20:41 +0000)]
- Clean up the lowering and selection code of ConstantPool, GlobalAddress,
  and ExternalSymbol.
- Use C++ code (rather than tblgen'd selection code) to match the above
  mentioned leaf nodes. Do not mutate and nodes and do not record the
  selection in CodeGenMap. These nodes should be safe to duplicate. This is
  a performance win.

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

18 years agoFix an endianness problem on big-endian targets with expanded operands
Chris Lattner [Thu, 23 Feb 2006 20:06:57 +0000 (20:06 +0000)]
Fix an endianness problem on big-endian targets with expanded operands
to inline asms.  Mark some methods const.

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

18 years agoImplement the PPC inline asm "L" modifier. This allows us to compile:
Chris Lattner [Thu, 23 Feb 2006 19:31:10 +0000 (19:31 +0000)]
Implement the PPC inline asm "L" modifier.  This allows us to compile:

long long test(long long X) {
  __asm__("foo %0 %L0 %1 %L1" : "=r"(X): "r"(X));
  return X;
}

to:
        foo r2 r3 r2 r3

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

18 years agoRecord all of the expanded registers in the DAG and machine instr, fixing
Chris Lattner [Thu, 23 Feb 2006 19:21:04 +0000 (19:21 +0000)]
Record all of the expanded registers in the DAG and machine instr, fixing
several bugs in inline asm expanded operands.

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

18 years agoDwarfWriter reading basic type information from llvm-gcc4 code.
Jim Laskey [Thu, 23 Feb 2006 16:58:18 +0000 (16:58 +0000)]
DwarfWriter reading basic type information from llvm-gcc4 code.

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

18 years agoMatch the case of other mailing lists in the list
Chris Lattner [Thu, 23 Feb 2006 16:18:29 +0000 (16:18 +0000)]
Match the case of other mailing lists in the list

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

18 years agodocument the llvm-testresults list
Chris Lattner [Thu, 23 Feb 2006 16:14:22 +0000 (16:14 +0000)]
document the llvm-testresults list

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

18 years agoCode cleanups, no functionality change
Chris Lattner [Thu, 23 Feb 2006 06:44:17 +0000 (06:44 +0000)]
Code cleanups, no functionality change

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

18 years ago"." isn't enough to get a private label on linux, use ".L".
Chris Lattner [Thu, 23 Feb 2006 05:25:02 +0000 (05:25 +0000)]
"." isn't enough to get a private label on linux, use ".L".

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

18 years agoadd a small and simple case.
Chris Lattner [Thu, 23 Feb 2006 05:17:43 +0000 (05:17 +0000)]
add a small and simple case.

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

18 years agoA couple of new entries.
Evan Cheng [Thu, 23 Feb 2006 02:50:21 +0000 (02:50 +0000)]
A couple of new entries.

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

18 years agoPIC related bug fixes.
Evan Cheng [Thu, 23 Feb 2006 02:43:52 +0000 (02:43 +0000)]
PIC related bug fixes.
1. Various asm printer bug.
2. Lowering bug. Now TargetGlobalAddress is wrapped in X86ISD::TGAWrapper.

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

18 years agoX86 codegen tweak to use lea in another case:
Evan Cheng [Thu, 23 Feb 2006 00:13:58 +0000 (00:13 +0000)]
X86 codegen tweak to use lea in another case:

Suppose base == %eax and it has multiple uses, then instead of
  movl %eax, %ecx
  addl $8, %ecx
use
  leal 8(%eax), %ecx.

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

18 years agoAdd a test case for 'lea'.
Evan Cheng [Thu, 23 Feb 2006 00:12:12 +0000 (00:12 +0000)]
Add a test case for 'lea'.

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

18 years agoMissing .globl for weak / link-once .text symbols.
Evan Cheng [Wed, 22 Feb 2006 23:59:57 +0000 (23:59 +0000)]
Missing .globl for weak / link-once .text symbols.

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

18 years agoFix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, which
Chris Lattner [Wed, 22 Feb 2006 23:55:00 +0000 (23:55 +0000)]
Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, which
caused SPASS to fail building last night.

We can't trivially unswitch a loop if the exit block has phi nodes in it,
because we don't know which predecessor to use.

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

18 years agonew testcase distilled from SPASS
Chris Lattner [Wed, 22 Feb 2006 23:54:15 +0000 (23:54 +0000)]
new testcase distilled from SPASS

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

18 years agoThis fixes a couple of problems with expansion
Chris Lattner [Wed, 22 Feb 2006 23:09:03 +0000 (23:09 +0000)]
This fixes a couple of problems with expansion

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

18 years agoDon't return registers from register classes that aren't legal.
Chris Lattner [Wed, 22 Feb 2006 23:00:51 +0000 (23:00 +0000)]
Don't return registers from register classes that aren't legal.

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

18 years agoChange a whole bunch of code to be built around RegsForValue instead of
Chris Lattner [Wed, 22 Feb 2006 22:37:12 +0000 (22:37 +0000)]
Change a whole bunch of code to be built around RegsForValue instead of
a single register number.  This fully implements promotion for inline asms,
expand is close but not quite right yet.

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

18 years ago- Added option -relocation-model to set relocation model. Valid values include static...
Evan Cheng [Wed, 22 Feb 2006 20:19:42 +0000 (20:19 +0000)]
- Added option -relocation-model to set relocation model. Valid values include static, pic,
dynamic-no-pic, and default.
PPC and x86 default is dynamic-no-pic for Darwin, pic for others.
- Removed options -enable-pic and -ppc-static.

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

18 years agoCoordinate activities with llvm-gcc4 and dwarf.
Jim Laskey [Wed, 22 Feb 2006 19:02:11 +0000 (19:02 +0000)]
Coordinate activities with llvm-gcc4 and dwarf.

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

18 years agoMake the LLVM headers "-ansi -pedantic -Wno-long-long" clean.
Chris Lattner [Wed, 22 Feb 2006 16:23:43 +0000 (16:23 +0000)]
Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.

Patch by Martin Partel!

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

18 years agoTurn on loop unswitching tonight
Chris Lattner [Wed, 22 Feb 2006 07:33:49 +0000 (07:33 +0000)]
Turn on loop unswitching tonight

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

18 years agoAdd some comments, simplify some code, and fix a bug that caused rewriting
Chris Lattner [Wed, 22 Feb 2006 06:37:14 +0000 (06:37 +0000)]
Add some comments, simplify some code, and fix a bug that caused rewriting
to rewrite with the wrong value.

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

18 years agoAdded MMX, SSE1, and SSE2 vector instructions and some simple patterns.
Evan Cheng [Wed, 22 Feb 2006 02:26:30 +0000 (02:26 +0000)]
Added MMX, SSE1, and SSE2 vector instructions and some simple patterns.
Fixed some existing bugs (wrong predicates, prefixes) at the same time.

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

18 years agoreorder some libraries
Chris Lattner [Wed, 22 Feb 2006 00:59:06 +0000 (00:59 +0000)]
reorder some libraries

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

18 years agosplit register class handling from explicit physreg handling.
Chris Lattner [Wed, 22 Feb 2006 00:56:39 +0000 (00:56 +0000)]
split register class handling from explicit physreg handling.

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

18 years agoexpose the set of values types holdable in a regclass to clients
Chris Lattner [Tue, 21 Feb 2006 23:51:58 +0000 (23:51 +0000)]
expose the set of values types holdable in a regclass to clients

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

18 years agoAdjust to changes in getRegForInlineAsmConstraint prototype
Chris Lattner [Tue, 21 Feb 2006 23:12:12 +0000 (23:12 +0000)]
Adjust to changes in getRegForInlineAsmConstraint prototype

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

18 years agoUpdates to match change of getRegForInlineAsmConstraint prototype
Chris Lattner [Tue, 21 Feb 2006 23:11:00 +0000 (23:11 +0000)]
Updates to match change of getRegForInlineAsmConstraint prototype

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

18 years agoPass in a value type to getRegForInlineAsmConstraint, allowing targets to
Chris Lattner [Tue, 21 Feb 2006 23:10:29 +0000 (23:10 +0000)]
Pass in a value type to getRegForInlineAsmConstraint, allowing targets to
select different sets of registers depending on the type requested.

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

18 years agoOne more round of reorg so sabre doesn't freak out. :-)
Evan Cheng [Tue, 21 Feb 2006 20:00:20 +0000 (20:00 +0000)]
One more round of reorg so sabre doesn't freak out. :-)

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

18 years agoA big more cleaning up.
Evan Cheng [Tue, 21 Feb 2006 19:30:30 +0000 (19:30 +0000)]
A big more cleaning up.

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

18 years agoMoving things to their proper places.
Evan Cheng [Tue, 21 Feb 2006 19:26:52 +0000 (19:26 +0000)]
Moving things to their proper places.

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

18 years agoSplit instruction info into multiple files, one for each of x87, MMX, and SSE.
Evan Cheng [Tue, 21 Feb 2006 19:13:53 +0000 (19:13 +0000)]
Split instruction info into multiple files, one for each of x87, MMX, and SSE.

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

18 years agomissed optzn
Chris Lattner [Tue, 21 Feb 2006 18:29:44 +0000 (18:29 +0000)]
missed optzn

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

18 years agoThe HasNoV9 hack isn't needed here, now that tblgen knows that CustomDAGSchedInserter
Chris Lattner [Tue, 21 Feb 2006 18:04:32 +0000 (18:04 +0000)]
The HasNoV9 hack isn't needed here, now that tblgen knows that CustomDAGSchedInserter
instructions are expensive.

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

18 years agoAdded separate alias instructions for SSE logical ops that operate on non-packed...
Evan Cheng [Tue, 21 Feb 2006 02:24:38 +0000 (02:24 +0000)]
Added separate alias instructions for SSE logical ops that operate on non-packed types.

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

18 years agoAdded MMX and XMM packed integer move instructions, movd and movq.
Evan Cheng [Tue, 21 Feb 2006 01:39:57 +0000 (01:39 +0000)]
Added MMX and XMM packed integer move instructions, movd and movq.

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

18 years agoAdded SSE2 128-bit integer packed types: V16I8, V8I16, V4I32, and V2I64.
Evan Cheng [Tue, 21 Feb 2006 01:38:21 +0000 (01:38 +0000)]
Added SSE2 128-bit integer packed types: V16I8, V8I16, V4I32, and V2I64.
Added generic vector types: VR64 and VR128.

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

18 years agoAdded x86 integer vector types: 64-bit packed byte integer (v16i8), 64-bit
Evan Cheng [Mon, 20 Feb 2006 22:34:53 +0000 (22:34 +0000)]
Added x86 integer vector types: 64-bit packed byte integer (v16i8), 64-bit
packed word integer (v8i16), and 64-bit packed doubleword integer (v2i32).

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

18 years agoSome updates
Evan Cheng [Mon, 20 Feb 2006 19:58:27 +0000 (19:58 +0000)]
Some updates

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

18 years agoFix a problem Nate and Duraid reported where simplifying nodes can cause
Chris Lattner [Mon, 20 Feb 2006 06:51:04 +0000 (06:51 +0000)]
Fix a problem Nate and Duraid reported where simplifying nodes can cause
them to get ressurected, in which case, deleting the undead nodes is
unfriendly.

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

18 years agoFix a problem on itanium with memset. The value to set has been promoted to
Chris Lattner [Mon, 20 Feb 2006 06:38:35 +0000 (06:38 +0000)]
Fix a problem on itanium with memset.  The value to set has been promoted to
i64 before this code, so zero_ext doesn't work.

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

18 years agoimproved support for branch folding, still not enabled.
Chris Lattner [Sat, 18 Feb 2006 07:57:38 +0000 (07:57 +0000)]
improved support for branch folding, still not enabled.

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

18 years agoIf SSE3 is available, promote FP_TO_UINT i32 to FP_TO_SINT i64 to take
Evan Cheng [Sat, 18 Feb 2006 07:26:17 +0000 (07:26 +0000)]
If SSE3 is available, promote FP_TO_UINT i32 to FP_TO_SINT i64 to take
advantage of fisttpll.

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

18 years agoFix bugs identified by VC++.
Jeff Cohen [Sat, 18 Feb 2006 03:20:33 +0000 (03:20 +0000)]
Fix bugs identified by VC++.

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

18 years agoAdd a fold for add that exchanges it with a constant shift if possible, so
Nate Begeman [Sat, 18 Feb 2006 02:43:25 +0000 (02:43 +0000)]
Add a fold for add that exchanges it with a constant shift if possible, so
that the shift may be more easily folded into other operations.

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

18 years agoImplement deletion of dead blocks, currently disabled.
Chris Lattner [Sat, 18 Feb 2006 02:42:34 +0000 (02:42 +0000)]
Implement deletion of dead blocks, currently disabled.

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

18 years agoAdd checks to make sure we don't create bogus extend nodes, and fix a bug
Nate Begeman [Sat, 18 Feb 2006 02:40:58 +0000 (02:40 +0000)]
Add checks to make sure we don't create bogus extend nodes, and fix a bug
where we were doing exactly that which was causing failures on x86 and
alpha.

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

18 years agoAdded fisttp for fp to int conversion.
Evan Cheng [Sat, 18 Feb 2006 02:36:28 +0000 (02:36 +0000)]
Added fisttp for fp to int conversion.

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

18 years agoBump up pattern cost if the resulting instruction is marked
Evan Cheng [Sat, 18 Feb 2006 02:33:09 +0000 (02:33 +0000)]
Bump up pattern cost if the resulting instruction is marked
usesCustomDAGSchedInserter.

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

18 years agoDisable PIC for JIT.
Evan Cheng [Sat, 18 Feb 2006 01:49:25 +0000 (01:49 +0000)]
Disable PIC for JIT.

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

18 years agoa previous patch completely disabled trivial unswitching, this fixees it.
Chris Lattner [Sat, 18 Feb 2006 01:32:04 +0000 (01:32 +0000)]
a previous patch completely disabled trivial unswitching, this fixees it.
Thanks to nate for pointing this out :)

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

18 years agoinitial trivial support for folding branches that have now-constant destinations.
Chris Lattner [Sat, 18 Feb 2006 01:27:45 +0000 (01:27 +0000)]
initial trivial support for folding branches that have now-constant destinations.

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

18 years agoJit does not support PIC yet.
Evan Cheng [Sat, 18 Feb 2006 00:57:10 +0000 (00:57 +0000)]
Jit does not support PIC yet.

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

18 years agoWhen unswitching a loop, make sure to update loop info with exit blocks in
Chris Lattner [Sat, 18 Feb 2006 00:55:32 +0000 (00:55 +0000)]
When unswitching a loop, make sure to update loop info with exit blocks in
the right loop.

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

18 years agoFix Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll
Chris Lattner [Sat, 18 Feb 2006 00:33:17 +0000 (00:33 +0000)]
Fix Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll

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

18 years agonew testcase that crashes simplifycfg
Chris Lattner [Sat, 18 Feb 2006 00:32:44 +0000 (00:32 +0000)]
new testcase that crashes simplifycfg

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

18 years agox86 / Darwin PIC support.
Evan Cheng [Sat, 18 Feb 2006 00:15:05 +0000 (00:15 +0000)]
x86 / Darwin PIC support.

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

18 years agoMoved PICEnabled to include/llvm/Target/TargetOptions.h
Evan Cheng [Sat, 18 Feb 2006 00:08:58 +0000 (00:08 +0000)]
Moved PICEnabled to include/llvm/Target/TargetOptions.h

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

18 years agoMove PICEnabled declaration here.
Evan Cheng [Sat, 18 Feb 2006 00:06:03 +0000 (00:06 +0000)]
Move PICEnabled declaration here.

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

18 years agoFix a tricky issue in the SimplifyDemandedBits code where CombineTo wasn't
Chris Lattner [Fri, 17 Feb 2006 21:58:01 +0000 (21:58 +0000)]
Fix a tricky issue in the SimplifyDemandedBits code where CombineTo wasn't
exactly the API we wanted to call into.  This fixes the crash on crafty last
night.

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

18 years agoadd a new method
Chris Lattner [Fri, 17 Feb 2006 21:57:00 +0000 (21:57 +0000)]
add a new method

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

18 years agoA few final (for now) tests
Nate Begeman [Fri, 17 Feb 2006 21:38:45 +0000 (21:38 +0000)]
A few final (for now) tests

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