summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Described the missing AVX forms of SSE2 convert instructionsBruno Cardoso Lopes2010-06-293-51/+303
| | | | llvm-svn: 107108
* Fix Thumb encoding of VMOV (scalar to ARM core register). The encoding isBob Wilson2010-06-291-1/+1
| | | | | | the same as ARM except that the condition code field is always set to ARMCC::AL. llvm-svn: 107107
* Prefer llvm_unreachable(...) to assert(false && ...). This is important asChandler Carruth2010-06-291-5/+6
| | | | | | without it we might exit a non-void function without returning. llvm-svn: 107106
* add IR names to coerced arguments.Chris Lattner2010-06-293-9/+12
| | | | llvm-svn: 107105
* make the argument passing stuff in the FCA case smarter still, byChris Lattner2010-06-291-21/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avoiding making the FCA at all when the types exactly line up. For example, before we made: %struct.DeclGroup = type { i64, i64 } define i64 @_Z3foo9DeclGroup(i64, i64) nounwind { entry: %D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3] %2 = insertvalue %struct.DeclGroup undef, i64 %0, 0 ; <%struct.DeclGroup> [#uses=1] %3 = insertvalue %struct.DeclGroup %2, i64 %1, 1 ; <%struct.DeclGroup> [#uses=1] store %struct.DeclGroup %3, %struct.DeclGroup* %D %tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1] %tmp1 = load i64* %tmp ; <i64> [#uses=1] %tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1] %tmp3 = load i64* %tmp2 ; <i64> [#uses=1] %add = add nsw i64 %tmp1, %tmp3 ; <i64> [#uses=1] ret i64 %add } ... which has the pointless insertvalue, which fastisel hates, now we make: %struct.DeclGroup = type { i64, i64 } define i64 @_Z3foo9DeclGroup(i64, i64) nounwind { entry: %D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=4] %2 = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1] store i64 %0, i64* %2 %3 = getelementptr %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1] store i64 %1, i64* %3 %tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1] %tmp1 = load i64* %tmp ; <i64> [#uses=1] %tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1] %tmp3 = load i64* %tmp2 ; <i64> [#uses=1] %add = add nsw i64 %tmp1, %tmp3 ; <i64> [#uses=1] ret i64 %add } This only kicks in when x86-64 abi lowering decides it likes us. llvm-svn: 107104
* The comment string does not match for all targets. PowerPC uses ;.Devang Patel2010-06-291-0/+1
| | | | llvm-svn: 107103
* A few prettifications. Also renamed TraverseInitializer toCraig Silverstein2010-06-291-8/+8
| | | | | | TraverseConstructorInitializer, to be a bit clearer. llvm-svn: 107102
* Per Doug's suggestion, move check for invalid SourceLocation intoTed Kremenek2010-06-282-3/+4
| | | | | | | cxloc::translateSourceLocation() (thus causing all clients of this function to have the same behavior). llvm-svn: 107101
* Fixed debug map in executable + DWARF in .o debugging on Mac OS X.Greg Clayton2010-06-286-146/+151
| | | | | | | | | Added the ability to dump any file in the global module cache using any of the "image dump" commands. This allows us to dump the .o files that are used with DWARF + .o since they don't belong the the target list for the current target. llvm-svn: 107100
* Change CGCall to handle the "coerce" case where the coerce-to typeChris Lattner2010-06-283-16/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is a FCA to pass each of the elements as individual scalars. This produces code fast isel is less likely to reject and is easier on the optimizers. For example, before we would compile: struct DeclGroup { long NumDecls; char * Y; }; char * foo(DeclGroup D) { return D.NumDecls+D.Y; } to: %struct.DeclGroup = type { i64, i64 } define i64 @_Z3foo9DeclGroup(%struct.DeclGroup) nounwind { entry: %D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3] store %struct.DeclGroup %0, %struct.DeclGroup* %D, align 1 %tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1] %tmp1 = load i64* %tmp ; <i64> [#uses=1] %tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1] %tmp3 = load i64* %tmp2 ; <i64> [#uses=1] %add = add nsw i64 %tmp1, %tmp3 ; <i64> [#uses=1] ret i64 %add } Now we get: %0 = type { i64, i64 } %struct.DeclGroup = type { i64, i8* } define i8* @_Z3foo9DeclGroup(i64, i64) nounwind { entry: %D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3] %2 = insertvalue %0 undef, i64 %0, 0 ; <%0> [#uses=1] %3 = insertvalue %0 %2, i64 %1, 1 ; <%0> [#uses=1] %4 = bitcast %struct.DeclGroup* %D to %0* ; <%0*> [#uses=1] store %0 %3, %0* %4, align 1 %tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1] %tmp1 = load i64* %tmp ; <i64> [#uses=1] %tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1] %tmp3 = load i8** %tmp2 ; <i8*> [#uses=1] %add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1] ret i8* %add.ptr } Elimination of the FCA inside the function is still-to-come. llvm-svn: 107099
* Fix up ClassTemplateSpecializationDecl: For implicit instantiationsCraig Silverstein2010-06-281-10/+13
| | | | | | | | | | | | | | | | | ("set<int> x;"), we don't want to recurse at all, since the instatiated class isn't written in the source code anywhere. (Note the instatiated *type* -- set<int> -- is written, and will still get a callback of TemplateSpecializationType). For explicit instantiations ("template set<int>;"), we do need a callback, since this is the only callback that's made for this instantiation. We use getTypeAsWritten() to distinguish. We will still need to figure out how to handle template specializations, which probably are still not quite correct. Reviewed by chandlerc llvm-svn: 107098
* Unlike other targets, ARM now uses BUILD_VECTORs post-legalization so theyBob Wilson2010-06-282-1/+12
| | | | | | | can't be changed arbitrarily by the DAGCombiner without checking if it is running after legalization. llvm-svn: 107097
* make the trivial forms of CreateCoerced{Load|Store} trivial.Chris Lattner2010-06-281-3/+12
| | | | llvm-svn: 107091
* Refix XTARGET. Previous attempt matches on powerpc-apple-darwin,Dale Johannesen2010-06-281-1/+1
| | | | | | although I don't see why. llvm-svn: 107090
* Attempt to fix XTARGET.Dale Johannesen2010-06-281-1/+1
| | | | llvm-svn: 107088
* Modify the way sub-statements are stored and retrieved from PCH.Argyrios Kyrtzidis2010-06-289-726/+529
| | | | | | | | | | | | | | | Before this commit, sub-stmts were stored as encountered and when they were placed in the Stmts stack we had to know what index each stmt operand has. This complicated supporting variable sub-stmts and sub-stmts that were contained in TypeSourceInfos, e.g. x = sizeof(int[1]); would crash PCH. Now, sub-stmts are stored in reverse order, from last to first, so that when reading them, in order to get the next sub-stmt we just need to pop the last stmt from the stack. This greatly simplified the way stmts are written and read (just use PCHWriter::AddStmt and PCHReader::ReadStmt accordingly) and allowed variable stmt operands and TypeSourceInfo exprs. llvm-svn: 107087
* Make the ARMCodeEmitter identify Thumb functions via ARMFunctionInfo insteadBob Wilson2010-06-281-5/+7
| | | | | | of the Subtarget. llvm-svn: 107086
* Use DW_FORM_addr for DW_AT_entry_pc.Devang Patel2010-06-283-1/+51
| | | | llvm-svn: 107085
* Add a blurb about -scev-aa.Dan Gohman2010-06-281-0/+13
| | | | llvm-svn: 107080
* In asm's, output operands with matching input constraintsDale Johannesen2010-06-284-5/+21
| | | | | | | | have to be registers, per gcc documentation. This affects the logic for determining what "g" should lower to. PR 7393. A couple of existing testcases are affected. llvm-svn: 107079
* pass/return structs of char and short as i8/i16 to avoidChris Lattner2010-06-283-7/+11
| | | | | | aweful through-memory coersion, just like we do for i32 now. llvm-svn: 107078
* Added the darwin .secure_log_unique and .secure_log_reset directives.Kevin Enderby2010-06-284-0/+96
| | | | llvm-svn: 107077
* more tidying up.Chris Lattner2010-06-281-32/+45
| | | | llvm-svn: 107076
* Added function name types to allow us to set breakpoints by name moreGreg Clayton2010-06-2854-270/+718
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | intelligently. The four name types we currently have are: eFunctionNameTypeFull = (1 << 1), // The function name. // For C this is the same as just the name of the function // For C++ this is the demangled version of the mangled name. // For ObjC this is the full function signature with the + or // - and the square brackets and the class and selector eFunctionNameTypeBase = (1 << 2), // The function name only, no namespaces or arguments and no class // methods or selectors will be searched. eFunctionNameTypeMethod = (1 << 3), // Find function by method name (C++) with no namespace or arguments eFunctionNameTypeSelector = (1 << 4) // Find function by selector name (ObjC) names this allows much more flexibility when setting breakoints: (lldb) breakpoint set --name main --basename (lldb) breakpoint set --name main --fullname (lldb) breakpoint set --name main --method (lldb) breakpoint set --name main --selector The default: (lldb) breakpoint set --name main will inspect the name "main" and look for any parens, or if the name starts with "-[" or "+[" and if any are found then a full name search will happen. Else a basename search will be the default. Fixed some command option structures so not all options are required when they shouldn't be. Cleaned up the breakpoint output summary. Made the "image lookup --address <addr>" output much more verbose so it shows all the important symbol context results. Added a GetDescription method to many of the SymbolContext objects for the more verbose output. llvm-svn: 107075
* Constant fold x == undef to undef.Dan Gohman2010-06-282-1/+31
| | | | llvm-svn: 107074
* tidy up style. no functional change.Jim Grosbach2010-06-281-2/+3
| | | | llvm-svn: 107073
* Fix Value::stripPointerCasts and BasicAA to avoid trouble onDan Gohman2010-06-283-10/+54
| | | | | | | code in unreachable blocks, which have have use-def cycles. This fixes PR7514. llvm-svn: 107071
* Refactor encoding function for NEON 1-register with modified immediate format.Bob Wilson2010-06-281-5/+1
| | | | llvm-svn: 107070
* Support Thumb mode encoding of NEON instructions.Bob Wilson2010-06-281-0/+15
| | | | llvm-svn: 107068
* Reduce indentation via early exit. NFC.Bill Wendling2010-06-281-100/+110
| | | | llvm-svn: 107067
* Added test for a previously fixed bug where invoking lldb command from an emacsJohnny Chen2010-06-281-1/+12
| | | | | | shell and issuing 'help' would hang (was actually infinitely looping). llvm-svn: 107066
* Include inlined function in list of processed subprograms.Devang Patel2010-06-281-1/+1
| | | | llvm-svn: 107065
* Remove state assertion.Ted Kremenek2010-06-281-1/+0
| | | | llvm-svn: 107064
* Don't crash in InitializePreprocessor() when there is no valid PTHManager. ↵Ted Kremenek2010-06-281-1/+2
| | | | | | Fixes <rdar://problem/8098441>. llvm-svn: 107061
* new, no longer brain-dead, r106907Jim Grosbach2010-06-281-2/+9
| | | | llvm-svn: 107060
* Remove this weak test.Devang Patel2010-06-281-16/+0
| | | | llvm-svn: 107059
* Testcase for llvm-gcc fix 107051.Dale Johannesen2010-06-281-0/+21
| | | | llvm-svn: 107052
* random acts of tidying.Chris Lattner2010-06-281-28/+47
| | | | llvm-svn: 107050
* Don't write temporary files in test directoryJakob Stoklund Olesen2010-06-281-1/+1
| | | | llvm-svn: 107049
* X86-64:Chris Lattner2010-06-284-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pass/return structs of float/int as float/i32 instead of double/i64 to make the code generated for ABI cleaner. Passing in the low part of a double is the same as passing in a float. For example, we now compile: struct DeclGroup { float NumDecls; }; float foo(DeclGroup D); void bar(DeclGroup *D) { foo(*D); } into: %struct.DeclGroup = type { float } define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind { entry: %D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2] %agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2] store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr %tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1] %tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1] %tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1] call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false) %coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <float*> [#uses=1] %0 = load float* %coerce.dive, align 1 ; <float> [#uses=1] %call = call float @_Z3foo9DeclGroup(float %0) ; <float> [#uses=0] ret void } instead of: %struct.DeclGroup = type { float } define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind { entry: %D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2] %agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2] %tmp3 = alloca double ; <double*> [#uses=2] store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr %tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1] %tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1] %tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1] call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false) %coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <float*> [#uses=1] %0 = bitcast double* %tmp3 to float* ; <float*> [#uses=1] %1 = load float* %coerce.dive ; <float> [#uses=1] store float %1, float* %0, align 1 %2 = load double* %tmp3 ; <double> [#uses=1] %call = call float @_Z3foo9DeclGroup(double %2) ; <float> [#uses=0] ret void } which is this machine code (at -O0): __Z3barP9DeclGroup: subq $24, %rsp movq %rdi, 16(%rsp) movq 16(%rsp), %rdi leaq 8(%rsp), %rax movl (%rdi), %ecx movl %ecx, (%rax) movss 8(%rsp), %xmm0 callq __Z3foo9DeclGroup addq $24, %rsp ret vs this: __Z3barP9DeclGroup: subq $24, %rsp movq %rdi, 16(%rsp) movq 16(%rsp), %rdi leaq 8(%rsp), %rax movl (%rdi), %ecx movl %ecx, (%rax) movss 8(%rsp), %xmm0 movss %xmm0, (%rsp) movsd (%rsp), %xmm0 callq __Z3foo9DeclGroup addq $24, %rsp ret At -O3, it is the difference between this now: __Z3barP9DeclGroup: movss (%rdi), %xmm0 jmp __Z3foo9DeclGroup # TAILCALL vs this before: __Z3barP9DeclGroup: movl (%rdi), %eax movd %rax, %xmm0 jmp __Z3foo9DeclGroup # TAILCALL llvm-svn: 107048
* Minor refactorin of my last patch (radar 7860965 related).Fariborz Jahanian2010-06-281-1/+1
| | | | llvm-svn: 107047
* After physreg coalescing, physical registers might not have live ranges whereJakob Stoklund Olesen2010-06-281-1/+2
| | | | | | | | | | you would expect. Don't assert on that case, just give up. This fixes PR7513. llvm-svn: 107046
* Add a triple so test runs on Linux as well.Jakob Stoklund Olesen2010-06-281-0/+1
| | | | llvm-svn: 107045
* Have __func__ and siblings point to block's implementation functionFariborz Jahanian2010-06-282-1/+30
| | | | | | name. Fixes radar 7860965. llvm-svn: 107044
* Add more special treatment for inline asm in RegAllocFast.Jakob Stoklund Olesen2010-06-283-22/+129
| | | | | | | | | | | | When an instruction has tied operands and physreg defines, we must take extra care that the tied operands conflict with neither physreg defs nor uses. The special treatment is given to inline asm and instructions with tied operands / early clobbers and physreg defines. This fixes PR7509. llvm-svn: 107043
* Fix thinko.Eric Christopher2010-06-281-2/+4
| | | | llvm-svn: 107042
* tweak test to pass on windowsChris Lattner2010-06-281-1/+1
| | | | llvm-svn: 107040
* Pull in the libCrashReporterClient.a information with a warning comment.Eric Christopher2010-06-284-98/+9
| | | | | | Remove library check and regenerate configure. llvm-svn: 107028
* Preserve deleted function's local variables' debug info.Devang Patel2010-06-283-0/+53
| | | | | | Radar 8122864. llvm-svn: 107027
* Make this test darwin specific.Devang Patel2010-06-281-1/+1
| | | | llvm-svn: 107025
OpenPOWER on IntegriCloud