Commit Graph

753 Commits

Author SHA1 Message Date
Alkis Evlogimenos 832437255d Stop using getValues().
llvm-svn: 15487
2004-08-04 08:44:43 +00:00
Chris Lattner 4d7af1c680 Fix a warning
llvm-svn: 15409
2004-08-01 19:31:30 +00:00
Chris Lattner 2b47c02b64 Convert all I<> instructions to asmformat.
Delete the 'name' field of all instructions that have asmformats.

llvm-svn: 15403
2004-08-01 09:52:59 +00:00
Chris Lattner 27fcf976f2 Eliminate 3 of the X86 printImplicit* flags.
llvm-svn: 15398
2004-08-01 08:23:17 +00:00
Chris Lattner e42675f5af Get rid of 3 of the 4 'printimplicit' flags. Implicit operands are now
explicitly listed in the asm string.

llvm-svn: 15397
2004-08-01 08:22:29 +00:00
Chris Lattner f6bd77190e Convert more instructions over to the asmprinter
llvm-svn: 15396
2004-08-01 08:13:11 +00:00
Chris Lattner 06cf67ee14 Handle registers a bit more efficiently
llvm-svn: 15395
2004-08-01 08:12:41 +00:00
Chris Lattner ba52a58836 give FP stack registers names
llvm-svn: 15394
2004-08-01 08:12:13 +00:00
Chris Lattner 275d98dcbb Switch more instructions over to using the asmprinter. Fix bugs in the emission
of in/out instructions (missing %'s on registers).

llvm-svn: 15393
2004-08-01 07:44:35 +00:00
Chris Lattner d5540021fc The tblgen'erated asmparser wants a way to print operands.
llvm-svn: 15392
2004-08-01 07:43:46 +00:00
Chris Lattner 9520d20c83 Rename the Printer class -> X86AsmPrinter.
Include the tablegenerated assembly writer.

llvm-svn: 15389
2004-08-01 06:02:08 +00:00
Chris Lattner 1d21ea7f1f Factor a bunch of the rules and add support for generating the asmwriter.
llvm-svn: 15388
2004-08-01 06:01:32 +00:00
Chris Lattner 321763358b Specify an asm string and operands lists for a bunch of instructions.
This only really covers no-operand instructions so far.

llvm-svn: 15387
2004-08-01 06:01:00 +00:00
Chris Lattner 6971be8159 Completely disable the pattern isel until it is more substantial.
llvm-svn: 15380
2004-08-01 03:28:02 +00:00
Chris Lattner 70d2260eb9 Entirely eliminate all patterns and expanders from this file. We shall go
with an incremental approach rather than a revolutionary approach.

llvm-svn: 15379
2004-08-01 03:25:01 +00:00
Chris Lattner 06bfc0d930 Remove obsolete file
llvm-svn: 15377
2004-08-01 03:19:28 +00:00
Alkis Evlogimenos bb635a27a4 Align breaks.
llvm-svn: 15371
2004-07-31 10:05:44 +00:00
Chris Lattner fcef7655fa Add breaks
llvm-svn: 15365
2004-07-31 09:53:31 +00:00
Alkis Evlogimenos ce15f8f4c9 Simplify code a bit.
llvm-svn: 15364
2004-07-31 09:44:32 +00:00
Alkis Evlogimenos aaf642103a Correctly spell 'unconditional'.
llvm-svn: 15363
2004-07-31 09:41:44 +00:00
Alkis Evlogimenos f57d78a87d Implement insertGoto and reverseBranchCondition for the X86.
llvm-svn: 15362
2004-07-31 09:38:47 +00:00
Chris Lattner 66a13e230d Mark barrier instructions. Execution does not fall through uncond branches
or return intructions.

llvm-svn: 15356
2004-07-31 02:10:53 +00:00
Misha Brukman a332a646a0 Fix indentation: should be 2 spaces.
llvm-svn: 15240
2004-07-26 18:48:58 +00:00
Misha Brukman cf7d3af07f Fix file header as it has been renamed.
llvm-svn: 15239
2004-07-26 18:45:48 +00:00
Misha Brukman bca562404c Renamed files to have the `X86' prefix for uniqueness purposes.
All CVS history was renamed, the *,v were copied over.  No worries.

llvm-svn: 15238
2004-07-26 18:43:11 +00:00
Chris Lattner 8d06c43f01 Remove some (LARGE) abandoned code for the release. If this is ever needed
again in the future, it can be resurrected out of CVS

llvm-svn: 15112
2004-07-22 21:30:35 +00:00
Chris Lattner fac8452acf Fix cases where we generated horrible code like this:
mov %EDI, 12
        add %EDI, %ECX
        mov %ECX, 12
        add %ECX, %EDX
        mov %EDX, 12
        add %EDX, %ESI

instead (really!) generate this:

        add %ECX, 12
        add %EDX, 12
        add %ESI, 12

llvm-svn: 15090
2004-07-21 21:28:26 +00:00
Chris Lattner f8cf35855a While I'm at it, don't break codegen of mul by 3,5,9.
llvm-svn: 15013
2004-07-19 23:50:57 +00:00
Chris Lattner 7c06d44f42 Generate better code for multiplies by negative constants like -4, -1, -9, etc.
llvm-svn: 15012
2004-07-19 23:47:21 +00:00
Reid Spencer 874368790f bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass

llvm-svn: 14950
2004-07-18 00:38:32 +00:00
Chris Lattner c856e90d1d Make sure to emit the immediate byte for instructions like:
shrd [mem], reg, imm

This fixes the jit-ls failure on 186.crafty.

llvm-svn: 14914
2004-07-17 20:26:14 +00:00
Chris Lattner 8a4039ed9a Reserve the correct amt of space.
llvm-svn: 14913
2004-07-17 20:24:05 +00:00
Chris Lattner 7dc9de5f43 Patches towards fixing PR341
llvm-svn: 14841
2004-07-15 02:14:30 +00:00
Chris Lattner 33930ad7bd Improve codegen for the LLVM offsetof/sizeof "operator". Before we compiled
this LLVM function:

int %foo() {
        ret int cast (int** getelementptr (int** null, int 1) to int)
}

into:

foo:
        mov %EAX, 0
        lea %EAX, DWORD PTR [%EAX + 4]
        ret

now we compile it into:

foo:
        mov %EAX, 4
        ret

This sequence is frequently generated by the MSIL front-end, and soon the malloc lowering pass and
Java front-ends as well..

-Chris

llvm-svn: 14834
2004-07-15 00:58:53 +00:00
Chris Lattner c2726e63ed Delete the allocate*TargetMachine function, which is now dead .
The shared command line options are now in a header that makes sense.

llvm-svn: 14756
2004-07-11 04:17:10 +00:00
Chris Lattner 73eb9436ee Make these format a bit nicer
llvm-svn: 14747
2004-07-11 03:27:42 +00:00
Chris Lattner 4266f8017d Auto-registrate target
llvm-svn: 14745
2004-07-11 02:48:49 +00:00
Reid Spencer eb04d9bcb4 Add #include <iostream> since Value.h does not #include it any more.
llvm-svn: 14622
2004-07-04 12:19:56 +00:00
Chris Lattner 6c322ecc31 Remove dead blocks
llvm-svn: 14564
2004-07-02 05:46:41 +00:00
Misha Brukman 887fd23dfc Fix associativity of parameters to assert(): now it actually makes sense.
llvm-svn: 14483
2004-06-29 19:43:20 +00:00
Misha Brukman c968b87d94 Convert tabs to spaces.
llvm-svn: 14482
2004-06-29 19:28:53 +00:00
Chris Lattner e6e1b48023 I believe that the code generator now properly handles dead basic blocks. If not,
this is a bug, and should be fixed.

llvm-svn: 14476
2004-06-29 07:17:12 +00:00
Chris Lattner 1a920d49f6 Fix a regression from r1.224. In particular, codegen a cast from double ->
float as a truncation by going through memory.  This truncation was being
skipped, which caused 175.vpr to fail after aggressive register promotion.

llvm-svn: 14473
2004-06-29 00:14:38 +00:00
Tanya Lattner 23dbc8170c Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function.
llvm-svn: 14389
2004-06-25 00:13:11 +00:00
Misha Brukman c22299d21b Spell out `NoFramePointerElim' for readability.
llvm-svn: 14299
2004-06-21 21:17:44 +00:00
Misha Brukman 5cb198a9c6 Use the common `NoFPElim' setting instead of our own.
llvm-svn: 14298
2004-06-21 21:10:24 +00:00
Chris Lattner bcdadf3765 Move the IntrinsicLowering header into the CodeGen directory, as per PR346
llvm-svn: 14266
2004-06-20 07:49:54 +00:00
Chris Lattner aa27623b99 Codegen sub C, X a little bit better for register pressure. Instead of
mov REG, C
sub REG, X

generate:

neg X
add X, C

which uses one less reg

llvm-svn: 14213
2004-06-18 00:50:37 +00:00
Chris Lattner b30d12292a Fold setcc instructions into select and branches that are not in the same BB as
the setcc.

llvm-svn: 14212
2004-06-18 00:29:22 +00:00
Chris Lattner 7887da36de Do not fold loads into instructions if it is used more than once. In particular
we do not want to fold the load in cases like this:

  X = load
    = add A, X
    = add B, X

llvm-svn: 14204
2004-06-17 22:15:25 +00:00