summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix emergency spilling in LiveIntervals::spillPhysRegAroundRegDefsUses.Jakob Stoklund Olesen2010-11-161-22/+23
| | | | | | | | | | | | | | Always spill the full representative register at any point where any subregister is live. This fixes PR8620 which caused the old logic to get confused and not spill anything at all. The fundamental problem here is that the coalescer is too aggressive about physical register coalescing. It sometimes makes it impossible to allocate registers without these emergency spills. llvm-svn: 119375
* Print out the register class of the current interval.Jakob Stoklund Olesen2010-11-161-2/+3
| | | | llvm-svn: 119374
* Make the verifier a little quieter on instructions that it's probablyEric Christopher2010-11-161-1/+3
| | | | | | (and likely) wrong about anyhow. llvm-svn: 119320
* Remember to resize SpillSlotToUsesMap when allocating an emergency spill slot.Jakob Stoklund Olesen2010-11-162-19/+19
| | | | | | | | | Use amazing new function call technology instead of writing identical code in multiple places. This fixes PR8604. llvm-svn: 119306
* Fix PR8612 in the standard spiller, take two.Jakob Stoklund Olesen2010-11-161-1/+8
| | | | | | | | | | The live range of a register defined by an early clobber starts at the use slot, not the def slot. Except when it is an early clobber tied to a use operand. Then it starts at the def slot like a standard def. llvm-svn: 119305
* Revert "Fix PR8612 in the standard spiller as well."Jakob Stoklund Olesen2010-11-151-5/+1
| | | | | | This reverts r119183 which borke the buildbots. llvm-svn: 119270
* Code clean up. The peephole pass should be the one updating the instructionEvan Cheng2010-11-151-17/+15
| | | | | | iterator, not TII->OptimizeCompareInstr. llvm-svn: 119186
* Fix PR8612 in the standard spiller as well.Jakob Stoklund Olesen2010-11-151-1/+5
| | | | | | | The live range of a register defined by an early clobber starts at the use slot, not the def slot. llvm-svn: 119183
* When spilling a register defined by an early clobber, make sure that the newJakob Stoklund Olesen2010-11-151-0/+6
| | | | | | | | | | | | | live ranges for the spill register are also defined at the use slot instead of the normal def slot. This fixes PR8612 for the inline spiller. A use was being allocated to the same register as a spilled early clobber def. This problem exists in all the spillers. A fix for the standard spiller is forthcoming. llvm-svn: 119182
* First step of huge frame-related refactoring: move emit{Prologue,Epilogue} ↵Anton Korobeynikov2010-11-151-4/+4
| | | | | | out of TargetRegisterInfo to TargetFrameInfo, which is definitely much better suitable place llvm-svn: 119097
* move the pic base symbol stuff up to MachineFunctionChris Lattner2010-11-141-0/+7
| | | | | | | since it is trivial and will be shared between ppc and x86. This substantially simplifies the X86 backend also. llvm-svn: 119089
* Remove DW_AT_start_scope support. It is incomplete and superseeded by ↵Devang Patel2010-11-122-40/+9
| | | | | | location entries support. llvm-svn: 118940
* typo (4th checkin for one fix)Andrew Trick2010-11-121-1/+1
| | | | llvm-svn: 118913
* Fixes PR8287: SD scheduling time. The fix is a failsafe that preventsAndrew Trick2010-11-121-13/+53
| | | | | | | | | catastrophic compilation time in the event of unreasonable LLVM IR. Code quality is a separate issue--someone upstream needs to do a better job of reducing to llvm.memcpy. If the situation can be reproduced with any supported frontend, then it will be a separate bug. llvm-svn: 118904
* tidy up.Chris Lattner2010-11-121-7/+5
| | | | llvm-svn: 118896
* Fix some style issues in PBQP. Patch by David Blaikie.Lang Hames2010-11-121-20/+25
| | | | llvm-svn: 118883
* Add a FIXME comment.Dan Gohman2010-11-111-0/+2
| | | | llvm-svn: 118803
* Check TRI->getReservedRegs because other allocators do it. Even thoughAndrew Trick2010-11-113-37/+57
| | | | | | | | it makes no sense for allocation_order iterators to visit reserved regs. The inline spiller depends on AliasAnalysis. Manage the Query state to avoid uninitialized or stale results. llvm-svn: 118800
* Remove the memmove->memcpy optimization from CodeGen. MemCpyOpt does this.Dan Gohman2010-11-111-14/+0
| | | | llvm-svn: 118789
* Delete SplittingSpiller. It was not being used by anyone, and it is beingJakob Stoklund Olesen2010-11-111-286/+1
| | | | | | superceded by SplitKit. llvm-svn: 118754
* Insert two blank SlotIndexes between basic blocks instead of just one.Jakob Stoklund Olesen2010-11-111-2/+6
| | | | | | | | | | | | | | | | | This is the first small step towards using closed intervals for liveness instead of the half-open intervals we're using now. We want to be able to distinguish between a SlotIndex that represents a variable being live-out of a basic block, and an index representing a variable live-in to its successor. That requires two separate indexes between blocks. One for live-outs and one for live-ins. With this change, getMBBEndIdx(MBB).getPrevSlot() becomes stable so it stays greater than any instructions inserted at the end of MBB. llvm-svn: 118747
* No need to add liveness that's already there.Jakob Stoklund Olesen2010-11-101-4/+1
| | | | llvm-svn: 118742
* Hook up AliasAnalysis in InlineSpiller. This is used for rematerializingJakob Stoklund Olesen2010-11-102-1/+8
| | | | | | constant loads. llvm-svn: 118741
* Take care of special characters while creating named MDNode name to hold ↵Devang Patel2010-11-101-10/+4
| | | | | | | | function specific local variable's info. This fixes radar 8653152. I am checking in testcase as a separate check-in. llvm-svn: 118726
* Basic rematerialization during splitting.Jakob Stoklund Olesen2010-11-102-38/+66
| | | | | | | | | | | Whenever splitting wants to insert a copy, it checks if the value can be rematerialized cheaply instead. Missing features: - Delete instructions when all uses have been rematerialized. - Truncate live ranges to the remaining uses after rematerialization. llvm-svn: 118702
* RABasic is nearly functionally complete. There are a few remainingAndrew Trick2010-11-108-87/+225
| | | | | | | | | benchmarks hitting an assertion. Adds LiveIntervalUnion::collectInterferingVRegs. Fixes "late spilling" by checking for any unspillable live vregs among all physReg aliases. llvm-svn: 118701
* Simplify the LiveRangeEdit::canRematerializeAt() interface a bit.Jakob Stoklund Olesen2010-11-103-27/+19
| | | | llvm-svn: 118661
* Fixed version of 118639 with an extra assert to catch similar problemsRafael Espindola2010-11-091-1/+1
| | | | | | earlier. Implicit bool -> int conversions are evil! llvm-svn: 118651
* Adds RABasic verification and tracing.Andrew Trick2010-11-094-16/+158
| | | | | | (retry now that the windows build is green) llvm-svn: 118630
* Add a trivial virtual dtor to AbstractRegisterDescription to appeaseMatt Beaumont-Gay2010-11-091-0/+11
| | | | | | -Wnon-virtual-dtor. llvm-svn: 118616
* Reverting r118604. Windows build broke.Andrew Trick2010-11-094-165/+14
| | | | llvm-svn: 118613
* Adds RABasic verification and tracing.Andrew Trick2010-11-094-14/+165
| | | | llvm-svn: 118604
* Fix DAGCombiner to avoid folding a sext-in-reg or similar through a shlDan Gohman2010-11-091-0/+1
| | | | | | in order to fold it into a load. llvm-svn: 118471
* Fix an inline asm pasto from 117667; was preventingDale Johannesen2010-11-091-1/+2
| | | | | | {i64, i64} from matching i128. llvm-svn: 118465
* Adds support for spilling previously allocated live intervals toAndrew Trick2010-11-084-88/+207
| | | | | | | | | handle cases in which a register is unavailable for spill code. Adds LiveIntervalUnion::extract. While processing interferences on a live virtual register, reuses the same Query object for each physcial reg. llvm-svn: 118423
* Add registry hook for assembly text outputChe-Liang Chiou2010-11-081-4/+5
| | | | llvm-svn: 118394
* Prune includes.Benjamin Kramer2010-11-063-7/+7
| | | | llvm-svn: 118342
* When passing a parameter using the 'byval' mechanism, inline code needs to ↵Duncan Sands2010-11-051-0/+2
| | | | | | | | | | | | | be used to perform the copy, which may be of lots of memory [*]. It would be good if the fall-back code generated something reasonable, i.e. did the copy in a loop, rather than vast numbers of loads and stores. Add a note about this. Currently target specific code seems to always kick in so this is more of a theoretical issue rather than a practical one now that X86 has been fixed. [*] It's amazing how often people pass mega-byte long arrays by copy... llvm-svn: 118275
* Add 118023 back, but with proper spelling for .uleb128/.sleb128.Rafael Espindola2010-11-041-7/+6
| | | | llvm-svn: 118254
* Revert previous patch. Some targets don't support uleb and sayRafael Espindola2010-11-041-6/+7
| | | | | | they do :-( llvm-svn: 118250
* MCize.Rafael Espindola2010-11-041-7/+6
| | | | llvm-svn: 118249
* In the calling convention logic, ValVT is always a legal type,Duncan Sands2010-11-041-1/+1
| | | | | | | and as such can be represented by an MVT - the more complicated EVT is not needed. Use MVT for ValVT everywhere. llvm-svn: 118245
* Disable fancy splitting during spilling unless -extra-spiller-splits is given.Jakob Stoklund Olesen2010-11-041-8/+18
| | | | | | | | This way, InlineSpiller does the same amount of splitting as the standard spiller. Splitting should really be guided by the register allocator, and doesn't belong in the spiller at all. llvm-svn: 118216
* Just return undef for invalid masks or elts, and since we're doing that,Eric Christopher2010-11-031-5/+6
| | | | | | just do it earlier too. llvm-svn: 118195
* Let RegAllocBasic require MachineDominators - they are already available andJakob Stoklund Olesen2010-11-031-0/+3
| | | | | | splitting needs them. llvm-svn: 118194
* Tag debug output as regallocJakob Stoklund Olesen2010-11-032-2/+2
| | | | llvm-svn: 118193
* Simplify uses of MVT and EVT. An MVT can be compared directlyDuncan Sands2010-11-032-7/+5
| | | | | | | with a SimpleValueType, while an EVT supports equality and inequality comparisons with SimpleValueType. llvm-svn: 118169
* Inside the calling convention logic LocVT is always a simpleDuncan Sands2010-11-032-18/+18
| | | | | | | | | | value type, so there is no point in passing it around using an EVT. Use the simpler MVT everywhere. Rather than trying to propagate this information maximally in all the code that using the calling convention stuff, I chose to do a mainly low impact change instead. llvm-svn: 118167
* If we have an undef mask our Elt will be -1 for our access, handleEric Christopher2010-11-031-3/+7
| | | | | | | | this by using an undef as a pointer. Fixes rdar://8625016 llvm-svn: 118164
* Fix DAGCombiner to avoid going into an infinite loop when itDan Gohman2010-11-031-1/+36
| | | | | | | encounters (and:i64 (shl:i64 (load:i64), 1), 0xffffffff). This fixes rdar://8606584. llvm-svn: 118143
OpenPOWER on IntegriCloud