oota-llvm.git
21 years agoAllow folding together two globals through type resolution
Chris Lattner [Sun, 15 Dec 2002 16:32:21 +0000 (16:32 +0000)]
Allow folding together two globals through type resolution

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

21 years agoplanes is not spelled with an O
Chris Lattner [Sun, 15 Dec 2002 16:20:23 +0000 (16:20 +0000)]
planes is not spelled with an O

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

21 years agoTestcase identified by Brian Gaeke that breaks the C frontend...
Chris Lattner [Sun, 15 Dec 2002 15:52:03 +0000 (15:52 +0000)]
Testcase identified by Brian Gaeke that breaks the C frontend...

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

21 years agoFix borkness with not using MachineBasicBlocks in PHI nodes
Chris Lattner [Sun, 15 Dec 2002 08:02:51 +0000 (08:02 +0000)]
Fix borkness with not using MachineBasicBlocks in PHI nodes

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

21 years agoAdd support to cast from a bool type
Chris Lattner [Sun, 15 Dec 2002 08:02:15 +0000 (08:02 +0000)]
Add support to cast from a bool type
Add support for boolean constants
add getClassB method

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

21 years agoUse MachineOperand::isFoo methods instead of our own global functions
Chris Lattner [Sun, 15 Dec 2002 08:01:39 +0000 (08:01 +0000)]
Use MachineOperand::isFoo methods instead of our own global functions

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

21 years agoAdd capability to have a MachineBasicBlock as an operand to a MachineInstr
Chris Lattner [Sun, 15 Dec 2002 08:01:02 +0000 (08:01 +0000)]
Add capability to have a MachineBasicBlock as an operand to a MachineInstr
Add a bunch of methods to MachineOperand is* to reduce usage of MO_foo

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

21 years agoNew testcase for bool support
Chris Lattner [Sun, 15 Dec 2002 07:55:43 +0000 (07:55 +0000)]
New testcase for bool support

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

21 years agoFix a huge performance problem in reassociate by introducing a
Chris Lattner [Sun, 15 Dec 2002 03:56:00 +0000 (03:56 +0000)]
Fix a huge performance problem in reassociate by introducing a
rank map cache for instruction ranks

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

21 years agoMinor changes:
Chris Lattner [Sun, 15 Dec 2002 03:49:50 +0000 (03:49 +0000)]
Minor changes:
  * Reword comment to make more clear
  * Don't print out BB's after modification made
  * Don't delete and new an instruction when we need to move something, just move it.

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

21 years agoMake stuff compiled with gccld not dump into the debugger if there's a problem
Chris Lattner [Sat, 14 Dec 2002 21:28:32 +0000 (21:28 +0000)]
Make stuff compiled with gccld not dump into the debugger if there's a problem

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

21 years agoPass command line arguments to main
Chris Lattner [Fri, 13 Dec 2002 16:48:57 +0000 (16:48 +0000)]
Pass command line arguments to main

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

21 years agoAdd statistic
Chris Lattner [Fri, 13 Dec 2002 15:28:42 +0000 (15:28 +0000)]
Add statistic

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

21 years agoTest indirect call
Chris Lattner [Fri, 13 Dec 2002 14:15:20 +0000 (14:15 +0000)]
Test indirect call

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

21 years agoImplement indirect function calls
Chris Lattner [Fri, 13 Dec 2002 14:13:27 +0000 (14:13 +0000)]
Implement indirect function calls

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

21 years agoMake function code generation printing debug-only.
Misha Brukman [Fri, 13 Dec 2002 13:16:14 +0000 (13:16 +0000)]
Make function code generation printing debug-only.

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

21 years agoMade status output debug-only (for testing diffs against lli).
Misha Brukman [Fri, 13 Dec 2002 13:15:36 +0000 (13:15 +0000)]
Made status output debug-only (for testing diffs against lli).

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

21 years agoFix bork in doMultiply
Chris Lattner [Fri, 13 Dec 2002 13:07:42 +0000 (13:07 +0000)]
Fix bork in doMultiply

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

21 years agoAdd sanity checks
Chris Lattner [Fri, 13 Dec 2002 13:04:04 +0000 (13:04 +0000)]
Add sanity checks

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

21 years agoFixed a bug where moves due to phis were being neglected.
Misha Brukman [Fri, 13 Dec 2002 12:33:31 +0000 (12:33 +0000)]
Fixed a bug where moves due to phis were being neglected.

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

21 years agoNew testcase
Chris Lattner [Fri, 13 Dec 2002 12:10:16 +0000 (12:10 +0000)]
New testcase

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

21 years agoCleaned up the code: factored out switch/case into a separate function, put
Misha Brukman [Fri, 13 Dec 2002 12:00:06 +0000 (12:00 +0000)]
Cleaned up the code: factored out switch/case into a separate function, put
constants in an array for quick lookup. Stole the idea from elsewhere in
Jello.

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

21 years agoNeed to insert all moves due to PHI nodes before *ALL* jumps in a predecessor
Misha Brukman [Fri, 13 Dec 2002 11:55:59 +0000 (11:55 +0000)]
Need to insert all moves due to PHI nodes before *ALL* jumps in a predecessor
basic block, as there could be multiple.

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

21 years agoInsert phi code at top of block
Chris Lattner [Fri, 13 Dec 2002 11:52:34 +0000 (11:52 +0000)]
Insert phi code at top of block

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

21 years agolib/Target/X86/InstSelectSimple.cpp:
Brian Gaeke [Fri, 13 Dec 2002 11:39:18 +0000 (11:39 +0000)]
lib/Target/X86/InstSelectSimple.cpp:

The MachineBasicBlock variable name patrol hereby fines Chris Lattner
one bag of nachos, for shadowing global names while his license to do so
was under suspension.

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

21 years agoThis should be more correct: invalidates physical registers that are used in
Misha Brukman [Fri, 13 Dec 2002 11:33:22 +0000 (11:33 +0000)]
This should be more correct: invalidates physical registers that are used in
an instruction to avoid using them to allocate to other virtual registers.

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

21 years agoImplement cast bool to X
Chris Lattner [Fri, 13 Dec 2002 11:31:59 +0000 (11:31 +0000)]
Implement cast bool to X

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

21 years agoRename all BMI MachineBasicBlock operands to MBB.
Brian Gaeke [Fri, 13 Dec 2002 11:22:48 +0000 (11:22 +0000)]
Rename all BMI MachineBasicBlock operands to MBB.

Try to mess around with emitGEPOperation's elementSizeReg to make it work,
again.

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

21 years agoFinish up iterator stuph
Chris Lattner [Fri, 13 Dec 2002 10:50:40 +0000 (10:50 +0000)]
Finish up iterator stuph

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

21 years agoTreat longs as ints => pretend they're all 32-bit values and squeeze them into
Misha Brukman [Fri, 13 Dec 2002 10:43:09 +0000 (10:43 +0000)]
Treat longs as ints => pretend they're all 32-bit values and squeeze them into
32-bit registers.

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

21 years agoFixed bug with running out of registers. Also, reinstated namespace which
Misha Brukman [Fri, 13 Dec 2002 10:42:31 +0000 (10:42 +0000)]
Fixed bug with running out of registers. Also, reinstated namespace which
disappeared during the last checkin.

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

21 years agoReturn success on success
Chris Lattner [Fri, 13 Dec 2002 10:13:45 +0000 (10:13 +0000)]
Return success on success

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

21 years agoTest more phi stuff
Chris Lattner [Fri, 13 Dec 2002 10:12:50 +0000 (10:12 +0000)]
Test more phi stuff

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

21 years agoCode gen phi's correctly
Chris Lattner [Fri, 13 Dec 2002 10:09:43 +0000 (10:09 +0000)]
Code gen phi's correctly

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

21 years agoPrint X86 PHI nodes in a sane manner
Chris Lattner [Fri, 13 Dec 2002 09:59:26 +0000 (09:59 +0000)]
Print X86 PHI nodes in a sane manner

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

21 years agoThis should handle register allocating PHI nodes.
Misha Brukman [Fri, 13 Dec 2002 09:54:36 +0000 (09:54 +0000)]
This should handle register allocating PHI nodes.

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

21 years agoAdded moveReg2Reg() and moveImm2Reg() to accomodate moving data around due to
Misha Brukman [Fri, 13 Dec 2002 09:54:12 +0000 (09:54 +0000)]
Added moveReg2Reg() and moveImm2Reg() to accomodate moving data around due to
PHI nodes.

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

21 years agoFinal version of BuildMI for symmetry and because I want to use it
Chris Lattner [Fri, 13 Dec 2002 09:33:06 +0000 (09:33 +0000)]
Final version of BuildMI for symmetry and because I want to use it

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

21 years agolib/Target/X86/InstSelectSimple.cpp: Start counting arguments with 2,
Brian Gaeke [Fri, 13 Dec 2002 09:28:50 +0000 (09:28 +0000)]
lib/Target/X86/InstSelectSimple.cpp: Start counting arguments with 2,
 because arguments start two stack slots off of EBP. Break out of the
 for loop once the argument is found. Increment the counter at the end
 of the loop instead of the beginning. Use addRegOffset and compute
 the scale * index part at compile time instead of using the fancy
 load instruction. Just because an instruction set has wacky addressing
 modes doesn't mean we ought to use them (at least, if you believe Dave
 Patterson).

lib/Target/X86/X86InstrBuilder.h: Add some comments.

test/Regression/Jello/test-loadstore.ll:  Let main return int 0.

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

21 years agoInstSelectSimple.cpp: Give promote32 a comment. Add initial
Brian Gaeke [Fri, 13 Dec 2002 07:56:18 +0000 (07:56 +0000)]
InstSelectSimple.cpp:  Give promote32 a comment.  Add initial
 implementation of getReg() for arguments.

MachineCodeEmitter.cpp: Fix using EBP with index, scale and no
 displacement (whew!) due to Chris.

Printer.cpp: Fix printing out index and scale in memory references.

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

21 years agoGet rid of deprecated function
Chris Lattner [Fri, 13 Dec 2002 07:30:45 +0000 (07:30 +0000)]
Get rid of deprecated function

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

21 years agoreturn 0 on success
Chris Lattner [Fri, 13 Dec 2002 06:57:24 +0000 (06:57 +0000)]
return 0 on success

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

21 years agoImplement getelementptr constant exprs
Chris Lattner [Fri, 13 Dec 2002 06:56:29 +0000 (06:56 +0000)]
Implement getelementptr constant exprs
Implement ConstantPointerRefs
Treat long/ulongs as if they were integers.  A hack, but an effective one

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

21 years agobrg
Brian Gaeke [Fri, 13 Dec 2002 06:46:31 +0000 (06:46 +0000)]
brg

InstSelectSimple.cpp: Add stub implementation of visitFreeInst.
 Add comments that mention how we are failing to implement malloc/free.
 Add initial implementation of visitAllocaInst.

X86TargetMachine.cpp: Include llvm/Transforms/Scalar.h.
 Add LowerAllocations pass before instruction selection.

jello/Makefile: Add scalaropts.a.

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

21 years agogetelementptr uses long instead of uint indexes
Chris Lattner [Fri, 13 Dec 2002 06:01:21 +0000 (06:01 +0000)]
getelementptr uses long instead of uint indexes

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

21 years agoStop sucking
Chris Lattner [Fri, 13 Dec 2002 05:51:32 +0000 (05:51 +0000)]
Stop sucking

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

21 years agoMaking main() return 0 so that we know it ran successfully when it exits.
Misha Brukman [Fri, 13 Dec 2002 05:44:21 +0000 (05:44 +0000)]
Making main() return 0 so that we know it ran successfully when it exits.

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

21 years agoMaking main() return 0 to exit without error when no error actually occurs.
Misha Brukman [Fri, 13 Dec 2002 05:43:36 +0000 (05:43 +0000)]
Making main() return 0 to exit without error when no error actually occurs.

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

21 years agoFix testcase
Chris Lattner [Fri, 13 Dec 2002 05:42:57 +0000 (05:42 +0000)]
Fix testcase

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

21 years agoImplement branches
Chris Lattner [Fri, 13 Dec 2002 05:40:28 +0000 (05:40 +0000)]
Implement branches

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

21 years agoInfinite loops, are, well, not good
Chris Lattner [Fri, 13 Dec 2002 05:28:50 +0000 (05:28 +0000)]
Infinite loops, are, well, not good

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

21 years agoEmit the right form of mod/rm mod field
Chris Lattner [Fri, 13 Dec 2002 05:05:05 +0000 (05:05 +0000)]
Emit the right form of mod/rm mod field

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

21 years agoNicify a bit
Chris Lattner [Fri, 13 Dec 2002 05:04:37 +0000 (05:04 +0000)]
Nicify a bit

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

21 years agoThis way it's easier to test: if the call to external exit(0) succeeded,
Misha Brukman [Fri, 13 Dec 2002 04:43:32 +0000 (04:43 +0000)]
This way it's easier to test: if the call to external exit(0) succeeded,
program exits with code 0, no error. If the call does not work/succeed, main
returns 1, so we notice it. The other way around doesn't work. :)

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

21 years agoFix encoding of CBW instruction
Chris Lattner [Fri, 13 Dec 2002 04:41:31 +0000 (04:41 +0000)]
Fix encoding of CBW instruction

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

21 years agoStart allocating stack space at [ebp-4] to not overwrite the return address.
Misha Brukman [Fri, 13 Dec 2002 04:34:02 +0000 (04:34 +0000)]
Start allocating stack space at [ebp-4] to not overwrite the return address.
Also make all loads & stores 4-byte aligned for performance. ;)

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

21 years agoMoves now select correct opcode based on the data size.
Misha Brukman [Fri, 13 Dec 2002 04:24:53 +0000 (04:24 +0000)]
Moves now select correct opcode based on the data size.

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

21 years agoRemove extranous #include
Chris Lattner [Fri, 13 Dec 2002 04:12:24 +0000 (04:12 +0000)]
Remove extranous #include

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

21 years agoRename MemArg* to Arg*
Chris Lattner [Fri, 13 Dec 2002 03:51:55 +0000 (03:51 +0000)]
Rename MemArg* to Arg*

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

21 years agoMake mem size an assert
Chris Lattner [Fri, 13 Dec 2002 03:50:13 +0000 (03:50 +0000)]
Make mem size an assert
Add mem size flags to all instructions using an imm

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

21 years agoThis is supposed to provide correct size for datatypes. Supposedly.
Misha Brukman [Fri, 13 Dec 2002 02:13:15 +0000 (02:13 +0000)]
This is supposed to provide correct size for datatypes. Supposedly.

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

21 years agoTake advantage of our knowledge of 2-address X86 instructions and
Misha Brukman [Thu, 12 Dec 2002 23:20:31 +0000 (23:20 +0000)]
Take advantage of our knowledge of 2-address X86 instructions and
register-allocated them appropriately.

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

21 years agoDefine the 2-address flag used by X86 instructions (add,sub,and,or,xor) that
Misha Brukman [Thu, 12 Dec 2002 23:19:51 +0000 (23:19 +0000)]
Define the 2-address flag used by X86 instructions (add,sub,and,or,xor) that
need to be declared as such.

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

21 years agoAdded the flag to mark instructions which are really 2-address instructions in
Misha Brukman [Thu, 12 Dec 2002 23:19:11 +0000 (23:19 +0000)]
Added the flag to mark instructions which are really 2-address instructions in
X86, but would be 3-address in any normail architecture.

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

21 years agoThis checkin is brought to you by the brian gaeke allnighter fund.
Brian Gaeke [Thu, 12 Dec 2002 15:33:40 +0000 (15:33 +0000)]
This checkin is brought to you by the brian gaeke allnighter fund.

(lib/Target/X86) InstSelectSimple.cpp:
 Include llvm/DerivedTypes.h and iostream.
 Refactor visitMul out into a wrapper around doMultiply(), so that we
  can do multiplications on temporary values when we are doing
  getelementptrs.
 Refactor part of getReg out into makeAnotherReg, so that we can create
  registers willy-nilly to hold temporary values, when we are doing
  getelementptrs.
 Add stub implementations of visitMallocInst and visitAllocaInst.
 Add initial implementation of visitGetElementPtrInst.
 In copyConstantToRegister:
  We throw a *lot* of our asserts here. So, when we want to throw an
   assert, print out to stderr whatever expr or whatever constant made
   us barf.
  Support copying ConstantPointerNull to register, using a move immediate
   of zero.
 Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings
  of the numbers in the other instruction names. All uses modified.
 Teach visitCallInst to extract byte- and short-class return values
  from subregs of EAX.  Add a FIXME note about how we would do it for
  float-class return values.
 Add a FIXME note about how we would cast float to int and back.

X86InstrInfo.def:
 Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings
  of the numbers in the other instruction names. All uses modified.

(tools/jello) GlobalVars.cpp:
 Include iostream.
 If we have to emit a floating-point constant to memory, gamble and use
  the same method as for ints.
 If we have to emit a ConstantPointerNull to memory, try using a "void *"
  and "NULL".
 Otherwise, if we are going to throw an assert, print out whatever constant
  made us barf, first.

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

21 years ago'graph' is spelled without a 'c'.
Misha Brukman [Thu, 12 Dec 2002 05:34:10 +0000 (05:34 +0000)]
'graph' is spelled without a 'c'.
Also added Statistic counters for NoAlias and MayAlias.

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

21 years agoMake a release build compile. This field is not really an enum, it's really a bitfield
Chris Lattner [Thu, 12 Dec 2002 05:31:26 +0000 (05:31 +0000)]
Make a release build compile.  This field is not really an enum, it's really a bitfield

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

21 years agoipa.a only needs to be mentioned once, and spaces should be used instead of
Misha Brukman [Thu, 12 Dec 2002 05:29:32 +0000 (05:29 +0000)]
ipa.a only needs to be mentioned once, and spaces should be used instead of
tabs for readability.

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

21 years agoNo need to specify the class if the method is within the class declaration.
Misha Brukman [Thu, 12 Dec 2002 05:28:39 +0000 (05:28 +0000)]
No need to specify the class if the method is within the class declaration.

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

21 years agoRemove #includes
Chris Lattner [Thu, 12 Dec 2002 03:47:27 +0000 (03:47 +0000)]
Remove #includes

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

21 years agoInclude tablegen
Chris Lattner [Thu, 12 Dec 2002 03:44:42 +0000 (03:44 +0000)]
Include tablegen

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

21 years agoFix header
Chris Lattner [Thu, 12 Dec 2002 03:43:30 +0000 (03:43 +0000)]
Fix header

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

21 years agoExternal routines used to identify Cilk operations inserted by the
Vikram S. Adve [Tue, 10 Dec 2002 13:08:48 +0000 (13:08 +0000)]
External routines used to identify Cilk operations inserted by the
parallelization pass.

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

21 years agoThis file implements the function DemoteRegToStack(), which takes a
Vikram S. Adve [Tue, 10 Dec 2002 13:07:58 +0000 (13:07 +0000)]
This file implements the function DemoteRegToStack(), which takes a
virtual register computed by an Instruction& X and replaces it with
a slot in the stack frame, allocated via alloca.

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

21 years agoThis file provides the function DemoteRegToStack(), which takes a
Vikram S. Adve [Tue, 10 Dec 2002 13:07:12 +0000 (13:07 +0000)]
This file provides the function DemoteRegToStack(), which takes a
virtual register computed by an Instruction& X and replaces it with
a slot in the stack frame, allocated via alloca.

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

21 years agoThis file implements a pass that automatically parallelizes a program,
Vikram S. Adve [Tue, 10 Dec 2002 00:43:34 +0000 (00:43 +0000)]
This file implements a pass that automatically parallelizes a program,
using the Cilk multi-threaded runtime system to execute parallel code.
The current version inserts too many sync() operations in the program
because it does not attempt to optimize their placement.

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

21 years agoThe pass Parallelize automatically parallelizes a program using the
Vikram S. Adve [Tue, 10 Dec 2002 00:42:22 +0000 (00:42 +0000)]
The pass Parallelize automatically parallelizes a program using the
Cilk multi-threaded runtime system to execute parallel code.  This file
exposes some routines needed for code generation for that pass.

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

21 years agoFix link errors due to new IPModRef pass.
Vikram S. Adve [Mon, 9 Dec 2002 05:53:11 +0000 (05:53 +0000)]
Fix link errors due to new IPModRef pass.

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

21 years agoRepeat ipa.a. Since IPModRef is currently only used in analysis.o,
Vikram S. Adve [Mon, 9 Dec 2002 04:46:25 +0000 (04:46 +0000)]
Repeat ipa.a.  Since IPModRef is currently only used in analysis.o,
it was causing linking errors.

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

21 years agoIterator that enumerates the ProgramDependenceGraph (PDG) for a function,
Vikram S. Adve [Sun, 8 Dec 2002 14:13:19 +0000 (14:13 +0000)]
Iterator that enumerates the ProgramDependenceGraph (PDG) for a function,
i.e., enumerates all data and control dependences for the function.

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

21 years agoAn explicit representation of dependence graphs, and a pass that
Vikram S. Adve [Sun, 8 Dec 2002 13:26:29 +0000 (13:26 +0000)]
An explicit representation of dependence graphs, and a pass that
computes a dependence graph for data dependences on memory locations
using interprocedural Mod/Ref information.

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

21 years agoNamespacify more
Chris Lattner [Sun, 8 Dec 2002 06:01:34 +0000 (06:01 +0000)]
Namespacify more

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

21 years agoAdd support to count the number of dynamic instructions executed by LLI
Chris Lattner [Sun, 8 Dec 2002 05:51:08 +0000 (05:51 +0000)]
Add support to count the number of dynamic instructions executed by LLI

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

21 years agoAdd total instruction, bb, & function counts
Chris Lattner [Sat, 7 Dec 2002 23:24:24 +0000 (23:24 +0000)]
Add total instruction, bb, & function counts

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

21 years agoFix bug that was bugging bugpoint
Chris Lattner [Sat, 7 Dec 2002 21:27:16 +0000 (21:27 +0000)]
Fix bug that was bugging bugpoint

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

21 years agoRemove dead code
Chris Lattner [Sat, 7 Dec 2002 18:42:13 +0000 (18:42 +0000)]
Remove dead code

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

21 years agoCheck in an old testcase
Chris Lattner [Sat, 7 Dec 2002 17:08:07 +0000 (17:08 +0000)]
Check in an old testcase

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

21 years agoGive better error message if two passes of the same argument are registered
Chris Lattner [Sat, 7 Dec 2002 04:41:22 +0000 (04:41 +0000)]
Give better error message if two passes of the same argument are registered

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

21 years agoStronger assertion in getNodeId(): node id must exist in the map.
Vikram S. Adve [Fri, 6 Dec 2002 21:19:07 +0000 (21:19 +0000)]
Stronger assertion in getNodeId(): node id must exist in the map.

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

21 years agoTwo bug fixes:
Vikram S. Adve [Fri, 6 Dec 2002 21:17:10 +0000 (21:17 +0000)]
Two bug fixes:
(1) Make entries for Constant values in the ScalarMap.
(2) Set MOD bit for the node pointed to by the
    argument of a free instruction.

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

21 years agoFix several related bugs in DSNode::mergeWith() caused by the
Vikram S. Adve [Fri, 6 Dec 2002 21:15:21 +0000 (21:15 +0000)]
Fix several related bugs in DSNode::mergeWith() caused by the
fact that the incoming nodes may be merged away at intermediate
steps.  Use an extra level of indirection via DSNodeHandles
to track the nodes being merged.  All this now happens in a
static helper function MergeNodes().

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

21 years agoAdded static helper method MergeNodes(). See DataStructure.cpp for more.
Vikram S. Adve [Fri, 6 Dec 2002 21:10:17 +0000 (21:10 +0000)]
Added static helper method MergeNodes().  See DataStructure.cpp for more.

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

21 years agoBug fix in operator==() and in method fini().
Vikram S. Adve [Fri, 6 Dec 2002 15:02:22 +0000 (15:02 +0000)]
Bug fix in operator==() and in method fini().

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

21 years agoImplement a lot of cast functionality (no FP or 64)
Brian Gaeke [Fri, 6 Dec 2002 10:49:33 +0000 (10:49 +0000)]
Implement a lot of cast functionality (no FP or 64)

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

21 years agoMake sure to print indirect node again
Chris Lattner [Fri, 6 Dec 2002 06:40:00 +0000 (06:40 +0000)]
Make sure to print indirect node again

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

21 years agoFix bug
Chris Lattner [Fri, 6 Dec 2002 04:42:16 +0000 (04:42 +0000)]
Fix bug

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

21 years agoAllow printing partially constructed bitsets
Chris Lattner [Fri, 6 Dec 2002 04:42:10 +0000 (04:42 +0000)]
Allow printing partially constructed bitsets

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

21 years agoDon't delete values that may still be referenced!
Chris Lattner [Fri, 6 Dec 2002 04:02:48 +0000 (04:02 +0000)]
Don't delete values that may still be referenced!

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

21 years agoTighten up assertion checking
Chris Lattner [Fri, 6 Dec 2002 03:55:39 +0000 (03:55 +0000)]
Tighten up assertion checking

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

21 years agoOnly build jello when compiling on X86
Chris Lattner [Fri, 6 Dec 2002 03:53:40 +0000 (03:53 +0000)]
Only build jello when compiling on X86

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