Ruchira Sasanka
2a6cc8300d
updated suggesting/coloring of call & return args & implicit operands.
...
Changed added instr to a deque (from a vector)
llvm-svn: 831
2001-10-15 16:26:38 +00:00
Ruchira Sasanka
33535773cb
fixed a coalscing bug
...
llvm-svn: 828
2001-10-15 16:22:44 +00:00
Chris Lattner
2b3369567e
* Fix privacy issues on RegToRefVecMap
...
* Fix initialization order problems...
llvm-svn: 762
2001-10-13 06:51:01 +00:00
Ruchira Sasanka
7c10e086eb
--corrected coalescing test: coalsed only if two are of the same reg class
...
llvm-svn: 729
2001-10-12 17:48:18 +00:00
Vikram S. Adve
1235b330f7
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
d50b665acf
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
192686db96
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
c36a504cfe
Moved code generation support routines to InstrSelectionSupport.cpp.
...
llvm-svn: 717
2001-10-10 20:49:07 +00:00
Chris Lattner
da55810666
Commit more code over to new cast style
...
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
3856934386
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
4b717c0edc
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Ruchira Sasanka
acffb966b9
removing phy regaloc - incorrect file
...
llvm-svn: 682
2001-09-30 23:52:14 +00:00
Vikram S. Adve
813ffcc4f6
Change ! ( ...== ...) to !=.
...
llvm-svn: 680
2001-09-30 23:45:08 +00:00
Vikram S. Adve
e44abbb99d
Improved dump for disp type operand.
...
llvm-svn: 679
2001-09-30 23:44:19 +00:00
Vikram S. Adve
819635eb7c
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
f734fc2af7
Minor changes for bug fixes in SchedGraph.cpp.
...
llvm-svn: 677
2001-09-30 23:37:26 +00:00
Vikram S. Adve
2b2ca42761
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
560b0ad482
added suggesting color support
...
llvm-svn: 673
2001-09-30 23:19:57 +00:00
Ruchira Sasanka
e3b9faddad
--added suggesting colors; call/ret arg handling
...
llvm-svn: 670
2001-09-30 23:11:59 +00:00
Chris Lattner
bb09a10929
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
Ruchira Sasanka
72727bf358
-- removed debugging messages
...
llvm-svn: 651
2001-09-19 22:39:58 +00:00
Ruchira Sasanka
213b3621ac
-fixed return value bug.
...
llvm-svn: 650
2001-09-19 22:31:21 +00:00
Chris Lattner
da876eff3c
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
d89425bb58
Change debug info from #define to command line option
...
llvm-svn: 646
2001-09-19 16:26:10 +00:00
Chris Lattner
1bec3bd0a4
* REMOVE extraneous debug info if DEBUG_RA is not set
...
* Spell PhyRegAlloc right.
llvm-svn: 645
2001-09-19 16:09:04 +00:00
Ruchira Sasanka
219f777bad
*** empty log message ***
...
llvm-svn: 634
2001-09-18 22:57:47 +00:00
Ruchira Sasanka
1f331f258b
-- updated printing
...
llvm-svn: 631
2001-09-18 22:43:57 +00:00
Chris Lattner
1d06a46723
Remove a copy of a bunch of code
...
llvm-svn: 630
2001-09-18 18:15:40 +00:00
Chris Lattner
3c6ce06243
Don't check for null on delete
...
llvm-svn: 624
2001-09-18 17:02:42 +00:00
Vikram S. Adve
82d1e14e7f
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
bb81dae651
Minor changes.
...
llvm-svn: 613
2001-09-18 12:56:28 +00:00
Vikram S. Adve
0c51cf0f51
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
8656a80661
Format file header.
...
llvm-svn: 611
2001-09-18 12:52:03 +00:00
Vikram S. Adve
703297cf24
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
3e8029dc07
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
270766a210
Renamed some header files.
...
llvm-svn: 608
2001-09-18 12:49:39 +00:00
Vikram S. Adve
fa64a35a01
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
06225084b9
Minor fixes: renamed target machine files; fold sched info into TargetMachine.
...
llvm-svn: 603
2001-09-18 12:41:43 +00:00
Ruchira Sasanka
8efbd10c86
modified machine code printing
...
llvm-svn: 595
2001-09-15 21:11:11 +00:00
Ruchira Sasanka
86b2ad4b7c
--added methods for printing
...
llvm-svn: 592
2001-09-15 19:08:41 +00:00
Ruchira Sasanka
bae3812a95
added setRegForValue to MachineOperand class
...
llvm-svn: 591
2001-09-15 19:07:45 +00:00
Ruchira Sasanka
6fd9532e54
fixed printing messages
...
llvm-svn: 590
2001-09-15 19:06:58 +00:00
Ruchira Sasanka
fe0292e68d
-- debug messages dissabled
...
llvm-svn: 589
2001-09-15 16:54:40 +00:00
Ruchira Sasanka
f60342a231
--reg alloc code added
...
llvm-svn: 587
2001-09-15 00:33:26 +00:00
Ruchira Sasanka
671428c8a7
-reg alloc code
...
llvm-svn: 586
2001-09-15 00:31:44 +00:00
Ruchira Sasanka
11002a7b93
added RegAlloc Directory to DIRS
...
llvm-svn: 581
2001-09-14 21:28:17 +00:00
Ruchira Sasanka
808568eafc
*** empty log message ***
...
llvm-svn: 580
2001-09-14 21:18:34 +00:00
Chris Lattner
7f155e10f6
Add a forward decl, oops.
...
llvm-svn: 573
2001-09-14 17:55:51 +00:00
Chris Lattner
8d44b99844
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
87b3bf630b
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
22a6a90511
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
f8464e4b8d
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
06028541ab
Move the sparc target to a new lib/Target directory
...
llvm-svn: 562
2001-09-14 03:55:11 +00:00
Chris Lattner
fc1e0f33fa
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
0a823a062c
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
2124f99556
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
f8459bb199
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
16dd09a7bb
* 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
cc38da77e8
Eliminate 'BasicNode' from InstrForest.
...
llvm-svn: 551
2001-09-11 23:52:11 +00:00
Chris Lattner
706ee8e5ec
Eliminate MainTreeNode function
...
llvm-svn: 550
2001-09-11 23:22:43 +00:00
Chris Lattner
a7d3b8dca1
Remove irrelevant gross K&R Cisms
...
llvm-svn: 549
2001-09-11 23:13:38 +00:00
Chris Lattner
e014d797b4
Use type checking predicates
...
llvm-svn: 543
2001-09-10 20:10:26 +00:00
Chris Lattner
5a01692836
Use correct casts
...
llvm-svn: 542
2001-09-10 20:10:02 +00:00
Chris Lattner
aeaba8a2ee
Use predicate for Value type test
...
Use builtin casts
llvm-svn: 541
2001-09-10 20:09:50 +00:00
Chris Lattner
44a45af61b
Use predicate for Value type test
...
llvm-svn: 540
2001-09-10 20:09:28 +00:00
Chris Lattner
acfa507663
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
a461b05207
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
e4fe7bc4a5
Implement the subset of the GetConstantValueAsSignedInt function that is needed, locally.
...
llvm-svn: 524
2001-09-09 23:01:32 +00:00
Chris Lattner
c49f5f35db
Fix problems with freeing memory twice
...
llvm-svn: 520
2001-09-09 22:26:29 +00:00
Vikram S. Adve
b606fcb3e0
Handle cast float-to-float or cast double-to-double.
...
llvm-svn: 512
2001-09-09 20:35:34 +00:00
Chris Lattner
57de997eff
Fix build breakage. :(
...
llvm-svn: 511
2001-09-09 19:52:23 +00:00
Chris Lattner
facf074632
I really don't like it when people break the build.
...
llvm-svn: 510
2001-09-09 19:41:52 +00:00
Ruchira Sasanka
f5788aa837
Committed for compliation. Not yet final.
...
--Ruchira
llvm-svn: 505
2001-09-08 14:22:50 +00:00
Ruchira Sasanka
e5d0fb8eee
--Ruchira
...
llvm-svn: 504
2001-09-08 14:10:34 +00:00
Chris Lattner
064286b9cf
Updates to work with new lack of constant pool
...
llvm-svn: 490
2001-09-07 21:22:57 +00:00
Chris Lattner
e99c9acb84
Remove unneeded #includes
...
llvm-svn: 489
2001-09-07 21:22:28 +00:00
Chris Lattner
b7d0c37f5c
Remove unnecesary #include add dump calls pulled out of .h file
...
llvm-svn: 488
2001-09-07 21:21:03 +00:00
Chris Lattner
bbf765695f
* Remove lots of #includes
...
llvm-svn: 487
2001-09-07 21:19:42 +00:00
Chris Lattner
feb62c321e
Add tags so emacs knows these are C++ files
...
llvm-svn: 483
2001-09-07 21:04:20 +00:00
Chris Lattner
23fcc08d38
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
74d07801bf
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
4eb6d9fd85
annotations are now const
...
llvm-svn: 450
2001-09-07 16:40:04 +00:00
Ruchira Sasanka
4d30f4bb6c
*** empty log message ***
...
llvm-svn: 412
2001-08-31 20:59:58 +00:00
Vikram S. Adve
10db4c2551
Added nonterminals for arithmetic operations where one operand is constant.
...
llvm-svn: 406
2001-08-28 23:25:46 +00:00
Vikram S. Adve
59a091870a
Makefile for InstrSched/
...
llvm-svn: 403
2001-08-28 23:17:22 +00:00
Vikram S. Adve
27713047f4
Remove source list.
...
llvm-svn: 402
2001-08-28 23:16:59 +00:00
Vikram S. Adve
ebfa4bd437
Added directory InstrSched.
...
llvm-svn: 401
2001-08-28 23:16:13 +00:00
Vikram S. Adve
245b5b0691
Major changes too hard to document :-)
...
llvm-svn: 400
2001-08-28 23:12:57 +00:00
Vikram S. Adve
23e59b70cd
Extensive additions for supporting instruction scheduling.
...
llvm-svn: 398
2001-08-28 23:10:41 +00:00
Vikram S. Adve
742086f200
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
3148b83485
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
138c3bb667
Class that encapsulates priority heuristics for instruction scheduling.
...
llvm-svn: 395
2001-08-28 23:06:49 +00:00
Vikram S. Adve
754c4dd6ae
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
8641f9dca0
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
5f72f42aee
Moved function PrintMachineInstructions here.
...
llvm-svn: 392
2001-08-28 23:02:39 +00:00
Chris Lattner
b6aa2334f4
I suck
...
llvm-svn: 385
2001-08-27 18:54:45 +00:00
Chris Lattner
53bbf0783b
Initial checkin of TargetData code
...
llvm-svn: 384
2001-08-27 16:00:15 +00:00
Chris Lattner
6c5cbe3f60
Convert to use the new factored out TargetData class
...
llvm-svn: 381
2001-08-27 15:51:16 +00:00
Chris Lattner
8dd99f33ea
Factor code out to the TargetData class
...
llvm-svn: 380
2001-08-27 15:50:41 +00:00
Chris Lattner
827c2a1d7c
Demolish explicit source list
...
llvm-svn: 375
2001-08-27 05:18:35 +00:00
Chris Lattner
f04f646c1b
Remove explicit source list
...
llvm-svn: 371
2001-08-25 20:40:32 +00:00
Vikram S. Adve
1700068262
Always set isDef for operand in position resultPos.
...
llvm-svn: 357
2001-08-13 16:32:45 +00:00
Ruchira Sasanka
6dec5fe042
Changed SetMachineOpernad calls in Set3OperandsFromInstr so that the
...
result position is a def (i.e., added true to the end of call) -- Ruchira
llvm-svn: 356
2001-08-13 16:26:28 +00:00
Ruchira Sasanka
20429a47e5
Changed case 64 to make the first arg of phi a defintion
...
llvm-svn: 355
2001-08-13 16:24:01 +00:00
Ruchira Sasanka
c82322c526
*** empty log message ***
...
llvm-svn: 351
2001-08-07 21:01:23 +00:00
Ruchira Sasanka
4ac2975f5a
added a default isDef arg to SetMachineOperand method - Ruchira
...
llvm-svn: 350
2001-08-07 20:16:52 +00:00
Vikram S. Adve
22db4f9b7c
Add CC operand as 4th operand of SUBcc, and mark it as a def.
...
llvm-svn: 348
2001-08-06 21:06:10 +00:00
Vikram S. Adve
45317ad6cc
Also, move burg rule to Makefile.common.
...
llvm-svn: 346
2001-08-06 19:06:56 +00:00
Vikram S. Adve
ed242ccea0
Better still, lets move pathname for Burg to Makefile.common.
...
llvm-svn: 344
2001-08-06 19:01:45 +00:00
Vikram S. Adve
058ff319fd
Use full pathname for burg.
...
llvm-svn: 342
2001-08-06 18:53:26 +00:00
Vikram S. Adve
527c8955de
Simplify command line options, and add option for printing
...
machine instructions without debugging info.
llvm-svn: 340
2001-07-31 21:53:25 +00:00
Vikram S. Adve
c746fbb806
Added tree nodes for Phi instructions.
...
llvm-svn: 338
2001-07-31 21:50:29 +00:00
Vikram S. Adve
1c73bc1c1f
Generate tree nodes for Phi instructions.
...
llvm-svn: 337
2001-07-31 21:49:53 +00:00
Vikram S. Adve
ff7070bbb9
Allow machine instructions with variable numbers of arguments.
...
This is used only by Phi for now.
llvm-svn: 336
2001-07-31 21:49:28 +00:00
Vikram S. Adve
e335821b08
Generate dummy Phi machine instruction, plus a bug fix for BrCond(boolreg).
...
llvm-svn: 334
2001-07-31 21:46:57 +00:00
Vikram S. Adve
da0c7d89bc
Record machine instructions in the vector for each basic block.
...
llvm-svn: 331
2001-07-30 18:48:43 +00:00
Vikram S. Adve
50204f5daa
Added UltraSparcInstrInfo class to specialize class MachineInstrInfo.
...
Relevant changes elsewhere:
Added MachineInstrInfo class and moved instruction-related members there.
Added several fields to MachineInstrDescriptor (and renamed it from
MachineInstrInfo. Latency fields are to support scheduling.
llvm-svn: 311
2001-07-28 04:19:10 +00:00
Vikram S. Adve
985b6e3d13
Eliminate unused function.
...
llvm-svn: 310
2001-07-28 04:15:45 +00:00
Vikram S. Adve
150460321e
Bug fixes:
...
Store bool result in register after SetCC if the bool value
is used by anything other than a branch.
Forward-substitute operand of a VM instruction for which no
machine instruction is generated (e.g., Cast).
Other changes due to changes to classes TargetMachine and MachineInstr.
llvm-svn: 309
2001-07-28 04:15:15 +00:00
Vikram S. Adve
c429691751
Added MachineInstrInfo class and moved instruction-related members there.
...
Added several fields to MachineInstrDescriptor (and renamed it from
MachineInstrInfo. Latency fields are to support scheduling.
llvm-svn: 308
2001-07-28 04:09:37 +00:00
Vikram S. Adve
bff682dfac
Eliminate separate enum for operand register type.
...
Use union for alternative data for different operand types.
Add iterator over Value* operands in a MachineInstr.
llvm-svn: 307
2001-07-28 04:06:37 +00:00
Chris Lattner
ab0cc40796
CommandLine library cleanup. No longer use getValue/setValue, instead, just treat the commandline
...
args as the objects they represent and the "right thing" will happen
llvm-svn: 283
2001-07-23 19:27:24 +00:00
Chris Lattner
78a307b170
Eliminated the Unique class in favor of NonCopyable and NonCopyableV
...
llvm-svn: 280
2001-07-23 18:26:21 +00:00
Chris Lattner
e2472bbf6c
Moved inline/llvm/Tools/* to include/llvm/Support/*
...
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner
44187dbff1
Clean up hash table usage
...
Remove opaque pointer used for C compatibility which isn't an issue
llvm-svn: 275
2001-07-23 03:50:57 +00:00
Chris Lattner
d8f1cc98e8
Removal of the redundant CompileContext wrapper
...
llvm-svn: 274
2001-07-23 03:09:03 +00:00
Chris Lattner
0af2464a78
Large scale changes to implement new command line argument facility
...
llvm-svn: 272
2001-07-23 02:35:57 +00:00
Chris Lattner
9c0f8f24e0
Privatize LLCOptions. It had no business being visible to the entire
...
program.
llvm-svn: 267
2001-07-22 04:40:02 +00:00
Chris Lattner
b299068101
Eliminate lots of unnecessary #includes and forward decls
...
there are probably more to kill
llvm-svn: 261
2001-07-21 23:24:48 +00:00
Chris Lattner
7769970e16
Eliminate many unneccesary #includes
...
llvm-svn: 260
2001-07-21 22:59:56 +00:00
Chris Lattner
7cad6f14b8
Make code fit in 80 columns more
...
llvm-svn: 259
2001-07-21 22:57:05 +00:00
Chris Lattner
eb68f3263c
Remove unneccesary #includes
...
llvm-svn: 258
2001-07-21 22:53:35 +00:00
Chris Lattner
293e80559c
Exterminate nasty Cisms
...
llvm-svn: 257
2001-07-21 22:42:09 +00:00
Chris Lattner
bdb56b1639
Refer to include/llvm/CodeGen not Codegen
...
llvm-svn: 256
2001-07-21 22:32:34 +00:00
Chris Lattner
dd511760d9
Renamed include/llvm/Codegen to include/llvm/CodeGen
...
llvm-svn: 253
2001-07-21 20:58:30 +00:00
Vikram S. Adve
656823944e
Description of the SPARC as a target architecture.
...
llvm-svn: 233
2001-07-21 12:42:19 +00:00
Vikram S. Adve
3414e78e29
Base clas for a description of a target architecture.
...
llvm-svn: 232
2001-07-21 12:42:08 +00:00
Vikram S. Adve
ab9e557102
Instruction selection via pattern matching on instruction trees using BURG.
...
llvm-svn: 231
2001-07-21 12:41:50 +00:00
Vikram S. Adve
9c049ca36c
*** empty log message ***
...
llvm-svn: 230
2001-07-21 12:41:01 +00:00