summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Use the correct MachineRegisterInfo object.Bill Wendling2008-01-021-2/+1
| | | | llvm-svn: 45499
* Remove dead code.Bill Wendling2008-01-021-35/+0
| | | | llvm-svn: 45496
* Use the new architecture to get the containing machine basic block for a machineBill Wendling2008-01-021-28/+28
| | | | | | | instruction. Also, use "splice" to move the new instruction instead of remove/insert (where it was leaking memory anyway). llvm-svn: 45492
* Move some more instruction creation methods from RegisterInfo into InstrInfo.Owen Anderson2008-01-016-21/+36
| | | | llvm-svn: 45484
* Make MachineRegisterInfo::getVRegDef more efficient by aiming the keep the ↵Chris Lattner2008-01-011-4/+10
| | | | | | def of the vreg at the start of the list, so the list doesn't need to be traversed. llvm-svn: 45483
* switch the register iterator to act more like hte LLVM value iterator: ↵Chris Lattner2008-01-012-3/+17
| | | | | | | | | | | dereferencing it now returns the machineinstr of the use. To get the operand, use I.getOperand(). Add a new MachineRegisterInfo::replaceRegWith, which is basically like Value::replaceAllUsesWith. llvm-svn: 45482
* Add a trivial but handy function to efficiently return the machine Chris Lattner2008-01-011-0/+15
| | | | | | instruction that defines the specified vreg. Crazy. llvm-svn: 45480
* Implement automatically updated def/use lists for all MachineInstr register Chris Lattner2008-01-013-8/+331
| | | | | | | operands. The lists are currently kept in MachineRegisterInfo, but it does not yet provide an iterator interface to them. llvm-svn: 45477
* Fix a problem where lib/Target/TargetInstrInfo.h would include and useChris Lattner2008-01-011-0/+58
| | | | | | | | | | 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-315-17/+18
| | | | | | 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-3123-200/+224
| | | | | | | | | | | | | | 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-307-29/+23
| | | | | | | | | | | | 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-305-122/+126
| | | | | | | | | | - 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
* 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
* 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
* 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-2959-118/+118
| | | | llvm-svn: 45418
* remove attribution from lib Makefiles.Chris Lattner2007-12-292-4/+4
| | | | llvm-svn: 45415
* Fold comparisons against a constant nan, and optimize ORD/UNORD Chris Lattner2007-12-291-0/+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
* make sure not to zap volatile stores, thanks a lot to Dale for noticing this!Chris Lattner2007-12-291-1/+2
| | | | llvm-svn: 45402
* don't fold fp_round(fp_extend(load)) -> fp_round(extload)Chris Lattner2007-12-291-0/+4
| | | | llvm-svn: 45400
* 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
* Flesh out the Briggs implementation a little bit more, fix a few FIXMEs.Owen Anderson2007-12-241-11/+35
| | | | llvm-svn: 45347
* Sketch out an implementation of Briggs' copy placement algorithm.Owen Anderson2007-12-231-10/+104
| | | | llvm-svn: 45334
* initial code for forming an FGETSIGN node. This is disabled untilChris Lattner2007-12-221-0/+26
| | | | | | legalizer support goes in. llvm-svn: 45323
* improve support for fgetsignChris Lattner2007-12-221-0/+6
| | | | llvm-svn: 45322
* Tell TargetLoweringOpt whether it is running beforeChris Lattner2007-12-221-1/+1
| | | | | | or after legalize. llvm-svn: 45321
* Add a new FGETSIGN operation, which defaults to expand on allChris Lattner2007-12-221-1/+5
| | | | | | targets. llvm-svn: 45320
* Use getIntrinsicID instead of looking up intrinsic prototypes. AlsoGordon Henriksen2007-12-221-28/+29
| | | | | | | fixes a bug with indirect calls. (Test case will be included with ocaml collector patch.) llvm-svn: 45316
* Note what still needs doing.Owen Anderson2007-12-221-1/+6
| | | | llvm-svn: 45310
* Remove critical edge breaking. It won't be necessary as long as we are very ↵Owen Anderson2007-12-221-37/+0
| | | | | | careful when inserting copies. llvm-svn: 45309
* More accurate checks for two-address constraints.Evan Cheng2007-12-201-8/+40
| | | | llvm-svn: 45259
* The physical register + virtual register joining requirement was much too ↵Evan Cheng2007-12-201-1/+1
| | | | | | strict. llvm-svn: 45253
* Bring back a burr scheduling heuristic that's still needed.Evan Cheng2007-12-201-5/+34
| | | | llvm-svn: 45252
* Updated comments to reflect what "side effects" means in this situation.Bill Wendling2007-12-201-10/+3
| | | | llvm-svn: 45245
* Simplify LowerCallTo by using a callsite.Duncan Sands2007-12-191-41/+27
| | | | llvm-svn: 45198
* The C++ exception handling personality function wantsDuncan Sands2007-12-193-28/+60
| | | | | | | | | | | | | | | | | | | | | | | to know about calls that cannot throw ('nounwind'): if such a call does throw for some reason then the personality will terminate the program. The distinction between an ordinary call and a nounwind call is that an ordinary call gets an entry in the exception table but a nounwind call does not. This patch sets up the exception table appropriately. One oddity is that I've chosen to bracket nounwind calls with labels (like invokes) - the other choice would have been to bracket ordinary calls with labels. While bracketing ordinary calls is more natural (because bracketing by labels would then correspond exactly to getting an entry in the exception table), I didn't do it because introducing labels impedes some optimizations and I'm guessing that ordinary calls occur more often than nounwind calls. This fixes the gcc filter2 eh test, at least at -O0 (the inliner needs some tweaking at higher optimization levels). llvm-svn: 45197
* Don't leave newly created nodes around if it turns out they are not needed.Evan Cheng2007-12-191-2/+4
| | | | llvm-svn: 45186
OpenPOWER on IntegriCloud