summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* This commit changes:Chris Lattner2008-01-1712-44/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Legalize now always promotes truncstore of i1 to i8. 2. Remove patterns and gunk related to truncstore i1 from targets. 3. Rename the StoreXAction stuff to TruncStoreAction in TLI. 4. Make the TLI TruncStoreAction table a 2d table to handle from/to conversions. 5. Mark a wide variety of invalid truncstores as such in various targets, e.g. X86 currently doesn't support truncstore of any of its integer types. 6. Add legalize support for truncstores with invalid value input types. 7. Add a dag combine transform to turn store(truncate) into truncstore when safe. The later allows us to compile CodeGen/X86/storetrunc-fp.ll to: _foo: fldt 20(%esp) fldt 4(%esp) faddp %st(1) movl 36(%esp), %eax fstps (%eax) ret instead of: _foo: subl $4, %esp fldt 24(%esp) fldt 8(%esp) faddp %st(1) fstps (%esp) movl 40(%esp), %eax movss (%esp), %xmm0 movss %xmm0, (%eax) addl $4, %esp ret llvm-svn: 46140
* * Introduce a new SelectionDAG::getIntPtrConstant methodChris Lattner2008-01-173-38/+35
| | | | | | | | | | | | | and switch various codegen pieces and the X86 backend over to using it. * Add some comments to SelectionDAGNodes.h * Introduce a second argument to FP_ROUND, which indicates whether the FP_ROUND changes the value of its input. If not it is safe to xform things like fp_extend(fp_round(x)) -> x. llvm-svn: 46125
* Trampoline support for x86-64. This looks likeDuncan Sands2008-01-161-7/+56
| | | | | | | | | it should work, but I have no machine to test it on. Committed because it will at least cause no harm, and maybe someone can test it for me! llvm-svn: 46098
* make it more clear that this predicate only applies to scalar FP types.Chris Lattner2008-01-162-10/+10
| | | | llvm-svn: 46058
* introduce a isTypeInSSEReg predicate, which allows us to simplifyChris Lattner2008-01-162-21/+18
| | | | | | some code. No functionality change. llvm-svn: 46055
* My previous commit had an incomplete message, it should have been:Chris Lattner2008-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make the 'fp return in ST(0)' optimization smart enough to look through token factor nodes. THis allows us to compile testcases like CodeGen/X86/fp-stack-retcopy.ll into: _carg: subl $12, %esp call L_foo$stub fstpl (%esp) fldl (%esp) addl $12, %esp ret instead of: _carg: subl $28, %esp call L_foo$stub fstpl 16(%esp) movsd 16(%esp), %xmm0 movsd %xmm0, 8(%esp) fldl 8(%esp) addl $28, %esp ret Still not optimal, but much better and this is a trivial patch. Fixing the rest requires invasive surgery that is is not llvm 2.2 material. llvm-svn: 46054
* make the 'fp return in ST(0)' optimization smart enough to Chris Lattner2008-01-161-1/+1
| | | | | | look through token factor llvm-svn: 46053
* various whitespace cleanups, no functionality change.Chris Lattner2008-01-161-7/+7
| | | | llvm-svn: 46052
* Missed file from previous checkin.Dale Johannesen2008-01-151-0/+1
| | | | llvm-svn: 46030
* Fix and enable EH for x86-64 Darwin. AddsDale Johannesen2008-01-153-5/+14
| | | | | | | | | ShortenEHDataFor64Bits as a not-very-accurate abstraction to cover all the changes in DwarfWriter. Some cosmetic changes to Darwin assembly code for gcc testsuite compatibility. llvm-svn: 46029
* If someone wants to implement ppc TRAP, they can go for it :)Chris Lattner2008-01-151-0/+1
| | | | llvm-svn: 46019
* rename SDTRet -> SDTNone.Chris Lattner2008-01-157-13/+11
| | | | | | Move definition of 'trap' sdnode up from x86 instrinfo to targetselectiondag.td. llvm-svn: 46017
* Remove DefInst from LiveVariables::VarInfo. Use the facilities on ↵Owen Anderson2008-01-151-3/+0
| | | | | | MachineRegisterInfo instead. llvm-svn: 46016
* no need to expand ISD::TRAP to X86ISD::TRAP, just match ISD::TRAP.Chris Lattner2008-01-153-17/+6
| | | | llvm-svn: 46015
* Fix JIT encoding of trap/ud2 instructionAnton Korobeynikov2008-01-151-2/+1
| | | | llvm-svn: 46012
* For PR1839: add initial support for __builtin_trap. llvm-gcc part is missedAnton Korobeynikov2008-01-153-1/+23
| | | | | | as well as PPC codegen llvm-svn: 46001
* Rename CCIfStruct to CCIfByVal and CCStructAssign to CCPassByVal. Remove ↵Evan Cheng2008-01-152-10/+11
| | | | | | unused parameters of CCStructAssign and add size and alignment requirement info. llvm-svn: 45997
* Both x86-32 and x86-64 handle byval parameter attributes.Evan Cheng2008-01-151-4/+9
| | | | llvm-svn: 45996
* Improve the FP stackifier to decide all on its own whether Chris Lattner2008-01-141-23/+30
| | | | | | | | | an instruction kills a register or not. This is cheap and easy to do now that instructions record this on their flags, and this eliminates the second pass of LiveVariables from the x86 backend. This speeds up a release llc by ~2.5%. llvm-svn: 45955
* Whitespace tweak.Duncan Sands2008-01-131-1/+1
| | | | llvm-svn: 45940
* improve cygwin compatibility, patch by Sam BishopChris Lattner2008-01-121-1/+1
| | | | llvm-svn: 45917
* clarify a noteChris Lattner2008-01-121-1/+9
| | | | llvm-svn: 45914
* Indirect call with byval parameter requires a cast first.Evan Cheng2008-01-121-6/+17
| | | | llvm-svn: 45911
* Add support for NetBSD, patch by Krister Walfridsson!Chris Lattner2008-01-121-1/+1
| | | | llvm-svn: 45902
* Code clean up.Evan Cheng2008-01-121-23/+20
| | | | llvm-svn: 45898
* fix a wordo that gordon noticed :)Chris Lattner2008-01-121-1/+1
| | | | llvm-svn: 45896
* Any x86 instruction that reads from an invariant location is invariant.Chris Lattner2008-01-121-43/+24
| | | | | | | | This allows us to sink things like: cvtsi2sd 32(%esp), %xmm1 when reading from the argument area, for example. llvm-svn: 45895
* More cbe byval fixes.Evan Cheng2008-01-111-13/+25
| | | | llvm-svn: 45891
* More CellSPU refinements:Scott Michel2008-01-112-15/+36
| | | | | | | | | | | | - struct_2.ll: Completely unaligned load/store testing - call_indirect.ll, struct_1.ll: Add test lines to exercise X-form [$reg($reg)] addressing At this point, loads and stores should be under control (he says in an optimistic tone of voice.) llvm-svn: 45882
* rename MachineInstr::setInstrDescriptor -> setDescChris Lattner2008-01-119-26/+26
| | | | llvm-svn: 45871
* remove xchg and shift-reg-by-1 instructions, which are dead.Chris Lattner2008-01-113-71/+6
| | | | llvm-svn: 45870
* add a note, remove a done deed.Chris Lattner2008-01-111-18/+3
| | | | llvm-svn: 45869
* hrm - correct spelling.Arnold Schwaighofer2008-01-111-6/+6
| | | | | | Actually were not riding any arguments. Sadly there is no semantic spell checker that is going to safe you from such a mistake. llvm-svn: 45868
* Improve tail call optimized call's argument lowering. Before thisArnold Schwaighofer2008-01-112-91/+79
| | | | | | | | | | | | | | | | commit all arguments where moved to the stack slot where they would reside on a normal function call before the lowering to the tail call stack slot. This was done to prevent arguments overwriting each other. Now only arguments sourcing from a FORMAL_ARGUMENTS node or a CopyFromReg node with virtual register (could also be a caller's argument) are lowered indirectly. --This line, and those below, will be ignored-- M X86/X86ISelLowering.cpp M X86/README.txt llvm-svn: 45867
* Correct a copy and paste error.Arnold Schwaighofer2008-01-111-1/+1
| | | | llvm-svn: 45865
* Some C backend ByVal parameter attribute support. Not yet complete.Evan Cheng2008-01-111-3/+30
| | | | llvm-svn: 45864
* Rename Int_CVTSI642SSr* to Int_CVTSI2SS64r* for naming consistency and ↵Evan Cheng2008-01-111-26/+16
| | | | | | remove unused instructions. llvm-svn: 45861
* more flags set rightChris Lattner2008-01-113-15/+24
| | | | llvm-svn: 45860
* add some missing flags.Chris Lattner2008-01-111-4/+16
| | | | llvm-svn: 45859
* add some notes.Chris Lattner2008-01-111-0/+18
| | | | llvm-svn: 45854
* A couple of obvious off-by-one bugs.Evan Cheng2008-01-111-4/+7
| | | | llvm-svn: 45852
* More CellSPU refinement and progress:Scott Michel2008-01-117-343/+370
| | | | | | | | | | | | | | | | | | | | - Cleaned up custom load/store logic, common code is now shared [see note below], cleaned up address modes - More test cases: various intrinsics, structure element access (load/store test), updated target data strings, indirect function calls. Note: This patch contains a refactoring of the LoadSDNode and StoreSDNode structures: they now share a common base class, LSBaseSDNode, that provides an interface to their common functionality. There is some hackery to access the proper operand depending on the derived class; otherwise, to do a proper job would require finding and rearranging the SDOperands sent to StoreSDNode's constructor. The current refactor errs on the side of being conservatively and backwardly compatible while providing functionality that reduces redundant code for targets where loads and stores are custom-lowered. llvm-svn: 45851
* Weak zeroes don't go in bss on Darwin.Dale Johannesen2008-01-111-3/+4
| | | | llvm-svn: 45849
* Weak things initialized to 0 don't go in bss on Darwin.Dale Johannesen2008-01-114-19/+19
| | | | | | | Cosmetic changes to spacing to match gcc (some dejagnu tests actually care). llvm-svn: 45848
* Simplify the side effect stuff a bit more and make licm/sinkingChris Lattner2008-01-102-11/+14
| | | | | | | | | | | | | | | | both work right according to the new flags. This removes the TII::isReallySideEffectFree predicate, and adds TII::isInvariantLoad. It removes NeverHasSideEffects+MayHaveSideEffects and adds UnmodeledSideEffects as machine instr flags. Now the clients can decide everything they need. I think isRematerializable can be implemented in terms of the flags we have now, though I will let others tackle that. llvm-svn: 45843
* IMPLICIT_USE and IMPLICIT_DEF are dead, remove them.Chris Lattner2008-01-102-7/+0
| | | | llvm-svn: 45838
* add a noteChris Lattner2008-01-101-0/+50
| | | | llvm-svn: 45837
* Output sinl for a long double FSIN node, not sin.Duncan Sands2008-01-101-1/+3
| | | | | | | | Likewise fix up a bunch of other libcalls. While there I remove NEG_F32 and NEG_F64 since they are not used anywhere. This fixes 9 Ada ACATS failures. llvm-svn: 45833
* Start inferring side effect information more aggressively, and fix many bugs ↵Chris Lattner2008-01-106-75/+149
| | | | | | | | | | | | | | in the x86 backend where instructions were not marked maystore/mayload, and perf issues where instructions were not marked neverHasSideEffects. It would be really nice if we could write patterns for copy instructions. I have audited all the x86 instructions down to MOVDQAmr. The flags on others and on other targets are probably not right in all cases, but no clients currently use this info that are enabled by default. llvm-svn: 45829
* rename X86InstrX86-64.td -> X86Instr64bit.tdChris Lattner2008-01-102-5/+5
| | | | llvm-svn: 45826
OpenPOWER on IntegriCloud