summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Treat EntryToken nodes as "passive" so that they aren't added to theDan Gohman2008-04-153-35/+51
| | | | | | | | | | | | | | | | | ScheduleDAG; they don't correspond to any actual instructions so they don't need to be scheduled. This fixes a bug where the EntryToken was being scheduled multiple times in some cases, though it ended up not causing any trouble because EntryToken doesn't expand into anything. With this fixed the schedulers reliably schedule the expected number of units, so we can check this with an assertion. This requires a tweak to test/CodeGen/X86/loop-hoist.ll because it ends up getting scheduled differently in a trivial way, though it was enough to fool the prcontext+grep that the test does. llvm-svn: 49701
* In -view-sunit-dags, display "special" chain dependencies as cyanDan Gohman2008-04-141-0/+2
| | | | | | instead of blue to distinguish them from regular dependencies. llvm-svn: 49696
* Avoid creating MERGE_VALUES nodes for single values.Dan Gohman2008-04-141-1/+2
| | | | llvm-svn: 49676
* Fix const-correctness issues with the SrcValue handling in theDan Gohman2008-04-141-8/+8
| | | | | | memory intrinsic expansion code. llvm-svn: 49666
* Reverse sense of unwind-tables option. This meansDale Johannesen2008-04-141-3/+3
| | | | | | | stack tracebacks on Darwin x86-64 won't work by default; nevertheless, everybody but me thinks this is a good idea. llvm-svn: 49663
* Fix /test/CodeGen/PowerPC/big-endian-actual-args.ll for linux/ppc32Nicolas Geoffray2008-04-141-4/+4
| | | | llvm-svn: 49652
* Initial libcall support for LegalizeTypes. This isDuncan Sands2008-04-143-0/+116
| | | | | | | | much simpler than in LegalizeDAG because calls are not yet expanded into call sequences: that happens after type legalization has finished. llvm-svn: 49634
* LegalizeTypes can sometimes have deleted nodesDuncan Sands2008-04-132-0/+51
| | | | | | | | | in its maps. Add some sanity checks that catch this kind of thing. Hopefully these can be removed one day (once all problems are fixed!) but for the moment it seems wise to have them in. llvm-svn: 49612
* Add a divided flag for the first piece of an argument divided into mulitple ↵Nicolas Geoffray2008-04-131-2/+7
| | | | | | parts. Fixes PR1643 llvm-svn: 49611
* Merge LLVMBuilder and FoldingBuilder, callingDuncan Sands2008-04-131-11/+19
| | | | | | the result IRBuilder. Patch by Dominic Hamon. llvm-svn: 49604
* Factor some libcall code.Duncan Sands2008-04-121-61/+49
| | | | llvm-svn: 49583
* Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not LegalDan Gohman2008-04-128-490/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | on any current target and aren't optimized in DAGCombiner. Instead of using intermediate nodes, expand the operations, choosing between simple loads/stores, target-specific code, and library calls, immediately. Previously, the code to emit optimized code for these operations was only used at initial SelectionDAG construction time; now it is used at all times. This fixes some cases where rep;movs was being used for small copies where simple loads/stores would be better. This also cleans up code that checks for alignments less than 4; let the targets make that decision instead of doing it in target-independent code. This allows x86 to use rep;movs in low-alignment cases. Also, this fixes a bug that resulted in the use of rep;stos for memsets of 0 with non-constant memory size when the alignment was at least 4. It's better to use the library in this case, which can be significantly faster when the size is large. This also preserves more SourceValue information when memory intrinsics are lowered into simple loads/stores. llvm-svn: 49572
* Do not add empty live intervals to handled_. They should never be undone for ↵Evan Cheng2008-04-111-2/+1
| | | | | | backtracking. llvm-svn: 49544
* If a PHI node has a single implicit_def source, replace it with an ↵Evan Cheng2008-04-111-5/+19
| | | | | | implicit_def instead of a copy. llvm-svn: 49543
* Use of implicit_def is not part of live interval. Create empty intervals for ↵Evan Cheng2008-04-113-12/+53
| | | | | | the uses when the live interval is being spilled. llvm-svn: 49542
* detabifyGabor Greif2008-04-111-1/+1
| | | | llvm-svn: 49524
* Remove implicit_def instructions that become dead as result of coalescing.Evan Cheng2008-04-101-19/+37
| | | | llvm-svn: 49513
* Allow registers defined by implicit_def to be clobbered.Evan Cheng2008-04-101-6/+15
| | | | llvm-svn: 49512
* A copy instruction may use a register multiple times on some targets. Change ↵Evan Cheng2008-04-101-2/+6
| | | | | | them all. llvm-svn: 49491
* Add comment.Evan Cheng2008-04-101-0/+2
| | | | llvm-svn: 49469
* Teach branch folding pass about implicit_def instructions. Unfortunately we ↵Evan Cheng2008-04-101-1/+56
| | | | | | can't just eliminate them since register scavenger expects every register use to be defined. However, we can delete them when there are no intra-block uses. Carefully removing some implicit def's which enable more blocks to be optimized away. llvm-svn: 49461
* - More aggressively coalescing away copies whose source is defined by an ↵Evan Cheng2008-04-093-76/+297
| | | | | | | | implicit_def. - Added insert_subreg coalescing support. llvm-svn: 49448
* Missed a hasInterval check.Evan Cheng2008-04-091-0/+2
| | | | llvm-svn: 49415
* Implement new llc flag -disable-required-unwind-tables.Dale Johannesen2008-04-081-2/+7
| | | | | | Corresponds to -fno-unwind-tables (usually default in gcc). llvm-svn: 49361
* Rename MemOperand to MachineMemOperand. This was suggested byDan Gohman2008-04-073-13/+14
| | | | | | | review feedback from Chris quite a while ago. No functionality change. llvm-svn: 49348
* Re-commit of the r48822, where the infinite looping problem discoveredRoman Levenstein2008-04-076-109/+123
| | | | | | by Dan Gohman is fixed. llvm-svn: 49330
* Silence warning when no assertions.Chris Lattner2008-04-061-1/+2
| | | | llvm-svn: 49284
* Prefer to expand mask for xor to -1, so we have a chance to turn it into a not.Torok Edwin2008-04-061-4/+19
| | | | | | | If it cannot be expanded, it will keep the old behaviour and try to shrink the constant. Part of enhancement for PR2191. llvm-svn: 49280
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-062-46/+46
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* 1. IMPLICIT_DEF can *re-define* any register.Evan Cheng2008-04-051-2/+42
| | | | | | | 2. Coalescer can now create an interesting situation where a register def can reaches itself without being killed. llvm-svn: 49246
* Make sure both PendingLoads and PendingExports are flushedDale Johannesen2008-04-041-1/+4
| | | | | | | | | | before an invoke. Failure to do this causes references in the landing pad to variables that were not set. Fixes g++.dg/eh/delayslot1.C g++.dg/eh/fp-regs.C g++.old-deja/g++.brendan/eh1.C llvm-svn: 49243
* Undo PHI elimination copy placement patch. This causes coalescing ↵Evan Cheng2008-04-041-30/+1
| | | | | | (performace) issues. llvm-svn: 49198
* This is done.Evan Cheng2008-04-041-4/+0
| | | | llvm-svn: 49197
* if some functions don't have debug info, we were outputing the same label at ↵Andrew Lenharth2008-04-031-2/+5
| | | | | | the start of each of those functions. This makes assemblers unhappy llvm-svn: 49176
* - Turn copies of implicit_def into implicit_def instructions.Evan Cheng2008-04-032-6/+71
| | | | | | - Be smarter about coalescing copies from implicit_def. llvm-svn: 49168
* Special handling of zero-sized live intervals.Evan Cheng2008-04-031-5/+19
| | | | llvm-svn: 49167
* - Treat a live range defined by an implicit_def as a zero-sized one.Evan Cheng2008-04-031-2/+28
| | | | | | - Eliminate an implicit_def when it's being spilled. llvm-svn: 49166
* - PHI elimination also eliminates implicit_def that fits into a PHI node ↵Evan Cheng2008-04-031-42/+84
| | | | | | | | rather than copying it. - Be (slightly) smarter about where to place the copies. llvm-svn: 49165
* Start of a series of patches related to implicit_def.Evan Cheng2008-04-031-37/+70
| | | | | | There is no point in creating a long live range defined by an implicit_def. Scheduler now duplicates implicit_def instruction for each of its uses. Therefore, if an implicit_def node has multiple uses, it will become a number of very short live ranges, rather than a long one. This will make coalescer's job easier. llvm-svn: 49164
* Backing out 48222 temporarily.Evan Cheng2008-04-036-137/+108
| | | | llvm-svn: 49124
* Make EH work with unnamed functions. Reenable runningDale Johannesen2008-04-021-2/+4
| | | | | | StripSymbols when EH is on. llvm-svn: 49110
* Now that I am told MachineRegisterInfo also tracks physical register uses / ↵Evan Cheng2008-04-021-24/+64
| | | | | | defs, I can do away with the horribleness I introduced a while back. It's impossible to detect if there is any use of a physical register below an instruction (and before any def of the register) with some cheap book keeping. llvm-svn: 49105
* Remove #include<map> from LiveVariables.h. Not referenced.Evan Cheng2008-04-022-1/+3
| | | | llvm-svn: 49099
* Cosmetic changes per EH patch review feedback.Dale Johannesen2008-04-021-1/+1
| | | | llvm-svn: 49096
* In some situations, we need to check for local interferences between the PHIOwen Anderson2008-04-021-2/+11
| | | | | | node and its inputs. llvm-svn: 49070
* Correctly mark a valno that was previous defined by a PHI node as having anOwen Anderson2008-04-021-4/+7
| | | | | | unknown defining inst after PHI elimination. llvm-svn: 49069
* Recommitting EH patch; this should answer most of theDale Johannesen2008-04-024-90/+98
| | | | | | | | | | | | | | | review feedback. -enable-eh is still accepted but doesn't do anything. EH intrinsics use Dwarf EH if the target supports that, and are handled by LowerInvoke otherwise. The separation of the EH table and frame move data is, I think, logically figured out, but either one still causes full EH info to be generated (not sure how to split the metadata correctly). MachineModuleInfo::needsFrameInfo is no longer used and is removed. llvm-svn: 49064
* Re-materialization is for uses only.Evan Cheng2008-04-011-4/+4
| | | | llvm-svn: 49053
* Revert 49006 for the moment.Dale Johannesen2008-04-013-26/+17
| | | | llvm-svn: 49046
* Don't dereference MBB->end().Owen Anderson2008-04-011-1/+1
| | | | llvm-svn: 49043
OpenPOWER on IntegriCloud