summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix a problem where lib/Target/TargetInstrInfo.h would include and useChris Lattner2008-01-0118-60/+74
| | | | | | | | | | a header file from libcodegen. This violates a layering order: codegen depends on target, not the other way around. The fix to this is to split TII into two classes, TII and TargetInstrInfoImpl, which defines stuff that depends on libcodegen. It is defined in libcodegen, where the base is not. llvm-svn: 45475
* Fix PR1833 - eh.exception and eh.selector return twoDuncan Sands2007-12-311-6/+28
| | | | | | | | values, which means doing extra legalization work. It would be easier to get this kind of thing right if there was some documentation... llvm-svn: 45472
* Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of theOwen Anderson2007-12-3129-261/+312
| | | | | | Machine-level API cleanup instigated by Chris. llvm-svn: 45470
* properly encapsulate the parent field of MBB and MI with get/set accessors.Chris Lattner2007-12-313-31/+35
| | | | llvm-svn: 45469
* update a couple of references to SSARegMap.Chris Lattner2007-12-312-3/+3
| | | | llvm-svn: 45468
* Rename SSARegMap -> MachineRegisterInfo in keeping with the idea Chris Lattner2007-12-3145-396/+413
| | | | | | | | | | | | | | that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. llvm-svn: 45467
* Add new shorter predicates for testing machine operands for various types: Chris Lattner2007-12-3039-179/+172
| | | | | | | | | | | | e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on switching everything over, so new clients should just start using the shorter names. Remove old long accessors, switching everything over to use the short accessor: getMachineBasicBlock() -> getMBB(), getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc. llvm-svn: 45464
* More cleanups for MachineOperand:Chris Lattner2007-12-308-139/+131
| | | | | | | | | | - 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
* MachineOperand:Chris Lattner2007-12-301-57/+38
| | | | | | | | | | | | | | | | | - 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
* fix typo duncan noticed!Chris Lattner2007-12-301-1/+1
| | | | llvm-svn: 45459
* simpilfy some register printing code.Chris Lattner2007-12-301-16/+6
| | | | llvm-svn: 45458
* eliminate a copy of the machineoperand printing stuff. Keep the copy thatChris Lattner2007-12-301-34/+4
| | | | | | knows how to print offsets. llvm-svn: 45457
* Simplify and clean up some machine operand/instr printing/dumping stuff.Chris Lattner2007-12-301-9/+9
| | | | llvm-svn: 45456
* two register machineoperands are not identical unless their subregs match.Chris Lattner2007-12-301-1/+2
| | | | llvm-svn: 45455
* MachineOperand::getImmedValue -> MachineOperand::getImmChris Lattner2007-12-304-12/+9
| | | | llvm-svn: 45454
* Use MachineOperand::getImm instead of MachineOperand::getImmedValue. ↵Chris Lattner2007-12-3031-159/+156
| | | | | | Likewise setImmedValue -> setImm llvm-svn: 45453
* Add some doxygen comments to llvm-c/Core.h.Gordon Henriksen2007-12-301-1/+2
| | | | llvm-svn: 45450
* make machine operands fatter: give each one an up-pointer to the Chris Lattner2007-12-301-1/+7
| | | | | | machineinstr that owns it. llvm-svn: 45449
* If we have a load of a global address that's not modified during theBill Wendling2007-12-302-3/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* use simplified operand addition methods.Chris Lattner2007-12-302-10/+11
| | | | llvm-svn: 45437
* use simplified operand addition methods.Chris Lattner2007-12-301-17/+25
| | | | llvm-svn: 45436
* use simplified operand addition methods.Chris Lattner2007-12-301-30/+22
| | | | llvm-svn: 45435
* Shrinkify the machine operand creation method names.Chris Lattner2007-12-301-1/+1
| | | | llvm-svn: 45433
* Start using the simplified methods for adding operands.Chris Lattner2007-12-303-28/+29
| | | | llvm-svn: 45432
* simplify some code by factoring operand construction better.Chris Lattner2007-12-301-22/+4
| | | | llvm-svn: 45428
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29548-1292/+1451
| | | | llvm-svn: 45418
* remove attribution from lib Makefiles.Chris Lattner2007-12-2935-71/+71
| | | | llvm-svn: 45415
* this is done.Chris Lattner2007-12-291-7/+0
| | | | llvm-svn: 45408
* One readme entry is done, one is really easy (Evan, want to investigateChris Lattner2007-12-291-77/+25
| | | | | | | | eliminating the llvm.x86.sse2.loadl.pd intrinsic?), one shuffle optzn may be done (if shufps is better than pinsw, Evan, please review), and we already know about LICM of simple instructions. llvm-svn: 45407
* Fold comparisons against a constant nan, and optimize ORD/UNORD Chris Lattner2007-12-292-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | comparisons with a constant. This allows us to compile isnan to: _foo: fcmpu cr7, f1, f1 mfcr r2 rlwinm r3, r2, 0, 31, 31 blr instead of: LCPI1_0: ; float .space 4 _foo: lis r2, ha16(LCPI1_0) lfs f0, lo16(LCPI1_0)(r2) fcmpu cr7, f1, f0 mfcr r2 rlwinm r3, r2, 0, 31, 31 blr llvm-svn: 45405
* this xform is implemented.Chris Lattner2007-12-291-22/+0
| | | | llvm-svn: 45404
* Disable null pointer folding transforms for non-generic address spaces. This ↵Christopher Lamb2007-12-292-4/+12
| | | | | | should probably be a target-specific predicate based on address space. That way for targets where this isn't applicable the predicate can be optimized away. llvm-svn: 45403
* make sure not to zap volatile stores, thanks a lot to Dale for noticing this!Chris Lattner2007-12-291-1/+2
| | | | llvm-svn: 45402
* Codegen:Chris Lattner2007-12-291-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as: _bar: pushl %esi subl $8, %esp movl 16(%esp), %esi call L_foo$stub fstps (%esi) addl $8, %esp popl %esi #FP_REG_KILL ret instead of: _bar: pushl %esi subl $8, %esp movl 16(%esp), %esi call L_foo$stub fstpl (%esi) cvtsd2ss (%esi), %xmm0 movss %xmm0, (%esi) addl $8, %esp popl %esi #FP_REG_KILL ret llvm-svn: 45401
* don't fold fp_round(fp_extend(load)) -> fp_round(extload)Chris Lattner2007-12-291-0/+4
| | | | llvm-svn: 45400
* avoid going through a stack slot to convert from fpstack to xmm regChris Lattner2007-12-292-29/+39
| | | | | | | | | if we are just going to store it back anyway. This improves things like: double foo(); void bar(double *P) { *P = foo(); } llvm-svn: 45399
* Delete a store whose input is a load from the same pointer:Chris Lattner2007-12-291-1/+12
| | | | | | | x = load p store x -> p llvm-svn: 45398
* add a noteChris Lattner2007-12-291-1/+41
| | | | llvm-svn: 45397
* expand note.Chris Lattner2007-12-291-0/+4
| | | | llvm-svn: 45393
* dead calls to llvm.stacksave can be deleted, even though theyChris Lattner2007-12-291-1/+10
| | | | | | have potential side-effects. llvm-svn: 45392
* add a note.Chris Lattner2007-12-281-0/+32
| | | | llvm-svn: 45388
* add a note.Chris Lattner2007-12-281-0/+32
| | | | llvm-svn: 45387
* Repair a transform that Chris noticed a bug in. Thanks to Nicholas for ↵Owen Anderson2007-12-281-5/+12
| | | | | | pointing out my stupid mistakes when writing this patch. :-) llvm-svn: 45384
* disable this instcombine xform, it miscompiles:Chris Lattner2007-12-281-0/+2
| | | | | | | | | | | | | | | | | | | define i32 @main() { entry: %z = alloca i32 ; <i32*> [#uses=2] store i32 0, i32* %z %tmp = load i32* %z ; <i32> [#uses=1] %sub = sub i32 %tmp, 1 ; <i32> [#uses=1] %cmp = icmp ult i32 %sub, 0 ; <i1> [#uses=1] %retval = select i1 %cmp, i32 1, i32 0 ; <i32> [#uses=1] ret i32 %retval } into ret 1, instead of ret 0. Christopher, please investigate. llvm-svn: 45383
* add a noteChris Lattner2007-12-281-0/+19
| | | | llvm-svn: 45377
* Ignore functions with internal linkages during linking. This snipped mimics theAnton Korobeynikov2007-12-271-0/+3
| | | | | | behaviour of LinkGlobals() function. llvm-svn: 45375
* Adding bindings for target triple and data layout.Gordon Henriksen2007-12-271-0/+19
| | | | llvm-svn: 45369
* Switch the bindings to use LLVMFoldingBuilder.Gordon Henriksen2007-12-271-1/+1
| | | | llvm-svn: 45367
* Fixing several transforms which would drop the collector attributeGordon Henriksen2007-12-254-0/+10
| | | | | | when copying functions. llvm-svn: 45356
* Don't break critical edges for single-bb loops, this helps with PR1877, thoughChris Lattner2007-12-251-3/+1
| | | | | | | | | | it is only a partial fix. This change is noise for most programs, but speeds up Shootout-C++/matrix by 20%, Ptrdist/ks by 24%, smg2000 by 8%, hexxagon by 9%, bzip2 by 9% (not sure I trust this), ackerman by 13%, etc. OTOH, it slows down Shootout/fib2 by 40% (I'll update PR1877 with this info). llvm-svn: 45354
OpenPOWER on IntegriCloud