summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify overlap check.Jakob Stoklund Olesen2012-05-191-8/+1
| | | | llvm-svn: 157137
* Fix 12892.Jakob Stoklund Olesen2012-05-193-4/+146
| | | | | | | | | | | | Dead code elimination during coalescing could cause a virtual register to be split into connected components. The following rewriting would be confused about the already joined copies present in the code, but without a corresponding value number in the live range. Erase all joined copies instantly when joining intervals such that the MI and LiveInterval representations are always in sync. llvm-svn: 157135
* Do not eliminate allocas whose alignment exceeds that of thePeter Collingbourne2012-05-192-12/+71
| | | | | | | copied-in constant, as a subsequent user may rely on over alignment. Fixes PR12885. llvm-svn: 157134
* Add a FIXME about access to negative stack-pointer offsets on PPC32.Hal Finkel2012-05-191-0/+2
| | | | | | | | | | | | | | The current code will generate a prologue which starts with something like: mflr 0 stw 31, -4(1) stw 0, 4(1) stwu 1, -16(1) But under the PPC32 SVR4 ABI, access to negative offsets from R1 is not allowed. This was pointed out by Peter Bergner. llvm-svn: 157133
* Remove the late DCE in RegisterCoalescer.Jakob Stoklund Olesen2012-05-191-145/+2
| | | | | | | | | | | Dead code and joined copies are now eliminated on the fly, and there is no need for a post pass. This makes the coalescer work like other modern register allocator passes: Code is changed on the fly, there is no pending list of changes to be committed. llvm-svn: 157132
* Erase joined copies immediately.Jakob Stoklund Olesen2012-05-192-14/+16
| | | | | | | | | The late dead code elimination is no longer necessary. The test changes are cause by a register hint that can be either %rdi or %rax. The choice depends on the use list order, which this patch changes. llvm-svn: 157131
* Fix an ancient bug in removeCopyByCommutingDef().Jakob Stoklund Olesen2012-05-191-2/+5
| | | | | | | | | | | | | | | Before rewriting uses of one value in A to register B, check that there are no tied uses. That would require multiple A values to be rewritten. This bug can't bite in the current version of the code for a fairly subtle reason: A tied use would have caused 2-addr to insert a copy before the use. If the copy has been coalesced, it will be found by the same loop changed by this patch, and the optimization is aborted. This was exposed by 400.perlbench and lua after applying a patch that deletes joined copies aggressively. llvm-svn: 157130
* On Haswell, perfer storing YMM registers using a single instruction.Nadav Rotem2012-05-192-5/+18
| | | | llvm-svn: 157129
* Add support for additional in-reg vbroadcast patternsNadav Rotem2012-05-192-3/+46
| | | | llvm-svn: 157127
* Disambiguate call to operator==.Benjamin Kramer2012-05-191-1/+1
| | | | | | clang++ and msvc happily had no problem with it but g++ refuses to compile. llvm-svn: 157126
* Collect inflatable virtual registers on the fly.Jakob Stoklund Olesen2012-05-191-16/+11
| | | | | | | There is no reason to defer the collection of virtual registers whose register class may be replaced with a larger class. llvm-svn: 157125
* ValueMap: Use DenseMap's find_as mechanism to reduce use list churn.Benjamin Kramer2012-05-191-5/+17
| | | | | | Otherwise just looking up a value in the map requires creating a VH, adding it to the use lists and destroying it again. llvm-svn: 157124
* Move CallbackVHs dtor inline, it can be devirtualized in many cases. Move ↵Benjamin Kramer2012-05-192-8/+9
| | | | | | the other virtual methods out of line as they are only called from within Value.cpp anyway. llvm-svn: 157123
* Tidy up some spacing and inconsistent use of pre/post increment. No ↵Craig Topper2012-05-192-28/+28
| | | | | | functional change intended. llvm-svn: 157122
* Remove extra semicolons.Benjamin Kramer2012-05-191-15/+15
| | | | llvm-svn: 157118
* Provide move semantics for TinyPtrVector and for DenseMap's rehash function.Benjamin Kramer2012-05-192-2/+13
| | | | | | This makes DenseMap<..., TinyPtrVector<...>> as cheap as it always should've been! llvm-svn: 157113
* Ordinary PR1255 patch: DifferenceEngine and CPPBackend adopted to the new ↵Stepan Dyatkovskiy2012-05-192-5/+5
| | | | | | SwitchInst methods. llvm-svn: 157112
* Copy some AVX support from MCJIT to JIT. Maybe will fix PR12748.Craig Topper2012-05-191-17/+29
| | | | llvm-svn: 157109
* Eliminate dead code after remat.Jakob Stoklund Olesen2012-05-191-1/+3
| | | | | | This will remove the original def once it has no more uses. llvm-svn: 157104
* Don't remat during updateRegDefsUses().Jakob Stoklund Olesen2012-05-191-22/+5
| | | | | | | | | | | Remaining virtreg->physreg copies were rematerialized during updateRegDefsUses(), but we already do the same thing in joinCopy() when visiting the physreg copy instruction. Eliminate the preserveSrcInt argument to reMaterializeTrivialDef(). It is now always true. llvm-svn: 157103
* Immediately erase trivially useless copies.Jakob Stoklund Olesen2012-05-191-2/+4
| | | | | | | There is no need for these instructions to stick around since they are known to be not dead. llvm-svn: 157102
* Run proper recursive dead code elimination during coalescing.Jakob Stoklund Olesen2012-05-192-21/+63
| | | | | | | | | | | | | | | Dead copies cause problems because they are trivial to coalesce, but removing them gived the live range a dangling end point. This patch enables full dead code elimination which trims live ranges to their uses so end points don't dangle. DCE may erase multiple instructions. Put the pointers in an ErasedInstrs set so we never risk visiting erased instructions in the work list. There isn't supposed to be any dead copies entering RegisterCoalescer, but they do slip by as evidenced by test/CodeGen/X86/coalescer-dce.ll. llvm-svn: 157101
* Allow LiveRangeEdit to be created with a NULL parent.Jakob Stoklund Olesen2012-05-195-13/+16
| | | | | | The dead code elimination with callbacks is still useful. llvm-svn: 157100
* Actually support DW_TAG_rvalue_reference_type that we were tryingEric Christopher2012-05-194-11/+56
| | | | | | | | to generate out of the front end. rdar://11479676 llvm-svn: 157094
* Add support for the 'd' mips inline asm output modifier.Eric Christopher2012-05-192-12/+23
| | | | | | Patch by Jack Carter. llvm-svn: 157093
* SCEV: Add MarkPendingLoopPredicates to avoid recursive isImpliedCond.Andrew Trick2012-05-193-1/+58
| | | | | | | | | | getUDivExpr attempts to simplify by checking for overflow. isLoopEntryGuardedByCond then evaluates the loop predicate which may lead to the same getUDivExpr causing endless recursion. Fixes PR12868: clang 3.2 segmentation fault. llvm-svn: 157092
* Fix replacing all the users of objc weak runtime routinesDan Gohman2012-05-182-2/+58
| | | | | | when deleting them. rdar://11434915. llvm-svn: 157080
* Modernize naming convention for class members.Jakob Stoklund Olesen2012-05-182-45/+45
| | | | | | No functional change. llvm-svn: 157079
* Move all work list processing to copyCoalesceWorkList().Jakob Stoklund Olesen2012-05-181-39/+42
| | | | | | This will make it possible to filter out erased instructions later. llvm-svn: 157073
* allow LazyValueInfo::getEdgeValue() to reason about multiple edges from the ↵Nuno Lopes2012-05-182-11/+34
| | | | | | same switch instruction by doing union of ranges (which may still be conservative, but it's more aggressive than before) llvm-svn: 157071
* Refactor data-in-code annotations.Jim Grosbach2012-05-1828-215/+411
| | | | | | | | | | | | | | | | | | | | | | Use a dedicated MachO load command to annotate data-in-code regions. This is the same format the linker produces for final executable images, allowing consistency of representation and use of introspection tools for both object and executable files. Data-in-code regions are annotated via ".data_region"/".end_data_region" directive pairs, with an optional region type. data_region_directive := ".data_region" { region_type } region_type := "jt8" | "jt16" | "jt32" | "jta32" end_data_region_directive := ".end_data_region" The previous handling of ARM-style "$d.*" labels was broken and has been removed. Specifically, it didn't handle ARM vs. Thumb mode when marking the end of the section. rdar://11459456 llvm-svn: 157062
* fix warnings when compiling with -WshadowNick Kledzik2012-05-183-5/+5
| | | | llvm-svn: 157061
* Remove duplicate code that we could just fallthrough to.Eric Christopher2012-05-181-1/+0
| | | | llvm-svn: 157060
* Simplify RegisterCoalescer::copyCoalesceInMBB().Jakob Stoklund Olesen2012-05-181-48/+15
| | | | | | | | | It is no longer necessary to separate VirtCopies, PhysCopies, and ImpDefCopies. Implicitly defined copies are extremely rare after we added the ProcessImplicitDefs pass, and physical register copies are not joined any longer. llvm-svn: 157059
* add test case for bugfix in r157032Nuno Lopes2012-05-181-0/+29
| | | | llvm-svn: 157058
* Add support for the mips 'x' inline asm modifier.Eric Christopher2012-05-182-0/+11
| | | | | | Patch by Jack Carter. llvm-svn: 157057
* Remove support for PhysReg joining.Jakob Stoklund Olesen2012-05-181-136/+14
| | | | | | | | | | | | | | | | | | | | | | | | This has been disabled for a while, and it is not a feature we want to support. Copies between physical and virtual registers are eliminated by good hinting support in the register allocator. Joining virtual and physical registers is really a form of register allocation, and the coalescer is not properly equipped to do that. In particular, it cannot backtrack coalescing decisions, and sometimes that would cause it to create programs that were impossible to register allocate, by exhausting a small register class. It was also very difficult to keep track of the live ranges of aliasing registers when extending the live range of a physreg. By disabling physreg joining, we can let fixed physreg live ranges remain constant throughout the register allocator super-pass. One type of physreg joining remains: A virtual register that has a single value which is a copy of a reserved register can be merged into the reserved physreg. This always lowers register pressure, and since we don't compute live ranges for reserved registers, there are no problems with aliases. llvm-svn: 157055
* FileCheck-ify, apropos of nothingJoel Jones2012-05-181-4/+4
| | | | llvm-svn: 157051
* Recommited reworked r156804:Stepan Dyatkovskiy2012-05-182-53/+29
| | | | | | SelectionDAGBuilder::Clusterify : main functinality was replaced with CRSBuilder::optimize, so big part of Clusterify's code was reduced. llvm-svn: 157046
* Simplify code a bit. No functional change intended.Craig Topper2012-05-181-14/+8
| | | | llvm-svn: 157044
* Simplify handling of v16i8 shuffles and fix a missed optimization.Craig Topper2012-05-183-35/+14
| | | | llvm-svn: 157043
* Teach two-address pass to update the "source" map so it doesn't perform aEvan Cheng2012-05-182-1/+23
| | | | | | | | | non-profitable commute using outdated info. The test case would still fail because of poor pre-RA schedule. That will be fixed by MI scheduler. rdar://11472010 llvm-svn: 157038
* Temporarily disabled the MCJIT tests for Darwin, because the ↵Danil Malyshev2012-05-181-1/+1
| | | | | | RuntimeDyldMachO has a problems with relocations for 32bit x86. llvm-svn: 157035
* Clarify comment.Eric Christopher2012-05-181-1/+1
| | | | llvm-svn: 157033
* fix corner case in ConstantRange::intersectWith().Nuno Lopes2012-05-182-1/+6
| | | | | | this fixes the missed optimization I was seeing in the CorrelatedValuePropagation pass llvm-svn: 157032
* Fixed a bug in llvm-objdump when disassembling using -macho option for a binaryKevin Enderby2012-05-182-2/+34
| | | | | | containing no symbols. Fixed the crash and fixed it not disassembling anything. llvm-svn: 157031
* Remove a test that was only testing for physreg joining.Jakob Stoklund Olesen2012-05-181-12/+1
| | | | | | | | | | This is the same as the other tests: Clever tricks are required to make the arguments and return value line up in a single-instruction function. It rarely happens in real life. We have plenty other examples of this behavior. llvm-svn: 157030
* Remove -join-physregs from the test suite.Jakob Stoklund Olesen2012-05-1717-232/+227
| | | | | | | | | | | | | | This option has been disabled for a while, and it is going away so I can clean up the coalescer code. The tests that required physreg joining to be enabled were almost all of the form "tiny function with interference between arguments and return value". Such functions are usually inlined in the real world. The problem exposed by phys_subreg_coalesce-3.ll is real, but fairly rare. llvm-svn: 157027
* minor simplification in the call to ConstantRange constructorNuno Lopes2012-05-171-1/+1
| | | | llvm-svn: 157024
* commentsAndrew Trick2012-05-171-2/+3
| | | | llvm-svn: 157020
OpenPOWER on IntegriCloud