aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86FastISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Split x86's ADJCALLSTACK instructions into 32-bit and 64-bit forms.Dan Gohman2008-10-011-2/+4
| | | | | | | | | | | | This allows the 64-bit forms to use+def RSP instead of ESP. This doesn't fix any real bugs today, but it is more precise and it makes the debug dumps on x86-64 look more consistent. Also, add some comments describing the CALL instructions' physreg operand uses and defs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56925 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix X86FastISel's output for x86-32 PIC constant pool addresses.Dan Gohman2008-09-301-1/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56829 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the GlobalBaseReg field out of X86ISelDAGToDAG.cppDan Gohman2008-09-301-19/+2
| | | | | | | | | and X86FastISel.cpp into X86MachineFunction.h, so that it can be shared, instead of having each selector keep track of its own. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56825 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable all x87 usage, including f32 and f64 when the subtargetDan Gohman2008-09-301-6/+17
| | | | | | | doesn't have SSE(2), with X86FastISel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56823 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an over-pessimization about GlobalVariable addresses in X86FastISel.Dan Gohman2008-09-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56802 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix X86FastISel's address folding to check displacementDan Gohman2008-09-261-5/+12
| | | | | | | values for overflow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56686 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the code for determining when symblic addressesDan Gohman2008-09-261-9/+31
| | | | | | | | | | require RIP-relative addressing and use it to fix a bug in X86FastISel in x86-64 PIC mode, where it was trying to use base/index registers with RIP-relative addresses. This fixes a bunch of x86-64 testsuite failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56676 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable support for x86_f80 in X86FastISel. Supporting it wouldDan Gohman2008-09-261-9/+6
| | | | | | | require more work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56637 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in which address displacements were being added to theDan Gohman2008-09-251-1/+9
| | | | | | | load from the stub, instead of the result of the load from the stub. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56626 91177308-0d34-0410-b5e6-96231b3b80d8
* Large mechanical patch.Devang Patel2008-09-251-6/+6
| | | | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
* PIC support in X86FastISel.Dan Gohman2008-09-251-10/+57
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56608 91177308-0d34-0410-b5e6-96231b3b80d8
* Arrange for FastISel code to have access to the MachineModuleInfoDan Gohman2008-09-231-2/+4
| | | | | | | object. This will be needed to support debug info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56508 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the calling convention used when tail call optimization is enabled ↵Arnold Schwaighofer2008-09-221-2/+0
| | | | | | from CC_X86_32_TailCall to CC_X86_32_FastCC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56436 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold immediates into X86 shifts with fast isel. This generates:Chris Lattner2008-09-211-15/+24
| | | | | | | | | | | | | | | sarl $3, %ecx instead of: movl $3, %ecx sarl %cl, %edx This shrinks fast isel 176.gcc by about 2000 instructions (.3%) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56413 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a FastISel GlobalVariable CSE bug.Dan Gohman2008-09-191-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56376 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor X86SelectConstAddr, folding it into X86SelectAddress. ThisDan Gohman2008-09-191-80/+66
| | | | | | | | results in better code for globals. Also, unbreak the local CSE for GlobalValue stub loads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56371 91177308-0d34-0410-b5e6-96231b3b80d8
* Address-mode folding for X86FastISel. It's pretty basic, but itDan Gohman2008-09-181-18/+95
| | | | | | | | | catches a fair number of common cases. Note that this currently causes Fast-ISel to leave behind lots of dead instructions. Those will be dealt with in subsequent commits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56320 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify this code. The FastISel class has its own TD member.Dan Gohman2008-09-181-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56311 91177308-0d34-0410-b5e6-96231b3b80d8
* FastISel: For calls, prefer using the callee's address as a constantDan Gohman2008-09-171-10/+13
| | | | | | | | | | | | | over having it in a register. And wait until after checking type legality before requesting that the callee address be placed in a register. Also, fix support for calls with void return type. This speeds up fast-isel isel time by about 15% and reduces instruction counts by about 3% overall on certain testcases. It also changes many indirect calls to direct calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56292 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in ANY_EXTEND handling that was breaking 403.gcc on X86-64 in fast ↵Owen Anderson2008-09-111-2/+7
| | | | | | isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56117 91177308-0d34-0410-b5e6-96231b3b80d8
* If ISD::ANY_EXTEND fails, try ISD::ZERO_EXTEND and ISD::SIGN_EXTEND before ↵Owen Anderson2008-09-111-0/+7
| | | | | | | | | giving up. This fixes 445.gobmk on X86-64 in fast isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56088 91177308-0d34-0410-b5e6-96231b3b80d8
* X86FastISel support for double->float and float->double casts.Dan Gohman2008-09-101-0/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56070 91177308-0d34-0410-b5e6-96231b3b80d8
* Add X86FastISel support for static allocas, and refencesDan Gohman2008-09-101-59/+74
| | | | | | | | to static allocas. As part of this change, refactor the address mode code for laods and stores. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56066 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a constant lowering bug. Now we can do load and store instructions with ↵Evan Cheng2008-09-091-28/+43
| | | | | | funky getelementptr embedded in the address operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55975 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle calls which produce i1 results: promote to i8 but and it with 1 to ↵Evan Cheng2008-09-081-3/+18
| | | | | | get the low bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55925 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix copy+pastos in comments.Dan Gohman2008-09-081-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55918 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to extend call operands when needed. Enable x86 fastisel call ↵Evan Cheng2008-09-081-24/+33
| | | | | | support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55891 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial fastisel call support for C, Fast, and X86_FastCall calling ↵Evan Cheng2008-09-071-42/+308
| | | | | | | | | conventions. It's meant to handle "simple" calls, i.e. no byval, structret, etc. It doesn't support multi-result returns either. Not yet turned on, it needs to support sext / zext of arguments and result. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55882 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle x86 truncate to i8 with target hook for now.Evan Cheng2008-09-071-0/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55877 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix constant pool loads, and remove broken versions of addConstantPoolReference.Owen Anderson2008-09-061-6/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55868 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix X86FastISel's shift and select code to reject illegal types.Dan Gohman2008-09-051-1/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55857 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the opcodes used by X86FastISel for shifts and conditional moves.Dan Gohman2008-09-051-11/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55855 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out code that emits load and store instructions.Evan Cheng2008-09-051-111/+138
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55854 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename method.Owen Anderson2008-09-051-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55853 91177308-0d34-0410-b5e6-96231b3b80d8
* X86FastISel support for shifts and conditional moves.Dan Gohman2008-09-051-0/+99
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55844 91177308-0d34-0410-b5e6-96231b3b80d8
* Check a comparion's operand type for legality beforeDan Gohman2008-09-051-4/+4
| | | | | | | expanding its operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55820 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix X86FastISel code for comparisons and conditional branchesDan Gohman2008-09-051-1/+9
| | | | | | | | to check the result of getRegForValue before using it, and to check for illegal operand types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55819 91177308-0d34-0410-b5e6-96231b3b80d8
* X86FastISel support for conditional branches.Dan Gohman2008-09-051-1/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55816 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initial support for selecting constant materializations that require ↵Owen Anderson2008-09-051-0/+88
| | | | | | | | | constant pool loads on X86 in fast isel. This isn't actually used yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55814 91177308-0d34-0410-b5e6-96231b3b80d8
* X86FastISel support for ICmpInst and FCmpInst.Dan Gohman2008-09-041-0/+139
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55811 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the ordering of operands to the store (inverted relative to LLVM IR), ↵Owen Anderson2008-09-041-2/+4
| | | | | | and fix the testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55777 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a first attempt at implementing stores for X86 fast isel using target hooks.Owen Anderson2008-09-041-0/+87
| | | | | | | Dan or Evan, please review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55764 91177308-0d34-0410-b5e6-96231b3b80d8
* Load from GV stub should be locally CSE'd.Evan Cheng2008-09-041-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55763 91177308-0d34-0410-b5e6-96231b3b80d8
* Create HandlePHINodesInSuccessorBlocksFast, a version ofDan Gohman2008-09-031-28/+18
| | | | | | | | | | | | | | HandlePHINodesInSuccessorBlocks that works FastISel-style. This allows PHI nodes to be updated correctly while using FastISel. This also involves some code reorganization; ValueMap and MBBMap are now members of the FastISel class, so they needn't be passed around explicitly anymore. Also, SelectInstructions is changed to SelectInstruction, and only does one instruction at a time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55746 91177308-0d34-0410-b5e6-96231b3b80d8
* Add X86 target hook to implement load (even from GlobalAddress).Evan Cheng2008-09-031-1/+130
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55693 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak fast isel.Evan Cheng2008-09-031-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55685 91177308-0d34-0410-b5e6-96231b3b80d8
* Let tblgen only generate fastisel routines, not the class definition. This ↵Evan Cheng2008-09-031-7/+23
| | | | | | makes it easier for targets to define its own fastisel class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55679 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initial support for fast isel of instructions that have inputs pinned to ↵Owen Anderson2008-08-291-0/+1
| | | | | | physical registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55545 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a target callback for FastISel.Dan Gohman2008-08-281-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55512 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the predicate check code from DAGISelEmitter.cppDan Gohman2008-08-221-0/+1
| | | | | | | | | | and use it in FastISelEmitter.cpp, and make FastISel subtarget aware. Among other things, this lets it work properly on x86 targets that don't have SSE, where it successfully selects x87 instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55156 91177308-0d34-0410-b5e6-96231b3b80d8