- Feb 14, 2008
-
-
Dan Gohman authored
size. Initialize these APInts to properly-sized zero values. llvm-svn: 47099
-
- Feb 13, 2008
-
-
Dan Gohman authored
to pass the mask APInt by value, not by reference. llvm-svn: 47096
-
Dan Gohman authored
Add an overload that supports the uint64_t interface for use by clients that haven't been updated yet. llvm-svn: 47039
-
- Feb 12, 2008
-
-
Nate Begeman authored
Move formats into the formats file llvm-svn: 47035
-
Evan Cheng authored
llvm-svn: 47001
-
- Feb 11, 2008
-
-
Nate Begeman authored
Add some notes to the README. llvm-svn: 46949
-
- Feb 10, 2008
-
-
Dan Gohman authored
llvm-svn: 46930
-
- Feb 08, 2008
-
-
Dale Johannesen authored
128-bit vectors need it only when SSE is on. llvm-svn: 46890
-
Dan Gohman authored
llvm-svn: 46877
-
- Feb 07, 2008
-
-
Dan Gohman authored
to return pointers instead of references, since this is always what is needed. llvm-svn: 46857
-
Dan Gohman authored
llvm-svn: 46854
-
- Feb 06, 2008
-
-
Dan Gohman authored
initializer problem, a minor tweak to the way the DAGISelEmitter finds load/store nodes, and a renaming of the new PseudoSourceValue objects. llvm-svn: 46827
-
- Feb 05, 2008
-
-
Dale Johannesen authored
llvm-svn: 46764
-
- Feb 02, 2008
-
-
Nick Lewycky authored
llvm-svn: 46666
-
Evan Cheng authored
SDIsel processes llvm.dbg.declare by recording the variable debug information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc. Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes. For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time. llvm-svn: 46659
-
- Jan 31, 2008
-
-
Evan Cheng authored
llvm-svn: 46623
-
Dan Gohman authored
llvm-svn: 46590
-
Dan Gohman authored
with the real FLT_ROUNDS (defined in <float.h>). llvm-svn: 46587
-
Dan Gohman authored
in the backend. Introduce a new SDNode type, MemOperandSDNode, for holding a MemOperand in the SelectionDAG IR, and add a MemOperand list to MachineInstr, and code to manage them. Remove the offset field from SrcValueSDNode; uses of SrcValueSDNode that were using it are all all using MemOperandSDNode now. Also, begin updating some getLoad and getStore calls to use the PseudoSourceValue objects. Most of this was written by Florian Brander, some reorganization and updating to TOT by me. llvm-svn: 46585
-
- Jan 30, 2008
-
-
Evan Cheng authored
Even though InsertAtEndOfBasicBlock is an ugly hack it still deserves a proper name. Rename it to EmitInstrWithCustomInserter since it does not necessarily insert instruction at the end. llvm-svn: 46562
-
- Jan 29, 2008
-
-
Evan Cheng authored
Work in progress. This patch *fixes* x86-64 calls which are modelled as StructRet but really should be return in registers, e.g. _Complex long double, some 128-bit aggregates. This is a short term solution that is necessary only because llvm, for now, cannot model i128 nor call's with multiple results. Status: This only works for direct calls, and only the caller side is done. Disabled for now. llvm-svn: 46527
-
Dale Johannesen authored
llvm-svn: 46485
-
- Jan 27, 2008
-
-
Chris Lattner authored
llvm-svn: 46411
-
- Jan 26, 2008
-
-
Chris Lattner authored
now that the dag combiner does it. llvm-svn: 46404
-
- Jan 25, 2008
-
-
Chris Lattner authored
llvm-svn: 46345
-
Chris Lattner authored
us to compile: double test(double X) { return copysign(0.0, X); } into: _test: andpd LCPI1_0(%rip), %xmm0 ret instead of: _test: pxor %xmm1, %xmm1 andpd LCPI1_0(%rip), %xmm1 movapd %xmm0, %xmm2 andpd LCPI1_1(%rip), %xmm2 movapd %xmm1, %xmm0 orpd %xmm2, %xmm0 ret llvm-svn: 46344
-
- Jan 24, 2008
-
-
Chris Lattner authored
This case returns the value in ST(0) and then has to convert it to an SSE register. This causes significant codegen ugliness in some cases. For example in the trivial fp-stack-direct-ret.ll testcase we used to generate: _bar: 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 because we move the result of foo() into an XMM register, then have to move it back for the return of bar. Instead of hacking ever-more special cases into the call result lowering code we take a much simpler approach: on x86-32, fp return is modeled as always returning into an f80 register which is then truncated to f32 or f64 as needed. Similarly for a result, we model it as an extension to f80 + return. This exposes the truncate and extensions to the dag combiner, allowing target independent code to hack on them, eliminating them in this case. This gives us this code for the example above: _bar: subl $12, %esp call L_foo$stub addl $12, %esp ret The nasty aspect of this is that these conversions are not legal, but we want the second pass of dag combiner (post-legalize) to be able to hack on them. To handle this, we lie to legalize and say they are legal, then custom expand them on entry to the isel pass (PreprocessForFPConvert). This is gross, but less gross than the code it is replacing :) This also allows us to generate better code in several other cases. For example on fp-stack-ret-conv.ll, we now generate: _test: subl $12, %esp call L_foo$stub fstps 8(%esp) movl 16(%esp), %eax cvtss2sd 8(%esp), %xmm0 movsd %xmm0, (%eax) addl $12, %esp ret where before we produced (incidentally, the old bad code is identical to what gcc produces): _test: subl $12, %esp call L_foo$stub fstpl (%esp) cvtsd2ss (%esp), %xmm0 cvtss2sd %xmm0, %xmm0 movl 16(%esp), %eax movsd %xmm0, (%eax) addl $12, %esp ret Note that we generate slightly worse code on pr1505b.ll due to a scheduling deficiency that is unrelated to this patch. llvm-svn: 46307
-
Evan Cheng authored
Let each target decide byval alignment. For X86, it's 4-byte unless the aggregare contains SSE vector(s). For x86-64, it's max of 8 or alignment of the type. llvm-svn: 46286
-
- Jan 23, 2008
-
-
Duncan Sands authored
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
-
- Jan 17, 2008
-
-
Chris Lattner authored
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
-
Chris Lattner authored
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
-
- Jan 16, 2008
-
-
Duncan Sands authored
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
-
Chris Lattner authored
llvm-svn: 46058
-
Chris Lattner authored
some code. No functionality change. llvm-svn: 46055
-
Chris Lattner authored
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
-
Chris Lattner authored
look through token factor llvm-svn: 46053
-
Chris Lattner authored
llvm-svn: 46052
-
- Jan 15, 2008
-
-
Chris Lattner authored
llvm-svn: 46015
-
Anton Korobeynikov authored
as well as PPC codegen llvm-svn: 46001
-
- Jan 13, 2008
-
-
Duncan Sands authored
llvm-svn: 45940
-