Commit Graph

64323 Commits

Author SHA1 Message Date
Chris Lattner 1cedcf1c31 Moved functionality into the other constant pool stuff
llvm-svn: 477
2001-09-07 18:00:19 +00:00
Chris Lattner 2833dd3fed Follow the golden rule of the coding standards guide: Make the code look
like the rest of the system.

llvm-svn: 476
2001-09-07 17:38:10 +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 dbc082f7f7 Constant pool is eliminated
llvm-svn: 473
2001-09-07 17:08:28 +00:00
Chris Lattner 330f87d7fe Add support for iteration through type graphs
Static constructors destroy genericity

llvm-svn: 472
2001-09-07 17:04:29 +00:00
Chris Lattner c3f679f2fe Remove support for const pool merging, which is obsolete now.
llvm-svn: 471
2001-09-07 16:59:35 +00:00
Chris Lattner 8564037d97 Annotations are now const
llvm-svn: 470
2001-09-07 16:59:15 +00:00
Chris Lattner 754d3cf7e3 Build lli first
llvm-svn: 469
2001-09-07 16:58:57 +00:00
Chris Lattner 5cc42aa810 Symboltables are sorted in the bytecode, so no problems here!
llvm-svn: 468
2001-09-07 16:58:39 +00:00
Chris Lattner 5f3b276293 Cleanup
llvm-svn: 467
2001-09-07 16:57:29 +00:00
Chris Lattner 97d79f144c Support abstract types
Remove constant pool support

llvm-svn: 466
2001-09-07 16:57:07 +00:00
Chris Lattner 2bd66ebee9 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 9e0f1cb3ad 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 f50b723d9c Modules must have a valid, nonnull type. Make them void
llvm-svn: 463
2001-09-07 16:47:42 +00:00
Chris Lattner 5c764a5a9b Support new setName interface
llvm-svn: 462
2001-09-07 16:47:18 +00:00
Chris Lattner e8dd6ad040 * Support new setname interface
* Add assertion for sanity checking

llvm-svn: 461
2001-09-07 16:47:03 +00:00
Chris Lattner 49d855ca31 * 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 2d189a5981 Support new setName itf
llvm-svn: 459
2001-09-07 16:44:17 +00:00
Chris Lattner da010ca1b9 Annotations are const objects now
llvm-svn: 458
2001-09-07 16:44:01 +00:00
Chris Lattner d707ec62b6 Types and constants are wierd things in symbol tables now
llvm-svn: 457
2001-09-07 16:43:50 +00:00
Chris Lattner dae05dc937 * 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 e57fc205f4 Constant pool is dead
llvm-svn: 455
2001-09-07 16:42:51 +00:00
Chris Lattner 6d7bce9f3c Constants are now global unique objects
llvm-svn: 454
2001-09-07 16:42:26 +00:00
Chris Lattner 07e158de3c * Eliminate constant pool dependancies:
* Eliminate DoRemoveUnusedConstants

llvm-svn: 453
2001-09-07 16:42:08 +00:00
Chris Lattner 030772df99 * 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 bbb229655b * Support global constants
* Eliminate need for constant pool

llvm-svn: 451
2001-09-07 16:40:34 +00:00
Chris Lattner 4eb6d9fd85 annotations are now const
llvm-svn: 450
2001-09-07 16:40:04 +00:00
Chris Lattner b97ef9f4cf * 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 1f043cd1ba * 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 fee714f7e0 * 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 aa534bf195 * 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 c7805c7d71 Add support for forward referencing types
llvm-svn: 445
2001-09-07 16:33:01 +00:00
Chris Lattner 47af30c937 Add support for an opaque type
llvm-svn: 444
2001-09-07 16:32:43 +00:00
Chris Lattner dea211ea67 Remove #include of nonexistant header file
llvm-svn: 443
2001-09-07 16:32:10 +00:00
Chris Lattner 1e6912a13f * 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 ce4cd006c1 Module analyzer no longer has to iterate over constant pool
llvm-svn: 441
2001-09-07 16:31:23 +00:00
Chris Lattner c6b06c4f9b Simplify code by eliminating need to hang onto constant pool references
llvm-svn: 440
2001-09-07 16:31:04 +00:00
Chris Lattner fd5541a8c8 * Fixed mapped_iterator to actually work with functors
* Implement mapto function that works like map in a functional programming language

llvm-svn: 439
2001-09-07 16:30:28 +00:00
Chris Lattner a559795e9a Constant pools no longer exist
llvm-svn: 438
2001-09-07 16:29:55 +00:00
Chris Lattner d996b2d857 Eliminate DoConstantPoolMerging. ConstantPools no longer exist
llvm-svn: 437
2001-09-07 16:29:40 +00:00
Chris Lattner a7f5ed8f26 You no longer have to delete constants! They are located in a global
constant pool instead of in local ones.

Change bool handling to prevent modification of bool values

llvm-svn: 436
2001-09-07 16:29:18 +00:00
Chris Lattner 5e89d7c81c Annotations are now passed around as const objects
llvm-svn: 435
2001-09-07 16:28:25 +00:00
Chris Lattner b68baea2ed Use a deque instead of a vector for greater efficiency writing bytecode
llvm-svn: 434
2001-09-07 16:27:49 +00:00
Chris Lattner 6dbd0f2a81 Clean stuff up.
Types are not named, they are described

llvm-svn: 433
2001-09-07 16:27:25 +00:00
Chris Lattner 6f0e042959 Simplify SlotCalculator. SlotCalculator is now not a ModuleAnalyzer
llvm-svn: 432
2001-09-07 16:27:05 +00:00
Chris Lattner faa382da48 Simplify analyzer
llvm-svn: 431
2001-09-07 16:26:36 +00:00
Chris Lattner a9a872f142 * Fix long standing problems that would affect inlining. How could this have worked?
* Update to new setName interface

llvm-svn: 430
2001-09-07 16:26:13 +00:00
Chris Lattner 71cc25394b Add assertion to check for
alloca [int]
for example

llvm-svn: 429
2001-09-07 16:25:42 +00:00
Chris Lattner 4ce1643c94 * Values are AbstactTypeUsers to support abstract types
* SetName now takes extra parameter to support naming types and constants without handles

llvm-svn: 428
2001-09-07 16:25:23 +00:00
Chris Lattner 8e0ee42697 Remove extra whitespace at EOL
llvm-svn: 427
2001-09-07 16:24:35 +00:00
Chris Lattner fc51ef84bb * Add support for Opaque & Abstract types.
* Remove silly enum values that are never going to be used
* What used to be a types "name" is now it's "description"
* Add a new iterator to type to allow users to iterate over subtypes

llvm-svn: 426
2001-09-07 16:23:59 +00:00
Chris Lattner 0f26373be3 Support abstract types by keeping on the use list of the abstract type.
llvm-svn: 425
2001-09-07 16:21:36 +00:00
Chris Lattner 433a9e8244 SymTabValues no longer hold constant pools
llvm-svn: 424
2001-09-07 16:21:04 +00:00
Chris Lattner b371e06002 SymTabValue no longer includes ValueHolder for Module. Include it ourself
llvm-svn: 423
2001-09-07 16:20:46 +00:00
Chris Lattner 4619a296f3 * Support new setName interface
* Make the iterator a little nicer

llvm-svn: 422
2001-09-07 16:20:18 +00:00
Chris Lattner 09dcda1769 Support new setName interface
llvm-svn: 421
2001-09-07 16:19:55 +00:00
Chris Lattner fce2dd9caa * Add new DerivedType base class that goes between Type and the derived types
* Implement abstract types
* Add new Opaque derived type

llvm-svn: 420
2001-09-07 16:19:29 +00:00
Chris Lattner 3fc9d2f558 Implement support for globally unique constants. Constants no longer live
in a module or method local pool, they are global to the llvm system.

llvm-svn: 419
2001-09-07 16:18:19 +00:00
Chris Lattner 52e6fa2031 Add support for walking type graphs
llvm-svn: 418
2001-09-07 16:17:24 +00:00
Chris Lattner 8d230bf786 Changing setName semantics
llvm-svn: 417
2001-09-07 16:16:57 +00:00
Chris Lattner 0799ddb3a9 Make annotations operations const with a mutable annotation list so that
we can annotate Types.  A better solution would be make types nonconst.

llvm-svn: 416
2001-09-07 16:16:35 +00:00
Chris Lattner d77a512129 Fixed the "output constant pool even if he have no constants" issue
llvm-svn: 415
2001-09-07 16:13:58 +00:00
Chris Lattner 56ba0bb0da whoo hoo I did something! :)
llvm-svn: 414
2001-09-07 16:10:35 +00:00
Chris Lattner 3b78fa378e Make fib be more real
llvm-svn: 413
2001-09-01 01:47:52 +00:00
Ruchira Sasanka 4d30f4bb6c *** empty log message ***
llvm-svn: 412
2001-08-31 20:59:58 +00:00
Ruchira Sasanka b7237c88ae *** empty log message ***
llvm-svn: 411
2001-08-31 20:30:42 +00:00
Vikram S. Adve 8ae325420f Added directory LiveVar/
llvm-svn: 410
2001-08-28 23:29:31 +00:00
Vikram S. Adve 4968d07d19 Makefile for tools/tests/
llvm-svn: 409
2001-08-28 23:28:25 +00:00
Vikram S. Adve 8ff24b26c9 Driver to test IsPowerOf2. Could be extended for other library routines.
llvm-svn: 408
2001-08-28 23:28:10 +00:00
Vikram S. Adve 1f98eb43e5 Add testcodegen target, and restrict which tests are run for it.
llvm-svn: 407
2001-08-28 23:26:44 +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 df3c54f41d Changed link line.
llvm-svn: 405
2001-08-28 23:23:35 +00:00
Vikram S. Adve 799aed0af3 Add calls to NormalizeMethod() and to ScheduleInstructionsWithSSA().
llvm-svn: 404
2001-08-28 23:23:14 +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 3497e216d0 Added function MachineInstr::operandIsDefined(i) and decl for
function PrintMachineInstructions.

llvm-svn: 399
2001-08-28 23:11:46 +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
Vikram S. Adve 1143eff628 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 b6970c305f *** empty log message ***
llvm-svn: 390
2001-08-28 22:35:21 +00:00
Vikram S. Adve 6b99de80dc Simplification transformations to normalize the code for later passes.
llvm-svn: 389
2001-08-28 21:40:27 +00:00
Vikram S. Adve 7e95d47bdc Use const int instead of #define.
llvm-svn: 388
2001-08-28 21:35:26 +00:00
Vikram S. Adve 586a1d73a9 Add copy and assignment operators for POIterator, and
static constructors.

llvm-svn: 387
2001-08-28 21:34:56 +00:00
Vikram S. Adve 88bee9f363 Added InstrSched library to link line.
llvm-svn: 386
2001-08-28 21:33:33 +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 74a5857531 Remove target specific stuff from Type classes
llvm-svn: 383
2001-08-27 15:52:13 +00:00
Chris Lattner 21a6f5fe7f Remove target specific method from MemAccessInst class
llvm-svn: 382
2001-08-27 15:51:43 +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 eae2201f08 Use the new TargetData class to factor out some of the shared code
between the static compilers and the interpreter.

llvm-svn: 379
2001-08-27 15:50:12 +00:00
Chris Lattner 1cb56eda7f Remove target specific method.
llvm-svn: 378
2001-08-27 15:49:36 +00:00
Chris Lattner ab759f00c3 Remove target specific code, move to TargetData.cpp file
llvm-svn: 377
2001-08-27 15:49:16 +00:00
Chris Lattner f93e63a189 Support passing a data pointer to annotation factory methods
llvm-svn: 376
2001-08-27 05:19:10 +00:00
Chris Lattner 827c2a1d7c Demolish explicit source list
llvm-svn: 375
2001-08-27 05:18:35 +00:00
Chris Lattner 8aaab6b9c1 Extend annotations to pass data pointers around to the functions
llvm-svn: 374
2001-08-27 05:17:47 +00:00
Chris Lattner 6b99609e1f Add another TODO: sigh
llvm-svn: 373
2001-08-27 05:17:20 +00:00
Chris Lattner 2c1a98ef08 Lots of new functionality
llvm-svn: 372
2001-08-27 05:16:50 +00:00
Chris Lattner f04f646c1b Remove explicit source list
llvm-svn: 371
2001-08-25 20:40:32 +00:00
Vikram S. Adve e3590a93e9 Add dependence to libvmcore.
llvm-svn: 370
2001-08-25 12:43:25 +00:00
Chris Lattner 439465583a Make sure noone branches to the entry node of the method
llvm-svn: 369
2001-08-24 14:56:34 +00:00
Chris Lattner addc6258cd Compile LLI
llvm-svn: 368
2001-08-23 17:09:06 +00:00
Chris Lattner 7e0eec9a85 Rename start methods to main so interpreter works easier
llvm-svn: 367
2001-08-23 17:08:51 +00:00
Chris Lattner 3885a2db4f Add annotation support
llvm-svn: 366
2001-08-23 17:07:56 +00:00
Chris Lattner a0484c8eeb Handle case where there is no exit node from a flowgraph
llvm-svn: 365
2001-08-23 17:07:19 +00:00
Chris Lattner 01a45c6c96 Changed an assertion message
llvm-svn: 364
2001-08-23 17:06:38 +00:00
Chris Lattner 8e626e419e Add annotation support to value
llvm-svn: 363
2001-08-23 17:06:21 +00:00
Chris Lattner 9f35277950 * Add assertions
* Add a nodeVisited method to the DF interator

llvm-svn: 362
2001-08-23 17:05:59 +00:00
Chris Lattner d7ff578767 Initial checkin of interpreter
llvm-svn: 361
2001-08-23 17:05:04 +00:00
Ruchira Sasanka 11e97b08f0 LV code on machine instructions
llvm-svn: 360
2001-08-20 21:12:49 +00:00
Ruchira Sasanka ec1a5411d7 LV info on machine instructions
llvm-svn: 359
2001-08-20 21:11:01 +00:00
Ruchira Sasanka 8c99a32982 Corrected the compilation error by making the ValOperator class a friend of
MachineOperand class - Ruchira

llvm-svn: 358
2001-08-13 16:54:48 +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
Vikram S. Adve 5715b56e65 Can't use ref to stack value!
llvm-svn: 354
2001-08-09 20:14:22 +00:00
Vikram S. Adve 315d2d941e Needed old conditions as well as new in skipToNextVal()!
llvm-svn: 353
2001-08-09 19:18:33 +00:00
Vikram S. Adve c3fd4c2fc6 Bug fix in ValOpIterator: not moving past operand with NULL Value.
llvm-svn: 352
2001-08-08 00:15:42 +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
Ruchira Sasanka 5303bac986 Added isDef field to MachineOperand class - Ruchira
llvm-svn: 349
2001-08-07 20:14:30 +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 13090bd303 Use extra operand for instructions that set a CC register that
was not explicit before.

llvm-svn: 347
2001-08-06 21:05:39 +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 75b9add9fa And add rule to create a .cpp source file from burg input file!
llvm-svn: 345
2001-08-06 19:06:43 +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 ca4a382bf7 Add path and options for burg.
llvm-svn: 343
2001-08-06 19:01:20 +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 701a698d43 Allow numOperands of -1 for variable #operands.
llvm-svn: 341
2001-07-31 21:55:51 +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 5abe128752 Had used the wrong option.
llvm-svn: 339
2001-07-31 21:52:28 +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 5af4076380 Added dummy Phi instruction.
llvm-svn: 335
2001-07-31 21:48:23 +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 a223748a52 Added support for testing instruction selection on all but 2 tests.
llvm-svn: 333
2001-07-31 21:45:56 +00:00
Vikram S. Adve 06c30a0419 Added class MachineCodeForBasicBlock.
llvm-svn: 332
2001-07-30 18:49:07 +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 32b5d841ba Added vector of machine instructions for the basic block.
llvm-svn: 330
2001-07-30 18:47:24 +00:00
Chris Lattner bf22504107 New test cases
llvm-svn: 329
2001-07-28 18:04:10 +00:00
Chris Lattner 3f14c66890 Remove some gross stuff
llvm-svn: 328
2001-07-28 17:52:53 +00:00
Chris Lattner e0c6a09883 Allow vararg method types with 0 fixed types
llvm-svn: 327
2001-07-28 17:52:35 +00:00
Chris Lattner e76a335f5b Make error msg nicer
llvm-svn: 326
2001-07-28 17:52:14 +00:00
Chris Lattner b62b602fe2 Enable the elimination of method prototypes that are not referenced
llvm-svn: 325
2001-07-28 17:51:49 +00:00
Chris Lattner f324dc82a1 * Make sure that the size of the type field can also control the output
instruction pattern.

llvm-svn: 324
2001-07-28 17:51:21 +00:00
Chris Lattner 5bdab0f9ad * Add calls to failure template so that it is actually possible to debug
why bytecode parsing is failing.  Just put a breakpoint in the failure
  templates.

llvm-svn: 323
2001-07-28 17:50:18 +00:00
Chris Lattner 2091efbc0a * Fix bugs
llvm-svn: 322
2001-07-28 17:49:02 +00:00
Chris Lattner 26e50dc0c3 * Enable the use of escaped literal strings
* Unresolved variable names now have the correct line number for their
  error messages
* Rename Def* to Value*
* Check for symbol table collisions before inserting values
* Remove the STRING keyword
* Enable the use of string literals to initialize constant arrays
* Enable the use of extended constants in more locations: eg ret [int] [4, 5]
* Allow method prototypes to appear in the constant pool of the program
* Support varargs methods better.  Enable varargs methods with 0 fixed
  arguments
* Allow the entire method prototype to optionally be specified in a call inst

llvm-svn: 321
2001-07-28 17:48:55 +00:00
Chris Lattner 58b3b9a4da Modify var names to make it apparant that the code is really generic
llvm-svn: 320
2001-07-28 17:43:45 +00:00
Chris Lattner 44b939a328 Changes to make test scripts more reliable
llvm-svn: 319
2001-07-28 17:40:15 +00:00
Chris Lattner b58fdf0e5e Add test of string constants
llvm-svn: 318
2001-07-28 17:39:46 +00:00
Vikram S. Adve 222c518e1c Added function printIndent.
llvm-svn: 317
2001-07-28 04:41:27 +00:00
Vikram S. Adve 56324d34f7 Added a pointer hash function object for use in pointer maps.
llvm-svn: 316
2001-07-28 04:41:10 +00:00
Vikram S. Adve 0f32957dbb Make a function const.
llvm-svn: 315
2001-07-28 04:40:15 +00:00
Vikram S. Adve 6b1d4f349a Remove lib/LLC library.
llvm-svn: 314
2001-07-28 04:39:27 +00:00
Vikram S. Adve 72ffa4357c Added several SPARC instructions including conditional move and SETHI.
Added MachineInstrInfo class and subclass UltraSparcInstrInfo.
Added several fields to MachineInstrDescriptor (and renamed it from
MachineInstrInfo).  Latency fields are to support scheduling.

llvm-svn: 313
2001-07-28 04:26:42 +00:00
Vikram S. Adve f72a942a3c Remove redundant and unused functions.
llvm-svn: 312
2001-07-28 04:20:33 +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 3a7aa63841 Work around a few 'sorting issues' with the bytecode output that causes the bytecode
not to be bit for bit identical.  This is a hack and should be fixed in the future

llvm-svn: 306
2001-07-26 16:30:18 +00:00
Chris Lattner ee998be490 Don't write out constants that do not have a name, they will be inlined.
llvm-svn: 305
2001-07-26 16:29:38 +00:00
Chris Lattner 252afbaf33 Refactor some of the constant stuff so that we can return complex constant
values directly.  This was causing test failures. :(

llvm-svn: 304
2001-07-26 16:29:15 +00:00
Chris Lattner 89d4dfbfba Add an arg to insertVal to allow us to prevent builtin types from being ignored
when they are inserted.

Ignore constant values without names.  If they are used, they will be inlined.

llvm-svn: 303
2001-07-26 16:28:37 +00:00
Chris Lattner 547bda8e18 Add an arg to insertVal to allow us to prevent builtin types from being ignored
when they are inserted

llvm-svn: 302
2001-07-26 16:28:18 +00:00
Chris Lattner 6bd07a6f51 New test for varargs functions
llvm-svn: 301
2001-07-25 22:49:12 +00:00
Chris Lattner d642454bba Add library dep
llvm-svn: 300
2001-07-25 22:48:43 +00:00
Chris Lattner 2d88a8ee37 Parenthesize output for expranalyze so that pointer stuff being multiplied isn't confusing
llvm-svn: 299
2001-07-25 22:48:37 +00:00
Chris Lattner 1ca60f71f0 Build as before dis
llvm-svn: 298
2001-07-25 22:48:09 +00:00
Chris Lattner 90e0d464ba Add support for extern varargs methods & varargs method calls
llvm-svn: 297
2001-07-25 22:47:55 +00:00
Chris Lattner 42b5a8a6e5 Add support for extern varargs methods & varargs method calls
Remove tool generated files

llvm-svn: 296
2001-07-25 22:47:46 +00:00
Chris Lattner c4d6aca02e Fix a bug when compiling 'shl ubyte * %var, ubyte 2'
llvm-svn: 295
2001-07-25 22:47:32 +00:00
Chris Lattner e06cbbbc74 Filter out noncore stuff
llvm-svn: 294
2001-07-25 22:46:22 +00:00
Chris Lattner fd7f856670 Fixed a bug exposed when doing something like this: <program> -notanoption --help
llvm-svn: 293
2001-07-25 18:40:49 +00:00
Ruchira Sasanka 6988791c1e Changed printValue() to print constant value if the value is a constant.
llvm-svn: 292
2001-07-24 18:21:21 +00:00
Ruchira Sasanka 9f18119edb *** empty log message ***
llvm-svn: 291
2001-07-24 17:14:13 +00:00
Chris Lattner 46c73465b6 Doh! Wrong Optional flag. :(
llvm-svn: 290
2001-07-23 23:14:23 +00:00
Chris Lattner 81cc83df03 Add a comment indicating that there is documentation of the library
llvm-svn: 289
2001-07-23 23:04:07 +00:00
Chris Lattner ba02525614 Initial checking of some rough documentation for commandline library
llvm-svn: 288
2001-07-23 23:03:12 +00:00
Chris Lattner 3dfcf026f0 Change option name slightly
llvm-svn: 287
2001-07-23 23:02:51 +00:00
Chris Lattner 4fdde2cc62 Minor changes to implementation of CommandLine library to let users override
options forced by different  subclasses of Option

llvm-svn: 286
2001-07-23 23:02:45 +00:00
Chris Lattner 85014f4657 Add a missing </a> tag
llvm-svn: 285
2001-07-23 20:40:41 +00:00
Chris Lattner d5c3133364 Use the new Alias command line option
llvm-svn: 284
2001-07-23 20:22:30 +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 0d005997fd Doh! Wrong accessor. Caused 'can not read bytecode' errors. :(
llvm-svn: 282
2001-07-23 18:51:23 +00:00
Chris Lattner a6b2ddeb82 -help is verbose enough that we don't need this anymore
llvm-svn: 281
2001-07-23 18:31:02 +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 36a57d31e3 Initial checkin
llvm-svn: 278
2001-07-23 17:17:47 +00:00
Chris Lattner 7c310fa6ac Fix coding style issues to actually attempt to be somewhat uniform
llvm-svn: 277
2001-07-23 05:03:15 +00:00
Chris Lattner ae066aaf44 Nonpolymorphic class, doesn't need a virtual dtor!
llvm-svn: 276
2001-07-23 03:57:05 +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 8767b618ef Verbosify descriptions
llvm-svn: 273
2001-07-23 02:54:25 +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 f2d1e79276 Remove dependence on command line library. Silly anyway.
llvm-svn: 271
2001-07-22 18:36:00 +00:00
Chris Lattner 2ed3326123 Make it pickier
llvm-svn: 270
2001-07-22 05:45:46 +00:00
Chris Lattner 1dde6921a3 Add flag for emacs so it realizes it's C++ code
llvm-svn: 269
2001-07-22 05:15:16 +00:00
Chris Lattner 941978e1bf New test case
llvm-svn: 268
2001-07-22 05:00:34 +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 2c52fe7a52 Move private header into private directory
llvm-svn: 266
2001-07-22 03:59:25 +00:00
Chris Lattner 5f4b44652f Convert from using C style char*'s to strings.
Look ma, no strdups

llvm-svn: 265
2001-07-22 03:57:31 +00:00
Chris Lattner 6f55581254 Remove String file some more
llvm-svn: 264
2001-07-22 00:46:48 +00:00
Chris Lattner 043ad095ae Remove stringutils.h file
llvm-svn: 263
2001-07-22 00:18:33 +00:00
Chris Lattner a05bbb614f Destroy the StringUtils.h file
llvm-svn: 262
2001-07-22 00:18:10 +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 388c608cb9 Instructions for use
llvm-svn: 255
2001-07-21 21:05:39 +00:00
Chris Lattner e696d62ce3 Make sure we build all of the code!
llvm-svn: 254
2001-07-21 21:04:03 +00:00
Chris Lattner dd511760d9 Renamed include/llvm/Codegen to include/llvm/CodeGen
llvm-svn: 253
2001-07-21 20:58:30 +00:00
Chris Lattner 7f95c9e33a Fix code to be in a consistent style
llvm-svn: 252
2001-07-21 20:09:07 +00:00
Chris Lattner 68cf7a4626 More minor reorganizations
llvm-svn: 251
2001-07-21 20:08:52 +00:00
Chris Lattner 93547c3231 Remove getTempValuesForMachineCode from the Instruction interface
to remove dependency on <vector>

llvm-svn: 250
2001-07-21 20:04:10 +00:00
Chris Lattner 863bb601ce Filter out the sparc.burm.c file
llvm-svn: 249
2001-07-21 19:43:08 +00:00
Chris Lattner 720ff31ab4 Moved LLC subdir to the tools top level directory
llvm-svn: 248
2001-07-21 19:33:01 +00:00
Chris Lattner 897e02b2c0 Make the makefile work
llvm-svn: 247
2001-07-21 19:31:40 +00:00
Chris Lattner 7309d66d73 Add new ctor for ConstPoolBool
llvm-svn: 246
2001-07-21 19:16:08 +00:00
Chris Lattner 77ba32f4cc Add new constructor for const pool bool
llvm-svn: 245
2001-07-21 19:15:26 +00:00
Chris Lattner 55406840e2 Add support for casts
llvm-svn: 244
2001-07-21 19:10:49 +00:00
Chris Lattner c9f7c061bc Add support for casting operators
llvm-svn: 243
2001-07-21 19:10:33 +00:00
Chris Lattner e850a7920e Support changed expression api
llvm-svn: 242
2001-07-21 19:08:44 +00:00
Chris Lattner 2c6f274188 More functionality, renamed API
llvm-svn: 241
2001-07-21 19:07:19 +00:00
Chris Lattner 4ee51f4ede Moved isIntegral to the Type system
Renamed equals(char) to equalsInt(char).  Made it a const memfunc

llvm-svn: 240
2001-07-21 19:02:43 +00:00
Chris Lattner 24a2d2b7db Autodep functionality broken. Remove so we get successful builds
llvm-svn: 239
2001-07-21 18:59:13 +00:00
Vikram S. Adve 18f60c7082 Version of testmemory to test alloca, load and store.
llvm-svn: 238
2001-07-21 12:46:12 +00:00
Vikram S. Adve 6546f97d2f Used a bigger constant in loopfunc.ll that doesn't fit in immed field.
llvm-svn: 237
2001-07-21 12:44:24 +00:00
Vikram S. Adve 6ee77c851e Utility routines for simpler access to the value of an integer constant.
llvm-svn: 236
2001-07-21 12:44:00 +00:00
Vikram S. Adve 4d709951bb Program options class.
llvm-svn: 235
2001-07-21 12:43:07 +00:00
Vikram S. Adve 2d94a344f0 Driver and options for the llc compiler.
llvm-svn: 234
2001-07-21 12:42:29 +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
Vikram S. Adve aa576e5b8b Added CodeGen, LLC, and Support.
llvm-svn: 229
2001-07-21 12:40:37 +00:00
Vikram S. Adve 1f3de470af General support utilities like a program options class and a StringMap
class for mapping strings to arbitrary things.

llvm-svn: 228
2001-07-21 12:40:18 +00:00
Vikram S. Adve ad5ac0fab4 CompileContext and options class for the llc compiler.
llvm-svn: 227
2001-07-21 12:39:30 +00:00
Vikram S. Adve 5c66a797a2 Header files for the target architecture description and for instruction
selection, and instances of these for the SPARC.

llvm-svn: 226
2001-07-21 12:39:03 +00:00
Vikram S. Adve 7161ef83f9 Added support for getting the dependence of an executable on its libs,
using a variable to get the list of libraries on the link path.
BUG: If the library in the same directory as the executable is missing,
BUG: gnumake will build the library but then fail when linking the executable
BUG: saying the library was not found.  Need a better hack.

llvm-svn: 225
2001-07-21 12:38:14 +00:00
Vikram S. Adve aa4c7b56f8 Add isIntegral() method to SignedIntType and UnsignedIntType.
llvm-svn: 224
2001-07-21 12:32:48 +00:00
Vikram S. Adve fcb6aefa90 Provide simpler ways to extract the value of an integer constant.
llvm-svn: 223
2001-07-20 21:11:07 +00:00
Vikram S. Adve 0452d48c50 Compute and cache information about the storage size and layout
of structures.  This information is machine-dependent.

llvm-svn: 222
2001-07-20 21:09:17 +00:00
Vikram S. Adve 75cc5a26a2 Provide uniform access to the pointer operand and to the index
operands (if any) for different types of MemAccessInst's.

llvm-svn: 221
2001-07-20 21:07:06 +00:00
Vikram S. Adve 3e2394cdad Added a representation of the machine instructions generated
for a VM instruction.

llvm-svn: 220
2001-07-20 21:05:02 +00:00
Chris Lattner 85090922f4 Start of expression analysis support
llvm-svn: 219
2001-07-20 19:17:55 +00:00
Chris Lattner 26be0fc32a Header to raise and lower representation
llvm-svn: 218
2001-07-20 19:17:47 +00:00
Chris Lattner 05132dacd0 Add support to call LevelRaise
llvm-svn: 217
2001-07-20 19:16:47 +00:00
Chris Lattner e49d242603 Update makefile for more accurate deps
Include support to print out Expression types

llvm-svn: 216
2001-07-20 19:16:29 +00:00
Chris Lattner 9655e54d21 Implement ensureTypeAvailable
Implement ConstPoolInt class

llvm-svn: 215
2001-07-20 19:16:02 +00:00
Chris Lattner 4f6031f3e7 Add support for constant propogation of multiplies
llvm-svn: 214
2001-07-20 19:15:36 +00:00
Chris Lattner 5e5abe3eaa Factor out WriteAsOperand.
llvm-svn: 213
2001-07-20 19:15:21 +00:00
Chris Lattner 1caf0bbd4e Add a comment.
llvm-svn: 212
2001-07-20 19:15:08 +00:00
Chris Lattner e3d4a4fa44 Add multiply as a supported constant propogation operation
Include the LevelChange.h header in AllOpts.h

llvm-svn: 211
2001-07-20 19:14:41 +00:00
Chris Lattner 64a234bc26 New function: WriteAsOperand.
llvm-svn: 210
2001-07-20 19:14:01 +00:00
Chris Lattner 85b1f15113 Add new base class ConstPoolInt, useful for dealing with integral constants
llvm-svn: 209
2001-07-20 19:13:28 +00:00
Chris Lattner c9bdc871ca Add new method, ensureTypeAvailable
llvm-svn: 208
2001-07-20 19:13:04 +00:00
Chris Lattner 0d94bacd62 Change is*Type to be a casting convertion operator
Add a new isIntegral virtual function

llvm-svn: 207
2001-07-20 19:12:34 +00:00
Chris Lattner 2d4f9e0995 Add an function to BinaryOperator to swap the two operands
llvm-svn: 206
2001-07-20 19:09:33 +00:00
Chris Lattner ad8051b0b3 Add short forms of the get*Type methods.
llvm-svn: 205
2001-07-20 19:09:11 +00:00
Chris Lattner 197390e985 Fix nasty typo
llvm-svn: 204
2001-07-20 04:39:07 +00:00
Chris Lattner 4efb8afd9b Fix clean target
llvm-svn: 203
2001-07-18 23:43:53 +00:00
Chris Lattner 6244d18477 Compile source files in alphabetical order
llvm-svn: 202
2001-07-18 23:43:37 +00:00
Chris Lattner 49970039ea Fixed typo in comment
llvm-svn: 201
2001-07-16 16:17:18 +00:00
Chris Lattner 3e37ec7c0a Support external methods
llvm-svn: 200
2001-07-15 21:43:45 +00:00
Chris Lattner c7801d21f7 New test case for prototype support
llvm-svn: 199
2001-07-15 21:43:17 +00:00
Vikram S. Adve 868a2aeccc Reordered link line for correct static linking.
llvm-svn: 198
2001-07-15 21:13:29 +00:00
Vikram S. Adve fe34689e55 Changed default to building library archives instead of shared objects.
Added support for compiling *.c files.

llvm-svn: 197
2001-07-15 13:16:47 +00:00
Chris Lattner a7620d9656 Implement forward/external declarations for methods.
llvm-svn: 196
2001-07-15 06:35:59 +00:00
Chris Lattner 17f729e269 Implement forward/external declarations for methods. Also, emit an error if a method
is defined more than once, instead of crashing.

llvm-svn: 195
2001-07-15 06:35:53 +00:00
Chris Lattner eaed2794d8 Rename 'isMethodExternal' to 'isExternal'
llvm-svn: 194
2001-07-15 06:35:24 +00:00
Chris Lattner 12b2c8aae7 Add notes on instruction selection pass
llvm-svn: 193
2001-07-15 00:23:59 +00:00
Chris Lattner abc1609342 New testcase from GCC doing array operations
llvm-svn: 192
2001-07-15 00:18:50 +00:00
Chris Lattner d06dd69e73 Add support for assembly printing fp constants
llvm-svn: 191
2001-07-15 00:18:39 +00:00
Chris Lattner 4d44c2ba81 Add support to the bytecode writer to recognize floating point constants
llvm-svn: 190
2001-07-15 00:17:23 +00:00
Chris Lattner f435e200b1 Add support to the bytecode reader to recognize floating point constants
llvm-svn: 189
2001-07-15 00:17:18 +00:00
Chris Lattner 212f70d92e Add support to the parser to recognize floating point constants
llvm-svn: 188
2001-07-15 00:17:01 +00:00
Chris Lattner 2cded30974 Add a function to convert a double to a string
llvm-svn: 187
2001-07-15 00:16:38 +00:00
Chris Lattner 08d936465f Add support to write and read a fixed amount of raw data
llvm-svn: 186
2001-07-15 00:16:22 +00:00
Chris Lattner 07b82701da Add a note
llvm-svn: 185
2001-07-15 00:16:02 +00:00
Chris Lattner f2a738cfe2 * ValueHolder now takes 3 arguments
* Added a few methods to ConstantPool
* ConstPoolVal no longer derives from Value
* Method & Module multiply inherit from SymTabValue & Value now
* Added a GetElementPtrInst::isStructSelector() method

llvm-svn: 184
2001-07-14 06:13:19 +00:00
Chris Lattner 5451c9e977 Add knowledge about the struct form of the GetElementPtr instruction
llvm-svn: 183
2001-07-14 06:11:51 +00:00
Chris Lattner 5b1200bf8e Remove dependency on the structure of ValueHolder.
llvm-svn: 182
2001-07-14 06:11:26 +00:00
Chris Lattner dbfb7d8042 * The parent of a constant pool is a symtabvalue, not a value.
llvm-svn: 181
2001-07-14 06:10:49 +00:00
Chris Lattner 32e96bcb54 The parent of a constant pool is a symtabvalue, not a value.
llvm-svn: 180
2001-07-14 06:10:33 +00:00
Chris Lattner 56f73d45f5 Added some comments, preparing to add global variables and method prototypes
llvm-svn: 179
2001-07-14 06:10:16 +00:00
Chris Lattner 5446f8a542 * The parent of a constant pool is a SymTabValue, not a value.
llvm-svn: 178
2001-07-14 06:08:51 +00:00
Chris Lattner 5a2d2b1f0a Made the following changes:
* ValueHolder became a 3 argument template.  This allows for BasicBlock to
  use the value holder arg as a typesafe parent pointer.
* SymTabValue no longer inherits from Value
* Method does not inherit from only SymTabValue.  Now it inherits from both
  STV & Value.
* Module does not inherit from only SymTabValue.  Now it inherits from both
  STV & Value.
* Updated the SymTabValue.h file to reference SymTabValue instead of STDef
  in several places
* Added isArraySelector & isStructSelector to GetElementPtr instruction

llvm-svn: 177
2001-07-14 06:07:58 +00:00
Chris Lattner 39d4e7a794 Added more todo's. Don't I ever accomplish anything?
llvm-svn: 176
2001-07-14 06:04:27 +00:00
Chris Lattner 2e9fee4702 Add DebugValue member.
llvm-svn: 175
2001-07-12 23:35:26 +00:00
Chris Lattner 5f904ea839 Made it not inline
llvm-svn: 174
2001-07-12 23:35:11 +00:00
Chris Lattner 805c1514e4 Add DebugValue global function
llvm-svn: 173
2001-07-12 23:33:53 +00:00
Chris Lattner d6c5a769ea Don't clean out the type plane of the constant pool... this is a hack. FIXME
llvm-svn: 172
2001-07-09 19:38:52 +00:00
Chris Lattner d9c40e355e Make sure that types go in the constant pool if they are used.
llvm-svn: 171
2001-07-09 19:38:36 +00:00
Chris Lattner 875710c4a1 hasSideEffects should be marked virtual
stores and free's have sideeffects

llvm-svn: 170
2001-07-09 19:38:26 +00:00
Chris Lattner c2e142bcf7 Modify notes
llvm-svn: 169
2001-07-09 19:38:08 +00:00
Chris Lattner 006106973f Fix stupid typo
llvm-svn: 168
2001-07-09 16:54:29 +00:00
Chris Lattner ac457c46a3 Initial checkin of coding standards
llvm-svn: 167
2001-07-09 03:27:08 +00:00
Chris Lattner 70de663266 Updated documentation for load, store & getelementptr
llvm-svn: 166
2001-07-09 00:26:23 +00:00
Chris Lattner f20469c1ab add coverage of newly implemented instructions.
llvm-svn: 165
2001-07-08 23:23:30 +00:00
Chris Lattner 62ecb4a137 Implementation of Store & GetElementPtr
llvm-svn: 164
2001-07-08 23:22:50 +00:00
Chris Lattner 31feae8550 Implement checking for new instructions
llvm-svn: 163
2001-07-08 21:18:49 +00:00
Chris Lattner 1851cad21f Add note
llvm-svn: 162
2001-07-08 21:18:41 +00:00
Chris Lattner d8bebcd517 Implemented shl, shl, & load instructions
llvm-svn: 161
2001-07-08 21:10:27 +00:00
Chris Lattner 49c643262e Moved Cast from being a Unary instruction to being an "Other" instruction
llvm-svn: 160
2001-07-08 19:03:27 +00:00
Chris Lattner fb8ed0cf3a Use the CDG to mark branches alive on demand.
llvm-svn: 159
2001-07-08 18:38:36 +00:00
Chris Lattner b418152221 Add a new "addOperand" method to User.
llvm-svn: 158
2001-07-08 18:38:18 +00:00
Chris Lattner 1547114cbf Fixed post dominator frontiers! Yaay!
llvm-svn: 157
2001-07-08 05:54:09 +00:00
Chris Lattner a682182f64 Neg instruction removed. Cast instruction implemented.
llvm-svn: 156
2001-07-08 04:57:15 +00:00
Chris Lattner 52112fb34e Neg instruction removed. TODO item fulfilled.
llvm-svn: 155
2001-07-08 04:56:59 +00:00
Chris Lattner 1fd1a3a7b4 Removing unnecesary file
llvm-svn: 154
2001-07-07 20:54:19 +00:00
Chris Lattner 87d478287b Convert BinaryOperand and UnaryOperator to only take instruction types of
the appropriate enum

llvm-svn: 153
2001-07-07 20:17:23 +00:00
Chris Lattner b1ca9cbceb Broad superficial changes:
* Renamed getOpcode to getOpcodeName
* Changed getOpcodeName to return a const char * instead of string
* Added a getOpcode method to replace getInstType
* Changed code to use getOpcode instead of getInstType

llvm-svn: 152
2001-07-07 19:24:15 +00:00
Chris Lattner 48d80e18f9 Devirtualize User::dropAllReferences
llvm-svn: 151
2001-07-07 19:00:36 +00:00
Chris Lattner a999afa182 Remove dtor's that simply call dropAllReferences
llvm-svn: 150
2001-07-07 18:42:52 +00:00
Chris Lattner a073acb22d Changed the fundemental architecture of Operands for Instructions. Now
Operands are maintained as a vector<Use> in the User class, and operator
iterators are provided as before.  Getting an operand no longer requires
a virtual function call.

WARNING: getOperand(x) where x >= getNumOperands() will now assert instead
of returning null!

llvm-svn: 149
2001-07-07 08:36:50 +00:00
Chris Lattner 37099990b3 Changed memory reference instructions to store the result as the implicit
type of the instruction.

llvm-svn: 148
2001-07-07 08:36:30 +00:00
Chris Lattner 32503d5637 Fixed some error messages to be nicer
llvm-svn: 147
2001-07-07 08:36:05 +00:00
Chris Lattner 54292f3557 Add note about nuking Instruction::neg
llvm-svn: 146
2001-07-07 08:33:39 +00:00
Chris Lattner e325a04f5e Initial checkin
llvm-svn: 145
2001-07-06 22:00:42 +00:00
Chris Lattner e166cc8069 Add better support for post dominator information.
Print method name for each analysis.

llvm-svn: 144
2001-07-06 16:59:10 +00:00
Chris Lattner 29aae157f7 Add method to unify all exit nodes of a method
llvm-svn: 143
2001-07-06 16:58:36 +00:00
Chris Lattner c385bebc89 Implement support for postdominators, except in dom frontiers
llvm-svn: 142
2001-07-06 16:58:22 +00:00
Chris Lattner a6c8b30e9d New file, includes method to merge exit nodes together
llvm-svn: 141
2001-07-06 16:57:52 +00:00
Chris Lattner 5afd71b109 * Add a DominatorBase base class to maintain root of Dominator info
* Implement post dominator support

llvm-svn: 140
2001-07-06 16:57:21 +00:00
Chris Lattner 719d5b2899 * Added comments
* Made iterators inherit from appropriate iterator base class
* Abstracted out graphs from depth first iterator
* Add "Inverse" traversal of CFG

llvm-svn: 139
2001-07-06 16:56:17 +00:00
Chris Lattner 8024bde7c7 Update to include right file
llvm-svn: 138
2001-07-06 16:32:07 +00:00
Chris Lattner c002347cf8 Initial checkin of analyze tool.
llvm-svn: 137
2001-07-03 15:30:38 +00:00
Chris Lattner f146536edd Build new analyze tool
llvm-svn: 136
2001-07-03 15:30:21 +00:00
Chris Lattner 9559178a84 Added analyze to path for SetupOpt script
llvm-svn: 135
2001-07-03 15:30:10 +00:00
Chris Lattner d27d05967d Add analyze tool to path for Setup script
llvm-svn: 134
2001-07-03 15:29:48 +00:00
Chris Lattner 81f3ace753 IntervalPartition was changed to inherit from vector<Interval*> instead of
contain it so that it would have full iterator access without much work.

Writer includes code to print out IntervalPartition's now.

llvm-svn: 133
2001-07-03 15:28:35 +00:00
Chris Lattner 6bf3e9512b IntervalPartition was changed to inherit from vector<Interval*> instead of
contain it so that it would have full iterator access without much work.

llvm-svn: 132
2001-07-03 15:28:08 +00:00
Chris Lattner 0b6d74bcdf *** empty log message ***
llvm-svn: 131
2001-07-03 15:27:41 +00:00
Chris Lattner f9bd02a89a Checkin of new Analysis result printing header
llvm-svn: 130
2001-07-03 05:37:26 +00:00
Chris Lattner fa3ac26d22 Code got moved from the lib/Assembly/Writer/IntervalWriter.cpp file to
here.  Updates to correct description n stuff.

llvm-svn: 129
2001-07-03 05:36:34 +00:00
Chris Lattner a2bb73e41f Remove code for printing out Analysis data structures. It got moved
llvm-svn: 128
2001-07-03 05:35:52 +00:00
Chris Lattner 7edbdd4485 Update documentation a bit, correct #include guard
llvm-svn: 127
2001-07-03 05:35:23 +00:00
Chris Lattner e17733d2ee Add note about tool idea. Change command line of note to be more specific
llvm-svn: 126
2001-07-03 05:35:04 +00:00
Chris Lattner a7f22e53c0 Add printing code for dominator info
llvm-svn: 125
2001-07-02 05:46:47 +00:00
Chris Lattner 081aabc330 Checkin of new dominator calculation routines. These will be improved in
the future to do post dominators and stuff

llvm-svn: 124
2001-07-02 05:46:38 +00:00
Chris Lattner 6dccb6576c Enable printing of dominator related information.
Theis will eventually be moved!

llvm-svn: 123
2001-07-02 05:45:30 +00:00
Chris Lattner 12393e5c5a Add new anaysis routines for building dominator related information
llvm-svn: 122
2001-07-02 05:45:17 +00:00
Chris Lattner b44c6a4b47 Addition of 'deleter' function.
llvm-svn: 121
2001-07-02 01:09:41 +00:00
Chris Lattner 0c94a300eb Moved deleter to include/llvm/Tools/STLExtras.h
llvm-svn: 120
2001-07-02 01:08:08 +00:00
Chris Lattner b28986ffc7 Initial checkin. Should print dead instructions, except it doesn't do
control dependencies.  :(

llvm-svn: 119
2001-06-30 06:39:11 +00:00
Chris Lattner 57f61a32b0 Include ADCE pass, rename include/Opt directory to llvm/Optimizations
Optimizations now in opt namespace.
Rename SCCP pass to DoSCCP

llvm-svn: 118
2001-06-30 06:38:31 +00:00
Chris Lattner 1960b3c6d2 Rename DoSparseConditionalConstantProp -> DoSCCP
llvm-svn: 117
2001-06-30 06:37:43 +00:00
Chris Lattner e758b67f5c Add note
llvm-svn: 116
2001-06-30 06:37:33 +00:00
Chris Lattner 9dd7120a2a Add prototypes for ADCE pass
llvm-svn: 115
2001-06-30 06:37:16 +00:00
Chris Lattner b0810f37d3 Rename DoSparseConditionalConstantProp to DoSCCP
llvm-svn: 114
2001-06-30 06:37:01 +00:00
Chris Lattner d42d492734 Optimizations got their own header files
Optimizations now live in the 'opt' namespace
include/llvm/Opt was renamed include/llvm/Optimizations

llvm-svn: 113
2001-06-30 04:36:40 +00:00
Chris Lattner 31cf984332 Implement reduceApply method
llvm-svn: 112
2001-06-30 04:35:40 +00:00
Chris Lattner c10245352c Add a new pop_back() method
llvm-svn: 111
2001-06-30 04:35:21 +00:00
Chris Lattner 6f70fda2f0 The ConstRules class got moved to the opt namespace
llvm-svn: 110
2001-06-30 04:35:01 +00:00
Chris Lattner a6e2316d03 Add a reduceApply method
llvm-svn: 109
2001-06-30 04:34:42 +00:00
Chris Lattner 9e497a01f7 Split AllOpts.h into lots of little .h files.
llvm-svn: 108
2001-06-30 04:34:07 +00:00
Chris Lattner 7ce8b17e60 Export ConstantFoldTerminator, allow it to fold conditional branches to
the same label.

llvm-svn: 107
2001-06-29 23:56:58 +00:00
Chris Lattner 10b250eb4d Added documentation. Constant fold terminators.
llvm-svn: 106
2001-06-29 23:56:23 +00:00
Chris Lattner 96bb2fb5a2 Added prototype for ConstantFoldTerminator
llvm-svn: 105
2001-06-29 23:56:00 +00:00
Chris Lattner 2dd58aefa5 Add a check to avoid allowing V->replaceAllUsesWith(V)
llvm-svn: 104
2001-06-29 05:25:51 +00:00
Chris Lattner 615d3cf40d Add implementation of BasicBlock::removePredecessor code that was factored
out of DCE.cpp

llvm-svn: 103
2001-06-29 05:25:23 +00:00
Chris Lattner 84f07396d3 * Factored RemovePredecessorFromBlock into BasicBlock::removePredecessor
* Avoid messing around with this case:
  br label %A
%A:  br label %A
* Enable optimizations that are correct now.

llvm-svn: 102
2001-06-29 05:24:28 +00:00
Chris Lattner e4abb60948 We need to make sure to remove PHI nodes in the successor that cannot be
executed when removing branch dest.

llvm-svn: 101
2001-06-29 05:23:10 +00:00
Chris Lattner d77f3c0cbd Added a note about a new verification the verifier should do
Removed a redundant check

llvm-svn: 100
2001-06-29 05:22:12 +00:00
Chris Lattner 17556f82d0 Added new removePredecessor method prototype
llvm-svn: 99
2001-06-29 05:21:42 +00:00
Chris Lattner 9b07b7168b Added note, moved note
llvm-svn: 98
2001-06-29 05:21:05 +00:00
Chris Lattner 44601ba46a Fixed the obnoxious problem that caused an entire directory to rebuild
even if you only change one .cpp file. Yaay

llvm-svn: 97
2001-06-29 05:20:16 +00:00
Chris Lattner 4cee8d8ffb Miscellaneous cleanups:
* Convert post to pre-increment for for loops
  * Use generic programming more
  * Use new Value::cast* instructions
  * Use new Module, Method, & BasicBlock forwarding methods
  * Use new facilities in STLExtras.h
  * Use new Instruction::isPHINode() method

llvm-svn: 96
2001-06-27 23:41:11 +00:00
Chris Lattner 347389dae8 Add a new Sparse Conditional Constant Propogation pass
llvm-svn: 95
2001-06-27 23:38:11 +00:00
Chris Lattner bef00adb40 Add command line arguments for Constant Pool Merging & Sparse Conditional Constant Prop
llvm-svn: 94
2001-06-27 23:37:58 +00:00
Chris Lattner e32de63e07 Put in test of SCCP. Watch out though, because we need to sort the
constant pool for the final check to work.  :(

llvm-svn: 93
2001-06-27 23:37:22 +00:00
Chris Lattner 0ee411c080 Change to use the new GenericBinaryInst class. Support lots more operators.
llvm-svn: 92
2001-06-27 23:36:49 +00:00
Chris Lattner 1a67fb8860 Misc cleanup
llvm-svn: 91
2001-06-27 23:36:09 +00:00
Chris Lattner f222bf33c3 * Expose DoConstantPoolMerging
* Cleanups (post->pre increment, new cleaner API, etc)
* Moved stuff into ConstantHandling.h

llvm-svn: 90
2001-06-27 23:35:26 +00:00
Chris Lattner 4c8ba81f21 Convert ugly postincrement to efficient preincrement
llvm-svn: 89
2001-06-27 23:34:01 +00:00
Chris Lattner 7798de1382 * Move stuff around a bit.
* Add reduce_apply_bool

llvm-svn: 88
2001-06-27 23:32:12 +00:00
Chris Lattner 4400f659f1 Add instructions to fold unary and binary instructions.
llvm-svn: 87
2001-06-27 23:31:34 +00:00
Chris Lattner 780cfa5381 * Use the new reduce_apply_bool template
* Expose Constant Pool Merging from ConstantProp.cpp
* Include definitions for SCCP pass
* InstListType is not neccesary anymore

llvm-svn: 86
2001-06-27 23:31:14 +00:00
Chris Lattner a32c04fcb1 getBasicBlocks() is not needed anymore for reading Method data
llvm-svn: 85
2001-06-27 23:30:11 +00:00
Chris Lattner 608fe88627 Added methods to make dealing with switches and branch instructions
more tolerable.

llvm-svn: 84
2001-06-27 23:29:41 +00:00
Chris Lattner c112b3de44 Minor formating changes
llvm-svn: 83
2001-06-27 23:29:21 +00:00
Chris Lattner 8c2076b84e Make a new GenericBinaryInst class, instead of providing lots of silly
little classes.

llvm-svn: 82
2001-06-27 23:28:50 +00:00
Chris Lattner 223796ccf2 Convert postincrements to more efficient preincrements
llvm-svn: 81
2001-06-27 23:28:02 +00:00
Chris Lattner 642a3063da Add a new slew of functions to allow dynamic_cast<> like operation for
upcasting Value's to their subclasses.

llvm-svn: 80
2001-06-27 23:27:42 +00:00
Chris Lattner 0972270aaf Add extra forwarding accessor methods so that getMethodList(), getBasicBlocks()
and getInstList() are obsolete... except for when modifying those lists.  This
makes code much more succinct and to the point.

llvm-svn: 79
2001-06-27 23:26:41 +00:00
Chris Lattner eed707034c Add more notes
llvm-svn: 78
2001-06-27 23:24:50 +00:00
Chris Lattner f124461c30 Filter out some more stuff
llvm-svn: 77
2001-06-27 23:24:22 +00:00
Chris Lattner 01683cca32 Moved UnaryOperator::create to InstrTypes.cpp until there is an iUnaryOps.cpp
Moved BinaryOperator::create to iBinaryOperators.cpp
Add getUniqueName to SymbolTable

llvm-svn: 76
2001-06-25 07:33:13 +00:00
Chris Lattner dbdaaef7d5 Implement induction variable injection!
llvm-svn: 75
2001-06-25 07:32:19 +00:00
Chris Lattner 31e23cdeb4 Renamed get.*Operator to create seeing that it would have to be qualified
with the classname anyways.

llvm-svn: 74
2001-06-25 07:31:31 +00:00
Chris Lattner 7221d33514 * Rename get.*Operator to create seeing that it would have to be qualified
with the classname anyways.
* Add an isPHINode() method to Instruction
* Add getUniqueName() to SymbolTable class
* Add an insert method to ValueHolder

llvm-svn: 73
2001-06-25 07:31:05 +00:00
Chris Lattner c3a6f546de A silly stupid test of the loop depth calculator was added. REMOVE in the
future.

llvm-svn: 72
2001-06-25 03:55:37 +00:00
Chris Lattner ed59025460 IntervalPartition: recode to use IntervalIterator to do all the work
LoopDepth.cpp: new file that calculates the depth of a loop, using
IntervalPartitions.

llvm-svn: 71
2001-06-25 03:55:04 +00:00
Chris Lattner 554c161f1f Add a helper function bind_obj
llvm-svn: 70
2001-06-25 03:54:32 +00:00
Chris Lattner 3fe4504c28 Big changes. Interval*.h is now more or less finalized. IntervalPartition
is recoded to use IntervalIterators.  IntervalIterators can now maintain
their own memory or let an external entity do it.

Loop depth is a new user of IntervalPartition for calculating the loop
nesting depth of a basic block

TODO: add IntervalPartition capability to split intervals between the looping
portion and the "tail" portion.

llvm-svn: 69
2001-06-25 03:54:14 +00:00
Chris Lattner c17f93528b CFG.h: change the iterator tag
Method.h: Add an iterator type.

llvm-svn: 68
2001-06-25 03:52:19 +00:00
Chris Lattner 741aaad071 ValueHolder's aren't interseting to me anymore
llvm-svn: 67
2001-06-25 03:51:53 +00:00
Chris Lattner 601012721c New file due to the Intervals.h splitup
llvm-svn: 66
2001-06-24 04:07:44 +00:00
Chris Lattner db1d8bdf34 New files due to the Intervals.h splitup
llvm-svn: 65
2001-06-24 04:07:37 +00:00
Chris Lattner 72bd8ccbac Add a useless phi for testing with InductionVariables stuff
llvm-svn: 64
2001-06-24 04:06:23 +00:00
Chris Lattner f64a8936e5 #include a different header due to Intervals.h splitting up
llvm-svn: 63
2001-06-24 04:05:45 +00:00
Chris Lattner dec727e346 IntervalPartition & IntervalIterator classes have been split out into
their own .h files & .cpp file

llvm-svn: 62
2001-06-24 04:05:21 +00:00
Chris Lattner 658a50fe1b IntervalPartition & IntervalIterator classes have been split out into
their own .h files

llvm-svn: 61
2001-06-24 04:05:09 +00:00
Chris Lattner 4c16155c36 Prepare for split between Interval, IntervalIterator, and IntervalIPartition
llvm-svn: 60
2001-06-24 03:25:01 +00:00
Chris Lattner 2e2e27a1af Addition of IntervalIterator. Preparing for rename of Intervals.h to
Interval.h, IntervalPartition.h, and IntervalIterator.h

llvm-svn: 59
2001-06-24 03:22:59 +00:00
Chris Lattner eb717fc873 Added notes
llvm-svn: 58
2001-06-24 02:01:31 +00:00
Chris Lattner 4c4f178723 Implement a lot more functionality. Now loop invariant and linear
induction variables are correctly identified.

llvm-svn: 57
2001-06-22 02:24:38 +00:00
Chris Lattner 34b62a04b6 Interval::HeaderNode is now accessed thorugh an accessor function
llvm-svn: 56
2001-06-22 02:23:39 +00:00
Chris Lattner 97c3480075 Add comments
Interval::HeaderNode is now accessed thorugh an accessor function

llvm-svn: 55
2001-06-22 02:23:27 +00:00
Chris Lattner dc36e44adc Add accessor methods to binary/unary operators
Add extra helper methods to PHI class

llvm-svn: 54
2001-06-22 02:21:42 +00:00
Chris Lattner 4b94e23bd0 Add a space to the PHI node output code to make it look nicer
llvm-svn: 53
2001-06-21 05:29:56 +00:00
Chris Lattner b20a15d334 Moved printing code to the Assembly/Writer library.
Code now detects looping intervals

llvm-svn: 52
2001-06-21 05:27:22 +00:00
Chris Lattner d79faa35af Implement the new Interval::isLoop method
Implement destructor to free memory

llvm-svn: 51
2001-06-21 05:26:15 +00:00
Chris Lattner d52706daa8 New header file defined with neeto utilities put in one place
llvm-svn: 50
2001-06-21 05:25:51 +00:00
Chris Lattner e3b1bacb6e Modified to use the new reduce_apply algorithm
llvm-svn: 49
2001-06-21 05:25:33 +00:00
Chris Lattner 570f10ad47 * Added capability to print out an interval
llvm-svn: 48
2001-06-21 05:25:09 +00:00
Chris Lattner d893c3300a * Added comments
* Added prototype for new Interval::isLoop method
* Added destructor to free memory
* Added IntervalPartition::isDegeneratePartition method
* Added IntervalPartition::size() method

llvm-svn: 47
2001-06-21 05:24:46 +00:00
Chris Lattner c3dcb5bced Add a test case: an irreducible flow graph.
llvm-svn: 46
2001-06-21 03:00:25 +00:00
Chris Lattner 778de94723 Get rid of a silly printout that isn't needed right now
llvm-svn: 45
2001-06-20 23:09:39 +00:00
Chris Lattner a83a2cac31 Add note
llvm-svn: 44
2001-06-20 23:09:27 +00:00
Chris Lattner 4f67265ba5 New test case
llvm-svn: 43
2001-06-20 23:05:53 +00:00
Chris Lattner f86e38e452 Add capability to print a derived interval graph
llvm-svn: 42
2001-06-20 22:44:38 +00:00
Chris Lattner 5035efaeda Add capability to build a derived interval graph
llvm-svn: 41
2001-06-20 22:44:32 +00:00
Chris Lattner 778702f26c Factor the predeclarations of the CFG.h functionality into a seperate, new header
file: CFGdecls.h

This allows the addition of BasicBlock::(pred|succ)_iterator typedefs.

llvm-svn: 40
2001-06-20 22:44:16 +00:00
Chris Lattner 28ae5cbcb5 Initial Checking of Interval handling code
llvm-svn: 39
2001-06-20 20:09:55 +00:00
Chris Lattner ac6d4fd1b1 Add stub for induction variable code
llvm-svn: 38
2001-06-20 19:27:34 +00:00
Chris Lattner a6b0157879 Add a more complex test case
llvm-svn: 37
2001-06-20 19:27:18 +00:00
Chris Lattner d286a997d3 Add a test case for interval code
llvm-svn: 36
2001-06-20 19:27:11 +00:00
Chris Lattner acbaaf7bf2 Add an optimization stub
llvm-svn: 35
2001-06-20 19:26:21 +00:00
Chris Lattner 6cc066490b New file: Interval analysis support
llvm-svn: 34
2001-06-20 19:26:12 +00:00
Chris Lattner f3a34d600b Add a note
llvm-svn: 33
2001-06-20 19:26:00 +00:00
Chris Lattner 901dd7eadd Filter out more stuff I don't want all the time
llvm-svn: 32
2001-06-20 19:25:53 +00:00
Chris Lattner 03d5267ba1 Removed silly test code
llvm-svn: 31
2001-06-13 19:55:50 +00:00
Chris Lattner f284ac55f6 Added options to print out basic blocks in a variety of different orderings
as a testcase for cfg iterators.

llvm-svn: 30
2001-06-13 19:55:41 +00:00
Chris Lattner 5ba5f88c35 Updates to work with new cfg namespace
llvm-svn: 29
2001-06-13 19:55:22 +00:00
Chris Lattner 62b7632c3c Implement support for writing VCG format output
llvm-svn: 28
2001-06-13 19:55:13 +00:00
Chris Lattner 78f524c613 Move contents to the cfg namespace.
Implement post order and reverse post order iterators

llvm-svn: 27
2001-06-13 19:55:02 +00:00
Chris Lattner 2b82b181a2 Updates to support
* Changes in PHI node structure
* We now run DCE after inlining because it helps clean up LOTS of inlining
  gunk.

llvm-svn: 26
2001-06-11 15:05:02 +00:00
Chris Lattner 874ddadf72 Updates to support
* Changes in PHI node structure

llvm-svn: 25
2001-06-11 15:04:40 +00:00
Chris Lattner 931ef3bf05 Updates to support
* Changes in PHI node structure
* Change to PHI syntax

llvm-svn: 24
2001-06-11 15:04:20 +00:00
Chris Lattner a653daaac2 Updates to support
* Changes in PHI node structure
* Fix to Predecessor iterator

llvm-svn: 23
2001-06-11 15:04:06 +00:00
Chris Lattner 7399a10ad5 Update documentation to reflect:
* Changes in PHI node structure
* Intentions for load instruction to work with structures

llvm-svn: 22
2001-06-11 15:03:43 +00:00
Chris Lattner 5f46e8c9da Moved getBinaryOperator to the BinaryOperator class and the getUnaryOperator
to the UnaryOperator class (from the Instruction class).

llvm-svn: 21
2001-06-08 21:30:13 +00:00
Chris Lattner 9d905c95e0 I actually got something done
llvm-svn: 20
2001-06-08 21:29:35 +00:00
Chris Lattner f5d87f9e56 Beautify the source a bit.
llvm-svn: 19
2001-06-08 21:07:26 +00:00
Chris Lattner f2ff0eac5b Include support for reverse iteration.
llvm-svn: 18
2001-06-08 20:52:54 +00:00
Chris Lattner 4ddc451fb3 Added a stupid testcase for iterators.
llvm-svn: 17
2001-06-08 00:35:25 +00:00
Chris Lattner 33455b2a23 Added reverse depth first capability, fixed depth first capability
llvm-svn: 16
2001-06-08 00:35:14 +00:00
Chris Lattner 7e0d6e05ac Updated to work with new CFG.h file.
llvm-svn: 15
2001-06-07 21:18:45 +00:00
Chris Lattner fe59ab9828 Moved iterators to the new CFG.h file.
llvm-svn: 14
2001-06-07 21:18:35 +00:00
Chris Lattner b151cb40ac New file
llvm-svn: 13
2001-06-07 21:18:08 +00:00
Chris Lattner cc45ae3d49 inlining can change methods a second time, so don't rerun inliner when testing for
differences in optimizations

llvm-svn: 12
2001-06-07 17:00:00 +00:00
Chris Lattner e6c4ea9861 Add extra method to PHI node class
llvm-svn: 11
2001-06-07 16:59:37 +00:00
Chris Lattner d821c2af37 Significant rework. DCE is still not done (see #ifdef'd out parts)
but at least the stuff that is checked in, now works.

llvm-svn: 10
2001-06-07 16:59:26 +00:00
Chris Lattner a2f01878b7 Fixed to print slightly differently. Added use counts for labels
llvm-svn: 9
2001-06-07 16:58:55 +00:00
Chris Lattner e358b22776 Fixes for BB iterators, additional methods added for DCE pass
llvm-svn: 8
2001-06-07 16:58:36 +00:00
Chris Lattner 2cafe60b3b Extra comments
llvm-svn: 7
2001-06-07 16:58:13 +00:00
Chris Lattner d71f87537c Now does not include instruction files...
llvm-svn: 6
2001-06-06 20:41:51 +00:00
Chris Lattner 2f7c963559 Initial revision
llvm-svn: 2
2001-06-06 20:29:01 +00:00