aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't use a random type for the select condition,Duncan Sands2008-10-201-2/+1
| | | | | | | use an MVT::i1 and simplify the code while there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57833 91177308-0d34-0410-b5e6-96231b3b80d8
* Set N->OperandList to 0 after deletion. Otherwise, it's possible that it willBill Wendling2008-10-191-15/+26
| | | | | | | be either deleted or referenced afterwards. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57786 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment. Other formatting changes. No functionality changes.Bill Wendling2008-10-191-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57785 91177308-0d34-0410-b5e6-96231b3b80d8
* Vector shuffle mask elements may be "undef". HandleDuncan Sands2008-10-191-13/+24
| | | | | | | this everywhere in LegalizeTypes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57783 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a legal integer type for vector shuffle maskDuncan Sands2008-10-191-4/+4
| | | | | | | | | | elements. Otherwise LegalizeTypes will, reasonably enough, legalize the mask, which may result in it no longer being a BUILD_VECTOR node (LegalizeDAG simply ignores the legality or not of vector masks). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57782 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r57699 with a fix to not crash on asms with multiple results. UnlikeChris Lattner2008-10-181-16/+48
| | | | | | | | | | | | the previous patch this one actually passes make check. "Fix PR2356 on PowerPC: if we have an input and output that are tied together that have different sizes (e.g. i32 and i64) make sure to reserve registers for the bigger operand." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57771 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't truncate GlobalAddress offsets to int in debug output.Dan Gohman2008-10-182-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57770 91177308-0d34-0410-b5e6-96231b3b80d8
* By min, I mean max.Evan Cheng2008-10-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57766 91177308-0d34-0410-b5e6-96231b3b80d8
* When creating intervals, leave min(1, numdefs) holes after each instruction.Evan Cheng2008-10-181-5/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57765 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach DAGCombine to fold constant offsets into GlobalAddress nodes,Dan Gohman2008-10-183-2/+47
| | | | | | | | | | | | | | | | | | | | | | | and add a TargetLowering hook for it to use to determine when this is legal (i.e. not in PIC mode, etc.) This allows instruction selection to emit folded constant offsets in more cases, such as the included testcase, eliminating the need for explicit arithmetic instructions. This eliminates the need for the C++ code in X86ISelDAGToDAG.cpp that attempted to achieve the same effect, but wasn't as effective. Also, fix handling of offsets in GlobalAddressSDNodes in several places, including changing GlobalAddressSDNode's offset from int to int64_t. The Mips, Alpha, Sparc, and CellSPU targets appear to be unaware of GlobalAddress offsets currently, so set the hook to false on those targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57748 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r57699. It's causing regressions inDan Gohman2008-10-181-43/+15
| | | | | | | | test/CodeGen/X86/2008-09-17-inline-asm-1.ll and a few others, and it breaks the llvm-gcc build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57747 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the code for mapping LLVM IR condition opcodes toDan Gohman2008-10-172-34/+47
| | | | | | | ISD condition opcodes into helper functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57726 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2898. Spiller delete a store for reuse before it knows for sure the ↵Evan Cheng2008-10-171-11/+26
| | | | | | | | | reuse happened. Patch by Lang Hames! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57720 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for 128 bit aggregates.Chris Lattner2008-10-171-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57715 91177308-0d34-0410-b5e6-96231b3b80d8
* The Dwarf writer was comparing mangled and unmangled names for C++ code when weBill Wendling2008-10-171-1/+4
| | | | | | | | | | have an unreachable block in a function. This was triggering the assert. This is a horrid hack to cover this up. Oh! for a good debug info architecture! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57714 91177308-0d34-0410-b5e6-96231b3b80d8
* Added MemIntrinsicNode which is useful to represent target intrinsics thatMon P Wang2008-10-171-2/+59
| | | | | | | touches memory and need an associated MemOperand git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57712 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the code for mapping LLVM IR condition opcodes toDan Gohman2008-10-171-126/+61
| | | | | | | ISD condition opcodes into helper functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57710 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2356 on PowerPC: if we have an input and output that are tied togetherChris Lattner2008-10-171-15/+43
| | | | | | | | that have different sizes (e.g. i32 and i64) make sure to reserve registers for the bigger operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57699 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor some code into a helper method, no functionality change.Chris Lattner2008-10-171-25/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57690 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of *which* input constraint matches an outputChris Lattner2008-10-172-6/+6
| | | | | | | | constraint. Reject asms where an output has multiple input constraints tied to it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57687 91177308-0d34-0410-b5e6-96231b3b80d8
* add an assert so that PR2356 explodes instead of running off anChris Lattner2008-10-172-6/+24
| | | | | | | | array. Improve some minor comments, refactor some helpers in AsmOperandInfo. No functionality change for valid code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57686 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a very subtle spiller bug: UpdateKills should not forget to track defs ↵Evan Cheng2008-10-171-8/+14
| | | | | | of aliases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57673 91177308-0d34-0410-b5e6-96231b3b80d8
* Define patterns for shld and shrd that match immediateDan Gohman2008-10-171-5/+9
| | | | | | | | | | | | | | | | | | | shift counts, and patterns that match dynamic shift counts when the subtract is obscured by a truncate node. Add DAGCombiner support for recognizing rotate patterns when the shift counts are defined by truncate nodes. Fix and simplify the code for commuting shld and shrd instructions to work even when the given instruction doesn't have a parent, and when the caller needs a new instruction. These changes allow LLVM to use the shld, shrd, rol, and ror instructions on x86 to replace equivalent code using two shifts and an or in many more cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57662 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename AliasSet to SubRegs, to reflect changes in the surrounding code.Dan Gohman2008-10-161-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57618 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the include of MachineLocation.h into MachineModuleInfo.hDan Gohman2008-10-161-1/+0
| | | | | | | | | because it declares a std::vector<MachineMove>, and strict concept checking requires the definition of MachineMove to be available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57617 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a subtle bug in DeadMachineInstructionElim's livenessDan Gohman2008-10-161-1/+4
| | | | | | | | computation. A def of a register doesn't necessarily kill live super-registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57614 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust whitespace in debug messages to be more consistentDan Gohman2008-10-152-5/+5
| | | | | | | with other debug messages. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57543 91177308-0d34-0410-b5e6-96231b3b80d8
* - Add target lowering hooks that specify which setcc conditions are illegal,Evan Cheng2008-10-152-5/+55
| | | | | | | | | | | | i.e. conditions that cannot be checked with a single instruction. For example, SETONE and SETUEQ on x86. - Teach legalizer to implement *illegal* setcc as a and / or of a number of legal setcc nodes. For now, only implement FP conditions. e.g. SETONE is implemented as SETO & SETNE, SETUEQ is SETUO | SETEQ. - Move x86 target over. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57542 91177308-0d34-0410-b5e6-96231b3b80d8
* FastISel support for exception-handling constructs.Dan Gohman2008-10-142-48/+119
| | | | | | | | | | - Move the EH landing-pad code and adjust it so that it works with FastISel as well as with SDISel. - Add FastISel support for @llvm.eh.exception and @llvm.eh.selector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57539 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename LoadX to LoadExt.Evan Cheng2008-10-143-16/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57526 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix command-line option printing to print two spaces where needed,Dan Gohman2008-10-1410-12/+12
| | | | | | | | | | instead of requiring all "short description" strings to begin with two spaces. This makes these strings less mysterious, and it fixes some cases where short description strings mistakenly did not begin with two spaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57521 91177308-0d34-0410-b5e6-96231b3b80d8
* FIX PR2794. Make sure SIGN_EXTEND_INREG nodes introduced by ↵Evan Cheng2008-10-131-1/+4
| | | | | | LegalizeSetCCOperands are leglized. Patch by Richard Pennington. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57460 91177308-0d34-0410-b5e6-96231b3b80d8
* Also update sub-register intervals after a trivial computation is rematt'ed ↵Evan Cheng2008-10-131-0/+10
| | | | | | for a copy instruction. PR2775. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57458 91177308-0d34-0410-b5e6-96231b3b80d8
* * Make TargetLowering not crash when TargetMachine::getTargetAsmInfo() returnsMatthijs Kooijman2008-10-131-1/+2
| | | | | | | | null. This assumes that any target that does not have AsmInfo, does not support "LocAndDot". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57438 91177308-0d34-0410-b5e6-96231b3b80d8
* Make MachineFunction not crash when TargetMachine::getRegisterInfo() returnsMatthijs Kooijman2008-10-131-5/+9
| | | | | | | NULL, but just hide some debug output then. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57437 91177308-0d34-0410-b5e6-96231b3b80d8
* calls can be supported.Chris Lattner2008-10-131-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57428 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in live-in detection that caused lost-copy problems to show up.Owen Anderson2008-10-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57424 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typoChris Lattner2008-10-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57388 91177308-0d34-0410-b5e6-96231b3b80d8
* Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's asChris Lattner2008-10-111-7/+3
| | | | | | | | | parameters instead of raw Constants. This prevents the constants from being selected by the isel pass, fixing PR2735. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57385 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify comparisonChris Lattner2008-10-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57371 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some overzealous checks that were rejectingDale Johannesen2008-10-101-12/+8
| | | | | | | | | valid comments in inline assembly. gcc.target/i386/20011009-1.c git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57365 91177308-0d34-0410-b5e6-96231b3b80d8
* Added missing print functions that take a raw_ostreamMon P Wang2008-10-101-2/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57339 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a "loses information" return value to APFloat::convertDale Johannesen2008-10-093-14/+26
| | | | | | | | | and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57329 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename APFloat::convertToAPInt to bitcastToAPInt toDale Johannesen2008-10-095-16/+16
| | | | | | | | | make it clearer what the function does. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57325 91177308-0d34-0410-b5e6-96231b3b80d8
* Align EH tables before label is emitted, not after,Dale Johannesen2008-10-081-1/+1
| | | | | | | | thus aligning the label. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57310 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the case where an instruction is not properly marked as using all ↵Owen Anderson2008-10-081-1/+19
| | | | | | registers that alias its inputs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57286 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove -disable-fast-isel. Use cl::boolOrDefault with -fast-iselDan Gohman2008-10-071-8/+3
| | | | | | | | | | | instead. So now: -fast-isel or -fast-isel=true enable fast-isel, and -fast-isel=false disables it. Fast-isel is also on by default with -fast, and off by default otherwise. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57270 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid emitting redundant materializations of integer constantsDan Gohman2008-10-071-3/+4
| | | | | | | | for things like null pointers, which at this level aren't different from regular integer constants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57265 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to enable StrongPHIElimination, for ease of testing.Owen Anderson2008-10-074-4/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57259 91177308-0d34-0410-b5e6-96231b3b80d8
* Use Dan's supperior checkAndrew Lenharth2008-10-071-13/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57255 91177308-0d34-0410-b5e6-96231b3b80d8