- May 24, 2012
-
-
Bill Wendling authored
llvm-svn: 157348
-
- May 23, 2012
-
-
Jakob Stoklund Olesen authored
Now that the coalescer keeps live intervals and machine code in sync at all times, it needs to deal with identity copies differently. When merging two virtual registers, all identity copies are removed right away. This means that other identity copies must come from somewhere else, and they are going to have a value number. Deal with such copies by merging the value numbers before erasing the copy instruction. Otherwise, we leave dangling value numbers in the live interval. This fixes PR12927. llvm-svn: 157340
-
Patrik Hägglund authored
llvm-svn: 157319
-
Eric Christopher authored
Part of rdar://11496790 llvm-svn: 157303
-
- May 22, 2012
-
-
Eric Christopher authored
llvm-svn: 157274
-
Eric Christopher authored
llvm-svn: 157273
-
Jakob Stoklund Olesen authored
Also make sure registers aren't erased twice if the dead def mentions the register twice. This fixes PR12911. llvm-svn: 157254
-
Owen Anderson authored
Fix use of an unitialized value in the LegalizeOps expansion for ISD::SUB. No in-tree targets exercise this path. Patch by Micah Villmow. llvm-svn: 157215
-
- May 21, 2012
-
-
Chad Rosier authored
llvm-svn: 157195
-
Jakob Stoklund Olesen authored
This helps compile time when the greedy register allocator splits live ranges in giant functions. Without the bias, we would try to grow regions through the giant edge bundles, usually to find out that the region became too big and expensive. If a live range has many uses in blocks near the giant bundle, the small negative bias doesn't make a big difference, and we still consider regions including the giant edge bundle. Giant edge bundles are usually connected to landing pads or indirect branches. llvm-svn: 157174
-
- May 20, 2012
-
-
Jakob Stoklund Olesen authored
With physreg joining out of the way, it is easy to recognize the instructions that need their kill flags cleared while testing for interference. This allows us to skip the final scan of all instructions for an 11% speedup of the coalescer pass. llvm-svn: 157169
-
Jakob Stoklund Olesen authored
It can be necessary to restrict to a sub-class before accessing sub-registers. llvm-svn: 157164
-
Jakob Stoklund Olesen authored
When rewriting operands, make sure the new registers have a compatible register class. llvm-svn: 157163
-
Peter Collingbourne authored
may be RAUW'd by the recursive call to LegalizeOps; instead, retrieve the other operands when calling UpdateNodeOperands. Fixes PR12889. llvm-svn: 157162
-
Benjamin Kramer authored
Found by valgrind. llvm-svn: 157160
-
Benjamin Kramer authored
llvm-svn: 157155
-
Jakob Stoklund Olesen authored
Not all GR64 registers have sub_8bit sub-registers. llvm-svn: 157150
-
Jakob Stoklund Olesen authored
X86 has 2-addr instructions with different constraints on the tied def and use operands. One is GR32, one is GR32_NOSP. llvm-svn: 157149
-
Jakob Stoklund Olesen authored
llvm-svn: 157148
-
Jakob Stoklund Olesen authored
This function adds copies to be erased to DupCopies, avoid also adding them to DeadCopies. llvm-svn: 157147
-
Jakob Stoklund Olesen authored
Avoid looking at the operands of a potentially erased instruction. llvm-svn: 157146
-
Jakob Stoklund Olesen authored
llvm-svn: 157145
-
Jakob Stoklund Olesen authored
llvm-svn: 157144
-
Jakob Stoklund Olesen authored
That struct ought to be a LiveInterval implementation detail. llvm-svn: 157143
-
Jakob Stoklund Olesen authored
llvm-svn: 157142
-
Jakob Stoklund Olesen authored
llvm-svn: 157137
-
Jakob Stoklund Olesen authored
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
-
- May 19, 2012
-
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
There is no reason to defer the collection of virtual registers whose register class may be replaced with a larger class. llvm-svn: 157125
-
Jakob Stoklund Olesen authored
This will remove the original def once it has no more uses. llvm-svn: 157104
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
There is no need for these instructions to stick around since they are known to be not dead. llvm-svn: 157102
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
The dead code elimination with callbacks is still useful. llvm-svn: 157100
-
Jakob Stoklund Olesen authored
No functional change. llvm-svn: 157079
-
- May 18, 2012
-
-
Jakob Stoklund Olesen authored
This will make it possible to filter out erased instructions later. llvm-svn: 157073
-
Jim Grosbach authored
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
-
Eric Christopher authored
llvm-svn: 157060
-