summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix a major bug in operand latency computation. The use index must be adjustedEvan Cheng2010-10-281-0/+3
| | | | | | by the number of defs first for it to match the instruction itinerary. llvm-svn: 117518
* Putting r117193 back except for the compile time cost. Rather than assuming ↵Evan Cheng2010-10-271-3/+10
| | | | | | fallthroughs uses all registers, just gather the union of all successor liveins. llvm-svn: 117506
* COFF: Add IMAGE_SCN_MEM_READ to text sections.Michael J. Spencer2010-10-271-0/+1
| | | | | | | | There are currently 100 references to COFF::IMAGE_SCN in 6 files and 11 different functions. Section to attribute mapping really needs to happen in one place to avoid problems like this. llvm-svn: 117473
* Fix whitespace.Michael J. Spencer2010-10-271-15/+15
| | | | llvm-svn: 117472
* Formatting.Jim Grosbach2010-10-271-2/+2
| | | | llvm-svn: 117453
* Handle critical loop predecessors by making both inside and outside registersJakob Stoklund Olesen2010-10-272-2/+19
| | | | | | | | | live out. This doesn't prevent us from inserting a loop preheader later on, if that is better. llvm-svn: 117424
* Compute critical loop predecessors in the same way as critical loop exits.Jakob Stoklund Olesen2010-10-272-1/+38
| | | | | | | | Critical edges going into a loop are not as bad as critical exits. We can handle them by splitting the critical edge, or by having both inside and outside registers live out of the predecessor. llvm-svn: 117423
* Physical registers trivially have multiple connected components all the time.Jakob Stoklund Olesen2010-10-271-5/+7
| | | | | | Only virtuals should be requires to be connected. llvm-svn: 117422
* Use a MemIntrinsicSDNode for ISD::PREFETCH, which touchesDale Johannesen2010-10-262-2/+11
| | | | | | | | memory, so a MachineMemOperand is useful (not propagated into the MachineInstr yet). No functional change except for dump output. llvm-svn: 117413
* Remove the vector of live vregs. I thought we would need to trackAndrew Trick2010-10-262-6/+0
| | | | | | | them, but hopefully we won't. And this is not the right data structure to do it anyway. llvm-svn: 117412
* After splitting, compute connected components of all new registers, not just forJakob Stoklund Olesen2010-10-262-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the remainder register. Example: bb0: x = 1 bb1: use(x) ... x = 2 jump bb1 When x is isolated in bb1, the inner part breaks into two components, x1 and x2: bb0: x0 = 1 bb1: x1 = x0 use(x1) ... x2 = 2 x0 = x2 jump bb1 llvm-svn: 117408
* Verify that live intervals are connected. If there are multiple connectedJakob Stoklund Olesen2010-10-261-1/+9
| | | | | | components, each should get its own virtual register. llvm-svn: 117407
* Call RenumberValues for all new registers created during splitting. This isJakob Stoklund Olesen2010-10-261-1/+2
| | | | | | necessary to get correct hasPHIKill flags. llvm-svn: 117406
* Preserve PHIDef bits in cloned values during splitting.Jakob Stoklund Olesen2010-10-261-0/+4
| | | | llvm-svn: 117405
* Assign source ordering to nodes created for StoreInst.Devang Patel2010-10-261-2/+5
| | | | llvm-svn: 117404
* Teach MachineBasicBlock::print() to annotate instructions and blocks withJakob Stoklund Olesen2010-10-264-20/+29
| | | | | | SlotIndexes when available. llvm-svn: 117392
* Remmeber to print full live interval on verification error.Jakob Stoklund Olesen2010-10-261-4/+7
| | | | llvm-svn: 117391
* Jakob's review of the basic register allocator.Andrew Trick2010-10-264-113/+160
| | | | llvm-svn: 117384
* s/beginScope/beginInstruction/gDevang Patel2010-10-263-10/+10
| | | | | | s/endScope/endInstruction/g llvm-svn: 117376
* Don't verify physical registers going into landing pads.Jakob Stoklund Olesen2010-10-261-0/+8
| | | | | | Magic is happening that we don't understand. llvm-svn: 117370
* Use instruction itinerary to determine what instructions are 'cheap'.Evan Cheng2010-10-261-4/+36
| | | | llvm-svn: 117348
* For statistics that are only used in functions declared in !NDEBUG, wrap theNick Lewycky2010-10-262-0/+5
| | | | | | | declarations in !NDEBUG to avoid -Wunused-variable warnings. Patch by Matt Beaumont-Gay! llvm-svn: 117345
* InlineSpiller can also update LiveStacks.Jakob Stoklund Olesen2010-10-261-0/+9
| | | | llvm-svn: 117338
* Make the spiller responsible for updating the LiveStacks analysis.Jakob Stoklund Olesen2010-10-263-34/+20
| | | | llvm-svn: 117337
* When the "true" and "false" blocks of a diamond if-conversion are the same,Bob Wilson2010-10-261-52/+46
| | | | | | | | | | | | | | | | do not double-count the duplicate instructions by counting once from the beginning and again from the end. Keep track of where the duplicates from the beginning ended and don't go past that point when counting duplicates at the end. Radar 8589805. This change causes one of the MC/ARM/simple-fp-encoding tests to produce different (better!) code without the vmovne instruction being tested. I changed the test to produce vmovne and vmoveq instructions but moving between register files in the opposite direction. That's not quite the same but predicated versions of those instructions weren't being tested before, so at least the test coverage is not any worse, just different. llvm-svn: 117333
* Change if-conversion to keep track of the extra cost due to microcodedBob Wilson2010-10-261-11/+25
| | | | | | | | | instructions separately from the count of non-predicated instructions. The instruction count is used in places to determine how many instructions to copy, predicate, etc. and things get confused if that count includes the extra cost for microcoded ops. llvm-svn: 117332
* Neuter r117193 as it causes significant post-ra scheduler compile time ↵Evan Cheng2010-10-251-2/+2
| | | | | | regression. llvm-svn: 117329
* Simplify.Devang Patel2010-10-251-9/+9
| | | | | | Do not count use of sdisel for single call instruction. llvm-svn: 117316
* Add counters to count basic blocks and machine basic blocks with out of ↵Devang Patel2010-10-251-4/+63
| | | | | | | | order line number info. Add counters to count how many basic blocks are entirely selected by fastisel. llvm-svn: 117310
* Add simple counter to count no. of basic blocks without any line number ↵Devang Patel2010-10-251-0/+28
| | | | | | information. At -O0, these basic block coule cause less than optimial debugging experience. llvm-svn: 117307
* In which I learn how to forward declare template classes.Jakob Stoklund Olesen2010-10-251-2/+1
| | | | llvm-svn: 117272
* Move the remaining attribute macros to systematic names based on the attributeChandler Carruth2010-10-231-12/+12
| | | | | | name and prefixed with 'LLVM_'. llvm-svn: 117203
* Fix a likely bug in an assertion by adding parentheses around '||'. This bugChandler Carruth2010-10-231-1/+1
| | | | | | was found by a GCC warning. ;] llvm-svn: 117199
* Properly model the latency of register defs which are 1) function returns orEvan Cheng2010-10-232-16/+85
| | | | | | | | | | | 2) live-outs. Previously the post-RA schedulers completely ignore these dependencies since returns, branches, etc. are all scheduling barriers. This patch model the latencies between instructions being scheduled and the barriers. It also handle calls by marking their register uses. llvm-svn: 117193
* Verify LiveIntervals against the CFG, ensuring that live-in values are live-outJakob Stoklund Olesen2010-10-231-1/+77
| | | | | | of all predecessors. llvm-svn: 117191
* Nonvirtual dtor that was accessible enough to be bad.Andrew Trick2010-10-221-0/+2
| | | | llvm-svn: 117180
* This is a prototype of an experimental register allocationAndrew Trick2010-10-226-1/+801
| | | | | | | | | | | | | | | | framework. It's purpose is not to improve register allocation per se, but to make it easier to develop powerful live range splitting. I call it the basic allocator because it is as simple as a global allocator can be but provides the building blocks for sophisticated register allocation with live range splitting. A minimal implementation is provided that trivially spills whenever it runs out of registers. I'm checking in now to get high-level design and style feedback. I've only done minimal testing. The next step is implementing a "greedy" allocation algorithm that does some register reassignment and makes better splitting decisions. llvm-svn: 117174
* Add more verification of LiveIntervals.Jakob Stoklund Olesen2010-10-221-0/+29
| | | | llvm-svn: 117170
* Be more strict about detecting multi-use blocks for isolation.Jakob Stoklund Olesen2010-10-221-28/+29
| | | | | | | | | | | When a block has exactly two uses and the register is both live-in and live-out, don't isolate the block. We would be inserting two copies, so we haven't really made any progress. If the live-in and live-out values separate into disconnected components after splitting, we would be making progress. We can't detect that for now. llvm-svn: 117169
* Unbreak build.Evan Cheng2010-10-222-10/+11
| | | | llvm-svn: 117155
* Transfer implicit ops when forming load multiple and return instructions.Evan Cheng2010-10-221-1/+1
| | | | llvm-svn: 117151
* Be more strict when detecting critical edges before loop splitting.Jakob Stoklund Olesen2010-10-221-19/+15
| | | | | | | | An exit block with a critical edge must only have predecessors in the loop, or just before the loop. This guarantees that the inserted copies in the loop predecessors dominate the exit block. llvm-svn: 117144
* Add print methodsJakob Stoklund Olesen2010-10-222-18/+32
| | | | llvm-svn: 117143
* X86: Base _fltused on the FunctionType of the called value instead of the ↵Michael J. Spencer2010-10-211-19/+20
| | | | | | | | potentially null "CalledFunction". Thanks Duncan! This is needed for indirect calls. llvm-svn: 117061
* Don't include the destination interval in the union when computingJakob Stoklund Olesen2010-10-211-2/+4
| | | | | | Parent - union(Y, ...). Doh. llvm-svn: 117042
* Permit landing pad successor blocks when verifying basic blocks that end in anJakob Stoklund Olesen2010-10-211-5/+13
| | | | | | unconditional branch. llvm-svn: 117041
* The variable liTRC is not used for anything useful, zap itDuncan Sands2010-10-211-5/+0
| | | | | | (gcc-4.6 warning). llvm-svn: 117022
* Remove some variables that are never really usedDuncan Sands2010-10-211-1/+0
| | | | | | (gcc-4.6 warns about these). llvm-svn: 117021
* CodeGen-Windows: Only emit _fltused if a VarArg function is called with ↵Michael J. Spencer2010-10-212-6/+6
| | | | | | | | floating point args. This should be the minimum set of functions that could possibly need it. llvm-svn: 116978
* Remember to keep track of rematted values.Jakob Stoklund Olesen2010-10-201-0/+1
| | | | llvm-svn: 116962
OpenPOWER on IntegriCloud