summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add a pre-dispatch SjLj EH hook on the unwind edge for targets to do anyJim Grosbach2010-10-191-0/+6
| | | | | | | setup they require. Use this for ARM/Darwin to rematerialize the base pointer from the frame pointer when required. rdar://8564268 llvm-svn: 116879
* fix the default va_arg expansion (in the realignment case) to not implicitlyChris Lattner2010-10-101-1/+1
| | | | | | truncate the stack pointer to 32-bits on a 64-bit machine. llvm-svn: 116169
* Use a more efficient lowering of uint64_t --> float that can take advantage ↵Owen Anderson2010-10-051-6/+28
| | | | | | | | | of hardware signed integer conversion without having to do a double cast (uint64_t --> double --> float). This is based on the algorithm from compiler_rt's __floatundisf for X86-64. llvm-svn: 115634
* update a bunch of code to use the MachinePointerInfo version of getStore.Chris Lattner2010-09-211-9/+10
| | | | llvm-svn: 114461
* eliminate an old SelectionDAG::getTruncStore method, propagatingChris Lattner2010-09-211-41/+38
| | | | | | MachinePointerInfo around more. llvm-svn: 114452
* propagate MachinePointerInfo through various uses of the oldChris Lattner2010-09-211-212/+211
| | | | | | SelectionDAG::getExtLoad overload, and eliminate it. llvm-svn: 114446
* continue MachinePointerInfo'izing, eliminating use of one of the oldChris Lattner2010-09-211-95/+104
| | | | | | getLoad overloads. llvm-svn: 114443
* a few more trivial updates. This fixes PerformInsertVectorEltInMemory to notChris Lattner2010-09-211-14/+12
| | | | | | | pass a completely incorrect SrcValue, which would result in a miscompile with combiner-aa. llvm-svn: 114411
* Add a missing check when legalizing a vector extending load. This doesn'tBob Wilson2010-09-031-3/+5
| | | | | | | solve the root problem, but it corrects the bug in the code I added to support legalizing in the case where the non-extended type is also legal. llvm-svn: 112997
* Add a hackaround for PR7993 which is causing failures on x86 builders that ↵Chris Lattner2010-08-261-0/+2
| | | | | | lack sse2. llvm-svn: 112175
* remove some llvmcontext arguments that are now dead post-refactoring.Chris Lattner2010-08-251-2/+1
| | | | llvm-svn: 112104
* Fix some GCC warnings by providing a virtual destructor in the base of a classChandler Carruth2010-08-231-1/+1
| | | | | | | hierarchy with virtual methods and using llvm_unreachable to properly indicate unreachable states which would otherwise leave variables uninitialized. llvm-svn: 111803
* If the target says that an extending load is not legal, regardless of whetherBob Wilson2010-08-191-7/+12
| | | | | | | | | | | it involves specific floating-point types, legalize should expand an extending load to a non-extending load followed by a separate extend operation. For example, we currently expand SEXTLOAD to EXTLOAD+SIGN_EXTEND_INREG (and assert that EXTLOAD should always be supported). Now we can expand that to LOAD+SIGN_EXTEND. This is needed to allow vector SIGN_EXTEND and ZERO_EXTEND to be used for NEON. llvm-svn: 111586
* Fix va_arg for doubles. With this patch VAARG nodes always contain theRafael Espindola2010-07-111-1/+3
| | | | | | | | | | | | | | | correct alignment information, which simplifies ExpandRes_VAARG a bit. The patch introduces a new alignment information to TargetLoweringInfo. This is needed since the two natural candidates cannot be used: * The 's' in target data: If this is set to the minimal alignment of any argument, getCallFrameTypeAlignment would return 4 for doubles on ARM for example. * The getTransientStackAlignment method. It is possible for an architecture to have argument less aligned than what we maintain the stack pointer. llvm-svn: 108072
* 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
OpenPOWER on IntegriCloud