aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Add basic verification of LiveIntervals.Jakob Stoklund Olesen2010-08-051-0/+59
| | | | | | | | | | | | | | We verify that the LiveInterval is live at uses and defs, and that all instructions have a SlotIndex. Stuff we don't check yet: - Is the LiveInterval minimal? - Do all defs correspond to instructions or phis? - Do all defs dominate all their live ranges? - Are all live ranges continually reachable from their def? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110386 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove double-def checking from MachineVerifier, so a register does not have toJakob Stoklund Olesen2010-08-052-89/+18
| | | | | | | | | | be killed before being redefined. These checks are usually disabled, and usually fail when enabled. We de facto allow live registers to be redefined without a kill, the corresponding assertions in RegScavenger were removed long ago. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110362 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid using a live std::multimap iterator while editing the map. It looks likeJakob Stoklund Olesen2010-08-051-7/+13
| | | | | | | we sometimes compare singular iterators, reported by ENABLE_EXPENSIVE_CHECKS. This fixes PR7825. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110355 91177308-0d34-0410-b5e6-96231b3b80d8
* The lower invoke pass needs to have unreachable code elimination run after itBill Wendling2010-08-041-2/+4
| | | | | | | because it could create such things. This fixes a MingW buildbot test failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110279 91177308-0d34-0410-b5e6-96231b3b80d8
* Coalesce stack slot accesses that arise when spilling both sides of a COPY.Jakob Stoklund Olesen2010-08-041-0/+23
| | | | | | | | | This helps avoid silly code: %R0<def = LOAD <fi#5> STORE <fi#5>, %R0<kill> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110266 91177308-0d34-0410-b5e6-96231b3b80d8
* Checkpoint SplitKit progress.Jakob Stoklund Olesen2010-08-043-86/+223
| | | | | | | We are now at a point where we can split around simple single-entry, single-exit loops, although still with some bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110257 91177308-0d34-0410-b5e6-96231b3b80d8
* Use location entry only of the location described by DBG_VALUE is valid.Devang Patel2010-08-041-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110255 91177308-0d34-0410-b5e6-96231b3b80d8
* The EH prepare passes really want to be the last passes run before code-gen.Bill Wendling2010-08-041-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110248 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment.Devang Patel2010-08-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110244 91177308-0d34-0410-b5e6-96231b3b80d8
* Change this llvm_unreachable to report_fatal_error, since it canDan Gohman2010-08-041-4/+11
| | | | | | | be triggered by valid, if dubious, IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110240 91177308-0d34-0410-b5e6-96231b3b80d8
* While spilling live registers at the end of block check whether they are ↵Devang Patel2010-08-041-1/+24
| | | | | | used by DBG_VALUE machine instructions or not. If a spilled register is used by DBG_VALUE machine instruction then insert a new DBG_VALUE machine instruction to encode variable's new location on stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110235 91177308-0d34-0410-b5e6-96231b3b80d8
* If a variable is spilled by code generator then use DW_OP_fbreg to describe ↵Devang Patel2010-08-041-10/+35
| | | | | | its location on stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110234 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate unnecessary empty string literals.Dan Gohman2010-08-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110183 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops. Don't normalize spill weights twice.Jakob Stoklund Olesen2010-08-031-1/+0
| | | | | | | | | When the normalizeSpillWeights function was introduced, I forgot to remove this normalization. This change could affect register allocation. Hopefully for the better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110119 91177308-0d34-0410-b5e6-96231b3b80d8
* Early exit and reduce indentation. No functionality change.Bill Wendling2010-08-021-105/+106
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110069 91177308-0d34-0410-b5e6-96231b3b80d8
* Free DbgScope created for dead functions.Devang Patel2010-08-021-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110045 91177308-0d34-0410-b5e6-96231b3b80d8
* Prefix `next' iterator operation with `llvm::'.Oscar Fuentes2010-08-023-7/+7
| | | | | | | | | Fixes potential ambiguity problems on VS 2010. Patch by nobled! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110029 91177308-0d34-0410-b5e6-96231b3b80d8
* PR7586: Make sure we don't claim that unknown bits are actually known in theEli Friedman2010-08-021-3/+2
| | | | | | | | ISD::AND case of TargetLowering::SimplifyDemandedBits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110019 91177308-0d34-0410-b5e6-96231b3b80d8
* Reference the personalities. Don't copy them into a new vector.Bill Wendling2010-08-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109966 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for bug reported by Evzen Muller on llvm-commits: make sure to correctlyEli Friedman2010-07-301-6/+3
| | | | | | | | | check the range of the constant when optimizing a comparison between a constant and a sign_extend_inreg node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109854 91177308-0d34-0410-b5e6-96231b3b80d8
* Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ↵Benjamin Kramer2010-07-291-4/+0
| | | | | | ownership of the TargetAsmBackend and the MCCodeEmitter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109767 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment typo.Dale Johannesen2010-07-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109765 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in the -regalloc=fast handling of exotic two-address instruction withJakob Stoklund Olesen2010-07-291-3/+11
| | | | | | | | | | | | | | | | | multiple defs, like t2LDRSB_POST. The first def could accidentally steal the physreg that the second, tied def was required to be allocated to. Now, the tied use-def is treated more like an early clobber, and the physreg is reserved before allocating the other defs. This would never be a problem when the tied def was the only def which is the usual case. This fixes MallocBench/gs for thumb2 -O0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109715 91177308-0d34-0410-b5e6-96231b3b80d8
* Print out the regclass of any virtual registers used by a machine instruction.Jakob Stoklund Olesen2010-07-281-0/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109608 91177308-0d34-0410-b5e6-96231b3b80d8
* It is FE's responsibility to emit proper directory name.Devang Patel2010-07-271-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109538 91177308-0d34-0410-b5e6-96231b3b80d8
* GrammarJim Grosbach2010-07-271-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109525 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a crash in the dag combiner caused by ↵Nate Begeman2010-07-271-2/+10
| | | | | | | | | ConstantFoldBIT_CONVERTofBUILD_VECTOR calling itself recursively and returning a SCALAR_TO_VECTOR node, but assuming the input was always a BUILD_VECTOR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109519 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 columnJim Grosbach2010-07-271-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109513 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typoJim Grosbach2010-07-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109511 91177308-0d34-0410-b5e6-96231b3b80d8
* It's better to have the arrays, which would trigger the creation of stackBill Wendling2010-07-273-3/+33
| | | | | | | | | | protectors, to be near the stack protectors on the stack. Accomplish this by tagging the stack object with a predicate that indicates that it would trigger this. In the prolog-epilog inserter, assign these objects to the stack after the stack protector but before the other objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109481 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SplitEditor to SplitKit. This class will be used to edit live intervals andJakob Stoklund Olesen2010-07-264-10/+305
| | | | | | | | rewrite instructions for live range splitting. Still work in progress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109469 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a use-after-free.Dan Gohman2010-07-261-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109468 91177308-0d34-0410-b5e6-96231b3b80d8
* Using llvm.eh.catch.all.value instead of .llvm.eh.catch.all.value.Bill Wendling2010-07-262-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109462 91177308-0d34-0410-b5e6-96231b3b80d8
* The "excess register pressure" returned by HighRegPressure() is not accurate ↵Evan Cheng2010-07-261-41/+20
| | | | | | enough to factor into scheduling priority. Eliminate it and add early exits to speed up scheduling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109449 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle Values with no value in getCopyFromRegs.Dan Gohman2010-07-261-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109415 91177308-0d34-0410-b5e6-96231b3b80d8
* A block dominates itself, by definition.Dan Gohman2010-07-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109402 91177308-0d34-0410-b5e6-96231b3b80d8
* Pacify gcc-4.5 which wrongly thinks that RExcess (passed as the Excess ↵Duncan Sands2010-07-261-1/+2
| | | | | | | | | parameter) may be used uninitialized in the callers of HighRegPressure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109393 91177308-0d34-0410-b5e6-96231b3b80d8
* Factored out a bit of common code to mark VNInfos for deletion.Lang Hames2010-07-261-40/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109388 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments.Evan Cheng2010-07-251-4/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109383 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix crashes when scheduling a CopyToReg node -- getMachineOpcode asserts onBob Wilson2010-07-251-2/+2
| | | | | | | those. Radar 8231572. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109367 91177308-0d34-0410-b5e6-96231b3b80d8
* Add hook to insert late LLVM=>LLVM passes just before iselAnton Korobeynikov2010-07-241-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109354 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ScheduleDAGInstrs::Defs and ::Uses to be variable-size vectorsBob Wilson2010-07-242-3/+4
| | | | | | | | instead of fixed size arrays, so that increasing FirstVirtualRegister to 16K won't cause a compile time performance regression. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109330 91177308-0d34-0410-b5e6-96231b3b80d8
* Use current working directory when Dirname is empty. This only happens when ↵Devang Patel2010-07-241-0/+5
| | | | | | absolute source file path is used on compiler command line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109302 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an ILP scheduler. This is a register pressure aware scheduler that'sEvan Cheng2010-07-242-12/+76
| | | | | | | | | | | | | appropriate for targets without detailed instruction iterineries. The scheduler schedules for increased instruction level parallelism in low register pressure situation; it schedules to reduce register pressure when the register pressure becomes high. On x86_64, this is a win for all tests in CFP2000. It also sped up 256.bzip2 by 16%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109300 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove too-strict assertion. We may want the vreg copy of the physical registerJim Grosbach2010-07-231-1/+0
| | | | | | | to be of a different register class. For example, in Thumb1 if the live-in is a high register, we want the vreg to be a low register. rdar://8224931 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109291 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r109262.Devang Patel2010-07-231-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109285 91177308-0d34-0410-b5e6-96231b3b80d8
* - Allow target to specify when is register pressure "too high". In most cases,Evan Cheng2010-07-231-56/+124
| | | | | | | | | | | | | | it's too late to start backing off aggressive latency scheduling when most of the registers are in use so the threshold should be a bit tighter. - Correctly handle live out's and extract_subreg etc. - Enable register pressure aware scheduling by default for hybrid scheduler. For ARM, this is almost always a win on # of instructions. It's runtime neutral for most of the tests. But for some kernels with high register pressure it can be a huge win. e.g. 464.h264ref reduced number of spills by 54 and sped up by 20%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109279 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the proper type for shift counts. This fixes a bootstrap error.Dan Gohman2010-07-231-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109265 91177308-0d34-0410-b5e6-96231b3b80d8
* IF directory name is empty then try to extract one using absolute file name.Devang Patel2010-07-231-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109262 91177308-0d34-0410-b5e6-96231b3b80d8
* DAGCombine (shl (anyext x, c)) to (anyext (shl x, c)) if the high bitsDan Gohman2010-07-231-1/+21
| | | | | | | are not demanded. This often allows the anyext to be folded away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109242 91177308-0d34-0410-b5e6-96231b3b80d8