summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
Commit message (Collapse)AuthorAgeFilesLines
* Let each target decide byval alignment. For X86, it's 4-byte unless the ↵Evan Cheng2008-01-232-0/+46
| | | | | | aggregare contains SSE vector(s). For x86-64, it's max of 8 or alignment of the type. llvm-svn: 46286
* The last pieces needed for loading arbitraryDuncan Sands2008-01-233-9/+3
| | | | | | | | | | | | | | | precision integers. This won't actually work (and most of the code is dead) unless the new legalization machinery is turned on. While there, I rationalized the handling of i1, and removed some bogus (and unused) sextload patterns. For i1, this could result in microscopically better code for some architectures (not X86). It might also result in worse code if annotating with AssertZExt nodes turns out to be more harmful than helpful. llvm-svn: 46280
* Honor explicit section information on Darwin.Dale Johannesen2008-01-231-1/+4
| | | | llvm-svn: 46267
* SSE varargs arguments are passed in memory.Evan Cheng2008-01-221-2/+2
| | | | llvm-svn: 46262
* Honour ByVal parameter attribute for name decorationAnton Korobeynikov2008-01-201-3/+12
| | | | llvm-svn: 46200
* Remove Darwin'ismAnton Korobeynikov2008-01-201-4/+1
| | | | llvm-svn: 46199
* Enable PIC codegen on x86-64/linuxAnton Korobeynikov2008-01-201-1/+1
| | | | llvm-svn: 46198
* Need to handle any 'nest' parameter before integerDuncan Sands2008-01-191-8/+8
| | | | | | | | | parameters, since otherwise it won't be passed in the right register. With this change trampolines work on x86-64 (thanks to Luke Guest for providing access to an x86-64 box). llvm-svn: 46192
* make a method publicChris Lattner2008-01-181-7/+7
| | | | llvm-svn: 46159
* Revert the part of 45848 that treated weak globalsDale Johannesen2008-01-171-3/+2
| | | | | | | | as weak globals rather than commons. While not wrong, this change tickled a latent bug in Darwin's strip, so revert it for now as a workaround. llvm-svn: 46144
* This commit changes:Chris Lattner2008-01-172-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-34/+29
| | | | | | | | | | | | | 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
* Fix and enable EH for x86-64 Darwin. AddsDale Johannesen2008-01-152-5/+13
| | | | | | | | | 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
* rename SDTRet -> SDTNone.Chris Lattner2008-01-151-4/+0
| | | | | | Move definition of 'trap' sdnode up from x86 instrinfo to targetselectiondag.td. llvm-svn: 46017
* 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-151-3/+3
| | | | | | 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
* 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
* rename MachineInstr::setInstrDescriptor -> setDescChris Lattner2008-01-112-10/+10
| | | | 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
* 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
* Weak things initialized to 0 don't go in bss on Darwin.Dale Johannesen2008-01-112-9/+10
| | | | | | | 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
* Start inferring side effect information more aggressively, and fix many bugs ↵Chris Lattner2008-01-105-69/+140
| | | | | | | | | | | | | | 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
* remove explicit sets of 'neverHasSideEffects' that can now be Chris Lattner2008-01-105-12/+11
| | | | | | inferred from the instr patterns. llvm-svn: 45824
* get def use info more correct.Chris Lattner2008-01-102-6/+7
| | | | llvm-svn: 45821
* verify that the frame index is immutable before remat'ing (still disabled)Chris Lattner2008-01-101-7/+10
| | | | | | or being side-effect free. llvm-svn: 45816
* Mark byval parameter stack objects mutable for now.Evan Cheng2008-01-101-7/+8
| | | | llvm-svn: 45813
* Emit unused EH frames for weak definitions on Darwin,Dale Johannesen2008-01-101-3/+4
| | | | | | | because assembler/linker can't cope with weak absolutes. PR 1880. llvm-svn: 45811
* Do not use the stack pointer directly, issue a copyfromreg instead. ↵Evan Cheng2008-01-101-1/+1
| | | | | | Otherwise we can end up with something like ADD32ri %esp, x which two-address pass won't like. llvm-svn: 45798
OpenPOWER on IntegriCloud