summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FastISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Eliminate a couple of fields from TargetRegisterClass: SubRegClasses and ↵Evan Cheng2009-01-221-1/+2
| | | | | | SuperRegClasses. These are not necessary. Also eliminate getSubRegisterRegClass and getSuperRegisterRegClass. These are slow and their results can change if register file names change. Just use TargetLowering::getRegClassFor() to get the right TargetRegisterClass instead. llvm-svn: 62762
* Change TargetInstrInfo::isMoveInstr to return source and destination ↵Evan Cheng2009-01-201-2/+2
| | | | | | sub-register indices as well. llvm-svn: 62600
* Use DebugInfo interface to lower dbg_* intrinsics.Devang Patel2009-01-131-2/+4
| | | | llvm-svn: 62127
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-2/+2
| | | | | | suggested by Chris. llvm-svn: 62099
* X86_COND_C and X86_COND_NC are alternate mnemonics forDan Gohman2009-01-071-7/+7
| | | | | | X86_COND_B and X86_COND_AE, respectively. llvm-svn: 61835
* Silence unused variable warnings.Devang Patel2008-12-231-0/+5
| | | | llvm-svn: 61392
* Fix fast-isel to not emit invalid assembly when presented with aDan Gohman2008-12-201-1/+1
| | | | | | | constant shift count that doesn't fit in the shift instruction's immediate field. This fixes PR3242. llvm-svn: 61281
* Fix some release-assert warningsChris Lattner2008-12-191-6/+6
| | | | llvm-svn: 61244
* Only perform SETO/SETC to JO/JC conversion if extractvalue is coming from an ↵Bill Wendling2008-12-101-35/+50
| | | | | | arithmetic with overflow instruction. llvm-svn: 60844
* Implement fast-isel conversion of a branch instruction that's branching on anBill Wendling2008-12-091-0/+63
| | | | | | | | | overflow/carry from the "arithmetic with overflow" intrinsics. It searches the machine basic block from bottom to top to find the SETO/SETC instruction that is its conditional. If an instruction modifies EFLAGS before it reaches the SETO/SETC instruction, then it defaults to the normal instruction emission. llvm-svn: 60807
* Correct my English.Bill Wendling2008-12-091-8/+9
| | | | llvm-svn: 60753
* Add initial support for fast-isel of the [SU]ADDO intrinsics. It isn'tBill Wendling2008-12-091-7/+84
| | | | | | | | | | | | | | | | | | | complete. For instance, it lowers the common case into this less-than-optimal code: addl %ecx, %eax seto %cl testb %cl, %cl jne LBB1_2 ## overflow instead of: addl %ecx, %eax jo LBB1_2 ## overflow That will come in a future commit. llvm-svn: 60737
* Fix a couple of mistaken switch case fall-throughs. Thanks to BillDan Gohman2008-12-081-0/+2
| | | | | | for spotting these! llvm-svn: 60728
* Factor out the code for sign-extending/truncating gep indicesDan Gohman2008-12-081-3/+3
| | | | | | | | | and use it in x86 address mode folding. Also, make getRegForValue return 0 for illegal types even if it has a ValueMap for them, because Argument values are put in the ValueMap. This fixes PR3181. llvm-svn: 60696
* Implement the optimized FCMP_OEQ/FCMP_UNE code for x86 fast-isel.Dan Gohman2008-10-211-0/+12
| | | | llvm-svn: 57915
* add support for folding immediates into stores when they Chris Lattner2008-10-151-20/+20
| | | | | | | are due to argument passing in calls. This is significant because it hits all immediate arguments to calls on x86-32. llvm-svn: 57556
* fold immediates into stores in simple cases, this produces diffs like Chris Lattner2008-10-151-30/+46
| | | | | | | | | | this: - movl $0, %eax - movl %eax, _yy_n_chars + movl $0, _yy_n_chars llvm-svn: 57555
* fold compare of null pointer into compare with 0.Chris Lattner2008-10-151-0/+4
| | | | llvm-svn: 57553
* Some minor cleanups:Chris Lattner2008-10-151-40/+30
| | | | | | | | | | | | | 1. Compute action in X86SelectSelect based on MVT instead of type. 2. Use TLI.getValueType(..) instead of MVT::getVT(..) because the former handles pointers and the later doesn't. 3. Don't pass TLI into isTypeLegal, since it already has access to it as an ivar. #2 gives fast isel some minor new functionality: handling load/stores of pointers. llvm-svn: 57552
* Use switch on VT instead of Type* comparisons.Chris Lattner2008-10-151-19/+18
| | | | llvm-svn: 57551
* Use X86FastEmitCompare for FCMP_OEQ and FCMP_UNE: it doesn'tChris Lattner2008-10-151-17/+8
| | | | | | change the generated code, but makes the code simpler. llvm-svn: 57550
* refactor compare emission out into a new X86FastEmitCompare method,Chris Lattner2008-10-151-29/+49
| | | | | | | | which makes it easy to share the compare/imm folding logic with 'setcc'. This shaves a bunch of instructions off the common select case, which happens a lot in llvm-gcc. llvm-svn: 57549
* Fold immediates into compares when possible, producing "cmp $4, %eax" instead ofChris Lattner2008-10-151-3/+36
| | | | | | loading 4 into a register and then doing the compare. llvm-svn: 57548
* more minor refactoring of X86SelectBranch, no functionality change.Chris Lattner2008-10-151-13/+11
| | | | llvm-svn: 57547
* factor buildmi calls in X86SelectBranchChris Lattner2008-10-151-89/+30
| | | | llvm-svn: 57546
* factor some more BuildMI's in X86SelectCmpChris Lattner2008-10-151-92/+30
| | | | llvm-svn: 57545
* factor some BuildMI calls, no functionality change.Chris Lattner2008-10-151-46/+56
| | | | llvm-svn: 57544
* FastISel support for exception-handling constructs.Dan Gohman2008-10-141-4/+20
| | | | | | | | | - 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. llvm-svn: 57539
* Add MBB successors and physreg Uses in the same order thatDan Gohman2008-10-071-7/+4
| | | | | | | SDISel typically adds them in. This makes it a little easier to compare FastISel output with SDISel output. llvm-svn: 57266
* Instead of emitting an implicit use for the super-register ofDan Gohman2008-10-071-6/+10
| | | | | | | | X86::CL that was used, emit an EXTRACT_SUBREG from the CL super-register to CL. This more precisely describes how the CL register is being used. llvm-svn: 57264
* Fix X86FastISel to handle dynamic allocas that have avoidedDan Gohman2008-10-031-0/+10
| | | | | | | getting inserted into the ValueMap. This avoids infinite recursion in some rare cases. llvm-svn: 56989
* Optimize conditional branches in X86FastISel. This replacesDan Gohman2008-10-021-16/+142
| | | | | | | | | | | sequences like this: sete %al testb %al, %al jne LBB11_1 with this: je LBB11_1 llvm-svn: 56969
* Work around an interaction between fast-isel and regalloc=local. TheDan Gohman2008-10-021-1/+5
| | | | | | | | | | | | | | | | | local register allocator's physreg liveness doesn't recognize subregs, so it doesn't know that defs of %ecx that are immediately followed by uses of %cl aren't dead. This comes up due to the way fast-isel emits shift instructions. This is a temporary workaround. Arguably, local regalloc should handle subreg references correctly. On the other hand, perhaps fast-isel should use INSERT_SUBREG instead of just assigning to the most convenient super-register of %cl when lowering shifts. This fixes MultiSource/Benchmarks/MallocBench/espresso, MultiSource/Applications/hexxagon, and others, under -fast. llvm-svn: 56947
* 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. llvm-svn: 56925
* Fix X86FastISel's output for x86-32 PIC constant pool addresses.Dan Gohman2008-09-301-1/+10
| | | | llvm-svn: 56829
* 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. llvm-svn: 56825
* Disable all x87 usage, including f32 and f64 when the subtargetDan Gohman2008-09-301-6/+17
| | | | | | doesn't have SSE(2), with X86FastISel. llvm-svn: 56823
* Fix an over-pessimization about GlobalVariable addresses in X86FastISel.Dan Gohman2008-09-291-1/+1
| | | | llvm-svn: 56802
* Fix X86FastISel's address folding to check displacementDan Gohman2008-09-261-5/+12
| | | | | | values for overflow. llvm-svn: 56686
* 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. llvm-svn: 56676
* Disable support for x86_f80 in X86FastISel. Supporting it wouldDan Gohman2008-09-261-9/+6
| | | | | | require more work. llvm-svn: 56637
* 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. llvm-svn: 56626
* 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. llvm-svn: 56622
* PIC support in X86FastISel.Dan Gohman2008-09-251-10/+57
| | | | llvm-svn: 56608
* Arrange for FastISel code to have access to the MachineModuleInfoDan Gohman2008-09-231-2/+4
| | | | | | object. This will be needed to support debug info. llvm-svn: 56508
* 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. llvm-svn: 56436
* 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%) llvm-svn: 56413
* Fix a FastISel GlobalVariable CSE bug.Dan Gohman2008-09-191-2/+4
| | | | llvm-svn: 56376
* 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. llvm-svn: 56371
* 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. llvm-svn: 56320
OpenPOWER on IntegriCloud