aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* When printing MemOperand nodes, only use print() forDan Gohman2008-07-171-3/+10
| | | | | | | | | PseudoSourceValue values, which never have names. Use getName() for all other values, because we want to print just a short summary of the value, not the entire instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53738 91177308-0d34-0410-b5e6-96231b3b80d8
* Use MergeBlockIntoPredecessor to simplify some code.Owen Anderson2008-07-171-52/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53735 91177308-0d34-0410-b5e6-96231b3b80d8
* Subreg live interval valno may not have a corresponding def machineinstr ↵Evan Cheng2008-07-172-1/+35
| | | | | | since it's less precise. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53734 91177308-0d34-0410-b5e6-96231b3b80d8
* Add nounwind.Evan Cheng2008-07-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53733 91177308-0d34-0410-b5e6-96231b3b80d8
* test commit accessDaniel Dunbar2008-07-171-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53732 91177308-0d34-0410-b5e6-96231b3b80d8
* Make MergeBlockIntoPredecessor more aggressive when the same successor appearsOwen Anderson2008-07-172-6/+25
| | | | | | | more than once. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53731 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable PRE. My last batch of changes fixed the miscompile.Owen Anderson2008-07-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53730 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a legal type for elements of the vector_shuffleDuncan Sands2008-07-171-3/+4
| | | | | | | | | | | | | | | | | | | mask. These are just indices into the shuffled vector so their type is unrelated to the type of the shuffled elements (which is what was being used before). This fixes vec_shuffle-11.ll when using LegalizeTypes. What seems to have happened is that Dan's recent change r53687, which corrected the result type of the shuffle, somehow caused LegalizeTypes to notice that the mask operand was a BUILD_VECTOR with a legal type but elements of an illegal type (i64). LegalizeTypes legalized this by introducing a new BUILD_VECTOR of i32 and bitcasting it to the old type. But the mask operand is not supposed to be a bitcast but a straight BUILD_VECTOR of constants, causing a crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53729 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new function, ReplaceAllUsesOfValuesWith, which handles bulkDan Gohman2008-07-1721-310/+520
| | | | | | | | | | | | | | | | | | | | | | | | | | | | replacement of multiple values. This is slightly more efficient than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically could be optimized even further. However, an important property of this new function is that it handles the case where the source value set and destination value set overlap. This makes it feasible for isel to use SelectNodeTo in many very common cases, which is advantageous because SelectNodeTo avoids a temporary node and it doesn't require CSEMap updates for users of values that don't change position. Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to handle operand lists more efficiently, and to correctly handle a number of corner cases to which its new wider use exposes it. This commit also includes a change to the encoding of post-isel opcodes in SDNodes; now instead of being sandwiched between the target-independent pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel opcodes are now represented as negative values. This makes it possible to test if an opcode is pre-isel or post-isel without having to know the size of the current target's post-isel instruction set. These changes speed up llc overall by 3% and reduce memory usage by 10% on the InstructionCombining.cpp testcase with -fast and -regalloc=local. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53728 91177308-0d34-0410-b5e6-96231b3b80d8
* Indentation.Evan Cheng2008-07-171-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53727 91177308-0d34-0410-b5e6-96231b3b80d8
* LegalizeTypes support for what seems to be theDuncan Sands2008-07-173-0/+36
| | | | | | | | only missing ppc long double operations: FNEG and FP_EXTEND. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53723 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary readme entryNate Begeman2008-07-171-9/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53722 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn LegalizeTypes back off again for the moment:Duncan Sands2008-07-176-6/+10
| | | | | | | | it is breaking Darwin bootstrap due to missing functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53721 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo in last commitNate Begeman2008-07-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53720 91177308-0d34-0410-b5e6-96231b3b80d8
* SSE codegen for vsetcc nodesNate Begeman2008-07-175-43/+209
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53719 91177308-0d34-0410-b5e6-96231b3b80d8
* Make GlobalOpt preserve address spaces when scalar replacing aggregate globals.Matthijs Kooijman2008-07-172-2/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53716 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2553Chris Lattner2008-07-172-1/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53715 91177308-0d34-0410-b5e6-96231b3b80d8
* When lowering certain atomics, we need to copy the memoperand from the oldMon P Wang2008-07-171-1/+5
| | | | | | | atomic operation to the new one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53714 91177308-0d34-0410-b5e6-96231b3b80d8
* Factorize some code for determining which libcall to use.Duncan Sands2008-07-175-563/+231
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53713 91177308-0d34-0410-b5e6-96231b3b80d8
* Inliner tweak. Function calls should cost more than one instruction!Evan Cheng2008-07-171-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53712 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor MergeBlockIntoPredecessor out into BasicBlockUtils.Owen Anderson2008-07-173-51/+60
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53705 91177308-0d34-0410-b5e6-96231b3b80d8
* Name string length is end position marker - begin position marker.Devang Patel2008-07-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53697 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not forget global definitions from inline asm code block.Devang Patel2008-07-162-0/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53693 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark function used by asm block as used, otherwise optimizer may not see the ↵Devang Patel2008-07-162-1/+8
| | | | | | use and may delete the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53692 91177308-0d34-0410-b5e6-96231b3b80d8
* There's no need to iterate block merging and PRE. In fact, iterating the latterOwen Anderson2008-07-161-14/+12
| | | | | | | could cause problems for memdep when it breaks critical edges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53691 91177308-0d34-0410-b5e6-96231b3b80d8
* Somehow, custom lowering of i64 multiplications got dropped along the way.Scott Michel2008-07-161-104/+105
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53689 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the result type of X86's truncate to i8.Dan Gohman2008-07-161-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53688 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the result type of a VECTOR_SHUFFLE+BIT_CONVERT dagcombine. ThisDan Gohman2008-07-161-3/+2
| | | | | | | | was turned up by some new SelectionDAG assertion checks that I'm working on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53687 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the name of BreakCriticalMachineEdge.h's include guardDan Gohman2008-07-161-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53686 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct a top-level comment.Dan Gohman2008-07-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53685 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for promoting and expanding AssertZextDuncan Sands2008-07-164-0/+3116
| | | | | | | | and AssertSext. Needed when passing huge integer parameters with the zeroext or signext attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53684 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify the comments here, to make slightly more clear theDan Gohman2008-07-161-2/+2
| | | | | | | | difference in purpose of TargetInstrInfo and TargetInstrDesc, which isn't immediately obvious from the name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53683 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy a doxygen comment.Dan Gohman2008-07-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53682 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment to say nonnegative instead of positive.Dan Gohman2008-07-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53681 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assert to check for empty flags for MachineMemOperand.Dan Gohman2008-07-161-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53680 91177308-0d34-0410-b5e6-96231b3b80d8
* Test passing of integer parameters for integersDuncan Sands2008-07-161-0/+1537
| | | | | | | | | | | of all sizes from i1 to i256. The code is not always that great, for example (x86) movw %di, %ax movw %ax, i17_s where the store could be directly from %di. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53677 91177308-0d34-0410-b5e6-96231b3b80d8
* Test codegen of loads and stores of all integerDuncan Sands2008-07-161-0/+2049
| | | | | | | | | sizes from i1 to i256. The generated code is like one huge bug report of things that the DAG combiner fails to simplify! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53676 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a few cases to instcombine's extractvalue testcase.Matthijs Kooijman2008-07-161-2/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53675 91177308-0d34-0410-b5e6-96231b3b80d8
* Un-XFAIL multdeadretval, since instcombine now properly handles the mess ↵Matthijs Kooijman2008-07-161-1/+0
| | | | | | deadargelim leaves behind :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53674 91177308-0d34-0410-b5e6-96231b3b80d8
* Redo InstCombiner::visitExtractValueInst. Instead of using the (complicate)Matthijs Kooijman2008-07-161-5/+80
| | | | | | | | | FindInsertedValue, it now performs a number of simple transformations that should result in the same effect when applied iteratively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53673 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder methods alphabetically. No functionality change.Duncan Sands2008-07-163-922/+913
| | | | | | | | | While this is not a wonderful organizing principle, it does make it easy to find routines, and clear where to insert new ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53672 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn on LegalizeTypes by default.Duncan Sands2008-07-162-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53671 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use ++idx_begin when I actually mean idx_begin + 1, especially since weMatthijs Kooijman2008-07-161-1/+1
| | | | | | | | | | also use *idx_begin in the same expression, giving unpredictable results. This fixes this bug: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-July/015877.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53670 91177308-0d34-0410-b5e6-96231b3b80d8
* The atomic.cmp.swap promotion logic is wrong: itDuncan Sands2008-07-161-8/+2
| | | | | | | | | | | | | | | | | simply does the atomic.cmp.swap on the larger type, which means it blows away whatever is sitting in the bytes just after the memory location, i.e. causes a buffer overflow. This really requires target specific code, which is why LegalizeTypes doesn't try to handle this case generically. The existing (wrong) code in LegalizeDAG will go away automatically once the type legalization code is removed from LegalizeDAG so I'm leaving it there for the moment. Meanwhile, don't test for this feature. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53669 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2296. Do not transform x86_sse2_storel_dq into a full-width store.Evan Cheng2008-07-162-1/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53666 91177308-0d34-0410-b5e6-96231b3b80d8
* x86-64 PIC JIT fixes: do not generate the extra load for external GV's.Evan Cheng2008-07-162-8/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53661 91177308-0d34-0410-b5e6-96231b3b80d8
* X86-64 PIC jump table values are different from x86-32 cases, they are dest ↵Evan Cheng2008-07-161-0/+4
| | | | | | - table base. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53660 91177308-0d34-0410-b5e6-96231b3b80d8
* TargetAsmInfo::SectionForGlobal showed up in a profile. Simplify it a little.Dan Gohman2008-07-151-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53639 91177308-0d34-0410-b5e6-96231b3b80d8
* SelectionDAG::AssignNodeIds is unused.Dan Gohman2008-07-152-15/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53636 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't sort SDNodes by their addresses in SelectionDAG::dump. Instead,Dan Gohman2008-07-151-9/+5
| | | | | | | | just use the AllNodes order, which is at least relatively stable across runs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53632 91177308-0d34-0410-b5e6-96231b3b80d8