summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
* Next round of earlyclobber handling. Approach theDale Johannesen2008-09-243-42/+17
| | | | | | | | | | RA problem by expanding the live interval of an earlyclobber def back one slot. Remove overlap-earlyclobber throughout. Remove earlyclobber bits and their handling from live internals. llvm-svn: 56539
* Properly handle 'm' inline asm constraints. If a GV is being selected for ↵Evan Cheng2008-09-242-5/+25
| | | | | | the addressing mode, it requires the same logic for PIC relative addressing, etc. llvm-svn: 56526
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-232-2/+0
| | | | llvm-svn: 56513
* Arrange for FastISel code to have access to the MachineModuleInfoDan Gohman2008-09-232-5/+10
| | | | | | object. This will be needed to support debug info. llvm-svn: 56508
* Replace the LiveRegs SmallSet with a simple counter that keepsDan Gohman2008-09-232-23/+29
| | | | | | | track of the number of live registers, which is all the set was being used for. llvm-svn: 56498
* Fix the alignment of loads from constant pool entries when theDan Gohman2008-09-222-1/+7
| | | | | | | load address has an offset from the base of the constant pool entry. llvm-svn: 56479
* Make log, log2, log10, exp, exp2 use Expand byDale Johannesen2008-09-221-0/+12
| | | | | | default. llvm-svn: 56471
* Per review feedback: Only performEvan Cheng2008-09-221-39/+27
| | | | | | | (srl x, (trunc (and y, c))) -> (srl x, (and (trunc y), c)) etc. when both "trunc" and "and" have single uses. llvm-svn: 56452
* Initial support for the CMake build system.Oscar Fuentes2008-09-221-0/+21
| | | | llvm-svn: 56419
* Add helper function to get a 32-bit floating point constant. No ↵Bill Wendling2008-09-221-189/+106
| | | | | | functionality change. llvm-svn: 56418
* don't print GlobalAddressSDNode's with an offset of zero as "foo0".Chris Lattner2008-09-211-5/+6
| | | | llvm-svn: 56399
* Refactor X86SelectConstAddr, folding it into X86SelectAddress. ThisDan Gohman2008-09-191-21/+15
| | | | | | | results in better code for globals. Also, unbreak the local CSE for GlobalValue stub loads. llvm-svn: 56371
* Add a new "fast" scheduler. This is currently basically just aDan Gohman2008-09-181-0/+654
| | | | | | | | | | | | | | | | copy of the BURRList scheduler, but with several parts ripped out, such as backtracking, online topological sort maintenance (needed by backtracking), the priority queue, and Sethi-Ullman number computation and maintenance (needed by the priority queue). As a result of all this, it generates somewhat lower quality code, but that's its tradeoff for running about 30% faster than list-burr in -fast mode in many cases. This is somewhat experimental. Moving forward, major pieces of this can be refactored with pieces in common with ScheduleDAGRRList.cpp. llvm-svn: 56307
* Add a bit to mark operands of asm's that conflictDale Johannesen2008-09-173-20/+44
| | | | | | | | | with an earlyclobber operand elsewhere. Propagate this bit and the earlyclobber bit through SDISel. Change linear-scan RA not to allocate regs in a way that conflicts with an earlyclobber. See also comments. llvm-svn: 56290
* Don't worry about clobbering physical register defs that aren't used.Dan Gohman2008-09-171-0/+2
| | | | llvm-svn: 56281
* When converting a CopyFromReg to a copy instruction, use the register class ↵Evan Cheng2008-09-161-5/+24
| | | | | | of its uses to determine the right destination register class of the copy. This is important for targets where a physical register may belong to multiple register classes. llvm-svn: 56258
* Change SelectionDAG::getConstantPool to always set the alignment of theDan Gohman2008-09-162-7/+20
| | | | | | | | | | | | | | | | | | | | ConstantPoolSDNode, using the target's preferred alignment for the constant type. In LegalizeDAG, when performing loads from the constant pool, the ConstantPoolSDNode's alignment is used in the calls to getLoad and getExtLoad. This change prevents SelectionDAG::getLoad/getExtLoad from incorrectly choosing the ABI alignment for constant pool loads when Alignment == 0. The incorrect alignment is only a performance issue when ABI alignment does not equal preferred alignment (i.e., on x86 it was generating MOVUPS instead of MOVAPS for v4f32 constant loads when the default ABI alignment for 128bit vectors is forced to 1 byte.) Patch by Paul Redmond! llvm-svn: 56253
* Reverting r56249. On further investigation, this functionality isn't needed.Bill Wendling2008-09-166-59/+45
| | | | | | Apologies for the thrashing. llvm-svn: 56251
* Include the alignment value when displaying ConstantPoolSDNodes.Dan Gohman2008-09-161-0/+1
| | | | llvm-svn: 56250
* - Change "ExternalSymbolSDNode" to "SymbolSDNode".Bill Wendling2008-09-166-45/+59
| | | | | | | | | | - Add linkage to SymbolSDNode (default to external). - Change ISD::ExternalSymbol to ISD::Symbol. - Change ISD::TargetExternalSymbol to ISD::TargetSymbol These changes pave the way to allowing SymbolSDNodes with non-external linkage. llvm-svn: 56249
* Don't take the time to CheckDAGForTailCallsAndFixThem when tail callsDan Gohman2008-09-162-4/+10
| | | | | | | are not enabled. Instead just omit the tail call flag when calls are created. llvm-svn: 56235
* Re-enable SelectionDAG CSE for calls. It matters in the case ofDan Gohman2008-09-151-6/+20
| | | | | | libcalls, as in this testcase on ARM. llvm-svn: 56226
* Define CallSDNode, an SDNode subclass for use with ISD::CALL.Dan Gohman2008-09-135-59/+73
| | | | | | | | | | | | | Currently it just holds the calling convention and flags for isVarArgs and isTailCall. And it has several utility methods, which eliminate magic 5+2*i and similar index computations in several places. CallSDNodes are not CSE'd. Teach UpdateNodeOperands to handle nodes that are not CSE'd gracefully. llvm-svn: 56183
* Change ConstantSDNode and ConstantFPSDNode to use ConstantInt* andDan Gohman2008-09-125-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | ConstantFP* instead of APInt and APFloat directly. This reduces the amount of time to create ConstantSDNode and ConstantFPSDNode nodes when ConstantInt* and ConstantFP* respectively are already available, as is the case in SelectionDAGBuild.cpp. Also, it reduces the amount of time to legalize constants into constant pools, and the amount of time to add ConstantFP operands to MachineInstrs, due to eliminating ConstantInt::get and ConstantFP::get calls. It increases the amount of work needed to create new constants in cases where the client doesn't already have a ConstantInt* or ConstantFP*, such as legalize expanding 64-bit integer constants to 32-bit constants. And it adds a layer of indirection for the accessor methods. But these appear to be outweight by the benefits in most cases. It will also make it easier to make ConstantSDNode and ConstantFPNode more consistent with ConstantInt and ConstantFP. llvm-svn: 56162
* Pass "earlyclobber" bit through to machineDale Johannesen2008-09-122-3/+14
| | | | | | | representation; coalescer and RA need to know about it. No functional change. llvm-svn: 56161
* Rename ConstantSDNode::getValue to getZExtValue, for consistencyDan Gohman2008-09-1211-128/+143
| | | | | | | with ConstantInt. This led to fixing a bug in TargetLowering.cpp using getValue instead of getAPIntValue. llvm-svn: 56159
* The sequence for ppcf128 compares was not IEEEDale Johannesen2008-09-121-4/+6
| | | | | | safe in the presence of NaNs. llvm-svn: 56136
* FastISel support for i1 PHI nodes.Dan Gohman2008-09-101-2/+7
| | | | llvm-svn: 56069
* FastISel support for i1 constants.Dan Gohman2008-09-101-2/+10
| | | | llvm-svn: 56068
* Add X86FastISel support for static allocas, and refencesDan Gohman2008-09-102-14/+23
| | | | | | | to static allocas. As part of this change, refactor the address mode code for laods and stores. llvm-svn: 56066
* Add a break statement that I accidentally deleted whenDan Gohman2008-09-101-0/+1
| | | | | | | I shuffled the fast-isel command-line options around. This fixes a bunch of fast-isel failures. llvm-svn: 56057
* Remove unnecessary bit-wise AND from the limited precision work.Bill Wendling2008-09-101-6/+4
| | | | llvm-svn: 56049
* Fix 80 col violation.Daniel Dunbar2008-09-101-1/+2
| | | | llvm-svn: 56048
* Check that both operands are f32 before attempting to lower.Bill Wendling2008-09-101-0/+1
| | | | llvm-svn: 56036
* Implement "visitPow". This is mainly used to see if we have a pow() call of thisBill Wendling2008-09-102-4/+146
| | | | | | | | | | | form: powf(10.0f, x); If this is the case, and also we want limited precision floating-point calculations, then lower to do the limited-precision stuff. llvm-svn: 56035
* A few more places where FPOW is being ignored.Evan Cheng2008-09-091-7/+13
| | | | llvm-svn: 56032
* Change -fast-isel-no-abort to -fast-isel-abort, which now defaultsDan Gohman2008-09-091-7/+12
| | | | | | | | to being off by default. Also, add assertion checks to check that the various fast-isel-related command-line options are only used when -fast-isel itself is enabled. llvm-svn: 56029
* Legalizer was missing code that expand fpow to a libcall.Evan Cheng2008-09-091-10/+12
| | | | llvm-svn: 56028
* Adding 6-, 12-, and 18-bit limited-precision floating-point support for exp2Bill Wendling2008-09-091-26/+111
| | | | | | function. llvm-svn: 56025
* Add support for 6-, 12-, and 18-bit limited precision calculations of exp forBill Wendling2008-09-091-7/+134
| | | | | | floating-point numbers. llvm-svn: 56023
* Add a new option, -fast-isel-verbose, that can be used withDan Gohman2008-09-091-15/+21
| | | | | | | -fast-isel-no-abort to get a dump of all unhandled instructions, without an abort. llvm-svn: 56021
* Clean this up, based on Evan's suggestions.Owen Anderson2008-09-091-2/+2
| | | | llvm-svn: 56009
* - Add support for 6-, 12-, and 18-bit limited precision floating-point "log"Bill Wendling2008-09-091-112/+216
| | | | | | | values. - Refactored some of the code. llvm-svn: 56008
* Make safer variant of alias resolution routine to be defaultAnton Korobeynikov2008-09-091-1/+1
| | | | llvm-svn: 56005
* Add limited precision floating-point conversions of log10 for 6- and 18-bitBill Wendling2008-09-091-4/+55
| | | | | | precisions. llvm-svn: 56000
* Check for type legality before materializing integer constants in fast isel. ↵Owen Anderson2008-09-091-0/+2
| | | | | | | | With this change, all of MultiSource/Applications passes on Darwin/X86 under FastISel. llvm-svn: 55982
* Remove the code that protected FastISel from aborting inDan Gohman2008-09-091-5/+2
| | | | | | | | the case of loads, stores, and conditional branches. It can handle those now, so any that aren't handled should trigger the abort. llvm-svn: 55977
* Fix a constant lowering bug. Now we can do load and store instructions with ↵Evan Cheng2008-09-091-0/+13
| | | | | | funky getelementptr embedded in the address operand. llvm-svn: 55975
* Add support for floating-point calculations of log2 with limited precisions of 6Bill Wendling2008-09-091-76/+191
| | | | | | and 18. llvm-svn: 55968
* Reapply 55904: Unbreak and fix indentationAnton Korobeynikov2008-09-081-37/+33
| | | | llvm-svn: 55958
OpenPOWER on IntegriCloud