- Sep 25, 2011
-
-
Jakob Stoklund Olesen authored
No functional change intended. llvm-svn: 140470
-
Jakob Stoklund Olesen authored
I'll fix the file contents in the next commit. This pass is currently expanding the COPY and SUBREG_TO_REG pseudos. I am going to add a hook so targets can expand more pseudo-instructions after register allocation. Many targets have pseudo-instructions that assist the register allocator. They can be expanded after register allocation, before PEI and PostRA scheduling. llvm-svn: 140469
-
- Sep 24, 2011
-
-
Nadav Rotem authored
Implement Duncan's suggestion to use the result of getSetCCResultType if it is legal (this is always the case for scalars), otherwise use the promoted result type. Fix test/CodeGen/X86/vsplit-and.ll when promote-elements is enabled. llvm-svn: 140464
-
Nadav Rotem authored
When generating the trunc-store of i1's, we need to use the vector type and not the scalar type. This patch fixes the assertion in CodeGen/Generic/bool-vector.ll when running with -promote-elements. llvm-svn: 140463
-
Jakob Stoklund Olesen authored
This exposes a -segmented-stacks bug. llvm-svn: 140429
-
Eli Friedman authored
PR10998: It is not legal to sink an instruction past the terminator of a block; make sure we don't do that. llvm-svn: 140428
-
- Sep 23, 2011
-
-
Duncan Sands authored
DecomposeMERGE_VALUES to "know" that results are legalized in a particular order, by passing it the number of the result being legalized (the type legalization core provides this, it just needs to be passed on). llvm-svn: 140373
-
Nadav Rotem authored
integer-promotion of CONCAT_VECTORS. Test: test/CodeGen/X86/widen_shuffle-1.ll This patch fixes the above tests (when running in with -promote-elements). llvm-svn: 140372
-
Dan Gohman authored
worklist, as it may be possible to perform further optimization on them. llvm-svn: 140349
-
- Sep 22, 2011
-
-
Jakob Stoklund Olesen authored
Sometimes register class constraints are trivial, like GR32->GR32_NOSP, or GPR->rGPR. Teach InstrEmitter to simply constrain the virtual register instead of emitting a copy in these cases. Normally, these copies are handled by the coalescer. This saves some coalescer work. llvm-svn: 140340
-
Jakob Stoklund Olesen authored
The function will refuse to use a register class with fewer registers than MinNumRegs. This can be used by clients to avoid accidentally increase register pressure too much. The default value of MinNumRegs=0 doesn't affect how constrainRegClass() works. llvm-svn: 140339
-
Bill Wendling authored
llvm-svn: 140318
-
Devang Patel authored
Few weeks ago, llvm completely inverted the debug info graph. Earlier each debug info node used to keep track of its compile unit, now compile unit keeps track of important nodes. One impact of this change is that the global variable's do not have any context, which should be checked before deciding to use AT_specification DIE. llvm-svn: 140282
-
Bill Wendling authored
This inserts a cleanup landingpad instruction and a resume to mimic the old unwind instruction. llvm-svn: 140277
-
- Sep 21, 2011
-
-
Jim Grosbach authored
llvm-svn: 140275
-
Nadav Rotem authored
Vector SetCC result types need to be type-legalized. This code worked before because scalar result types are known to be legal. llvm-svn: 140249
-
Andrew Trick authored
This is still a hack until we can teach tblgen to generate the optional CPSR operand rather than an implicit CPSR def. But the strangeness is now limited to the selection DAG. ADD/SUB MI's no longer have implicit CPSR defs, nor do we allow flag setting variants of these opcodes in machine code. There are several corner cases to consider, and getting one wrong would previously lead to nasty miscompilation. It's not the first time I've debugged one, so this time I added enough verification to ensure it won't happen again. llvm-svn: 140228
-
Bruno Cardoso Lopes authored
subvector inserts and extracts. Initial patch by Rackover, Zvi with some tweak done by me. llvm-svn: 140204
-
- Sep 20, 2011
-
-
Andrew Trick authored
No functionality change. The hook makes it explicit which patterns require "special" handling. i.e. it self-documents tblgen deficiencies. I plan to add verification in ExpandISelPseudos and Thumb2SizeReduce to catch any missing hasPostISelHooks. Otherwise it's too fragile. llvm-svn: 140160
-
Andrew Trick authored
Modified ARMISelLowering::AdjustInstrPostInstrSelection to handle the full gamut of CPSR defs/uses including instructins whose "optional" cc_out operand is not really optional. This allowed removal of the hasPostISelHook to simplify the .td files and make the implementation more robust. Fixes rdar://10137436: sqlite3 miscompile llvm-svn: 140134
-
Andrew Trick authored
llvm-svn: 140133
-
- Sep 18, 2011
-
-
Nadav Rotem authored
llvm-svn: 139994
-
- Sep 16, 2011
-
-
Benjamin Kramer authored
llvm-svn: 139892
-
Jakob Stoklund Olesen authored
The leaveIntvAfter() function normally inserts a back-copy after the requested instruction, making the back-copy kill the live range. In spill mode, try to insert the back-copy before the last use instead. That means the last use becomes the kill instead of the back-copy. This lowers the register pressure because the last use can now redefine the same register it was reading. This will also improve compile time: The back-copy isn't a kill, so hoisting it in hoistCopiesForSize() won't force a recomputation of the source live range. Similarly, if the back-copy isn't hoisted by the splitter, the spiller will not attempt hoisting it locally. llvm-svn: 139883
-
Jakob Stoklund Olesen authored
If the source register is live after the copy being spilled, there is no point to hoisting it. Hoisting inside a basic block only serves to resolve interferences by shortening the live range of the source. llvm-svn: 139882
-
- Sep 15, 2011
-
-
Eli Friedman authored
llvm-svn: 139851
-
Jakob Stoklund Olesen authored
When -split-spill-mode is enabled, spill hoisting is performed by SplitKit instead of by InlineSpiller. This hidden command line option is for testing the splitter spill mode. llvm-svn: 139845
-
Jakob Stoklund Olesen authored
Fix the stats counters to reflect that. llvm-svn: 139819
-
Jakob Stoklund Olesen authored
The number of spills could go negative since a folded COPY is just a spill, and it may be eliminated. llvm-svn: 139815
-
Jakob Stoklund Olesen authored
Adjust counters when removing spill and reload instructions. We still don't account for reloads being removed by eliminateDeadDefs(). llvm-svn: 139806
-
Jakob Stoklund Olesen authored
When traceSiblingValue() encounters a PHI-def value created by live range splitting, don't look at all the predecessor blocks. That can be very expensive in a complicated CFG. Instead, consider that all the non-PHI defs jointly dominate all the PHI-defs. Tracing directly to all the non-PHI defs is much faster that zipping around in the CFG when there are many PHIs with many predecessors. This significantly improves compile time for indirectbr interpreters. llvm-svn: 139797
-
Jakob Stoklund Olesen authored
Blocks with multiple PHI successors only need to go on the worklist once. Use a SmallPtrSet to track the live-out blocks that have already been handled. This is a lot faster than the two live range check we would otherwise do. Also stop recomputing hasPHIKill flags. Like RenumberValues(), it is conservatively correct to leave them in, and they are not used for anything important. llvm-svn: 139792
-
Jakob Stoklund Olesen authored
It does, after all. RemoveCopyByCommutingDef rewrites the uses of one particular value number in A. It doesn't know how to rewrite phi uses, so there can't be any. llvm-svn: 139787
-
Jakob Stoklund Olesen authored
There is only one legitimate use remaining, in addIntervalsForSpills(). All other calls to hasPHIKill() are only used to update PHIKill flags. The addIntervalsForSpills() function is part of the old spilling framework, only used by linearscan. llvm-svn: 139783
-
Jakob Stoklund Olesen authored
Instead, let HasOtherReachingDefs() test for defs in B that overlap any phi-defs in A as well. This test is slightly different, but almost identical. A perfectly precise test would only check those phi-defs in A that are reachable from AValNo. llvm-svn: 139782
-
Jakob Stoklund Olesen authored
The source live range is recomputed using shrinkToUses() which does handle phis correctly. The hasPHIKill() condition was relevant in the old days when ReMaterializeTrivialDef() tried to recompute the live range itself. The shrinkToUses() function will mark the original def as dead when no more uses and phi kills remain. It is then removed by runOnMachineFunction(). llvm-svn: 139781
-
Jakob Stoklund Olesen authored
It is conservatively correct to keep the hasPHIKill flags, even after deleting PHI-defs. The calculation can be very expensive after taildup has created a quadratic number of indirectbr edges in the CFG, and the hasPHIKill flag isn't used for anything after RenumberValues(). llvm-svn: 139780
-
Andrew Trick authored
An improper SlotIndex->VNInfo lookup was leading to unsafe copy removal. Fixes PR10920 401.bzip2 miscompile with no IV rewrite. llvm-svn: 139765
-
Devang Patel authored
llvm-svn: 139751
-
- Sep 14, 2011
-
-
Jakob Stoklund Olesen authored
THe LRE_DidCloneVirtReg callback may be called with vitual registers that RAGreedy doesn't even know about yet. In that case, there are no data structures to update. llvm-svn: 139702
-