summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Check that sret is only used on pointers to typesDuncan Sands2008-01-211-2/+2
| | | | | | with a size, like byval. llvm-svn: 46207
* Be consistent with other attribute methods, andDuncan Sands2008-01-211-1/+7
| | | | | | check the callee also if it is known. llvm-svn: 46206
* Move DAG-changing code out of #ifndef NDEBUG.Dale Johannesen2008-01-211-1/+3
| | | | llvm-svn: 46204
* Make sure the caller doesn't use freed memory.Duncan Sands2008-01-201-1/+3
| | | | | | Fixes PR1935. llvm-svn: 46203
* 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
* Initializing an unsigned with ~0UL causes the compilerDuncan Sands2008-01-201-9/+9
| | | | | | to complain on x86-64 (gcc 4.1). Use ~0U instead. llvm-svn: 46197
* Do not generate a FP_ROUND of f64 to f64.Dale Johannesen2008-01-201-3/+4
| | | | llvm-svn: 46195
* 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
* Added FoldingSet style 'profiling' support for APSInt.Ted Kremenek2008-01-191-0/+23
| | | | llvm-svn: 46189
* Added FoldingSet style 'profiling' support for APInt.Ted Kremenek2008-01-191-1/+13
| | | | llvm-svn: 46188
* Made 'FoldingSetNodeID' a proper class instead of a nested class inTed Kremenek2008-01-191-19/+19
| | | | | | | | | | 'FoldingSetNodeImpl' (previously 'FoldingSetNodeID' was a typedef of 'FoldingSetNodeImpl::NodeID'). Why? Clients can now easily forward declare 'FoldingSetNodeID' without having to include FoldingSet.h. llvm-svn: 46187
* Implement flt_rounds for PowerPC.Dale Johannesen2008-01-181-0/+64
| | | | llvm-svn: 46174
* remove extraneous &'s.Chris Lattner2008-01-181-2/+2
| | | | llvm-svn: 46171
* get symbolic information for ppc ldbl nodes.Chris Lattner2008-01-181-0/+5
| | | | llvm-svn: 46165
* Fix a latent bug exposed by my truncstore patch. We compiled stfiwx-2.ll to:Chris Lattner2008-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | _test: fctiwz f0, f1 stfiwx f0, 0, r4 blr instead of: _test: fctiwz f0, f1 stfd f0, -8(r1) nop nop lwz r2, -4(r1) stb r2, 0(r4) blr The former is not correct (stores 4 bytes, not 1). llvm-svn: 46161
* make a method publicChris Lattner2008-01-181-7/+7
| | | | llvm-svn: 46159
* Revert the part of 45849 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: 46147
* Revert the part of 45848 that treated weak globalsDale Johannesen2008-01-172-4/+4
| | | | | | | | 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
* Forward progress: crtbegin.c now compiles successfully!Scott Michel2008-01-174-149/+248
| | | | | | | | | | | | | Fixed CellSPU's A-form (local store) address mode, so that all globals, externals, constant pool and jump table symbols are now wrapped within a SPUISD::AFormAddr pseudo-instruction. This now identifies all local store memory addresses, although it requires a bit of legerdemain during instruction selection to properly select loads to and stores from local store, properly generating "LQA" instructions. Also added mul_ops.ll test harness for exercising integer multiplication. llvm-svn: 46142
* This commit changes:Chris Lattner2008-01-1715-66/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* code cleanups, no functionality change.Chris Lattner2008-01-171-7/+9
| | | | llvm-svn: 46126
* * Introduce a new SelectionDAG::getIntPtrConstant methodChris Lattner2008-01-1711-152/+168
| | | | | | | | | | | | | 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
* DAE bug fix. Don't lose parameter attributes on vararg arguments.Evan Cheng2008-01-171-5/+9
| | | | llvm-svn: 46113
* When a live virtual register is being clobbered by an implicit def, it is ↵Evan Cheng2008-01-171-2/+20
| | | | | | | | | | | spilled and the spill is its kill. However, if the local allocator has determined the register has not been modified (possible when its value was reloaded), it would not issue a restore. In that case, mark the last use of the virtual register as kill. llvm-svn: 46111
* Fix arg promotion to propagate the correct attrs on the calls toChris Lattner2008-01-171-14/+25
| | | | | | | promoted functions. This is important for varargs calls in particular. Thanks to duncan for providing a great testcase. llvm-svn: 46108
* Replace std::vector<bool> with BitVector.Evan Cheng2008-01-171-4/+8
| | | | llvm-svn: 46104
* Fixes a nasty dag combiner bug that causes a bunch of tests to fail at -O0.Evan Cheng2008-01-161-6/+44
| | | | | | | | | | | | | | | | | | | | It's not safe to use the two value CombineTo variant to combine away a dead load. e.g. v1, chain2 = load chain1, loc v2, chain3 = load chain2, loc v3 = add v2, c Now we replace use of v1 with undef, use of chain2 with chain1. ReplaceAllUsesWith() will iterate through uses of the first load and update operands: v1, chain2 = load chain1, loc v2, chain3 = load chain1, loc v3 = add v2, c Now the second load is the same as the first load, SelectionDAG cse will ensure the use of second load is replaced with the first load. v1, chain2 = load chain1, loc v3 = add v1, c Then v1 is replaced with undef and bad things happen. llvm-svn: 46099
* 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
* Handle attribute(used) global variables that are i8.Chris Lattner2008-01-161-14/+13
| | | | llvm-svn: 46090
* Do not mark EH tables no-dead-strip unless theDale Johannesen2008-01-162-13/+40
| | | | | | associated function is so marked. llvm-svn: 46088
* Fix a ppc long double regression I introduced yesterday due to aChris Lattner2008-01-161-0/+1
| | | | | | simplification. This fixes automotive-basicmath on PPC. llvm-svn: 46072
* merge a few pieces of code that do the store/load to stack Chris Lattner2008-01-161-30/+12
| | | | | | pattern to use EmitStackConvert now. llvm-svn: 46066
* rename ExpandBIT_CONVERT to EmitStackConvert, generalizing Chris Lattner2008-01-161-15/+37
| | | | | | it to allow it to emit different load and store kinds. llvm-svn: 46065
* simplify a bunch of code by using SelectionDAG::CreateStackTemporary Chris Lattner2008-01-161-28/+6
| | | | | | instead of inlining its body. llvm-svn: 46062
* Change legalizeop of FP_ROUND and FP_EXTEND to not fall throughChris Lattner2008-01-161-32/+55
| | | | | | | | | into the ANY_EXTEND/ZERO_EXTEND/SIGN_EXTEND code to simplify it. Unmerge the code for FP_ROUND and FP_EXTEND from each other to make each one simpler. llvm-svn: 46061
* 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
* Factor the ReachesChainWithoutSideEffects out of dag combiner into Chris Lattner2008-01-162-28/+32
| | | | | | | a public SDOperand::reachesChainWithoutSideEffects method. No functionality change. llvm-svn: 46050
* Do not strip llvm.used values.Devang Patel2008-01-161-3/+25
| | | | llvm-svn: 46045
* 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-154-13/+26
| | | | | | | | | 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
* Move some calls to getVRegDef higher in the callgraph, so they don't get ↵Owen Anderson2008-01-151-11/+11
| | | | | | executed as frequently in performance sensitive code. llvm-svn: 46027
* improve compatibility with mingw, patch by Alain FrischChris Lattner2008-01-151-1/+1
| | | | llvm-svn: 46026
* If someone wants to implement ppc TRAP, they can go for it :)Chris Lattner2008-01-151-0/+1
| | | | llvm-svn: 46019
* The type of the 'abort' node should be pointer type (becauseChris Lattner2008-01-151-1/+2
| | | | | | | it's a function pointer) not MVT::Other. This fixes builtin_trap lowering on ppc, alpha, ia64 llvm-svn: 46018
OpenPOWER on IntegriCloud