summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
...
* A few inline asm cleanups:Chris Lattner2008-04-261-8/+6
| | | | | | | | | - Make targetlowering.h fit in 80 cols. - Make LowerAsmOperandForConstraint const. - Make lowerXConstraint -> LowerXConstraint - Make LowerXConstraint return a const char* instead of taking a string byref. llvm-svn: 50312
* Remove the code from CodeGenPrepare that moved getresult instructionsDan Gohman2008-04-251-83/+156
| | | | | | | | | | | to the block that defines their operands. This doesn't work in the case that the operand is an invoke, because invoke is a terminator and must be the last instruction in a block. Replace it with support in SelectionDAGISel for copying struct values into sequences of virtual registers. llvm-svn: 50279
* Pull the code to perform an INSERT_VECTOR_ELT in memory out into its own Nate Begeman2008-04-251-43/+68
| | | | | | | function, and then use it to fix a bug in SplitVectorOp that expected inserts to always have constant insertion indices. llvm-svn: 50273
* Use isa instead of dyn_cast.Dan Gohman2008-04-231-1/+1
| | | | llvm-svn: 50181
* Add support to codegen for getresult instructions with undef operands.Dan Gohman2008-04-231-2/+7
| | | | llvm-svn: 50180
* Fix an out-of-bounds access in -view-sunit-dags in the case of anDan Gohman2008-04-211-1/+2
| | | | | | empty ScheduleDAG. llvm-svn: 50054
* Check we aren't trying to convert PPC long double.Dale Johannesen2008-04-201-6/+3
| | | | | | This fixes the testsuite failure on ppcf128-4.ll. llvm-svn: 49994
* Switch to using Simplified ConstantFP::get API.Chris Lattner2008-04-202-9/+7
| | | | llvm-svn: 49977
* Implement a bit more softfloat support inDuncan Sands2008-04-182-5/+187
| | | | | | | | LegalizeTypes. Correct the load logic so that it actually works, and also teach it to handle floating point extending loads. llvm-svn: 49923
* Add some more FIXME's for indexed loads and stores.Duncan Sands2008-04-183-0/+6
| | | | llvm-svn: 49916
* Provide an explicit list of operands to MakeLibcall,Duncan Sands2008-04-183-72/+81
| | | | | | | | | | rather than having it suck them out of a node. Add a bunch of new libcalls, and remove dead softfloat code (dead, because FloatToInt is used not Expand in this case). Note that indexed stores probably aren't handled properly, likewise for loads. llvm-svn: 49915
* Remove the implicit conversion from SDOperandPtr to SDOperand*; thisDan Gohman2008-04-171-4/+4
| | | | | | may fix a build error on Visual Studio. llvm-svn: 49876
* Correct the SrcValue information in the Expand code for va_copy.Dan Gohman2008-04-171-2/+2
| | | | llvm-svn: 49839
* Ongoing work on improving the instruction selection infrastructure:Roman Levenstein2008-04-166-79/+80
| | | | | | | | | | Rename SDOperandImpl back to SDOperand. Introduce the SDUse class that represents a use of the SDNode referred by an SDOperand. Now it is more similar to Use/Value classes. Patch is approved by Dan Gohman. llvm-svn: 49795
* Fix the new scheduler assertion checks to work whenDan Gohman2008-04-151-2/+10
| | | | | | | the scheduler has inserted no-ops. This fixes the 2006-07-03-schedulers.ll regression on ppc32. llvm-svn: 49747
* Change Divided flag to Split, as suggested by EvanNicolas Geoffray2008-04-151-2/+2
| | | | llvm-svn: 49715
* 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
* 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
* 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
* detabifyGabor Greif2008-04-111-1/+1
| | | | llvm-svn: 49524
* Rename MemOperand to MachineMemOperand. This was suggested byDan Gohman2008-04-072-12/+13
| | | | | | | 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
* 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
* 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
* 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
* Recommitting EH patch; this should answer most of theDale Johannesen2008-04-021-51/+41
| | | | | | | | | | | | | | | 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
* Revert 49006 for the moment.Dale Johannesen2008-04-011-13/+8
| | | | llvm-svn: 49046
* More soft fp fixes.Evan Cheng2008-04-011-1/+2
| | | | llvm-svn: 49016
* Pasto.Evan Cheng2008-04-011-1/+1
| | | | llvm-svn: 49014
* Add comment.Evan Cheng2008-04-011-0/+1
| | | | llvm-svn: 49013
* Unbreak ARM / Thumb soft FP support.Evan Cheng2008-04-011-3/+11
| | | | llvm-svn: 49012
* Emit exception handling info for functions which areDale Johannesen2008-03-311-8/+13
| | | | | | | | | | | not marked nounwind, or for all functions when -enable-eh is set, provided the target supports Dwarf EH. llvm-gcc generates nounwind in the right places; other FEs will need to do so also. Given such a FE, -enable-eh should no longer be needed. llvm-svn: 49006
* Fix a DAGCombiner optimization to respect volatile qualification.Dan Gohman2008-03-311-1/+2
| | | | llvm-svn: 48994
* Fix "Control reaches the end of non-void function" warnings, Chris Lattner2008-03-301-0/+1
| | | | | | patch by David Chisnall. llvm-svn: 48963
* Cosmetic changes.Evan Cheng2008-03-291-24/+3
| | | | llvm-svn: 48947
* ifdef out a dead function. Should this be removed?Chris Lattner2008-03-281-0/+2
| | | | llvm-svn: 48916
* Rename getAnyLoad to getLoad is suggested by Evan.Duncan Sands2008-03-282-17/+17
| | | | llvm-svn: 48914
* Implement LegalizeTypes support for softfloat LOAD.Duncan Sands2008-03-273-78/+64
| | | | | | | | In order to handle indexed nodes I had to introduce a new constructor, and since I was there I factorized the code in the various load constructors. llvm-svn: 48894
* Avoid creating chain dependencies from CopyToReg nodes to load and storeDan Gohman2008-03-271-54/+72
| | | | | | | | | | | | | | | | | | nodes. This doesn't currently have much impact the generated code, but it does produce simpler-looking SelectionDAGs, and consequently simpler-looking ScheduleDAGs, because there are fewer spurious dependencies. In particular, CopyValueToVirtualRegister now uses the entry node as the input chain dependency for new CopyToReg nodes instead of calling getRoot and depending on the most recent memory reference. Also, rename UnorderedChains to PendingExports and pull it up from being a local variable in SelectionDAGISel::BuildSelectionDAG to being a member variable of SelectionDAGISel, so that it doesn't have to be passed around to all the places that need it. llvm-svn: 48893
* Fix spelling. Thanks, Duncan! :-)Roman Levenstein2008-03-271-1/+1
| | | | llvm-svn: 48873
* Speed-up the SumOfUnscheduledPredsOfSuccs by introducing a new functionRoman Levenstein2008-03-271-2/+25
| | | | | | | | | | called LimitedSumOfUnscheduledPredsOfSuccs. It terminates the computation after a given treshold is reached. This new function is always faster, but brings real wins only on bigger test-cases. The old function SumOfUnscheduledPredsOfSuccs is left in-place for now and therefore a warning about an unused static function is produced. llvm-svn: 48872
* Use a linked data structure for the uses lists of an SDNode, just like Roman Levenstein2008-03-266-108/+137
| | | | | | | | | | | | | LLVM Value/Use does and MachineRegisterInfo/MachineOperand does. This allows constant time for all uses list maintenance operations. The idea was suggested by Chris. Reviewed by Evan and Dan. Patch is tested and approved by Dan. On normal use-cases compilation speed is not affected. On very big basic blocks there are compilation speedups in the range of 15-20% or even better. llvm-svn: 48822
OpenPOWER on IntegriCloud