summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Do trivial local CSE for constants and other non-Instruction valuesDan Gohman2008-09-031-12/+15
| | | | | | in FastISel. llvm-svn: 55748
* Create HandlePHINodesInSuccessorBlocksFast, a version ofDan Gohman2008-09-031-152/+127
| | | | | | | | | | | | | 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. llvm-svn: 55746
* Oops, I accidentally broke the fallback case with my last commit.Owen Anderson2008-09-031-0/+2
| | | | llvm-svn: 55704
* Fix an issue where we were reusing materializations of constants in blocks ↵Owen Anderson2008-09-031-9/+15
| | | | | | | | | not dominated by the materialization. This is the simple fix, materializing the constant before every use. It might be better to either track domination of uses or to materialize all constants and the beginning of the function and let remat sort when to do materialization at uses. llvm-svn: 55703
* 80 col violations.Evan Cheng2008-09-021-2/+4
| | | | llvm-svn: 55668
* Fix an issue where a use might be selected before a def, and then we didn't ↵Owen Anderson2008-08-301-8/+23
| | | | | | | | | | | respect the pre-chosen vreg assignment when selecting the def. This is the naive solution to the problem: insert a copy to the pre-chosen vreg. Other solutions might be preferable, such as: 1) Passing the dest reg into FastEmit_. However, this would require the higher level code to know about reg classes, which they don't currently. 2) Selecting blocks in reverse postorder. This has some compile time cost for computing the order, and we'd need to measure its impact. llvm-svn: 55555
* Implement null and undef values for FastISel.Dan Gohman2008-08-281-0/+5
| | | | llvm-svn: 55500
* Hook up support for fast-isel of trunc instructions, using the newly working ↵Owen Anderson2008-08-281-1/+4
| | | | | | support for EXTRACT_SUBREG. llvm-svn: 55482
* FastEmitInst_extractsubreg doesn't need to be passed the register class. It ↵Owen Anderson2008-08-281-2/+2
| | | | | | can get it from MachineRegisterInfo instead. llvm-svn: 55476
* Add a helper method that will be used to support EXTRACT_SUBREG for ↵Owen Anderson2008-08-271-0/+11
| | | | | | selecting trunc's in fast-isel. llvm-svn: 55439
* Fix FastISel's bitcast code for the case where getRegForValue fails.Dan Gohman2008-08-271-1/+4
| | | | llvm-svn: 55431
* Use TargetLowering to get the types in fast isel, which handles pointer ↵Owen Anderson2008-08-271-4/+4
| | | | | | types correctly for our purposes. llvm-svn: 55428
* Don't check TLI.getOperationAction. The FastISel way is toDan Gohman2008-08-271-6/+2
| | | | | | | just try to do the action and let the tablegen-generated code determine if there is target-support for an operation. llvm-svn: 55427
* Add a new FastISel method, getRegForValue, which takes care ofDan Gohman2008-08-271-133/+95
| | | | | | | the details of materializing constants and other values into registers, and make use of it in several places. llvm-svn: 55426
* Add a comment about the current floating-point constant code in FastISel.Dan Gohman2008-08-271-0/+6
| | | | llvm-svn: 55425
* Basic FastISel support for floating-point constants.Dan Gohman2008-08-271-0/+74
| | | | llvm-svn: 55401
* Fix handling of inttoptr and ptrtoint when unhandled operands are present.Owen Anderson2008-08-271-2/+6
| | | | llvm-svn: 55400
* Add support for fast isel of inttoptr and ptrtoint in the cases where ↵Owen Anderson2008-08-271-0/+19
| | | | | | truncation is not needed. llvm-svn: 55399
* Factor out a large amoutn of the cast handling code in fast isel into helper ↵Owen Anderson2008-08-261-107/+81
| | | | | | | | methods. This simultaneously makes the code simpler and adds support for sext as well. llvm-svn: 55398
* Add support for fast isel of zext.Owen Anderson2008-08-261-0/+29
| | | | llvm-svn: 55396
* Add support for fptosi of constants in fast isel.Owen Anderson2008-08-261-3/+29
| | | | llvm-svn: 55393
* Refactor the bitcast code into its own function.Dan Gohman2008-08-261-58/+69
| | | | llvm-svn: 55387
* Make FastISel use the correct argument type when casting GEP indices.Dan Gohman2008-08-261-6/+7
| | | | llvm-svn: 55384
* Don't select binary instructions with illegal types.Dan Gohman2008-08-261-0/+6
| | | | llvm-svn: 55383
* Add support for fast isel of sitofp, and remove some unnecessary and ↵Owen Anderson2008-08-261-4/+28
| | | | | | imprecise legality checks. llvm-svn: 55381
* Use a combination of copyRegToReg and ISD::BIT_CONVERT when doing fast isel ↵Owen Anderson2008-08-261-8/+19
| | | | | | | | of bitcasts, allowing it to support the full range of conversions people might ask for in a correct manner. llvm-svn: 55378
* Make TargetInstrInfo::copyRegToReg return a bool indicating whether the copy ↵Owen Anderson2008-08-261-5/+5
| | | | | | | | | requested was inserted or not. This allows bitcast in fast isel to properly handle the case where an appropriate reg-to-reg copy is not available. llvm-svn: 55375
* Add support for fast isel of non-constant fptosi instructions.Owen Anderson2008-08-261-5/+43
| | | | llvm-svn: 55373
* Add a RetVT parameter to emitted FastISel methods, so that we will be able ↵Owen Anderson2008-08-251-18/+23
| | | | | | | | to pass the desired return type down. This is not currently used. llvm-svn: 55345
* Unbreak build.Evan Cheng2008-08-251-2/+2
| | | | llvm-svn: 55342
* Expand bitcast support in fast isel to support bitcasts of non-constant ↵Owen Anderson2008-08-251-1/+29
| | | | | | values by emitting reg-reg copies. llvm-svn: 55340
* Add support for fast isel of (integer) immediate materialization pattens, ↵Owen Anderson2008-08-251-2/+29
| | | | | | | | and use them to support bitcast of constants in fast isel. llvm-svn: 55325
* Make MBBMap a DenseMap instead of a std::map.Dan Gohman2008-08-231-1/+1
| | | | llvm-svn: 55220
* Reapply r55191 and r55192.Dan Gohman2008-08-221-8/+15
| | | | llvm-svn: 55205
* Reverting r55190, r55191, and r55192. They broke the build with this error ↵Bill Wendling2008-08-221-15/+8
| | | | | | | | | | | | | | | message: {standard input}:17:bad register name `%sil' make[4]: *** [libgcc/./_addvsi3.o] Error 1 make[4]: *** Waiting for unfinished jobs.... {standard input}:23:bad register name `%dil' {standard input}:28:bad register name `%dil' make[4]: *** [libgcc/./_addvdi3.o] Error 1 {standard input}:18:bad register name `%sil' make[4]: *** [libgcc/./_subvsi3.o] Error 1 llvm-svn: 55200
* Fix the InsertBranch call.Dan Gohman2008-08-221-2/+1
| | | | llvm-svn: 55192
* Support non-fallthrough unconditional branches in FastISel.Dan Gohman2008-08-221-8/+16
| | | | llvm-svn: 55191
* Add FastISel support for PHINodes. Machine PHI nodesDan Gohman2008-08-221-0/+5
| | | | | | | are not yet updated properly, but that's a separate task. llvm-svn: 55187
* Factor out the predicate check code from DAGISelEmitter.cppDan Gohman2008-08-221-4/+6
| | | | | | | | | 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. llvm-svn: 55156
* Have FastISel skip the multiply by 1 for getelementptr on i8*.Dan Gohman2008-08-211-4/+2
| | | | llvm-svn: 55129
* MVT::getMVT uses iPTR for pointer types, while we need the actualDan Gohman2008-08-211-8/+8
| | | | | | | intptr_t type in this case. FastISel can now select simple getelementptr instructions. llvm-svn: 55125
* Basic fast-isel support for instructions with constant int operands.Dan Gohman2008-08-211-19/+69
| | | | llvm-svn: 55099
* Type of first GEP operand is always the same as the target pointer type.Evan Cheng2008-08-211-7/+5
| | | | llvm-svn: 55097
* Fix unused variable warnings.Dan Gohman2008-08-201-3/+3
| | | | llvm-svn: 55089
* First cut, un-optimized (and untested) fast isel lowering of GetElementPtrInst.Evan Cheng2008-08-201-3/+107
| | | | llvm-svn: 55085
* Simplify the BuildMI calls even more.Dan Gohman2008-08-201-6/+3
| | | | llvm-svn: 55077
* Simplify FastISel's constructor argument list, make the FastISelDan Gohman2008-08-201-11/+15
| | | | | | | | class hold a MachineRegisterInfo member, and make the MachineBasicBlock be passed in to SelectInstructions rather than the FastISel constructor. llvm-svn: 55076
* Make more use of the BuildMI API.Dan Gohman2008-08-201-8/+2
| | | | llvm-svn: 55072
* Minor code reorganization.Dan Gohman2008-08-201-3/+3
| | | | llvm-svn: 55071
* Minor whitespace cleanup.Dan Gohman2008-08-201-1/+1
| | | | llvm-svn: 55070
OpenPOWER on IntegriCloud