Commit Graph

39551 Commits

Author SHA1 Message Date
Gordon Henriksen 1862b6daa0 Another backwards compatibility fix.
llvm-svn: 45463
2007-12-30 22:48:58 +00:00
Chris Lattner db64f04ac6 - rename opType -> OpKind and contents -> Contents.
- eliminate the auxInfo union, merging it into the contents union.  This shaves 
  4 bytes off MachineOperand on a 32-bit machine.

- Use accessors in ctor methods.

- Add comments.

llvm-svn: 45462
2007-12-30 22:24:06 +00:00
Chris Lattner 6005589faf More cleanups for MachineOperand:
- Eliminate the static "print" method for operands, moving it
    into MachineOperand::print.
  - Change various set* methods for register flags to take a bool
    for the value to set it to.  Remove unset* methods.
  - Group methods more logically by operand flavor in MachineOperand.h

llvm-svn: 45461
2007-12-30 21:56:09 +00:00
Chris Lattner c98c0e57eb MachineOperand:
- Add getParent() accessors.
  - Move SubReg out of the AuxInfo union, to make way for future changes.
  - Remove the getImmedValue/setImmedValue methods.
  - in some MachineOperand::Create* methods, stop initializing fields that are dead.

MachineInstr:
  - Delete one copy of the MachineInstr printing code, now there is only one dump
    format and one copy of the code.
  - Make MachineOperand use the parent field to get info about preg register names if
    no target info is otherwise available.
  - Move def/use/kill/dead flag printing to the machineoperand printer, so they are
    always printed for an operand.

llvm-svn: 45460
2007-12-30 21:31:53 +00:00
Chris Lattner 96317d2412 fix typo duncan noticed!
llvm-svn: 45459
2007-12-30 21:21:10 +00:00
Chris Lattner 35fececec9 simpilfy some register printing code.
llvm-svn: 45458
2007-12-30 21:08:36 +00:00
Chris Lattner 383a873a9a eliminate a copy of the machineoperand printing stuff. Keep the copy that
knows how to print offsets.

llvm-svn: 45457
2007-12-30 21:03:30 +00:00
Chris Lattner 49bd29daa0 Simplify and clean up some machine operand/instr printing/dumping stuff.
llvm-svn: 45456
2007-12-30 21:01:27 +00:00
Chris Lattner 0dad74d252 two register machineoperands are not identical unless their subregs match.
llvm-svn: 45455
2007-12-30 20:55:08 +00:00
Chris Lattner 81798417dc MachineOperand::getImmedValue -> MachineOperand::getImm
llvm-svn: 45454
2007-12-30 20:50:28 +00:00
Chris Lattner 5c4637816e Use MachineOperand::getImm instead of MachineOperand::getImmedValue. Likewise setImmedValue -> setImm
llvm-svn: 45453
2007-12-30 20:49:49 +00:00
Gordon Henriksen 86427bb2a9 Trying r45451 again, but this time warning-free on 3.10.x.
llvm-svn: 45452
2007-12-30 18:12:41 +00:00
Gordon Henriksen 8100a225c0 Remove some lines that are nonportable to Ocaml 3.06.
llvm-svn: 45451
2007-12-30 17:48:11 +00:00
Gordon Henriksen 4a4d73519e Add some doxygen comments to llvm-c/Core.h.
llvm-svn: 45450
2007-12-30 17:46:33 +00:00
Chris Lattner 3c6ce5b43c make machine operands fatter: give each one an up-pointer to the
machineinstr that owns it.

llvm-svn: 45449
2007-12-30 06:11:04 +00:00
Gordon Henriksen 12c53c8c84 Strengthening this test so it fails in release mode.
llvm-svn: 45446
2007-12-30 05:45:49 +00:00
Chris Lattner ad0c83d65e split machineoperand out into its own header file.
llvm-svn: 45445
2007-12-30 04:40:25 +00:00
Bill Wendling 7749a9014b If we have a load of a global address that's not modified during the
function, then go ahead and hoist it out of the loop. This is the result:

$ cat a.c
volatile int G;

int A(int N) {
  for (; N > 0; --N)
    G++;
}
$ llc -o - -relocation-model=pic
_A:
...
LBB1_2: # bb
        movl    L_G$non_lazy_ptr-"L1$pb"(%eax), %esi
        incl    (%esi)
        incl    %edx
        cmpl    %ecx, %edx
        jne     LBB1_2  # bb
...
$ llc -o - -relocation-model=pic -machine-licm
_A:
...
        movl    L_G$non_lazy_ptr-"L1$pb"(%eax), %eax
LBB1_2: # bb
        incl    (%eax)
        incl    %edx
        cmpl    %ecx, %edx
        jne     LBB1_2  # bb
...

I'm limiting this to the MOV32rm x86 instruction for now.

llvm-svn: 45444
2007-12-30 03:18:58 +00:00
Nate Begeman 330aaa79e0 Allow implicit casts during arithmetic for OCUVector operations
Add codegen support and test for said casts.

llvm-svn: 45443
2007-12-30 02:59:45 +00:00
Nate Begeman 627daba0fd Allow splat casts for OCU vector assignments & add some comments.
llvm-svn: 45442
2007-12-30 01:45:55 +00:00
Nate Begeman 16a3a9d5f9 Rename stats to print-stats to avoid conflicting with llvm's
stats statistic when clang is built as a dylib.

llvm-svn: 45441
2007-12-30 01:38:50 +00:00
Nate Begeman 628028bd27 Allow codegen of vector fdiv
llvm-svn: 45440
2007-12-30 01:28:16 +00:00
Chris Lattner add4b3f9ab remove unneeded #includes.
llvm-svn: 45439
2007-12-30 01:11:43 +00:00
Chris Lattner 79f6f6c87a remove a bunch of now-dead methods.
llvm-svn: 45438
2007-12-30 01:04:05 +00:00
Chris Lattner b3fd2d7b63 use simplified operand addition methods.
llvm-svn: 45437
2007-12-30 01:01:54 +00:00
Chris Lattner 20421fe936 use simplified operand addition methods.
llvm-svn: 45436
2007-12-30 00:57:42 +00:00
Chris Lattner bbbae8e1ce use simplified operand addition methods.
llvm-svn: 45435
2007-12-30 00:51:11 +00:00
Chris Lattner b65293a075 make offset operand optional.
llvm-svn: 45434
2007-12-30 00:50:55 +00:00
Chris Lattner 4b762496a9 Shrinkify the machine operand creation method names.
llvm-svn: 45433
2007-12-30 00:45:46 +00:00
Chris Lattner e35dfb827f Start using the simplified methods for adding operands.
llvm-svn: 45432
2007-12-30 00:41:17 +00:00
Chris Lattner c002be7fdd switch MIBuilder over to use the simplified operand addition methods.
llvm-svn: 45431
2007-12-30 00:35:18 +00:00
Chris Lattner d948c2d244 1. Make a static MachineOperand::create* method for every
operand type.
2. Move these create methods below the accessors.
3. Simplify all the MachineInstr::add* methods to use these.

llvm-svn: 45430
2007-12-30 00:29:19 +00:00
Chris Lattner dc3c9050f8 tblgen shouldn't include headers from llvm codegen.
llvm-svn: 45429
2007-12-30 00:25:23 +00:00
Chris Lattner c288ff1d78 simplify some code by factoring operand construction better.
llvm-svn: 45428
2007-12-30 00:12:25 +00:00
Chris Lattner a77acbdcae implement codegen support for most unary operators when
initializing a global.  This handles important cases like:
float foo3 = -0.01f;

llvm-svn: 45427
2007-12-29 23:43:37 +00:00
Chris Lattner 6787a45a65 remove attribution from a variety of miscellaneous files.
llvm-svn: 45425
2007-12-29 22:59:10 +00:00
Chris Lattner f87b59d683 regenerate
llvm-svn: 45424
2007-12-29 20:47:37 +00:00
Chris Lattner cb1e357a1c remove attributions
llvm-svn: 45423
2007-12-29 20:46:15 +00:00
Gordon Henriksen 1158c533f7 Bindings for instruction calling conventions.
llvm-svn: 45422
2007-12-29 20:45:00 +00:00
Chris Lattner 345353d6b4 remove attributions from tools.
llvm-svn: 45421
2007-12-29 20:44:31 +00:00
Chris Lattner bcf65db6f3 remove attributions from examples.
llvm-svn: 45420
2007-12-29 20:37:57 +00:00
Chris Lattner 8adcd9f32e remove attributions from utils.
llvm-svn: 45419
2007-12-29 20:37:13 +00:00
Chris Lattner f3ebc3f3d2 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner 11cc8b3c14 remove attributions from the rest of the llvm makefiles.
llvm-svn: 45416
2007-12-29 20:11:13 +00:00
Chris Lattner a087a8d2ce remove attribution from lib Makefiles.
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Chris Lattner 8fa21acd25 remove attributions from tools/utils makefiles.
llvm-svn: 45414
2007-12-29 20:07:17 +00:00
Chris Lattner 7429581c33 remove attributions from .def files.
llvm-svn: 45413
2007-12-29 20:03:32 +00:00
Chris Lattner 5926c0ebfb remove attribution from makefiles.
llvm-svn: 45412
2007-12-29 20:02:25 +00:00
Chris Lattner e9cc742a17 Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)

llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Chris Lattner 5b12ab8c93 Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.

llvm-svn: 45410
2007-12-29 19:59:25 +00:00