Chris Lattner
23de05d818
Make the sparc.burg file be a little more flexible and rubust in the fact of
...
renumbering of instructions. It is still horribly broken and grossly dependant on the number of instructions, but now it is a least a little better.
Oh yeah it also works now.
llvm-svn: 793
2001-10-14 17:25:31 +00:00
Chris Lattner
110d64205d
Check in makefile
...
llvm-svn: 788
2001-10-13 16:57:03 +00:00
Chris Lattner
d6bf618e62
Compile the transforms directory
...
llvm-svn: 776
2001-10-13 07:04:00 +00:00
Chris Lattner
9d7255f19c
Start of a linker
...
llvm-svn: 775
2001-10-13 07:03:50 +00:00
Chris Lattner
24d2022f4e
Implement the invoke instruction
...
llvm-svn: 774
2001-10-13 07:01:45 +00:00
Chris Lattner
77672f99ab
* Fix a nefarious bugs: TypesEqual was wrong for varargs methods
...
* MethodType::get now takes a literal isVarArg method argument
* Use new style casts
llvm-svn: 773
2001-10-13 07:01:33 +00:00
Chris Lattner
5df2c60a5f
Convert a runtime check into an assertion
...
llvm-svn: 772
2001-10-13 06:58:56 +00:00
Chris Lattner
fe9768f73b
* Add support for Module specific constants
...
* Add proper support for ConstPoolPointerReference's
llvm-svn: 771
2001-10-13 06:58:40 +00:00
Chris Lattner
28a5ef9c3d
Add new TerminatorInst ctor for invoke
...
llvm-svn: 770
2001-10-13 06:57:47 +00:00
Chris Lattner
9fd302d22b
* Fix TODO
...
* Support ConstPoolPOinterReferences correctly
* New constPoolPointerNull subclass
* Add classof support for more classes
* Add proper support for ConstPoolPointerReference::getStrValue()
llvm-svn: 769
2001-10-13 06:57:33 +00:00
Chris Lattner
e479974c19
Fix broken #endif
...
llvm-svn: 768
2001-10-13 06:54:54 +00:00
Chris Lattner
9fb95b57db
* Add #include
...
* Fix #endif problems
* Change to getCalledValue instead of getCalledMethod
llvm-svn: 767
2001-10-13 06:54:30 +00:00
Chris Lattner
57781f7fda
Add StringList support
...
llvm-svn: 766
2001-10-13 06:53:19 +00:00
Chris Lattner
4c81efaf8e
Support the invoke instruction
...
llvm-svn: 765
2001-10-13 06:52:41 +00:00
Chris Lattner
8314c1f1bc
Support indirect calls
...
llvm-svn: 764
2001-10-13 06:52:31 +00:00
Chris Lattner
f29cb6207e
not is a keyword in ansi C++, avoid it
...
llvm-svn: 763
2001-10-13 06:51:26 +00:00
Chris Lattner
b9e0153cfe
* Fix privacy issues on RegToRefVecMap
...
* Fix initialization order problems...
llvm-svn: 762
2001-10-13 06:51:01 +00:00
Chris Lattner
21a0de20bf
* Use new style casts more
...
* Add real support for global variable addresses initializing constants
* Fix encoding/decoding of VarArgs calls
* Support the Invoke instruction
llvm-svn: 761
2001-10-13 06:48:38 +00:00
Chris Lattner
601ab4b0ff
* Add real support for global variable addresses initializing constants
...
* Add minor optimization to BytecodeParser::refineAbstractType
* MethodType::get now take an explicit isVarArg parameter
* Fix encoding/decoding of VarArgs calls
* Support the Invoke instruction
llvm-svn: 760
2001-10-13 06:47:01 +00:00
Chris Lattner
ecd7a98aad
* Support writing GlobalVariables with info comments by them
...
* Print out prototypes correctly in cases that we weren't before
* Use new style casts more
* Support printing new invoke instruction
llvm-svn: 759
2001-10-13 06:42:36 +00:00
Chris Lattner
be0be88441
* Add support for forward references of global variable addresses
...
* Add support for numeric global variable addresses
* Clean up getVal function by refactoring it into several smaller functions
* MethodTypes are now specified with an explicit isVarArg parameter
* Break ValueRef into ConstValueRef & SymbolicValueRef components
* Add support for the new Invoke instruction
* Fix a few broken calls to Type::getName instead of Type::getDescription
llvm-svn: 758
2001-10-13 06:41:08 +00:00
Chris Lattner
78b565249f
Add operator< to ValID's so that they can be put in map's
...
llvm-svn: 757
2001-10-13 06:37:47 +00:00
Chris Lattner
61fcf0014d
Remove exception specification
...
llvm-svn: 756
2001-10-13 06:37:27 +00:00
Chris Lattner
ec2d56a673
Support the new Invoke instruction
...
llvm-svn: 755
2001-10-13 06:37:14 +00:00
Chris Lattner
a7e5f0bb35
Support pointers to globals happily
...
llvm-svn: 754
2001-10-13 06:35:09 +00:00
Chris Lattner
edf1aed1df
Fix code to make GCC 2.96 happy
...
llvm-svn: 753
2001-10-13 06:34:47 +00:00
Chris Lattner
684b485035
* Add support for Invoke instructions
...
* Add support for indirect calls
llvm-svn: 752
2001-10-13 06:33:19 +00:00
Ruchira Sasanka
bba7b347fb
--corrected coalescing test: coalsed only if two are of the same reg class
...
llvm-svn: 729
2001-10-12 17:48:18 +00:00
Ruchira Sasanka
fb7ed55e35
added support for implict operands in machine instruction
...
llvm-svn: 728
2001-10-12 17:47:23 +00:00
Ruchira Sasanka
44e467ec90
--added support for implicit operands in machine instructions
...
llvm-svn: 727
2001-10-12 17:46:27 +00:00
Vikram S. Adve
cc2f052087
Record implicitRefs for each machine instruction instead of
...
each VM instruction.
llvm-svn: 725
2001-10-11 04:23:19 +00:00
Vikram S. Adve
1fe4d4071c
Add graph edges due to implicit refs in each machine instruction.
...
llvm-svn: 724
2001-10-11 04:22:45 +00:00
Vikram S. Adve
623324dea9
Don't insert useful instructions in delay slot of a RETURN.
...
llvm-svn: 721
2001-10-10 20:58:11 +00:00
Vikram S. Adve
2f08c4c828
Insert code to load constants used as Call or Return arguments.
...
Also, note return value of a Call as an "implicitUse".
llvm-svn: 720
2001-10-10 20:56:33 +00:00
Vikram S. Adve
2c19cf9a69
Machine-independent code generation routines used in instruction
...
selection. These used to live in several different places before.
llvm-svn: 719
2001-10-10 20:50:43 +00:00
Vikram S. Adve
34c44524a7
Moved code generation support routines to InstrSelectionSupport.cpp.
...
llvm-svn: 717
2001-10-10 20:49:07 +00:00
Ruchira Sasanka
b7ab4088e7
--removed %g regs being allocated - fix later
...
llvm-svn: 714
2001-10-09 23:36:13 +00:00
Chris Lattner
7a732d2a43
Add comment
...
llvm-svn: 712
2001-10-03 19:35:57 +00:00
Chris Lattner
4b2e88eac3
Support multiple global's definitions
...
llvm-svn: 711
2001-10-03 19:35:04 +00:00
Chris Lattner
ac7f7b4758
Factor parentness out of Module & GlobalVariable into GlobalValue
...
Implement SymbolTable debug/dump utility
llvm-svn: 710
2001-10-03 19:28:15 +00:00
Chris Lattner
ee349cd48b
Rename getNullPointer to getNull
...
Allow sharing of null pointer constants
llvm-svn: 709
2001-10-03 15:39:36 +00:00
Chris Lattner
5eb7388b84
Rename getNullPointer to getNull
...
llvm-svn: 708
2001-10-03 15:39:24 +00:00
Chris Lattner
db52bbed27
Allow duplicate constant values as long as they are compatible.
...
Clean up stuff a little bit with inMethod/ModuleContext functions
llvm-svn: 707
2001-10-03 15:39:04 +00:00
Chris Lattner
a6c7a3f199
Add check to make sure that we dont reference MEthodType's directly
...
llvm-svn: 704
2001-10-03 14:59:05 +00:00
Chris Lattner
a01eda3091
* Both Method & GlobalVariable now subclass GlobalValue
...
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion
llvm-svn: 703
2001-10-03 14:53:21 +00:00
Chris Lattner
af910dda17
First try at a horrible global value reference wrapper
...
llvm-svn: 701
2001-10-03 06:12:09 +00:00
Chris Lattner
510a74e27d
Clean up parser, fix a bug that prevented this from working:
...
%ListNode3 = global %list { %list* null, int 4 }
because %list is name and the parser expected a literal {..} type there.
In addition, simplified rules that the fix (Allow any Types there, not just a StructType)
made obsolete. Simplified type propogation a bit.
llvm-svn: 700
2001-10-03 03:19:33 +00:00
Chris Lattner
77d303815e
* Add support for null as a constant
...
* Allow multiple definitions of a type with the same name as long as they are the same type
* Eagerly resolve types to allow #2 to work instead of after the whole const pool has been processed
* Change grammar to require a const before a local constant definition
llvm-svn: 699
2001-10-03 01:49:25 +00:00
Chris Lattner
08b1dde37e
Commit more code over to new cast style
...
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
ad1b0a1a83
Convert more code to use new style casts
...
Eliminate old style casts from value.h
llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner
4c684cde80
Add more support for new style casts
...
Convert more code to use them
llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner
43781f1f96
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
345daca305
Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
...
the BasicBlock class where they should be. pred_begin/pred_end become methods on BasicBlock,
and the cfg namespace isn't used anymore.
llvm-svn: 691
2001-10-01 13:19:53 +00:00
Chris Lattner
716c1ac09e
Fix emission of return instructions
...
llvm-svn: 688
2001-10-01 02:32:34 +00:00
Vikram S. Adve
4bdadf3b6f
Several fixes:
...
(1) Avoid hard-coding some register numbers.
(2) Fix some incorrect branch opcodes.
(3) Don't try to move int register to float register!
(4) If an operand being forwarded is a constant and it doesn't fit
into the immed field of the copy machine instruction, then
generate a load-constant instead of a copy.
(5) Use (unsigned long) 0 for copying a pointer via "add 0, ptr -> ptr2".
llvm-svn: 683
2001-10-01 00:12:53 +00:00
Ruchira Sasanka
294d643339
removing phy regaloc - incorrect file
...
llvm-svn: 682
2001-09-30 23:52:14 +00:00
Vikram S. Adve
5201cd7f93
Change latency of setuw and setsw to 2 cycles.
...
llvm-svn: 681
2001-09-30 23:46:57 +00:00
Vikram S. Adve
8c431d2726
Change ! ( ...== ...) to !=.
...
llvm-svn: 680
2001-09-30 23:45:08 +00:00
Vikram S. Adve
7b68e7247a
Improved dump for disp type operand.
...
llvm-svn: 679
2001-09-30 23:44:19 +00:00
Vikram S. Adve
180dee14b8
Bug fixes:
...
(1) Ensure that delay slot instructions are not moved out of place (this
was happening for some CALL instructions). Basically, we need to
move all delay slot instructions out of the graph and handle them
along with the delayed control transfer instruction.
(2) Mark scheduled instructions correctly when instructions are scheduled
in more than one cycle in a single step (due to delay slots).
llvm-svn: 678
2001-09-30 23:43:34 +00:00
Vikram S. Adve
d376407048
Minor changes for bug fixes in SchedGraph.cpp.
...
llvm-svn: 677
2001-09-30 23:37:26 +00:00
Vikram S. Adve
5d7dcfd698
Two bug fixes:
...
(1) Add edges for Values that are written by multiple m/c instructions
(2) Add edges for LLVM operands that are not machine operands (e.g., Call args)
llvm-svn: 676
2001-09-30 23:36:58 +00:00
Ruchira Sasanka
fa120a9fb1
*** empty log message ***
...
llvm-svn: 675
2001-09-30 23:28:04 +00:00
Ruchira Sasanka
cfc7b10745
added suggesting color support
...
llvm-svn: 673
2001-09-30 23:19:57 +00:00
Ruchira Sasanka
897da2bda1
added support for suggesting colors
...
llvm-svn: 671
2001-09-30 23:16:47 +00:00
Ruchira Sasanka
e04709a704
--added suggesting colors; call/ret arg handling
...
llvm-svn: 670
2001-09-30 23:11:59 +00:00
Chris Lattner
b77eae1b27
Implement constant pointers, and null specifically in the parser, bytecode writer, and
...
bytecode reader.
llvm-svn: 668
2001-09-30 22:46:54 +00:00
Chris Lattner
94ef0a1a2c
Implement a constant pointer value
...
llvm-svn: 667
2001-09-30 20:14:07 +00:00
Chris Lattner
97440eba29
File #include file
...
llvm-svn: 665
2001-09-28 22:56:43 +00:00
Chris Lattner
9b45b18404
Pull iterators out of CFG.h and CFGdecls and put them in Support directory
...
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Chris Lattner
082a95ea67
* Properly escape function names
...
* Ignore %xcc argument on conditional branches
llvm-svn: 663
2001-09-28 15:07:24 +00:00
Chris Lattner
5390f15d0b
Check in bug fix for vadve
...
llvm-svn: 662
2001-09-28 15:06:55 +00:00
Chris Lattner
74c4c61d71
Initial support for construction of a call graph
...
llvm-svn: 660
2001-09-28 00:08:15 +00:00
Chris Lattner
02d80cea8c
Make error report a little more useful
...
llvm-svn: 657
2001-09-28 00:06:52 +00:00
Chris Lattner
2fc6c49ee7
ADCE is broken but at least we know why
...
llvm-svn: 656
2001-09-28 00:06:42 +00:00
Ruchira Sasanka
b43f15e73a
-- fixed a ret val bug
...
llvm-svn: 652
2001-09-19 22:40:51 +00:00
Ruchira Sasanka
b9da0f9024
-- removed debugging messages
...
llvm-svn: 651
2001-09-19 22:39:58 +00:00
Ruchira Sasanka
cbabf19f3b
-fixed return value bug.
...
llvm-svn: 650
2001-09-19 22:31:21 +00:00
Chris Lattner
c1073581ae
Change debug info from #define to command line option
...
Clean up extra debug info that wasn't guarded
llvm-svn: 647
2001-09-19 16:26:23 +00:00
Chris Lattner
030d4ca8f4
Change debug info from #define to command line option
...
llvm-svn: 646
2001-09-19 16:26:10 +00:00
Chris Lattner
81a5329a90
* REMOVE extraneous debug info if DEBUG_RA is not set
...
* Spell PhyRegAlloc right.
llvm-svn: 645
2001-09-19 16:09:04 +00:00
Chris Lattner
2635fee3a8
Seperate instruction definitions into new SparcInstr.def file
...
Move contents of SparcMachineInstrDesc[] out of SparcInternals.h
into Sparc.cpp
llvm-svn: 644
2001-09-19 15:56:23 +00:00
Chris Lattner
e77ee72df2
Okay, make the member function work.
...
llvm-svn: 643
2001-09-19 14:09:25 +00:00
Chris Lattner
9aa7a88f0e
Remove global debug output fns that have been superceded by a member func
...
llvm-svn: 642
2001-09-19 14:08:53 +00:00
Chris Lattner
14d60a1971
Add EmitAssembly to mf
...
llvm-svn: 637
2001-09-19 13:48:18 +00:00
Chris Lattner
d30d71f9e1
First cut at assembly output
...
llvm-svn: 636
2001-09-19 13:47:27 +00:00
Chris Lattner
05d1751f8d
Add emitAssemblyMethod to TargetMachine
...
llvm-svn: 635
2001-09-19 13:47:12 +00:00
Ruchira Sasanka
6d773d9580
*** empty log message ***
...
llvm-svn: 634
2001-09-18 22:57:47 +00:00
Ruchira Sasanka
ee3ad646e2
-- ruchira
...
llvm-svn: 632
2001-09-18 22:52:44 +00:00
Ruchira Sasanka
2a084fbcac
-- updated printing
...
llvm-svn: 631
2001-09-18 22:43:57 +00:00
Chris Lattner
757b686b27
Remove a copy of a bunch of code
...
llvm-svn: 630
2001-09-18 18:15:40 +00:00
Chris Lattner
86ecc9630a
Fix up code a bit, remove operator<< to Assembly/Writer.h
...
llvm-svn: 628
2001-09-18 17:03:59 +00:00
Chris Lattner
30d7546b7d
Remove extraneous #includes
...
llvm-svn: 627
2001-09-18 17:03:48 +00:00
Chris Lattner
b545b1f5e9
Don't check for null on delete
...
llvm-svn: 624
2001-09-18 17:02:42 +00:00
Vikram S. Adve
ef4f0a345c
Renamed files to match the primary classes they provide.
...
llvm-svn: 620
2001-09-18 13:10:05 +00:00
Vikram S. Adve
a163e94412
Renamed a header file.
...
llvm-svn: 619
2001-09-18 13:04:53 +00:00
Vikram S. Adve
916f962d8b
Make class TargetMachine the common interface to all target-dependent
...
information, including instr, sched, and reg information.
This allows us to allocate them all in one place and use them much
more uniformly.
llvm-svn: 618
2001-09-18 13:04:24 +00:00
Vikram S. Adve
a9b6105720
Allow pointer constants as well as integer and booleans.
...
Skip over list nodes in ForwardOperand.
llvm-svn: 617
2001-09-18 13:03:13 +00:00
Vikram S. Adve
cfb2776d53
Make class TargetMachine the common interface to all target-dependent
...
information, including instr, sched, and reg information.
Rename files to match the primary classes they provide.
Commented out call to register allocation until more tests run correctly.
llvm-svn: 616
2001-09-18 13:01:29 +00:00
Vikram S. Adve
bdbc6292fa
Renamed files to match the main classes they provide.
...
Some other minor changes.
llvm-svn: 615
2001-09-18 12:58:33 +00:00
Vikram S. Adve
64e9d6b584
Cast unsigned to int! It was causing a nice little bug.
...
llvm-svn: 614
2001-09-18 12:57:39 +00:00
Vikram S. Adve
296070fa2c
Minor changes.
...
llvm-svn: 613
2001-09-18 12:56:28 +00:00
Vikram S. Adve
65b49e5ba5
Don't add instructions to subtree for Phi or Call.
...
Free tree nodes when done.
Avoid obscuring code with for_each and bind_obj :-)
llvm-svn: 612
2001-09-18 12:54:27 +00:00
Vikram S. Adve
0a57de77e9
Format file header.
...
llvm-svn: 611
2001-09-18 12:52:03 +00:00
Vikram S. Adve
0a78fdff45
Add new entry/exit edges when removing delay slot nodes from the graph.
...
Renamed some header files.
llvm-svn: 610
2001-09-18 12:51:38 +00:00
Vikram S. Adve
1eb14a86ef
Moved erase edge functions to class SchedGraph.
...
Add new dummy edges when deleting existing edges.
llvm-svn: 609
2001-09-18 12:50:40 +00:00
Vikram S. Adve
538d42467b
Renamed some header files.
...
llvm-svn: 608
2001-09-18 12:49:39 +00:00
Vikram S. Adve
63c60c9419
Moved erase-edge functions from SchedGraphNode to SchedGraph.
...
Renamed some header files.
llvm-svn: 607
2001-09-18 12:49:26 +00:00
Vikram S. Adve
bf084ec2e7
Moved DebugValue to Value.cpp.
...
llvm-svn: 606
2001-09-18 12:48:16 +00:00
Vikram S. Adve
b0232d85a1
Added debugging support.
...
llvm-svn: 605
2001-09-18 12:44:41 +00:00
Vikram S. Adve
24f80f0837
Minor fixes: renamed target machine files; fold sched info into TargetMachine.
...
llvm-svn: 603
2001-09-18 12:41:43 +00:00
Chris Lattner
e5750a063d
Remove the unsized array constraint
...
llvm-svn: 599
2001-09-18 04:38:32 +00:00
Chris Lattner
ac91b150a7
Add support for global constants, and for initializers for constants
...
llvm-svn: 598
2001-09-18 04:01:05 +00:00
Chris Lattner
0dfd40e910
Add support for global constants, and for initializers for constants
...
Clean up parser somewhat by factoring out freeing of ID's into setname function
llvm-svn: 597
2001-09-18 04:00:54 +00:00
Ruchira Sasanka
f51404a55a
modified machine code printing
...
llvm-svn: 595
2001-09-15 21:11:11 +00:00
Ruchira Sasanka
9517b55411
modified printing of debug messages
...
llvm-svn: 593
2001-09-15 19:11:31 +00:00
Ruchira Sasanka
ecc5b3b882
--added methods for printing
...
llvm-svn: 592
2001-09-15 19:08:41 +00:00
Ruchira Sasanka
3706ce9f36
added setRegForValue to MachineOperand class
...
llvm-svn: 591
2001-09-15 19:07:45 +00:00
Ruchira Sasanka
c1514789f3
fixed printing messages
...
llvm-svn: 590
2001-09-15 19:06:58 +00:00
Ruchira Sasanka
6807a780c5
-- debug messages dissabled
...
llvm-svn: 589
2001-09-15 16:54:40 +00:00
Ruchira Sasanka
e0cf66f325
--reg alloc code added
...
llvm-svn: 587
2001-09-15 00:33:26 +00:00
Ruchira Sasanka
ad27c6876c
-reg alloc code
...
llvm-svn: 586
2001-09-15 00:31:44 +00:00
Ruchira Sasanka
422a5cb539
added register allocation code
...
llvm-svn: 585
2001-09-15 00:30:44 +00:00
Chris Lattner
fb161a3063
Fix a bug with not removing method level types after compilation
...
llvm-svn: 582
2001-09-14 22:03:42 +00:00
Ruchira Sasanka
8308fe4dee
added RegAlloc Directory to DIRS
...
llvm-svn: 581
2001-09-14 21:28:17 +00:00
Ruchira Sasanka
e30e83df47
*** empty log message ***
...
llvm-svn: 580
2001-09-14 21:18:34 +00:00
Ruchira Sasanka
803a63ced2
*** empty log message ***
...
llvm-svn: 579
2001-09-14 20:31:39 +00:00
Chris Lattner
eb286a8ad2
Add support for loading and storing pointers...
...
llvm-svn: 575
2001-09-14 20:00:02 +00:00
Chris Lattner
45ab5fc1ae
Fix a bug that caused a crash if a setcc had zero uses.
...
llvm-svn: 574
2001-09-14 18:29:28 +00:00
Chris Lattner
cbf2f72954
Add a forward decl, oops.
...
llvm-svn: 573
2001-09-14 17:55:51 +00:00
Chris Lattner
d6a98c11bc
Chris seems fond of #include <vector>. Fix these. Also convert use list in
...
Value to a vector instead of a list.
Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling
llvm-svn: 572
2001-09-14 16:56:32 +00:00
Chris Lattner
add21b5643
Add a comment
...
llvm-svn: 571
2001-09-14 16:08:12 +00:00
Chris Lattner
16dc47075f
Break scheduling infrastructure out of TargetMachine.cpp into SchedInfo.cpp
...
llvm-svn: 569
2001-09-14 15:43:58 +00:00
Chris Lattner
de29307caa
Split Target/Machine.h into three files:
...
* Machine.h
* InstInfo.h
* SchedInfo.h
TODO: Split out reg info stuff
llvm-svn: 567
2001-09-14 06:08:03 +00:00
Chris Lattner
a0a3946882
Make a new llvm/Target #include directory.
...
Move files from lib/CodeGen/TargetMachine to lib/Target
Move TargetData.h and TargetMachine.h to Target/{Data.h|Machine.h}
Prepare to split TargetMachine.h into several smaller files
llvm-svn: 566
2001-09-14 05:34:53 +00:00
Chris Lattner
7e70cdb641
Checkin changes to:
...
1. Clean up the TargetMachine structure. No more wierd pointers that have to
be cast around and taken care of by the target.
2. Instruction Scheduling now takes the schedinfo as an argument. The same
should be done with the instinfo, it just isn't now.
llvm-svn: 565
2001-09-14 04:32:55 +00:00
Chris Lattner
33a2812c8a
Move files to new sparc directory
...
llvm-svn: 563
2001-09-14 03:56:45 +00:00
Chris Lattner
2057603b65
Move the sparc target to a new lib/Target directory
...
llvm-svn: 562
2001-09-14 03:55:11 +00:00
Chris Lattner
1f823b04b3
Move files.
...
llvm-svn: 561
2001-09-14 03:47:57 +00:00
Chris Lattner
0cf998996e
Move the contents of the CodeGen/TargetMachine/Sparc directory to Target/Sparc
...
llvm-svn: 560
2001-09-14 03:46:34 +00:00
Chris Lattner
3e2a85a0e3
This checkin represents some cleanup of the backend, implementing the following things:
...
1. The TargetMachine structure is free to decide the process a particular target uses to generate code.
2. All of the gooee details of the sparc backend are now localized in the lib/CodeGen/TargetMAchine/Sparc directory. The Sparc.h file that is globally visible is just a stub.
3. The Sparc.h file that esxists now will dissapear entirely someday when we have multiple backends chosen by a factory of some sort.
llvm-svn: 559
2001-09-14 03:37:52 +00:00
Chris Lattner
9f5d3502c5
This checkin represents some cleanup of the backend, implementing the following things:
...
1. The TargetMachine structure is free to decide the process a particular target uses to generate code.
2. All of the gooee details of the sparc backend are now localized in the lib/CodeGen/TargetMAchine/Sparc directory. The Sparc.h file that is globally visible is just a stub.
3. The Sparc.h file that esxists now will dissapear entirely someday when we have multiple backends chosen by a factory of some sort.
NOTE! The BBLiveVar.cpp file dependant on the Sparc backend, and is therefore not generic/portale to other backends. This needs to be fixed.
llvm-svn: 558
2001-09-14 03:37:22 +00:00
Chris Lattner
aa4e715da3
Updates to use local header files.
...
Note that this reverted changes that Ruchira commited that broke the build and
are unmaintainable without other checkins.
llvm-svn: 557
2001-09-14 03:33:32 +00:00
Chris Lattner
b6e1cc3118
More cleanups, preparing to revamp InstrForest to, among other things,
...
not leak all its allocated memory.
llvm-svn: 553
2001-09-12 16:34:03 +00:00
Chris Lattner
6ff8e8edce
* Clean up InstrForest
...
* Fix ins sel problem, test case:
void "foo" (int *%x, int *%y)
begin
seteq int *%x, %y
ret void
end
llvm-svn: 552
2001-09-12 01:28:49 +00:00
Chris Lattner
8cbda4e314
Eliminate 'BasicNode' from InstrForest.
...
llvm-svn: 551
2001-09-11 23:52:11 +00:00
Chris Lattner
70439801a6
Eliminate MainTreeNode function
...
llvm-svn: 550
2001-09-11 23:22:43 +00:00
Chris Lattner
2a101815b4
Remove irrelevant gross K&R Cisms
...
llvm-svn: 549
2001-09-11 23:13:38 +00:00
Chris Lattner
277c7264f6
Handle subtract in expression classifier
...
llvm-svn: 548
2001-09-11 04:27:34 +00:00
Chris Lattner
836b03a509
Use the correct style casts
...
llvm-svn: 546
2001-09-10 20:12:04 +00:00
Chris Lattner
ea511697dd
Use correct style casts
...
llvm-svn: 545
2001-09-10 20:11:44 +00:00
Chris Lattner
c5adfbc219
Use correct style casts
...
Types are not all constant now
llvm-svn: 544
2001-09-10 20:11:28 +00:00
Chris Lattner
2a4122b6b2
Use type checking predicates
...
llvm-svn: 543
2001-09-10 20:10:26 +00:00
Chris Lattner
9f96643e60
Use correct casts
...
llvm-svn: 542
2001-09-10 20:10:02 +00:00
Chris Lattner
1ee7b9046f
Use predicate for Value type test
...
Use builtin casts
llvm-svn: 541
2001-09-10 20:09:50 +00:00
Chris Lattner
65f74b8d84
Use predicate for Value type test
...
llvm-svn: 540
2001-09-10 20:09:28 +00:00
Chris Lattner
00391ca46d
ModuleTyID doesn't exist anyymore
...
Use correct cast
llvm-svn: 539
2001-09-10 20:09:08 +00:00
Chris Lattner
ee86b5f051
getMethodType is now just getType
...
llvm-svn: 538
2001-09-10 20:08:52 +00:00
Chris Lattner
0631fccc21
Add support for printing globals
...
llvm-svn: 537
2001-09-10 20:08:19 +00:00
Chris Lattner
7310978a8b
Update to use correct type cast
...
llvm-svn: 536
2001-09-10 20:08:08 +00:00
Chris Lattner
b15a10307e
Add support for global variables
...
llvm-svn: 535
2001-09-10 20:07:57 +00:00
Chris Lattner
52084c119f
Fix a bug I introduced (assertion failed: Unknown operand type), and convert to predicate style for type checks
...
llvm-svn: 531
2001-09-10 19:43:38 +00:00
Chris Lattner
9d1629d688
Implement global variable support
...
llvm-svn: 530
2001-09-10 07:58:01 +00:00
Chris Lattner
3e7417ba99
Add support for external methods
...
llvm-svn: 529
2001-09-10 04:50:17 +00:00
Chris Lattner
34c9e1a6fb
Genericize support for calling functions a bit
...
Add external method support
llvm-svn: 528
2001-09-10 04:49:44 +00:00
Chris Lattner
0754f2306a
Remove the definitions of 3 global functions that don't belong in the core
...
llvm-svn: 526
2001-09-09 23:02:07 +00:00
Chris Lattner
69a3da6f4d
Implement the subset of the GetConstantValueAsSignedInt function that is needed, locally. Remove the two support functions to inline their contents.
...
llvm-svn: 525
2001-09-09 23:01:47 +00:00
Chris Lattner
3bce6b369a
Implement the subset of the GetConstantValueAsSignedInt function that is needed, locally.
...
llvm-svn: 524
2001-09-09 23:01:32 +00:00
Chris Lattner
9985e9db71
Rename contype to subtype
...
llvm-svn: 522
2001-09-09 22:26:58 +00:00
Chris Lattner
c583ae1a1a
Make ADCE more robust, it still has problems, but it's getting closer
...
llvm-svn: 521
2001-09-09 22:26:47 +00:00
Chris Lattner
d681b883a6
Fix problems with freeing memory twice
...
llvm-svn: 520
2001-09-09 22:26:29 +00:00
Chris Lattner
4bb7fcff1b
Rename file to be consistent with header name
...
llvm-svn: 519
2001-09-09 21:59:43 +00:00
Chris Lattner
45768e6fe5
Clean up Type class by removing mutable ConstRules member and use annotations insead
...
llvm-svn: 516
2001-09-09 21:02:38 +00:00
Chris Lattner
91858f96f2
Clean up ConstRules stuff to use annotations instead of a mutable member in Type
...
llvm-svn: 515
2001-09-09 21:01:20 +00:00
Vikram S. Adve
5458bc59fd
Handle cast float-to-float or cast double-to-double.
...
llvm-svn: 512
2001-09-09 20:35:34 +00:00
Chris Lattner
2e74f6ba1f
Fix build breakage. :(
...
llvm-svn: 511
2001-09-09 19:52:23 +00:00
Chris Lattner
b095aaa8f4
I really don't like it when people break the build.
...
llvm-svn: 510
2001-09-09 19:41:52 +00:00
Ruchira Sasanka
4f3751ecdd
Committed for compliation. Not yet final.
...
--Ruchira
llvm-svn: 505
2001-09-08 14:22:50 +00:00
Ruchira Sasanka
1c3c6a2fd2
--Ruchira
...
llvm-svn: 504
2001-09-08 14:10:34 +00:00
Chris Lattner
5e9c4e67c2
Make use of the new TOOLNAME/USEDLIBS options provided in Makefile.common
...
llvm-svn: 501
2001-09-07 22:59:25 +00:00
Chris Lattner
74dcfcd89b
Updates to work with new lack of constant pool
...
llvm-svn: 490
2001-09-07 21:22:57 +00:00
Chris Lattner
beefdaad8b
Remove unneeded #includes
...
llvm-svn: 489
2001-09-07 21:22:28 +00:00
Chris Lattner
fd10317614
Remove unnecesary #include add dump calls pulled out of .h file
...
llvm-svn: 488
2001-09-07 21:21:03 +00:00
Chris Lattner
c1ca76ff89
* Remove lots of #includes
...
llvm-svn: 487
2001-09-07 21:19:42 +00:00
Chris Lattner
9aac44442d
Add tags so emacs knows these are C++ files
...
llvm-svn: 483
2001-09-07 21:04:20 +00:00
Chris Lattner
9570fbc913
Moved functionality into the other constant pool stuff
...
llvm-svn: 477
2001-09-07 18:00:19 +00:00
Chris Lattner
e1acc842ba
The header file for a translation unit should always be included first
...
System headers should be last
llvm-svn: 475
2001-09-07 17:18:30 +00:00
Chris Lattner
796e9f8118
A file should always include it's private header file *FIRST* see the
...
coding guidelines
llvm-svn: 474
2001-09-07 17:15:18 +00:00
Chris Lattner
78c2f4ab17
Annotations are now const
...
llvm-svn: 470
2001-09-07 16:59:15 +00:00
Chris Lattner
078b48a3f4
Cleanup
...
llvm-svn: 467
2001-09-07 16:57:29 +00:00
Chris Lattner
1dd250de63
Support abstract types
...
Remove constant pool support
llvm-svn: 466
2001-09-07 16:57:07 +00:00
Chris Lattner
873e0fdbf9
Support a abstract, opaque, and recursive types
...
Remove lockty, remove fillerty
Make type lookup more efficient
Support shared generic factory code
llvm-svn: 465
2001-09-07 16:56:42 +00:00
Chris Lattner
daf98ba299
Types and constnats are wierd objects in the symtabs
...
Support abstract types in symtab
llvm-svn: 464
2001-09-07 16:48:17 +00:00
Chris Lattner
e3a3aa89f3
Modules must have a valid, nonnull type. Make them void
...
llvm-svn: 463
2001-09-07 16:47:42 +00:00
Chris Lattner
aeaeab832b
Support new setName interface
...
llvm-svn: 462
2001-09-07 16:47:18 +00:00
Chris Lattner
0e510b8267
* Support new setname interface
...
* Add assertion for sanity checking
llvm-svn: 461
2001-09-07 16:47:03 +00:00
Chris Lattner
9c4eb70eae
* Cnstants are now global objects
...
* ConstantPools no longer exist
* Constants are global objects in the LLVM system
* Constants are structurally equilivant if they are pointer equilivant
* Support abstract & opaque types
* Support setName on constants even though they don't track names
* Constnats don't get copy ctors anymore
* ConstPoolVal::equals is no longer useful [use ptr equivalency]
* Support generic factory classes to create and maintain constants
llvm-svn: 460
2001-09-07 16:46:31 +00:00
Chris Lattner
d2c013e34c
Support new setName itf
...
llvm-svn: 459
2001-09-07 16:44:17 +00:00
Chris Lattner
99e8b0589f
Annotations are const objects now
...
llvm-svn: 458
2001-09-07 16:44:01 +00:00
Chris Lattner
e299925703
Types and constants are wierd things in symbol tables now
...
llvm-svn: 457
2001-09-07 16:43:50 +00:00
Chris Lattner
b82abeff92
* Eliminate reference to ConstantPool class
...
* Constants are global objects that are not allocated or freed
llvm-svn: 456
2001-09-07 16:43:22 +00:00
Chris Lattner
797730ca28
Constant pool is dead
...
llvm-svn: 455
2001-09-07 16:42:51 +00:00
Chris Lattner
4fc1bcadd9
Constants are now global unique objects
...
llvm-svn: 454
2001-09-07 16:42:26 +00:00
Chris Lattner
eaf4551d57
* Eliminate constant pool dependancies:
...
* Eliminate DoRemoveUnusedConstants
llvm-svn: 453
2001-09-07 16:42:08 +00:00
Chris Lattner
6a211421bf
* Supoprt global constants
...
* Remove support for local constant pools
* Eliminate constant pool merging method, which is no longer neccesary
* Disable invalid optimization (todo: fix it)
llvm-svn: 452
2001-09-07 16:41:30 +00:00
Chris Lattner
652b08d465
* Support global constants
...
* Eliminate need for constant pool
llvm-svn: 451
2001-09-07 16:40:34 +00:00
Chris Lattner
caac8de99d
annotations are now const
...
llvm-svn: 450
2001-09-07 16:40:04 +00:00
Chris Lattner
28154ea366
* Emit bytecode using a deque instead of a vector to be faster
...
* Internal rep no longer has a constant pool
* Support emission of recursive types
* Don't output a constant pool for an external method
* The bytecode writer is no longer a module analyzer
llvm-svn: 449
2001-09-07 16:39:41 +00:00
Chris Lattner
0d073caf6c
* Remove support for internal constant pool
...
* Support globally unique constants
* Support recursive and forward referenced types
* Support abstract types
* Add new BCR_TRACE macro to enable debugging of why the bytecode reader
occasionally refuses to read something
llvm-svn: 448
2001-09-07 16:37:43 +00:00
Chris Lattner
c189163d03
* Assembly writer is not a module analyzer anymore
...
* There is no constant pool anymore
llvm-svn: 447
2001-09-07 16:36:04 +00:00
Chris Lattner
b8f60e50f3
* Add support for forward referencing types
...
* Add support for upreferences for recursive types
* Remove support for ConstantPool.h
* Add support for globally unique Constants
* Add support for the opaque type
llvm-svn: 446
2001-09-07 16:35:17 +00:00
Chris Lattner
1a53e079fd
Add support for forward referencing types
...
llvm-svn: 445
2001-09-07 16:33:01 +00:00
Chris Lattner
f590e0c914
Add support for an opaque type
...
llvm-svn: 444
2001-09-07 16:32:43 +00:00
Chris Lattner
fddd7fbc2c
Remove #include of nonexistant header file
...
llvm-svn: 443
2001-09-07 16:32:10 +00:00
Chris Lattner
35ea5501a8
* Slot calc is now simpler and not based on module analyzer.
...
* Add new SC_DEBUG option to enable debugging of why stuff doesn't work
llvm-svn: 442
2001-09-07 16:31:52 +00:00
Chris Lattner
f1f36de564
Module analyzer no longer has to iterate over constant pool
...
llvm-svn: 441
2001-09-07 16:31:23 +00:00
Chris Lattner
8bd3097d81
Simplify code by eliminating need to hang onto constant pool references
...
llvm-svn: 440
2001-09-07 16:31:04 +00:00
Ruchira Sasanka
fb626ffffe
*** empty log message ***
...
llvm-svn: 412
2001-08-31 20:59:58 +00:00
Vikram S. Adve
28e3131d5c
Added directory LiveVar/
...
llvm-svn: 410
2001-08-28 23:29:31 +00:00
Vikram S. Adve
b79b5f6b8b
Added nonterminals for arithmetic operations where one operand is constant.
...
llvm-svn: 406
2001-08-28 23:25:46 +00:00
Vikram S. Adve
9fd1f9c1c2
Makefile for InstrSched/
...
llvm-svn: 403
2001-08-28 23:17:22 +00:00
Vikram S. Adve
778fc57b85
Remove source list.
...
llvm-svn: 402
2001-08-28 23:16:59 +00:00
Vikram S. Adve
49fddd4df3
Added directory InstrSched.
...
llvm-svn: 401
2001-08-28 23:16:13 +00:00
Vikram S. Adve
789dcfe59c
Major changes too hard to document :-)
...
llvm-svn: 400
2001-08-28 23:12:57 +00:00
Vikram S. Adve
5947c43319
Extensive additions for supporting instruction scheduling.
...
llvm-svn: 398
2001-08-28 23:10:41 +00:00
Vikram S. Adve
f9fa4cc579
Added class MachineSchedInfo and several supporting classes
...
as a machine description for instruction scheduling.
llvm-svn: 397
2001-08-28 23:09:36 +00:00
Vikram S. Adve
ad002e37d5
Implementation of instruction scheduling for LLVM.
...
Currently schedules one basic block at a time.
llvm-svn: 396
2001-08-28 23:07:19 +00:00
Vikram S. Adve
91d73a52d5
Class that encapsulates priority heuristics for instruction scheduling.
...
llvm-svn: 395
2001-08-28 23:06:49 +00:00
Vikram S. Adve
23be1e0839
Scheduling DAG for instruction scheduling. Currently for a single basic block.
...
llvm-svn: 394
2001-08-28 23:06:02 +00:00
Vikram S. Adve
8fdc52a63d
Moved debug options declaration to header file, and moved
...
a function to MachineInstr.cpp.
llvm-svn: 393
2001-08-28 23:04:38 +00:00
Vikram S. Adve
89228a786c
Moved function PrintMachineInstructions here.
...
llvm-svn: 392
2001-08-28 23:02:39 +00:00
Vikram S. Adve
fe68c73977
analyze() now checks to see that we don't analyze the same method twice.
...
Needs a mechnanism to override this check (e.g., after a transformation).
llvm-svn: 391
2001-08-28 22:36:35 +00:00
Vikram S. Adve
4c03772b2a
*** empty log message ***
...
llvm-svn: 390
2001-08-28 22:35:21 +00:00
Chris Lattner
f3b74b4736
I suck
...
llvm-svn: 385
2001-08-27 18:54:45 +00:00
Chris Lattner
6336546710
Initial checkin of TargetData code
...
llvm-svn: 384
2001-08-27 16:00:15 +00:00
Chris Lattner
eaebbaf5bc
Remove target specific stuff from Type classes
...
llvm-svn: 383
2001-08-27 15:52:13 +00:00
Chris Lattner
3b527dd79e
Remove target specific method from MemAccessInst class
...
llvm-svn: 382
2001-08-27 15:51:43 +00:00
Chris Lattner
3eb05bbef1
Convert to use the new factored out TargetData class
...
llvm-svn: 381
2001-08-27 15:51:16 +00:00
Chris Lattner
6ea0dfcd7e
Factor code out to the TargetData class
...
llvm-svn: 380
2001-08-27 15:50:41 +00:00
Chris Lattner
b04aee8d08
Support passing a data pointer to annotation factory methods
...
llvm-svn: 376
2001-08-27 05:19:10 +00:00
Chris Lattner
d2af693cd9
Demolish explicit source list
...
llvm-svn: 375
2001-08-27 05:18:35 +00:00
Chris Lattner
0a85e4845d
Lots of new functionality
...
llvm-svn: 372
2001-08-27 05:16:50 +00:00
Chris Lattner
9eaf62df4a
Remove explicit source list
...
llvm-svn: 371
2001-08-25 20:40:32 +00:00
Chris Lattner
a6357a1101
Make sure noone branches to the entry node of the method
...
llvm-svn: 369
2001-08-24 14:56:34 +00:00
Chris Lattner
d381beea6a
Add annotation support
...
llvm-svn: 366
2001-08-23 17:07:56 +00:00
Chris Lattner
b2c70da37a
Handle case where there is no exit node from a flowgraph
...
llvm-svn: 365
2001-08-23 17:07:19 +00:00
Chris Lattner
5882b500cf
Changed an assertion message
...
llvm-svn: 364
2001-08-23 17:06:38 +00:00
Chris Lattner
8e225d7a21
Initial checkin of interpreter
...
llvm-svn: 361
2001-08-23 17:05:04 +00:00
Ruchira Sasanka
bc7068b2e4
LV code on machine instructions
...
llvm-svn: 360
2001-08-20 21:12:49 +00:00
Ruchira Sasanka
74f3230149
LV info on machine instructions
...
llvm-svn: 359
2001-08-20 21:11:01 +00:00