Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Do trivial local CSE for constants and other non-Instruction values | Dan Gohman | 2008-09-03 | 1 | -12/+15 |
| | | | | | | in FastISel. llvm-svn: 55748 | ||||
* | Create HandlePHINodesInSuccessorBlocksFast, a version of | Dan Gohman | 2008-09-03 | 1 | -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 Anderson | 2008-09-03 | 1 | -0/+2 |
| | | | | llvm-svn: 55704 | ||||
* | Fix an issue where we were reusing materializations of constants in blocks ↵ | Owen Anderson | 2008-09-03 | 1 | -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 Cheng | 2008-09-02 | 1 | -2/+4 |
| | | | | llvm-svn: 55668 | ||||
* | Fix an issue where a use might be selected before a def, and then we didn't ↵ | Owen Anderson | 2008-08-30 | 1 | -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 Gohman | 2008-08-28 | 1 | -0/+5 |
| | | | | llvm-svn: 55500 | ||||
* | Hook up support for fast-isel of trunc instructions, using the newly working ↵ | Owen Anderson | 2008-08-28 | 1 | -1/+4 |
| | | | | | | support for EXTRACT_SUBREG. llvm-svn: 55482 | ||||
* | FastEmitInst_extractsubreg doesn't need to be passed the register class. It ↵ | Owen Anderson | 2008-08-28 | 1 | -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 Anderson | 2008-08-27 | 1 | -0/+11 |
| | | | | | | selecting trunc's in fast-isel. llvm-svn: 55439 | ||||
* | Fix FastISel's bitcast code for the case where getRegForValue fails. | Dan Gohman | 2008-08-27 | 1 | -1/+4 |
| | | | | llvm-svn: 55431 | ||||
* | Use TargetLowering to get the types in fast isel, which handles pointer ↵ | Owen Anderson | 2008-08-27 | 1 | -4/+4 |
| | | | | | | types correctly for our purposes. llvm-svn: 55428 | ||||
* | Don't check TLI.getOperationAction. The FastISel way is to | Dan Gohman | 2008-08-27 | 1 | -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 of | Dan Gohman | 2008-08-27 | 1 | -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 Gohman | 2008-08-27 | 1 | -0/+6 |
| | | | | llvm-svn: 55425 | ||||
* | Basic FastISel support for floating-point constants. | Dan Gohman | 2008-08-27 | 1 | -0/+74 |
| | | | | llvm-svn: 55401 | ||||
* | Fix handling of inttoptr and ptrtoint when unhandled operands are present. | Owen Anderson | 2008-08-27 | 1 | -2/+6 |
| | | | | llvm-svn: 55400 | ||||
* | Add support for fast isel of inttoptr and ptrtoint in the cases where ↵ | Owen Anderson | 2008-08-27 | 1 | -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 Anderson | 2008-08-26 | 1 | -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 Anderson | 2008-08-26 | 1 | -0/+29 |
| | | | | llvm-svn: 55396 | ||||
* | Add support for fptosi of constants in fast isel. | Owen Anderson | 2008-08-26 | 1 | -3/+29 |
| | | | | llvm-svn: 55393 | ||||
* | Refactor the bitcast code into its own function. | Dan Gohman | 2008-08-26 | 1 | -58/+69 |
| | | | | llvm-svn: 55387 | ||||
* | Make FastISel use the correct argument type when casting GEP indices. | Dan Gohman | 2008-08-26 | 1 | -6/+7 |
| | | | | llvm-svn: 55384 | ||||
* | Don't select binary instructions with illegal types. | Dan Gohman | 2008-08-26 | 1 | -0/+6 |
| | | | | llvm-svn: 55383 | ||||
* | Add support for fast isel of sitofp, and remove some unnecessary and ↵ | Owen Anderson | 2008-08-26 | 1 | -4/+28 |
| | | | | | | imprecise legality checks. llvm-svn: 55381 | ||||
* | Use a combination of copyRegToReg and ISD::BIT_CONVERT when doing fast isel ↵ | Owen Anderson | 2008-08-26 | 1 | -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 Anderson | 2008-08-26 | 1 | -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 Anderson | 2008-08-26 | 1 | -5/+43 |
| | | | | llvm-svn: 55373 | ||||
* | Add a RetVT parameter to emitted FastISel methods, so that we will be able ↵ | Owen Anderson | 2008-08-25 | 1 | -18/+23 |
| | | | | | | | | to pass the desired return type down. This is not currently used. llvm-svn: 55345 | ||||
* | Unbreak build. | Evan Cheng | 2008-08-25 | 1 | -2/+2 |
| | | | | llvm-svn: 55342 | ||||
* | Expand bitcast support in fast isel to support bitcasts of non-constant ↵ | Owen Anderson | 2008-08-25 | 1 | -1/+29 |
| | | | | | | values by emitting reg-reg copies. llvm-svn: 55340 | ||||
* | Add support for fast isel of (integer) immediate materialization pattens, ↵ | Owen Anderson | 2008-08-25 | 1 | -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 Gohman | 2008-08-23 | 1 | -1/+1 |
| | | | | llvm-svn: 55220 | ||||
* | Reapply r55191 and r55192. | Dan Gohman | 2008-08-22 | 1 | -8/+15 |
| | | | | llvm-svn: 55205 | ||||
* | Reverting r55190, r55191, and r55192. They broke the build with this error ↵ | Bill Wendling | 2008-08-22 | 1 | -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 Gohman | 2008-08-22 | 1 | -2/+1 |
| | | | | llvm-svn: 55192 | ||||
* | Support non-fallthrough unconditional branches in FastISel. | Dan Gohman | 2008-08-22 | 1 | -8/+16 |
| | | | | llvm-svn: 55191 | ||||
* | Add FastISel support for PHINodes. Machine PHI nodes | Dan Gohman | 2008-08-22 | 1 | -0/+5 |
| | | | | | | | are not yet updated properly, but that's a separate task. llvm-svn: 55187 | ||||
* | Factor out the predicate check code from DAGISelEmitter.cpp | Dan Gohman | 2008-08-22 | 1 | -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 Gohman | 2008-08-21 | 1 | -4/+2 |
| | | | | llvm-svn: 55129 | ||||
* | MVT::getMVT uses iPTR for pointer types, while we need the actual | Dan Gohman | 2008-08-21 | 1 | -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 Gohman | 2008-08-21 | 1 | -19/+69 |
| | | | | llvm-svn: 55099 | ||||
* | Type of first GEP operand is always the same as the target pointer type. | Evan Cheng | 2008-08-21 | 1 | -7/+5 |
| | | | | llvm-svn: 55097 | ||||
* | Fix unused variable warnings. | Dan Gohman | 2008-08-20 | 1 | -3/+3 |
| | | | | llvm-svn: 55089 | ||||
* | First cut, un-optimized (and untested) fast isel lowering of GetElementPtrInst. | Evan Cheng | 2008-08-20 | 1 | -3/+107 |
| | | | | llvm-svn: 55085 | ||||
* | Simplify the BuildMI calls even more. | Dan Gohman | 2008-08-20 | 1 | -6/+3 |
| | | | | llvm-svn: 55077 | ||||
* | Simplify FastISel's constructor argument list, make the FastISel | Dan Gohman | 2008-08-20 | 1 | -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 Gohman | 2008-08-20 | 1 | -8/+2 |
| | | | | llvm-svn: 55072 | ||||
* | Minor code reorganization. | Dan Gohman | 2008-08-20 | 1 | -3/+3 |
| | | | | llvm-svn: 55071 | ||||
* | Minor whitespace cleanup. | Dan Gohman | 2008-08-20 | 1 | -1/+1 |
| | | | | llvm-svn: 55070 |