summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* don't redefine a parameterChris Lattner2007-08-021-1/+1
| | | | llvm-svn: 40748
* Fix a bug in getCopyFromParts turned up in the testcase for PR1132.Dan Gohman2007-07-301-3/+3
| | | | llvm-svn: 40598
* Support for trampolines, except for X86 codegen which isDuncan Sands2007-07-271-0/+27
| | | | | | still under discussion. llvm-svn: 40549
* Add const to CanBeFoldedBy, CheckAndMask, and CheckOrMask.Dan Gohman2007-07-241-2/+2
| | | | llvm-svn: 40480
* It's not necessary to do rounding for alloca operations when the requestedDan Gohman2007-07-181-5/+5
| | | | | | alignment is equal to the stack alignment. llvm-svn: 40004
* Fix comments about vectors to use the current wording.Dan Gohman2007-07-161-2/+2
| | | | llvm-svn: 39921
* Long live the exception handling!Anton Korobeynikov2007-07-141-0/+47
| | | | | | | | | | | | | | | This patch fills the last necessary bits to enable exceptions handling in LLVM. Currently only on x86-32/linux. In fact, this patch adds necessary intrinsics (and their lowering) which represent really weird target-specific gcc builtins used inside unwinder. After corresponding llvm-gcc patch will land (easy) exceptions should be more or less workable. However, exceptions handling support should not be thought as 'finished': I expect many small and not so small glitches everywhere. llvm-svn: 39855
* Skeleton of post-RA scheduler; doesn't do anything yet.Dale Johannesen2007-07-131-2/+2
| | | | | | | Change name of -sched option and DEBUG_TYPE to pre-RA-sched; adjust testcases. llvm-svn: 39816
* Change getCopyToParts and getCopyFromParts to always use target-endianDan Gohman2007-07-091-30/+18
| | | | | | | | register ordering, for both physical and virtual registers. Update the PPC target lowering for calls to expect registers for the call result to already be in target order. llvm-svn: 38471
* The exception handling intrinsics return values,Duncan Sands2007-07-061-1/+2
| | | | | | | | | | | | | so must be lowered to a value, not nothing at all. Subtle point: I made eh_selector return 0 and eh_typeid_for return 1. This means that only cleanups (destructors) will be run as the exception unwinds [if eh_typeid_for returned 0 then it would be as if the first catch always matched, and the corresponding handler would be run], which is probably want you want in the CBE. llvm-svn: 37947
* Add the byval attributeRafael Espindola2007-07-061-0/+2
| | | | llvm-svn: 37940
* Remove propagateEHRegister in favour of a more limitedDuncan Sands2007-07-061-24/+8
| | | | | | fix, that is adequate while PR1508 remains unresolved. llvm-svn: 37938
* Remove ExtractGlobalVariable - use StripPointerCastsDuncan Sands2007-07-061-20/+3
| | | | | | instead. llvm-svn: 37937
* Workaround of getCopyToRegs and getCopyFromRegs bugs for big-endian machines.Evan Cheng2007-07-061-4/+8
| | | | llvm-svn: 37935
* Add a parameter to getCopyToParts and getCopyFromParts to specify whetherDan Gohman2007-07-051-197/+211
| | | | | | | | endian swapping should be done, and update the code to use it. This fixes some register ordering issues on big-endian systems, such as PowerPC, introduced by the recent illegal by-val arguments changes. llvm-svn: 37921
* Extend eh.selector to support both catches and filters.Duncan Sands2007-07-041-34/+58
| | | | | | Drop the eh.filter intrinsic. llvm-svn: 37875
* Fix for PR 1505 (and 1489). Rewrite X87 registerDale Johannesen2007-07-031-9/+1
| | | | | | | model to include f32 variants. Some factoring improvments forthcoming. llvm-svn: 37847
* Replace ExpandScalarFormalArgs and ExpandScalarCallArgs with the newlyDan Gohman2007-07-021-124/+30
| | | | | | | | refactored getCopyFromParts and getCopyToParts, which are more general. This effectively adds support for lowering illegal by-val vector call arguments. llvm-svn: 37843
* Only do FNEG xform when the vector type is a floating point type.Evan Cheng2007-06-291-7/+9
| | | | llvm-svn: 37818
* Remove unnecessary attributions in comments.David Greene2007-06-291-2/+2
| | | | llvm-svn: 37799
* Fix reference to cached end iterator invalidated by an erase operation.David Greene2007-06-291-1/+3
| | | | | | Uncovered by _GLIBCXX_DEBUG. llvm-svn: 37795
* Add new TargetLowering code to provide the final register type that anDan Gohman2007-06-281-354/+284
| | | | | | | | | | | | illegal value type will be transformed to, for code that needs the register type after all transformations instead of just after the first transformation. Factor out the code that uses this information to do copy-from-regs and copy-to-regs for various purposes into separate functions so that they are done consistently. llvm-svn: 37781
* Partial fix for PR1502: If a EH register is needed in a successor of landing ↵Evan Cheng2007-06-271-11/+34
| | | | | | pad, add it as livein to all the blocks in the paths between the landing pad and the specified block. llvm-svn: 37763
* Use getVectorTypeBreakdown in FunctionLoweringInfo::CreateRegForValueDan Gohman2007-06-271-44/+11
| | | | | | | to compute the number and type of registers needed for vector values instead of computing it manually. This fixes PR1529. llvm-svn: 37755
* Generalize MVT::ValueType and associated functions to be able to representDan Gohman2007-06-251-219/+138
| | | | | | | | | | | | | | | extended vector types. Remove the special SDNode opcodes used for pre-legalize vector operations, and the special MVT::Vector type used with them. Adjust lowering and legalize to work with the normal SDNode kinds instead, and to use the normal MVT functions to work with vector types instead of using the two special operands that the pre-legalize nodes held. This allows pre-legalize and post-legalize DAGs, and the code that operates on them, to be more consistent. Pre-legalize vector operators can be handled more consistently with scalar operators. And, -view-dag-combine1-dags and -view-legalize-dags now look prettier for vector code. llvm-svn: 37719
* Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits fromDan Gohman2007-06-221-2/+2
| | | | | | | | | TargetLowering to SelectionDAG so that they have more convenient access to the current DAG, in preparation for the ValueType routines being changed from standalone functions to members of SelectionDAG for the pre-legalize vector type changes. llvm-svn: 37704
* Rename TargetLowering::getNumElements and friends toDan Gohman2007-06-211-14/+14
| | | | | | | TargetLowering::getNumRegisters and similar, to avoid confusion with the actual number of elements for vector types. llvm-svn: 37687
* Codegen support (stripped out) for the annotate attribute.Tanya Lattner2007-06-151-0/+4
| | | | llvm-svn: 37608
* Fix CodeGen/X86/inline-asm-x-scalar.ll:test4, by retaining regclass infoChris Lattner2007-06-151-6/+9
| | | | | | for tied register constraints. llvm-svn: 37601
* Workaround for PR1508.Duncan Sands2007-06-151-29/+96
| | | | llvm-svn: 37597
* Rename MVT::getVectorBaseType to MVT::getVectorElementType.Dan Gohman2007-06-141-2/+2
| | | | llvm-svn: 37579
* Only correctly lower exception handing intrinsics if exception handling isDuncan Sands2007-06-131-8/+7
| | | | | | turned on. Likewise for scanning of invokes to mark landing pads. llvm-svn: 37570
* Introduce new SelectionDAG node opcodes VEXTRACT_SUBVECTOR andDan Gohman2007-06-131-21/+18
| | | | | | | | | | | | | VCONCAT_VECTORS. Use these for CopyToReg and CopyFromReg legalizing in the case that the full register is to be split into subvectors instead of scalars. This replaces uses of VBIT_CONVERT to present values as vector-of-vector types in order to make whole subvectors accessible via BUILD_VECTOR and EXTRACT_VECTOR_ELT. This is in preparation for adding extended ValueType values, where having vector-of-vector types is undesirable. llvm-svn: 37569
* When creating CopyFromReg nodes, always use legal types. And use theDan Gohman2007-06-131-6/+6
| | | | | | | correct types for the result vector, even though it is currently bitcasted to a different type immediately. llvm-svn: 37568
* The fix that was applied for PR1224 stops the compilerDuncan Sands2007-06-131-32/+24
| | | | | | | | | | | | | | | | | | | | | | | | crashing but breaks exception handling. The problem described in PR1224 is that invoke is a terminator that can produce a value. The value may be needed in other blocks. The code that writes to registers values needed in other blocks runs before terminators are lowered (in this case invoke) so asserted because the value was not yet available. The fix that was applied was to do invoke lowering earlier, before writing values to registers. The problem this causes is that the code to copy values to registers can be output after the invoke call. If an exception is raised and control is passed to the landing pad then this copy-code will never execute. If the value is needed in some code path reached via the landing pad then that code will get something bogus. So revert the original fix and simply skip invoke values in the general copying to registers code. Instead copy the invoke value to a register in the invoke lowering code. llvm-svn: 37567
* Do not change the size of function arguments. PR 1489.Dale Johannesen2007-06-071-1/+9
| | | | llvm-svn: 37496
* Additional fix for PR1422: make sure the landing pad label is placed in theDuncan Sands2007-06-061-15/+26
| | | | | | | correct machine basic block - do not rely on the eh.exception intrinsic being in the landing pad: the loop optimizers can move it out. llvm-svn: 37463
* Integrate exception filter support and exception catch support. ThisDuncan Sands2007-06-021-3/+4
| | | | | | | | simplifies the code in DwarfWriter, allows for multiple filters and makes it trivial to specify filters accompanied by cleanups or catch-all specifications (see next patch). What a deal! Patch blessed by Anton. llvm-svn: 37398
* Since TypeInfos are passed as i8 pointers, a NULL TypeInfo should be passedDuncan Sands2007-06-011-4/+2
| | | | | | as a null i8 pointer not as a 0 i32. llvm-svn: 37383
* Minor comment cleanups.Dan Gohman2007-05-241-1/+1
| | | | llvm-svn: 37321
* Mark all calls as "could throw", when exceptions are enabled. Emit necessary ↵Anton Korobeynikov2007-05-231-33/+38
| | | | | | LP info too. This fixes PR1439 llvm-svn: 37311
* Qualify several calls to functions in the MVT namespace, for consistency.Dan Gohman2007-05-181-7/+7
| | | | llvm-svn: 37230
* Fix some subtle issues handling immediate values. This fixesChris Lattner2007-05-151-3/+6
| | | | | | test/CodeGen/ARM/2007-05-14-InlineAsmCstCrash.ll llvm-svn: 37069
* Do not assert, when case range split metric is zero and JTs are not allowed: ↵Anton Korobeynikov2007-05-091-5/+12
| | | | | | | | just emit binary tree in this case. This fixes PR1403. llvm-svn: 36959
* Parameter attributes on invoke calls were being lost due to the wrongDuncan Sands2007-05-071-4/+6
| | | | | | | attribute index being used. Fix proposed by Anton Korobeynikov, who asked me to implement and commit it for him. This is PR1398. llvm-svn: 36906
* DetabifyAnton Korobeynikov2007-05-061-1/+1
| | | | llvm-svn: 36891
* A bitcast of a global variable may have been constant folded to a GEP -Duncan Sands2007-05-041-26/+30
| | | | | | handle this case too. llvm-svn: 36745
* Drop 'const'Devang Patel2007-05-031-1/+1
| | | | llvm-svn: 36662
* Properly set arguments bitwidth of EHSELECT nodeAnton Korobeynikov2007-05-021-2/+2
| | | | llvm-svn: 36654
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-1/+1
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
OpenPOWER on IntegriCloud