Commit Graph

1510 Commits

Author SHA1 Message Date
Misha Brukman
859e5cc1f7 Removed `-debug' so that spurious printouts of patterns are not seen at
compilation time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7727 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:30:20 +00:00
Chris Lattner
7c2af6e93a Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7726 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:24:02 +00:00
Chris Lattner
b84fe1c636 Add patterns for multiply, and, or, and xor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7725 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:23:25 +00:00
Chris Lattner
622003fd74 add support for more nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7724 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:23:05 +00:00
Chris Lattner
2aa3a66fb1 Until the pattern matching instruction selector is finished, enable debug output from it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7722 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:11:01 +00:00
Chris Lattner
ac0c8680ad Add support for a pattern matching instruction selector. This is still in
the early implementation phases, so it is disabled by default


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7719 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 14:59:22 +00:00
Chris Lattner
f8dfa6ff9b Make imm be a leaf instead of a nonterminal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7708 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 19:51:16 +00:00
Misha Brukman
b8db66eb17 Implement LLVM intrinsics llvm.setjmp' and llvm.longjmp' as follows:
* setjmp() simply returns 0
* longjmp() simply calls abort()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7676 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 15:43:46 +00:00
Vikram S. Adve
97a95bdbdd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7674 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 15:01:26 +00:00
Chris Lattner
ec4f523178 Update tablegen interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7672 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 13:52:22 +00:00
Chris Lattner
69666e552e This register is never used, disable it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7661 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 04:49:16 +00:00
Misha Brukman
fe8a796833 Changing command-line option formats to be more consistent with LLVM style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7658 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 23:25:25 +00:00
Misha Brukman
58ba50fea7 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7657 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 23:06:21 +00:00
Misha Brukman
0870e970ff 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7653 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 22:19:18 +00:00
Vikram S. Adve
e895a740c7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7645 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 18:48:40 +00:00
Vikram S. Adve
5ac1175ada 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7644 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 18:42:49 +00:00
Chris Lattner
326e40aa8b The HAVE_JUMP code is dead, these intrinsics should _never_ be expanded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 18:04:40 +00:00
Misha Brukman
0897c60822 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()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7639 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 16:20:22 +00:00
Chris Lattner
2959b6ec49 Completely eliminate the isVoid TSFlag, shifting over all other fields
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7636 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 15:32:20 +00:00
Chris Lattner
d87b59c866 add a pattern for RET, immediates no longer need to be explicitly typed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7635 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 15:31:35 +00:00
Chris Lattner
3e77d6e44c Start adding usefulness to the DAG node definitions, add a new Expander
class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7634 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 15:31:02 +00:00
Chris Lattner
3fd1f5bb6a Use a new local data structure instead of the MachineInstr::regsUsed set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7621 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:11:13 +00:00
Chris Lattner
c393c57afc Add a map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7620 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:09:31 +00:00
Chris Lattner
6ae3117582 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7619 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:03:27 +00:00
Chris Lattner
3bed95b628 Physical registers no longer live in the regsUsed set for each machine instr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7618 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 21:55:58 +00:00
Chris Lattner
907b7dc9bd This method has now been changed to preserve flags for us!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7603 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:59:24 +00:00
Chris Lattner
c9bbfbc04e Factor shared code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7600 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:34:44 +00:00
Misha Brukman
f4de783582 * Removed `using' declaration, now use full namespace qualifier std::string
* Simplified code by using an inline function instead of copy-pasted code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:01:50 +00:00
Misha Brukman
c3cd8afe96 * Set annul bit to be 0, because the Sparc backend currently does not use it.
* Use the name of the predict field instead of just the const 1 in the
  Instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7592 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 14:34:38 +00:00
Chris Lattner
02beda1221 This is the real fix for the previous register allocator problem.
Physical registers should not float around.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7587 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 00:48:47 +00:00
Misha Brukman
b10cea86a9 Reformatted code to match the prevalent LLVM style; fit code into 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7586 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 00:02:06 +00:00
Misha Brukman
3683d9e842 ElectricFence found this bug where we were reading past the vector boundary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7585 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 23:48:40 +00:00
Chris Lattner
0bfd186db0 Add patterns for (mov R, R) (mov R, I) and subtracts. The moves are to enable
testing, the subtracts are because I was in the neighborhood.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7581 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 21:18:19 +00:00
Chris Lattner
c34921dc6a Change comments into something that TableGen can read!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7580 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 21:08:29 +00:00
Chris Lattner
244883e4af Allow instructions to have a DAG pattern associated with them.
Define a few preliminary node types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7579 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 21:07:37 +00:00
Chris Lattner
6770aedf7f Rename register classes to be upper case to make it obvious that they are X86
specific in the tree patterns


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7578 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 20:58:29 +00:00
Chris Lattner
e5bb2d94d9 There is nothing special about noops anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7568 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 05:11:37 +00:00
Chris Lattner
17d4d147dd There is nothing special about noops now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7567 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 05:11:19 +00:00
Chris Lattner
7cc7d987a4 Transition to using 'let X = y' instead of 'set X = y'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7565 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 05:03:18 +00:00
Chris Lattner
c8f4587efd transition to using let instead of set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7564 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 04:59:56 +00:00
Chris Lattner
60e81db31c Transition to using let instead of set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7563 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 04:58:12 +00:00
Chris Lattner
5e2cb8b991 Fix Bug: test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7558 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 02:12:48 +00:00
Chris Lattner
72feb15563 Simplify some constant expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7556 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 01:04:59 +00:00
Chris Lattner
d587a84197 Remove illegal, unsupported escapes. This fixes program: Ptrdist-bc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7552 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 23:42:17 +00:00
Chris Lattner
e012132028 * Sort #includes, remove dupliates
* Use .zero to emit padding between struct elements
* Emit .comm symbols when we can, this dramatically reduces the amount of gunk we have to print
* Print global variable identifiers next to initializer more nicely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7551 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 23:37:09 +00:00
Chris Lattner
7af9a38d0f Specify custom name for registers to get the ()'s in the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7547 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 22:12:47 +00:00
Chris Lattner
76bf868ff3 Allow specifying custom names for registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7546 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 22:12:37 +00:00
Chris Lattner
8d44ba8c5c Start using tablegen'd instruction enum list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:57:05 +00:00
Chris Lattner
113455be9d Resort tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7541 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:56:36 +00:00
Chris Lattner
4d18d5ce1e Lump the base opcode in with the X86 TargetSpecific flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7540 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:56:22 +00:00