summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Move getExtLoad() and (some) getLoad() DebugLoc argument after EVT argument ↵Evan Cheng2010-07-071-21/+21
| | | | | | for consistency sake. llvm-svn: 107820
* By default, the eh.sjlj.setjmp/longjmp intrinsics should just do nothing ratherJim Grosbach2010-07-061-2/+7
| | | | | | | than assuming a target will custom lower them. Targets which do so should exlicitly mark them as having custom lowerings. PR7454. llvm-svn: 107734
* 80-column and trailing whitespace cleanup.Jim Grosbach2010-07-021-28/+33
| | | | llvm-svn: 107490
* grammar tweaksJim Grosbach2010-07-021-3/+3
| | | | llvm-svn: 107489
* When splitting a VAARG, remember its alignment.Rafael Espindola2010-06-261-3/+17
| | | | | | This produces terrible but correct code. llvm-svn: 106952
* back-end libcall handling for ATOMIC_SWAP (__sync_lock_test_and_set)Jim Grosbach2010-06-181-0/+9
| | | | llvm-svn: 106342
* Fix cross initialization compilation error.Evan Cheng2010-06-181-1/+2
| | | | llvm-svn: 106324
* Add Expand-to-libcall support for additional atomics. This covers the usualJim Grosbach2010-06-181-4/+124
| | | | | | | | | | entries used by llvm-gcc. *_[U]MIN and such can be added later if needed. This enables the front ends to simplify handling of the atomic intrinsics by removing the target-specific decision about which targets can handle the intrinsics. llvm-svn: 106321
* Change UpdateNodeOperands' operand and return value from SDValue toDan Gohman2010-06-181-11/+24
| | | | | | SDNode *, since it doesn't care about the ResNo value. llvm-svn: 106282
* isValueValidForType can be a static member function.Dan Gohman2010-06-181-1/+1
| | | | llvm-svn: 106278
* add missing break. inconsequential as the code shouldn't be reached, butJim Grosbach2010-06-171-0/+1
| | | | | | for correctness' sake, it should be there. llvm-svn: 106229
* Add entries for Expanding atomic intrinsics to libcalls. Just a placeholderJim Grosbach2010-06-171-0/+19
| | | | | | | | | | | | | | for the moment. The implementation of the libcall will follow. Currently, the llvm-gcc knows when the intrinsics can be correctly handled by the back end and only generates them in those cases, issuing libcalls directly otherwise. That's too much coupling. The intrinsics should always be generated and the back end decide how to handle them, be it with a libcall, inline code, or whatever. This patch is a step in that direction. rdar://8097623 llvm-svn: 106227
* ISD::MEMBARRIER should lower to a libcall (__sync_synchronize) if the targetJim Grosbach2010-06-171-1/+13
| | | | | | sets the legalize action to Expand. llvm-svn: 106203
* Update the saved stack pointer in the sjlj function context following eitherJim Grosbach2010-05-271-0/+2
| | | | | | an alloca() or an llvm.stackrestore(). rdar://8031573 llvm-svn: 104900
* When expanding a vector_shuffle, the element type may not be legal and mayBob Wilson2010-05-191-0/+2
| | | | | | | | need to be promoted. The BUILD_VECTOR and EXTRACT_VECTOR_ELT nodes generated here already allow the promoted type to be used without further changes, so just do the promotion. This fixes part of pr7167. llvm-svn: 104141
* Implement a correct ui64->f32 conversion. The oldDale Johannesen2010-05-131-0/+36
| | | | | | one was subject to double rounding in extreme cases. llvm-svn: 103744
* Trim #includes and forward declarations.Dan Gohman2010-05-111-1/+0
| | | | llvm-svn: 103489
* Code that needs a TargetMachine should have access to one directly, ratherDan Gohman2010-04-191-4/+5
| | | | | | than just getting one through a TargetLowering. llvm-svn: 101802
* Use const qualifiers with TargetLowering. This eliminates severalDan Gohman2010-04-171-1/+1
| | | | | | | | | | | | | const_casts, and it reinforces the design of the Target classes being immutable. SelectionDAGISel::IsLegalToFold is now a static member function, because PIC16 uses it in an unconventional way. There is more room for API cleanup here. And PIC16's AsmPrinter no longer uses TargetLowering. llvm-svn: 101635
* More 80 violations.Evan Cheng2010-04-151-7/+12
| | | | llvm-svn: 101330
* use assertions instead of unreachable for logic errors.Chris Lattner2010-04-071-28/+26
| | | | llvm-svn: 100724
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-1/+1
| | | | llvm-svn: 100709
* trim some spurious references to DwarfWriter. SDIsel really doesn'tChris Lattner2010-04-051-1/+0
| | | | | | need it anymore, so don't addRequire it. llvm-svn: 100400
* Get rid of target-specific nodes for fp16 <-> fp32 conversion.Anton Korobeynikov2010-03-181-2/+0
| | | | llvm-svn: 98888
* Make default expansion for FP16 <-> FP32 nodes into libcallsAnton Korobeynikov2010-03-141-0/+8
| | | | llvm-svn: 98501
* Fix PR6522: implement copysign expansion for x86 long doubleDuncan Sands2010-03-121-23/+39
| | | | | | | | (it seems that FreeBSD doesn't have copysignl). Done by removing a bunch of assumptions from the code. This may also help with sparc 128 bit floats. llvm-svn: 98346
* Reapply r97778 and r97779, enabled only for unsigned i64 to f64Dan Gohman2010-03-061-0/+25
| | | | | | conversions. llvm-svn: 97854
* Revert r97778 and r97779. They're somehow breaking llvm-gcc builds.Dan Gohman2010-03-051-17/+41
| | | | llvm-svn: 97781
* Fix these constants to be more portable.Dan Gohman2010-03-051-3/+3
| | | | llvm-svn: 97779
* Rewrite i64-to-f64 conversion using an algorithm which handlesDan Gohman2010-03-051-41/+17
| | | | | | | | | rounding correctly. This implementation is a generalization of the x86_64 code in compiler-rt. This fixes rdar://7683708. llvm-svn: 97778
* Remove dead parameter passing.Bill Wendling2010-03-021-3/+2
| | | | llvm-svn: 97536
* Fix ExpandVectorBuildThroughStack for the case where theDan Gohman2010-02-251-3/+3
| | | | | | | operands are themselves vectors. Based on a patch by Micah Villmow for PR6338. llvm-svn: 97165
* Revert r97064. Duncan pointed out that bitcasts are defined inDan Gohman2010-02-251-7/+4
| | | | | | | | terms of store and load, which means bitcasting between scalar integer and vector has endian-specific results, which undermines this whole approach. llvm-svn: 97137
* Make getTypeSizeInBits work correctly for array types; it should returnDan Gohman2010-02-241-4/+7
| | | | | | | | | | | | | | | the number of value bits, not the number of bits of allocation for in-memory storage. Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and vectors. Fix several places in CodeGen which compute offsets into in-memory vectors to use TargetData information. This fixes PR1784. llvm-svn: 97064
* Add non-temporal flags and remove an assumption of default arguments.David Greene2010-02-151-63/+105
| | | | llvm-svn: 96240
* Fix "the the" and similar typos.Dan Gohman2010-02-101-1/+1
| | | | llvm-svn: 95781
* Rearrange handling of jump tables. Highlights:Chris Lattner2010-01-251-3/+6
| | | | | | | | | | | | | | | | | | 1. MachineJumpTableInfo is now created lazily for a function the first time it actually makes a jump table instead of for every function. 2. The encoding of jump table entries is now described by the MachineJumpTableInfo::JTEntryKind enum. This enum is determined by the TLI::getJumpTableEncoding() hook, instead of by lots of code scattered throughout the compiler that "knows" that jump table entries are always 32-bits in pic mode (for example). 3. The size and alignment of jump table entries is now calculated based on their kind, instead of at machinefunction creation time. Future work includes using the EntryKind in more places in the compiler, eliminating other logic that "knows" the layout of jump tables in various situations. llvm-svn: 94470
* Improved widening loads by adding support for wider loads ifMon P Wang2010-01-241-2/+2
| | | | | | | the alignment allows. Fixed a bug where we didn't use a vector load/store for PR5626. llvm-svn: 94338
* Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNodeDan Gohman2010-01-091-5/+3
| | | | | | | | | | really does need to be a vector type, because TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type, and it needs to be able to distinguish between vectors and scalars. Also, fix some more issues with legalization of vector casts. llvm-svn: 93043
* Change errs() to dbgs().David Greene2010-01-051-3/+4
| | | | llvm-svn: 92575
* Remove dead variable.Bill Wendling2009-12-281-1/+0
| | | | llvm-svn: 92188
* move a few more symbols to .rodataNuno Lopes2009-12-231-1/+1
| | | | llvm-svn: 92011
* Revert r91949 r91942 and r91936.Bill Wendling2009-12-231-407/+119
| | | | llvm-svn: 91953
* Finish up node ordering in ExpandNode.Bill Wendling2009-12-231-45/+113
| | | | llvm-svn: 91949
* Assign ordering to nodes created in ExpandNode. Only roughly 1/2 of the functionBill Wendling2009-12-221-84/+237
| | | | | | is finished. llvm-svn: 91942
* Assign ordering to SDNodes in PromoteNode. Also fixing a subtle bug where BSWAPBill Wendling2009-12-221-15/+82
| | | | | | was using "Tmp1" in the first getNode call instead of Node->getOperand(0). llvm-svn: 91936
* Add more plumbing. This time in the LowerArguments and "get" functions whichBill Wendling2009-12-221-2/+2
| | | | | | | | return partial registers. This affected the back-end lowering code some. Also patch up some places I missed before in the "get" functions. llvm-svn: 91880
* Introduce EVT::getHalfSizedIntegerVT() for use in ExpandUnalignedStore() inKen Dyck2009-12-171-6/+3
| | | | | | | | | | | | | | LegalizeDAG.cpp. Unlike the code it replaces, which simply decrements the simple type by one, getHalfSizedIntegerVT() searches for the smallest simple integer type that is at least half the size of the type it is called on. This approach has the advantage that it will continue working if a new value type (such as i24) is added to MVT. Also, in preparation for new value types, remove the assertions that non-power-of-2 8-bit-mutiple types are Extended when legalizing extload and truncstore operations. llvm-svn: 91614
* Delete an unnecessary line. The VTSDNode on a SIGN_EXTEND_REG is neverDan Gohman2009-12-111-1/+0
| | | | | | a vector type. llvm-svn: 91181
* Implement vector widening, splitting, and scalarizing for SIGN_EXTEND_INREG.Dan Gohman2009-12-111-2/+9
| | | | llvm-svn: 91158
OpenPOWER on IntegriCloud