summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add sanity checking for BUILD_PAIR (I noticed theDuncan Sands2008-10-291-3/+6
| | | | | | | | | other day that PPC custom lowering could create a BUILD_PAIR of two f64 with a result type of... f64! - already fixed). Fix a place that triggers the sanity check. llvm-svn: 58378
* Fix SelectionDAGBuild lowering of Select instructions toDan Gohman2008-10-211-8/+22
| | | | | | | handle first-class aggregate values. Also, fix a bug in the Ret handling for empty aggregates. llvm-svn: 57925
* Fix gcc.c-torture/compile/920520-1.c by inserting bitconvertsChris Lattner2008-10-211-7/+30
| | | | | | | | | for strange asm conditions earlier. In this case, we have a double being passed in an integer reg class. Convert to like sized integer register so that we allocate the right number for the class (two i32's for the f64 in this case). llvm-svn: 57862
* Fix comment. Other formatting changes. No functionality changes.Bill Wendling2008-10-191-5/+6
| | | | llvm-svn: 57785
* Reapply r57699 with a fix to not crash on asms with multiple results. UnlikeChris Lattner2008-10-181-16/+48
| | | | | | | | | | the previous patch this one actually passes make check. "Fix PR2356 on PowerPC: if we have an input and output that are tied together that have different sizes (e.g. i32 and i64) make sure to reserve registers for the bigger operand." llvm-svn: 57771
* Revert r57699. It's causing regressions inDan Gohman2008-10-181-43/+15
| | | | | | | test/CodeGen/X86/2008-09-17-inline-asm-1.ll and a few others, and it breaks the llvm-gcc build. llvm-svn: 57747
* Factor out the code for mapping LLVM IR condition opcodes toDan Gohman2008-10-171-34/+44
| | | | | | ISD condition opcodes into helper functions. llvm-svn: 57726
* add support for 128 bit aggregates.Chris Lattner2008-10-171-0/+1
| | | | llvm-svn: 57715
* Factor out the code for mapping LLVM IR condition opcodes toDan Gohman2008-10-171-126/+61
| | | | | | ISD condition opcodes into helper functions. llvm-svn: 57710
* Fix PR2356 on PowerPC: if we have an input and output that are tied togetherChris Lattner2008-10-171-15/+43
| | | | | | | that have different sizes (e.g. i32 and i64) make sure to reserve registers for the bigger operand. llvm-svn: 57699
* refactor some code into a helper method, no functionality change.Chris Lattner2008-10-171-25/+40
| | | | llvm-svn: 57690
* Keep track of *which* input constraint matches an outputChris Lattner2008-10-171-3/+3
| | | | | | | constraint. Reject asms where an output has multiple input constraints tied to it. llvm-svn: 57687
* add an assert so that PR2356 explodes instead of running off anChris Lattner2008-10-171-6/+9
| | | | | | | array. Improve some minor comments, refactor some helpers in AsmOperandInfo. No functionality change for valid code. llvm-svn: 57686
* simplify comparisonChris Lattner2008-10-111-1/+1
| | | | llvm-svn: 57371
* Correctly handle calls with no return values. This fixesDan Gohman2008-10-071-1/+1
| | | | | | 2006-01-23-UnionInit on x86-64 when inlining is not enabled. llvm-svn: 57223
* Temporarily reverting r56683. This is causing a failure during the build of ↵Bill Wendling2008-09-261-4/+1
| | | | | | | | | | | | | | | | | llvm-gcc: /Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -mmacosx-version-min=10.4 -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Gir/devel/llvm/clean/llvm.obj/include -I/Volumes/Gir/devel/llvm/clean/llvm.src/include -fexceptions -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc.src/gcc/unwind-dw2-fde-darwin.c -o libgcc/./unwind-dw2-fde-darwin.o Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) && TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical register live information"), function runOnMachineFunction, file /Volumes/Gir/devel/llvm/clean/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp, line 311. ../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. {standard input}:3521:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb" {standard input}:3521:symbol: "_dwarf_reg_size_table" can't be undefined in a subtraction expression {standard input}:3520:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb" ... llvm-svn: 56703
* Fix @llvm.frameaddress codegen. FP elimination optimization should be ↵Evan Cheng2008-09-261-1/+4
| | | | | | disabled when frame address is desired. Also add support for depth > 0. llvm-svn: 56683
* Add "inreg" field to CallSDNode (doesn't increaseDale Johannesen2008-09-261-7/+11
| | | | | | | | | its size). Adjust various lowering functions to pass this info through from CallInst. Use it to implement sseregparm returns on X86. Remove X86_ssecall calling convention. llvm-svn: 56677
* Large mechanical patch.Devang Patel2008-09-251-19/+19
| | | | | | | | | | | | | | | 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
* Accept 'inreg' attribute on x86 functions asDale Johannesen2008-09-251-2/+7
| | | | | | | | meaning sse_regparm (i.e. float/double values go in XMM0 instead of ST0). Update documentation to reflect reality. llvm-svn: 56619
* FastISel support for debug info.Dan Gohman2008-09-251-1/+3
| | | | llvm-svn: 56610
* <rdar://problem/6234798> Assertion failed: ↵Evan Cheng2008-09-251-2/+5
| | | | | | (!OpInfo.AssignedRegs.Regs.empty() && "Couldn't allocate input reg!") llvm-svn: 56597
* Remove SelectionDag early allocation of registersDale Johannesen2008-09-241-40/+9
| | | | | | | for earlyclobbers. Teach Local RA about earlyclobber, and add some tests for it. llvm-svn: 56592
* Next round of earlyclobber handling. Approach theDale Johannesen2008-09-241-21/+10
| | | | | | | | | | 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-241-2/+20
| | | | | | the addressing mode, it requires the same logic for PIC relative addressing, etc. llvm-svn: 56526
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-1/+0
| | | | llvm-svn: 56513
* Add helper function to get a 32-bit floating point constant. No ↵Bill Wendling2008-09-221-189/+106
| | | | | | functionality change. llvm-svn: 56418
* Add a bit to mark operands of asm's that conflictDale Johannesen2008-09-171-13/+23
| | | | | | | | | 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
* Reverting r56249. On further investigation, this functionality isn't needed.Bill Wendling2008-09-161-4/+4
| | | | | | Apologies for the thrashing. llvm-svn: 56251
* - Change "ExternalSymbolSDNode" to "SymbolSDNode".Bill Wendling2008-09-161-4/+4
| | | | | | | | | | - 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-161-3/+8
| | | | | | | are not enabled. Instead just omit the tail call flag when calls are created. llvm-svn: 56235
* Define CallSDNode, an SDNode subclass for use with ISD::CALL.Dan Gohman2008-09-131-7/+4
| | | | | | | | | | | | | 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-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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-121-3/+7
| | | | | | | representation; coalescer and RA need to know about it. No functional change. llvm-svn: 56161
* Rename ConstantSDNode::getValue to getZExtValue, for consistencyDan Gohman2008-09-121-3/+3
| | | | | | | with ConstantInt. This led to fixing a bug in TargetLowering.cpp using getValue instead of getAPIntValue. llvm-svn: 56159
* FastISel support for i1 PHI nodes.Dan Gohman2008-09-101-2/+7
| | | | llvm-svn: 56069
* 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-101-4/+145
| | | | | | | | | | | 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
* 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 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
* Add limited precision floating-point conversions of log10 for 6- and 18-bitBill Wendling2008-09-091-4/+55
| | | | | | precisions. llvm-svn: 56000
* 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
* Redo the 3 existing low-precision expansions toDale Johannesen2008-09-081-47/+38
| | | | | | | use float constants. An oversight by the numerics people who supplied this. llvm-svn: 55930
* Reverting r55898 to r55909. One of these patches was causing an ICE during ↵Bill Wendling2008-09-081-33/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the full bootstrap on Darwin: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DSHARED -m64 -DL_negdi2 -c ../../llvm-gcc.src/gcc/libgcc2.c -o libgcc/x86_64/_negdi2_s.o Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) && TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical register live information"), function runOnMachineFunction, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp, line 311. /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DSHARED -m64 -DL_lshrdi3 -c ../../llvm-gcc.src/gcc/libgcc2.c -o libgcc/x86_64/_lshrdi3_s.o ../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. {standard input}:unknown:Undefined local symbol LBB21_11 {standard input}:unknown:Undefined local symbol LBB21_12 {standard input}:unknown:Undefined local symbol LBB21_13 {standard input}:unknown:Undefined local symbol LBB21_8 llvm-svn: 55928
* Add VISIBILITY_HIDDEN on SDISelAsmOperandInfoDaniel Dunbar2008-09-081-1/+1
| | | | llvm-svn: 55922
* Unbreak and fix indentationAnton Korobeynikov2008-09-081-37/+33
| | | | llvm-svn: 55904
OpenPOWER on IntegriCloud