aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetLowering.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix PR 1681. When X86 target uses +sse -sse2,Dale Johannesen2007-09-231-10/+0
| | | | | | | | | | | | keep f32 in SSE registers and f64 in x87. This is effectively a new codegen mode. Change addLegalFPImmediate to permit float and double variants to do different things. Adjust callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42246 91177308-0d34-0410-b5e6-96231b3b80d8
* Add lengthof and endof templates that hide a lot of sizeof computations.Owen Anderson2007-09-071-6/+6
| | | | | | | Patch by Sterling Stein! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41758 91177308-0d34-0410-b5e6-96231b3b80d8
* Change LegalFPImmediates to use APFloat.Dale Johannesen2007-08-301-3/+14
| | | | | | | | | | Add APFloat interfaces to ConstantFP, SelectionDAG. Fix integer bit in double->APFloat conversion. Convert LegalizeDAG to use APFloat interface in ConstantFPSDNode uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41587 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords and remove spurious trailing semicolons.Dan Gohman2007-08-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41482 91177308-0d34-0410-b5e6-96231b3b80d8
* rename isOperandValidForConstraint to LowerAsmOperandForConstraint, Chris Lattner2007-08-251-6/+5
| | | | | | | | changing the interface to allow for future changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41384 91177308-0d34-0410-b5e6-96231b3b80d8
* Partial implementation of calling functions with byval arguments:Rafael Espindola2007-08-201-1/+2
| | | | | | | | *) The needed information is propagated to the DAG *) The X86-64 backend detects it and aborts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41179 91177308-0d34-0410-b5e6-96231b3b80d8
* Update per review comments.Dale Johannesen2007-08-091-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40965 91177308-0d34-0410-b5e6-96231b3b80d8
* long double 9 of N. This finishes up the X86-32 bitsDale Johannesen2007-08-091-0/+35
| | | | | | | | | (constants are still not handled). Adds ConvertActions to control fp-to-fp conversions (these are currently defaulted for all other targets, so no changes there). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40958 91177308-0d34-0410-b5e6-96231b3b80d8
* More explicit keywords.Dan Gohman2007-08-011-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40673 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for trampolines, except for X86 codegen which isDuncan Sands2007-07-271-1/+3
| | | | | | | still under discussion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40549 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new TargetLowering code to provide the final register type that anDan Gohman2007-06-281-5/+20
| | | | | | | | | | | | | illegal value type will be transformed to, for code that needs the register type after all transformations instead of just after the first transformation. Factor out the code that uses this information to do copy-from-regs and copy-to-regs for various purposes into separate functions so that they are done consistently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37781 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT.Dan Gohman2007-06-271-13/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37758 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace ?: with if statements, for clarity.Dan Gohman2007-06-261-18/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37735 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the expression for TargetLowering::isTypeLegal.Dan Gohman2007-06-261-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37732 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize MVT::ValueType and associated functions to be able to representDan Gohman2007-06-251-14/+40
| | | | | | | | | | | | | | | | extended vector types. Remove the special SDNode opcodes used for pre-legalize vector operations, and the special MVT::Vector type used with them. Adjust lowering and legalize to work with the normal SDNode kinds instead, and to use the normal MVT functions to work with vector types instead of using the two special operands that the pre-legalize nodes held. This allows pre-legalize and post-legalize DAGs, and the code that operates on them, to be more consistent. Pre-legalize vector operators can be handled more consistently with scalar operators. And, -view-dag-combine1-dags and -view-legalize-dags now look prettier for vector code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37719 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits fromDan Gohman2007-06-221-21/+1
| | | | | | | | | | TargetLowering to SelectionDAG so that they have more convenient access to the current DAG, in preparation for the ValueType routines being changed from standalone functions to members of SelectionDAG for the pre-legalize vector type changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37704 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TargetLowering::getNumElements and friends toDan Gohman2007-06-211-4/+4
| | | | | | | | TargetLowering::getNumRegisters and similar, to avoid confusion with the actual number of elements for vector types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37687 91177308-0d34-0410-b5e6-96231b3b80d8
* Target specific ifcvt code duplication limit.Evan Cheng2007-06-011-3/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37384 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Evan Cheng2007-05-181-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37191 91177308-0d34-0410-b5e6-96231b3b80d8
* Add target hook to specify block size limit for if-conversion.Evan Cheng2007-05-161-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37134 91177308-0d34-0410-b5e6-96231b3b80d8
* add a default parameterChris Lattner2007-04-281-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36529 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed tabs everywhere except autogenerated & external files. Add makeAnton Korobeynikov2007-04-161-2/+2
| | | | | | | target for tabs checking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36146 91177308-0d34-0410-b5e6-96231b3b80d8
* remove dead target hooks.Chris Lattner2007-04-091-13/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35847 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some dead target hooks, subsumed by isLegalAddressingModeChris Lattner2007-04-091-11/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35840 91177308-0d34-0410-b5e6-96231b3b80d8
* add a default ctor for AddrMode.Chris Lattner2007-04-091-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35832 91177308-0d34-0410-b5e6-96231b3b80d8
* switch TL::getValueType to use MVT::getValueType.Chris Lattner2007-03-311-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35527 91177308-0d34-0410-b5e6-96231b3b80d8
* add one addressing mode description hook to rule them all.Chris Lattner2007-03-301-1/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35520 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove isLegalAddressImmediate.Evan Cheng2007-03-281-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35406 91177308-0d34-0410-b5e6-96231b3b80d8
* switch TargetLowering::getConstraintType to take the entire constraint,Chris Lattner2007-03-251-3/+3
| | | | | | | not just the first letter. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35322 91177308-0d34-0410-b5e6-96231b3b80d8
* repair x86 performance, dejagnu problems from previous changeDale Johannesen2007-03-211-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35245 91177308-0d34-0410-b5e6-96231b3b80d8
* do not share old induction variables when this would result in invalidDale Johannesen2007-03-201-0/+10
| | | | | | | instructions (that would have to be split later) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35227 91177308-0d34-0410-b5e6-96231b3b80d8
* Added isLegalAddressExpression hook to test if the given expression can beEvan Cheng2007-03-161-1/+7
| | | | | | | folded into target addressing mode for the given type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35121 91177308-0d34-0410-b5e6-96231b3b80d8
* More flexible TargetLowering LSR hooks for testing whether an immediate isEvan Cheng2007-03-121-20/+10
| | | | | | | a legal target address immediate or scale. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35071 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactoring of formal parameter flags. Enable properly use ofAnton Korobeynikov2007-03-071-2/+3
| | | | | | | zext/sext/aext stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35008 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify lowering and selection of exception ops.Jim Laskey2007-02-221-0/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34491 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1195:Reid Spencer2007-02-151-1/+1
| | | | | | | | Change use of "packed" term to "vector" in comments, strings, variable names, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1195:Reid Spencer2007-02-151-4/+4
| | | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.Evan Cheng2007-02-081-2/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34065 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the onlyAnton Korobeynikov2007-02-011-0/+2
| | | | | | | | affected part is codegen of "memove" inside x86 backend. This fixes PR1144 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33752 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the target to override the ISD::CondCode that's to be used to test theEvan Cheng2007-01-311-0/+16
| | | | | | | result of the comparison libcall against zero. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33701 91177308-0d34-0410-b5e6-96231b3b80d8
* Finish off bug 680, allowing targets to custom lower frame and returnNate Begeman2007-01-291-8/+0
| | | | | | | address nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33636 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate changes from my local tree. This patch includes:Anton Korobeynikov2007-01-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 1. New parameter attribute called 'inreg'. It has meaning "place this parameter in registers, if possible". This is some generalization of gcc's regparm(n) attribute. It's currently used only in X86-32 backend. 2. Completely rewritten CC handling/lowering code inside X86 backend. Merged stdcall + c CCs and fastcall + fast CC. 3. Dropped CSRET CC. We cannot add struct return variant for each target-specific CC (e.g. stdcall + csretcc and so on). 4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in on first attribute has meaning 'This is hidden pointer to structure return. Handle it gently'. 5. Fixed small bug in llvm-extract + add new feature to FunctionExtraction pass, which relinks all internal-linkaged callees from deleted function to external linkage. This will allow further linking everything together. NOTEs: 1. Documentation will be updated soon. 2. llvm-upgrade should be improved to translate csret => sret. Before this, there will be some unexpected test fails. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33597 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't #include DerivedTypes.h in this header. Make adjustments toReid Spencer2007-01-121-22/+3
| | | | | | | compensate. Move a function out of line to TargetLowering.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33153 91177308-0d34-0410-b5e6-96231b3b80d8
* - Move RTLIB::Libcall enum to a separate file.Evan Cheng2007-01-121-90/+4
| | | | | | | - Code clean up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33148 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence a bogus compiler warning.Evan Cheng2007-01-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33145 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1064:Reid Spencer2007-01-121-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
* Store default libgcc routine names and allow them to be redefined by target.Evan Cheng2007-01-121-1/+108
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33105 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
* - Remove isSetCCExpensive() etc. These are no longer used.Evan Cheng2007-01-051-10/+8
| | | | | | | | - Add isSelectExpensive() etc. It's used to tell codegen that select is expensive for a given target, avoid using it if possible. Currently it's only used to expand FCOPYSIGN. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32939 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-311-12/+13
| | | | | | | Change integer type names for signless integer types git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32777 91177308-0d34-0410-b5e6-96231b3b80d8