summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix counting of Post-RA scheduling stalls. Improve debug output.David Goodwin2009-08-121-14/+25
| | | | llvm-svn: 78843
* Added RegisterCoalescer to required passes for PBQP.Lang Hames2009-08-121-0/+1
| | | | llvm-svn: 78840
* Use WriteAsOperand to print BasicBlock names.Dan Gohman2009-08-121-2/+2
| | | | llvm-svn: 78838
* Fix a few more places to use PadToColumn instead of tabs. And fixDan Gohman2009-08-121-6/+8
| | | | | | | the basic block label printing to check whether a block has a name before printing a comment character and whitespace for it. llvm-svn: 78830
* Use PadToColumn instead of tabs for aligning comments. Fix one placeDan Gohman2009-08-121-63/+122
| | | | | | that emitted unnecessary whitespace outside of VerboseAsm mode. llvm-svn: 78828
* Enhance the InstrStage object to enable the specification of an Itinerary ↵David Goodwin2009-08-121-29/+25
| | | | | | with overlapping stages. The default is to maintain the current behavior that the "next" stage immediately follows the previous one. llvm-svn: 78827
* Add catch block handling to SjLj exception handling.Jim Grosbach2009-08-121-4/+9
| | | | llvm-svn: 78817
* Change TargetAsmInfo to be constructed via TargetRegistry from a Target+TripleChris Lattner2009-08-121-0/+9
| | | | | | | | pair instead of from a virtual method on TargetMachine. This cuts the final ties of TargetAsmInfo to TargetMachine, meaning that MC can now use TargetAsmInfo. llvm-svn: 78802
* This logic was accidentally inverted in r78767.Dan Gohman2009-08-121-3/+3
| | | | llvm-svn: 78773
* Factor out the code for finding an available register for useDan Gohman2009-08-121-54/+70
| | | | | | in breaking an anti-dependence into a separate function. llvm-svn: 78767
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-1212-265/+319
| | | | | | infrastructure work needed to get the contexts to where they need to be first. llvm-svn: 78759
* Change the asmprinter to print the comment character before theChris Lattner2009-08-111-3/+4
| | | | | | | | | | "inlineasmstart/end" strings so that the contents of the directive are separate from the comment character. This lets elf targets get #APP/#NOAPP for free even if they don't use "#" as the comment character. This also allows hoisting the darwin stuff up to the shared TAI class. llvm-svn: 78737
* Allow a zero cycle stage to reserve/require a FU without advancing the cycle ↵David Goodwin2009-08-111-5/+16
| | | | | | counter. llvm-svn: 78736
* Fix warnings.Owen Anderson2009-08-112-9/+7
| | | | llvm-svn: 78725
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-1118-842/+843
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* "TAI::JumpTableDirective" is always null for current arm targets, simplifyChris Lattner2009-08-111-14/+12
| | | | | | the code based on this and make it fall through better. llvm-svn: 78708
* Use DEBUG macro for debug output.David Goodwin2009-08-111-11/+7
| | | | llvm-svn: 78694
* Add some debug output.David Goodwin2009-08-112-2/+16
| | | | llvm-svn: 78687
* Tidy #includes.Dan Gohman2009-08-113-2/+1
| | | | llvm-svn: 78677
* Remove unnecessary throw() specifications; LLVM doesn't use exceptions.Dan Gohman2009-08-112-4/+4
| | | | llvm-svn: 78667
* Remove unnecessary casts.Dan Gohman2009-08-111-1/+1
| | | | llvm-svn: 78664
* Add const qualifiers.Dan Gohman2009-08-111-2/+2
| | | | llvm-svn: 78663
* Rebuild RegScavenger::DistanceMap each time it is needed.Jakob Stoklund Olesen2009-08-111-23/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The register scavenger maintains a DistanceMap that maps MI pointers to their distance from the top of the current MBB. The DistanceMap is built incrementally in forward() and in bulk in findFirstUse(). It is used by scavengeRegister() to determine which candidate register has the longest unused interval. Unfortunately the DistanceMap contents can become outdated. The first time scavengeRegister() is called, the DistanceMap is filled to cover the MBB. If then instructions are inserted in the MBB (as they always are following scavengeRegister()), the recorded distances are too short. This causes bad behaviour in the included test case where a register use /after/ the current position is ignored because findFirstUse() thinks is is /before/ the current position. A "using an undefined register" assertion follows promptly. The fix is to build a fresh DistanceMap at the top of scavengeRegister(), and discard it after use. This means that DistanceMap is no longer needed as a RegScavenger member variable, and forward() doesn't need to update it. The fix then discloses issue number two in the same test case: The candidate search in scavengeRegister() finds a CSR that has been saved in the prologue, but is currently unused. It would be both inefficient and wrong to spill such a register in the emergency spill slot. In the present case, the emergency slot restore is placed immediately before the normal epilogue restore, leading to a "Redefining a live register" assertion. Fix number two: When scavengerRegister() stumbles upon an unused register that is overwritten later in the MBB, return that register early. It is important to verify that the register is defined later in the MBB, otherwise it might be an unspilled CSR. llvm-svn: 78650
* Fix a -Asserts warning.Daniel Dunbar2009-08-111-4/+4
| | | | | | | - Since the function is never called in NDEBUG mode, just dropped the DEBUG() uses here. llvm-svn: 78649
* Replace DOUT.David Goodwin2009-08-112-19/+21
| | | | llvm-svn: 78634
* SjLj based exception handling unwinding support. This patch is nasty, brutishJim Grosbach2009-08-116-50/+145
| | | | | | | | | | | | | and short. Well, it's kinda short. Definitely nasty and brutish. The front-end generates the register/unregister calls into the SjLj runtime, call-site indices and landing pad dispatch. The back end fills in the LSDA with the call-site information provided by the front end. Catch blocks are not yet implemented. Built on Darwin and verified no llvm-core "make check" regressions. llvm-svn: 78625
* Modified VNInfo. The "copy" member is now a union which holds the copy for a ↵Lang Hames2009-08-106-31/+31
| | | | | | register interval, or the defining register for a stack interval. Access is via getCopy/setCopy and getReg/setReg. llvm-svn: 78620
* Fix a bug in the DAGCombiner's handling of multiple linkedDan Gohman2009-08-101-3/+8
| | | | | | | | | | | MERGE_VALUES nodes. Replacing the result values with the operands in one MERGE_VALUES node may cause another MERGE_VALUES node be CSE'd with the first one, and bring its uses along, so that the first one isn't dead, as this code expects. Fix this by iterating until the node is really dead. This fixes PR4699. llvm-svn: 78619
* Fix a bug where DAGCombine was producing an illegal ConstantFPDan Gohman2009-08-101-1/+12
| | | | | | | node after legalize, and remove the workaround code from the ARM backend. llvm-svn: 78615
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-1021-1772/+1772
| | | | | | own struct type. llvm-svn: 78610
* Remove a bunch of debugging code that was slowing PBQP down by 25% or so.Owen Anderson2009-08-101-45/+0
| | | | llvm-svn: 78601
* Start moving TargetLowering away from using full MVTs and towards ↵Owen Anderson2009-08-104-11/+16
| | | | | | SimpleValueType, which will simplify the privatization of IntegerType in the future. llvm-svn: 78584
* Make this comment more closely reflect the code.Dan Gohman2009-08-101-1/+1
| | | | llvm-svn: 78569
* Add support for printing loop structure information in asm comments.David Greene2009-08-101-3/+99
| | | | | | | | | | This definitely slows down asm output so put it under an -asm-exuberant flag. This information is useful when doing static analysis of performance issues. llvm-svn: 78567
* Post RA scheduler changes. Introduce a hazard recognizer that uses the ↵David Goodwin2009-08-106-78/+331
| | | | | | target schedule information to accurately model the pipeline. Update the scheduler to correctly handle multi-issue targets. llvm-svn: 78563
* Move ConstantExpr handling to ResolveConstantExpr method and alsoBruno Cardoso Lopes2009-08-102-28/+87
| | | | | | add support for PtrToInt, Add, Mul. llvm-svn: 78552
* sink the 'name' and 'isdirective' state out of MCSection into its derived ↵Chris Lattner2009-08-082-12/+15
| | | | | | | | classes. This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-) llvm-svn: 78517
* 1. Make MCSection an abstract class.Chris Lattner2009-08-081-12/+1
| | | | | | | | | 2. Move section switch printing to MCSection virtual method which takes a TAI. This eliminates textual formatting stuff from TLOF. 3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and TLOFELF::AtIsCommentChar. llvm-svn: 78510
* eliminate TargetLoweringObjectFileSparc in favor of a TAI hook.Chris Lattner2009-08-081-1/+1
| | | | | | | | A TAI hook is appropriate in this case because this is just an asm syntax issue, not a semantic difference. TLOF should model the semantics of the section. llvm-svn: 78498
* Don't build illegal ops in DAGCombiner::SimplifyBinOpWithSameOpcodeHands().Jakob Stoklund Olesen2009-08-081-1/+3
| | | | | | | | Blackfin supports and/or/xor on i32 but not on i16. Teach DAGCombiner::SimplifyBinOpWithSameOpcodeHands to not produce illegal nodes after legalize ops. llvm-svn: 78497
* ELF improvements:Bruno Cardoso Lopes2009-08-083-58/+94
| | | | | | | | | | | Handle large integers, x86_fp80, ConstantAggregateZero, and two more ConstantExpr: GetElementPtr and IntToPtr Set SHF_MERGE bit for mergeable strings Avoid zero initialized strings to be classified as a bss symbol Don't allow common symbols to be classified as STB_WEAK Add a constant to be used as a global value offset in data relocations llvm-svn: 78476
* Clean out per-function data after the machine code verifier is done with it.Jakob Stoklund Olesen2009-08-081-0/+8
| | | | | | | | | | | | | | | Also don't dereference old pointers after they have been deleted causing random crashes when enabling the machine code verifier. Ahem... I have not included a test case for the crash. It hapened when enabling the verifier on CodeGen/X86/2009-08-06-branchfolder-crash.ll. The crash depends on an MBB being allocated at the same address as a previously deleted MBB. I don't think that can be reproduced reliably. llvm-svn: 78472
* Update the machine code verifier to keep up with the scavenger.Jakob Stoklund Olesen2009-08-081-12/+22
| | | | | | | | | * Cleaner handling of <undef>. * <def> takes precedence over <def,dead>. * Implement the OK-to-redefine-a-register-that-was- live-in-but-has-not-been-used-before rule. llvm-svn: 78467
* Remove RegisterScavenger::isSuperRegUsed(). This completely reverses the ↵Jakob Stoklund Olesen2009-08-082-38/+9
| | | | | | | | | | | | | | | mistaken commit r77904. Now there is no special treatment of instructions that redefine part of a super-register. Instead, the super-register is marked with <imp-use,kill> and <imp-def>. For instance, from LowerSubregs on ARM: subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1<undef>, %D1<kill>, 5 subreg: %D2<def> = FCPYD %D1<kill>, 14, %reg0, %Q1<imp-def> subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1, %D0<kill>, 6 subreg: %D3<def> = FCPYD %D0<kill>, 14, %reg0, %Q1<imp-use,kill>, %Q1<imp-def> llvm-svn: 78466
* Simplify RegScavenger::forward a bit more.Jakob Stoklund Olesen2009-08-081-65/+53
| | | | | | | | | | | Verify that early clobber registers and their aliases are not used. All changes to RegsAvailable are now done as a transaction so the order of operands makes no difference. The included test case is from PR4686. It has behaviour that was dependent on the order of operands. llvm-svn: 78465
* Fix some -Asserts unused variable warnings.Daniel Dunbar2009-08-082-6/+5
| | | | llvm-svn: 78447
* code cleanupChris Lattner2009-08-071-20/+18
| | | | llvm-svn: 78432
* remove a bunch of now-dead crud from the asmprinter and TAI interfaces.Chris Lattner2009-08-071-32/+0
| | | | llvm-svn: 78428
* Back out some of recent register scavenger change by John Mosby. It broke a ↵Evan Cheng2009-08-071-27/+14
| | | | | | number of ARM tests. llvm-svn: 78421
* tidy upChris Lattner2009-08-071-7/+4
| | | | llvm-svn: 78416
OpenPOWER on IntegriCloud