Commit Graph

7130 Commits

Author SHA1 Message Date
Chris Lattner 19630d41f8 Implement type-inference/checking for non-terminal references
llvm-svn: 7686
2003-08-07 21:02:56 +00:00
Chris Lattner acf3dbe0c5 Rename all of the "Process" methods to be "read" methods, start the Instantiate method
llvm-svn: 7685
2003-08-07 20:42:23 +00:00
Chris Lattner ca89a11494 Add support for "cast" nodes, which are required when there is not enough information
to infer type type of all nodes, e.g. (ret imm)

llvm-svn: 7684
2003-08-07 19:59:42 +00:00
Chris Lattner bd1ffb4ea1 Use the new version of isSubClassOf
llvm-svn: 7683
2003-08-07 19:42:14 +00:00
Chris Lattner c6793425e3 Add and use a new method
llvm-svn: 7682
2003-08-07 19:41:59 +00:00
Chris Lattner 9b759739ef Cleanup and reorganize code, no functional changes
llvm-svn: 7679
2003-08-07 19:28:55 +00:00
Chris Lattner b6629063ec Read in expanders too
llvm-svn: 7678
2003-08-07 19:21:10 +00:00
Chris Lattner a63e04482f Continued evolution of the selector emitter: Represent instruction patterns
as first class objects

llvm-svn: 7677
2003-08-07 19:12:24 +00:00
Misha Brukman 1fe74d144b Implement LLVM intrinsics `llvm.setjmp' and `llvm.longjmp' as follows:
* setjmp() simply returns 0
* longjmp() simply calls abort()

llvm-svn: 7676
2003-08-07 15:43:46 +00:00
Vikram S. Adve da92f366c7 Fix assertion in MachineInstr::substituteValue().
llvm-svn: 7675
2003-08-07 15:01:48 +00:00
Vikram S. Adve 6e4a358f72 Fix sanity-checking in 'maskUnsigned' code to be more precise:
use or def-and-use operands can be substituted after one def-only
operand has been substituted.

llvm-svn: 7674
2003-08-07 15:01:26 +00:00
John Criswell 449670a8f7 Fixed a segfault in gccld.
The original code does not work because the value from WorkList.end() is
invalidated once WorkList.erase() is called.  To ensure proper functionality,
we must ensure that WorkList.erase() is always called before WorkList.end().

llvm-svn: 7673
2003-08-07 14:43:13 +00:00
Chris Lattner eaa5b964bb Update tablegen interfaces
llvm-svn: 7672
2003-08-07 13:52:22 +00:00
Chris Lattner ccb9f8ed54 Finish implementation of the type inference engine.
Start working on reading in nonterminals

llvm-svn: 7671
2003-08-07 06:02:15 +00:00
Chris Lattner da2e1dcc2b Allow clients to get at the pointer type
llvm-svn: 7670
2003-08-07 06:01:44 +00:00
Chris Lattner 32809aad34 Add new method getVAlueAsDag
llvm-svn: 7669
2003-08-07 06:00:43 +00:00
Chris Lattner c01182c716 Initial checkin of tree pattern parser and type inference engine (which still needs work).
llvm-svn: 7668
2003-08-07 05:40:14 +00:00
Chris Lattner 40842f4c8b Eliminate now-dead method
llvm-svn: 7667
2003-08-07 05:39:37 +00:00
Chris Lattner 377f096678 Start using the CodeGeneratorWrappers
llvm-svn: 7666
2003-08-07 05:39:09 +00:00
Chris Lattner 9f993091ea Initial checkin of useful wrappers around the Target classes, for now, only ValueType and
Target are wrapped

llvm-svn: 7665
2003-08-07 05:38:11 +00:00
Sumant Kowshik 43ecb4829d Removed the support for pool allocation testing. This will be in a separate TEST file
llvm-svn: 7664
2003-08-07 05:36:53 +00:00
Sumant Kowshik db64829787 Change implementation so that variable sized slabs are used to allow arbitrary sized array allocations
llvm-svn: 7663
2003-08-07 05:31:04 +00:00
Sumant Kowshik 0b83080595 Added code for pool allocating only the pool-allocatable data structures in the presence of collapsed nodes + a couple of bug fixes
llvm-svn: 7662
2003-08-07 05:29:28 +00:00
Chris Lattner 8706805dae This register is never used, disable it.
llvm-svn: 7661
2003-08-07 04:49:16 +00:00
Sumant Kowshik b2d3c8e805 Added a flag which is set when all data structures are not pool allocated
llvm-svn: 7660
2003-08-07 04:37:52 +00:00
Chris Lattner 74bc5c7147 There was no reason for these to be bit-fields, they just need to be unique.
Also, add an isVoid item

llvm-svn: 7659
2003-08-07 00:17:00 +00:00
Misha Brukman b611692487 Changing command-line option formats to be more consistent with LLVM style.
llvm-svn: 7658
2003-08-06 23:25:25 +00:00
Misha Brukman 8f18938d1c * Renamed option from `nopreselect' to `nopreopt' since it disables more than
just PreSelection
* Wrapped code at 80 columns
* Added the DecomposeMultiDimRefs Pass to the JIT compilation path

llvm-svn: 7657
2003-08-06 23:06:21 +00:00
Chris Lattner e76a2e790d Ick, add the RIGHT accessor
llvm-svn: 7656
2003-08-06 23:01:18 +00:00
Chris Lattner 116ad79efd Add accessor
llvm-svn: 7655
2003-08-06 23:00:31 +00:00
Chris Lattner 4438d571f2 There is something wrong with code that looks like:
if (R == 0 || ...)
  R->getName()

llvm-svn: 7654
2003-08-06 22:29:04 +00:00
Misha Brukman 79226d066e Use the registers g1 and g5 as temporaries for making far jumps and far calls,
because saving i1 and i2 to their ``designated'' stack slots corrupts unknown
memory in other functions, standard libraries, and worse.

In addition, this has the benefit of improving JIT performance because we
eliminate writing out 4 instructions in CompilationCallback() and 2 loads and 2
stores.

llvm-svn: 7653
2003-08-06 22:19:18 +00:00
John Criswell fa30f1be46 Removed Makefile.common.
Since we are including Makefile.test, we automatically get Makefile.common.
Furthermore, the double inclusion of Makefile.common causes the test suite to
be executed twice per invocation of the top level make.

llvm-svn: 7652
2003-08-06 21:50:36 +00:00
Chris Lattner 48b78c8bf3 Export the register classes so that the instruction selector can get at them as needed
llvm-svn: 7651
2003-08-06 21:47:14 +00:00
Brian Gaeke 360855a017 Makefile.common: Remove commented-out and duplicate rules.
llvm-svn: 7650
2003-08-06 21:44:22 +00:00
Chris Lattner 4159fdaef2 Add a bunch of new Alpha Intrinsics for Rahul Joshi
llvm-svn: 7646
2003-08-06 20:08:25 +00:00
Vikram S. Adve 792b48f4d1 1. Bug fix: was using SLL instead of SLLX for ULongTy. Chump.
2. Handle fp-to-uint conversions directly here instead of relying on
   a pre-transformation to replace them with the 2-step conversion.
3. Use size rather than explicitly checking types when deciding what
   opcodes to use, wherever possible.  This is less error prone (the
   bug fix above was not the first time!).
4. Float-to-pointer casts shd now work though this hasn't been tested.

llvm-svn: 7645
2003-08-06 18:48:40 +00:00
Vikram S. Adve 26125cbeb5 Remove conversion of fp-to-uint cast into a multi-step cast:
this is not an optional transformation on SPARC and is now handled
directly by instruction selection.

llvm-svn: 7644
2003-08-06 18:42:49 +00:00
Chris Lattner 39a2b3aa08 New testcase
llvm-svn: 7643
2003-08-06 18:26:19 +00:00
Chris Lattner 584058220a The HAVE_JUMP code is dead, these intrinsics should _never_ be expanded
llvm-svn: 7642
2003-08-06 18:04:40 +00:00
Chris Lattner c592c9f8a3 Remove unnecessary use of NonCopyable
llvm-svn: 7641
2003-08-06 17:16:24 +00:00
Misha Brukman 31b31d94d9 Added asserts to prevent negative shift amounts from being generated.
llvm-svn: 7640
2003-08-06 16:28:49 +00:00
Misha Brukman 4510698acb SparcV9CodeEmitter.cpp:
* Doxygen-ified comments
* Added capability to make far calls (i.e., beyond 30 bits in CALL instr)
  which implies that we need to delete function references that were added by
  the call to addFunctionReference() because the actual call instruction is 10
  instructions away (thanks to 64-bit address construction)
* Cleaned up code that generates far jumps by using an array+loop

SparcV9CodeEmitter.h:
* Explained more of the side-effects of emitFarCall()

llvm-svn: 7639
2003-08-06 16:20:22 +00:00
Chris Lattner bade93cde8 Sort the file lists
llvm-svn: 7638
2003-08-06 16:02:50 +00:00
Chris Lattner a0de5c8f21 Loop unroller doesn't necessarily need to be profile driven
llvm-svn: 7637
2003-08-06 15:40:37 +00:00
Chris Lattner fb2054c40b Completely eliminate the isVoid TSFlag, shifting over all other fields
llvm-svn: 7636
2003-08-06 15:32:20 +00:00
Chris Lattner 19d25b3c41 add a pattern for RET, immediates no longer need to be explicitly typed
llvm-svn: 7635
2003-08-06 15:31:35 +00:00
Chris Lattner 0c4dd1ea09 Start adding usefulness to the DAG node definitions, add a new Expander
class

llvm-svn: 7634
2003-08-06 15:31:02 +00:00
Chris Lattner f0f55a9b28 Add error checking code to the node type parser. Start the instruction pattern
reader

llvm-svn: 7632
2003-08-06 06:16:35 +00:00
Chris Lattner b5035a4ec9 Initial support for an instruction selector emitter
llvm-svn: 7631
2003-08-06 05:42:05 +00:00