summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fix PR7519: after thrashing around and remembering how all this stuffChris Lattner2010-06-295-26/+68
| | | | | | | works, the fix is quite simple: just make sure to call ConvertTypeRecursive when the function type being lowered is in the midst of ConvertType. llvm-svn: 107173
* Allow a using directive to refer to the implicitly-defined namespaceDouglas Gregor2010-06-296-12/+70
| | | | | | | | "std", with a warning, to improve GCC compatibility. Fixes PR7517. As a drive-by, add typo correction for using directives. llvm-svn: 107172
* Move non-temporal movs to their own sectionBruno Cardoso Lopes2010-06-291-34/+38
| | | | llvm-svn: 107168
* Add support for encoding NEON VMOV (from core register to scalar) instructions.Bob Wilson2010-06-291-6/+19
| | | | | | | The encoding is the same as VMOV (from scalar to core register) except that the operands are in different places. llvm-svn: 107167
* Add sqrt, rsqrt and rcp AVX instructionsBruno Cardoso Lopes2010-06-293-1/+196
| | | | llvm-svn: 107166
* With packed enums, an enumerator's value may be stored in more bitsDouglas Gregor2010-06-292-0/+18
| | | | | | than the enumeration type itself takes. Fixes PR7477. llvm-svn: 107163
* skip dbg_value instructionsJim Grosbach2010-06-291-0/+2
| | | | llvm-svn: 107154
* tests: Use %clangxx when using driver for C++, in case C++ support is disabled.Daniel Dunbar2010-06-2913-18/+22
| | | | llvm-svn: 107153
* tests: Spell %clang_cc1 correctly.Daniel Dunbar2010-06-293-4/+4
| | | | llvm-svn: 107152
* minor cleanups.Chris Lattner2010-06-292-10/+4
| | | | llvm-svn: 107150
* Driver/Darwin: Only run dsymutil when we are also compiling/assembling as partDaniel Dunbar2010-06-292-5/+26
| | | | | | | of the compilation. - <rdar://problem/8141387> clang is always invoking dsymutil llvm-svn: 107149
* minor cosmeticsGabor Greif2010-06-291-1/+1
| | | | llvm-svn: 107148
* The t2MOVi16 and t2MOVTi16 instructions do not set CPSR. Trying to addBob Wilson2010-06-291-2/+2
| | | | | | | a CPSR operand to them causes an assertion failure, so apparently these instructions haven't been getting a lot of use. llvm-svn: 107147
* use ArgOffset constant to prepare for operand rotationGabor Greif2010-06-291-4/+4
| | | | llvm-svn: 107146
* use ArgOperand APIGabor Greif2010-06-291-6/+6
| | | | llvm-svn: 107145
* use ArgOperand APIGabor Greif2010-06-291-31/+31
| | | | llvm-svn: 107144
* Delete assert in ComputeKeyFunction. The function runs fine without it, sinceJeffrey Yasskin2010-06-292-4/+3
| | | | | | | | there's an explicit guard on isPolymorphic, and virtual bases don't affect the key function calculation. This allows people to call ASTContext::getKeyFunction on arbitrary classes. llvm-svn: 107143
* Return Changed. This required setting Changed if dbg metadataDuncan Sands2010-06-291-5/+7
| | | | | | | | is stripped off. Currently set unconditionally, since the API does not provide a way of working out if anything was actually stripped off. llvm-svn: 107142
* It seems clear that this should return Changed.Duncan Sands2010-06-291-1/+1
| | | | llvm-svn: 107141
* Add a VT argument to getMinimalPhysRegClass and replace the copy related usesRafael Espindola2010-06-298-11/+18
| | | | | | | | | of getPhysicalRegisterRegClass with it. If we want to make a copy (or estimate its cost), it is better to use the smallest class as more efficient operations might be possible. llvm-svn: 107140
* getMachineBasicBlockAddress returns a uintptr_t - don't truncateDuncan Sands2010-06-291-1/+1
| | | | | | | to unsigned only to extend back to a pointer sized value on the next line. llvm-svn: 107139
* The variable ValueSize is set to 1 on both code paths, and thenDuncan Sands2010-06-291-5/+1
| | | | | | ignored! Remove it. llvm-svn: 107138
* The variable "Value" is carefully set to Layout.getSymbolAddress,Duncan Sands2010-06-291-4/+0
| | | | | | but then not actually used - maybe a bug? Remove the variable. llvm-svn: 107137
* Remove unused calls to Lexer.getLoc and the pointless variable HasFillExpr.Duncan Sands2010-06-291-7/+0
| | | | llvm-svn: 107136
* Remove pointless variable LastDef.Duncan Sands2010-06-291-2/+0
| | | | llvm-svn: 107135
* Looks like this test is missing an XFAIL line.Duncan Sands2010-06-291-0/+1
| | | | llvm-svn: 107134
* Remove unused variable Loc and pointless variables unified_syntaxDuncan Sands2010-06-291-15/+4
| | | | | | and thumb_mode. llvm-svn: 107133
* use ArgOperand APIsGabor Greif2010-06-291-3/+3
| | | | llvm-svn: 107132
* Remove an unused and a pointless variable.Duncan Sands2010-06-291-3/+0
| | | | llvm-svn: 107131
* Remove pointless and unused variables.Duncan Sands2010-06-291-9/+0
| | | | llvm-svn: 107130
* encode operand initializations (at fixed index)Gabor Greif2010-06-291-12/+8
| | | | | | | | | in terms of Op<> and ArgOffset. This works for values of {0, 1} for ArgOffset. Please note that ArgOffset will become 0 soon and will go away eventually. llvm-svn: 107129
* Remove a pointless variable.Duncan Sands2010-06-291-5/+1
| | | | llvm-svn: 107128
* Remove initialized but otherwise unused variables.Duncan Sands2010-06-297-9/+0
| | | | llvm-svn: 107127
* Remove variables that are written by not read.Duncan Sands2010-06-291-6/+0
| | | | llvm-svn: 107126
* Use a more obvious way to avoid compiling functions which are only used when ↵Benjamin Kramer2010-06-291-3/+2
| | | | | | XDEBUG is enabled. llvm-svn: 107125
* Jump through some silly hoops to make GCC accept that a function may not alwaysChandler Carruth2010-06-291-0/+3
| | | | | | be called. llvm-svn: 107124
* Change X86_64ABIInfo to have ASTContext and TargetData ivars toChris Lattner2010-06-293-48/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avoid passing ASTContext down through all the methods it has. When classifying an argument, or argument piece, as INTEGER, check to see if we have a pointer at exactly the same offset in the preferred type. If so, use that pointer type instead of i64. This allows us to compile A function taking a stringref into something like this: define i8* @foo(i64 %D.coerce0, i8* %D.coerce1) nounwind ssp { entry: %D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=4] %0 = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1] store i64 %D.coerce0, i64* %0 %1 = getelementptr %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1] store i8* %D.coerce1, i8** %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 } instead of this: define i8* @foo(i64 %D.coerce0, i64 %D.coerce1) nounwind ssp { entry: %D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3] %0 = insertvalue %0 undef, i64 %D.coerce0, 0 ; <%0> [#uses=1] %1 = insertvalue %0 %0, i64 %D.coerce1, 1 ; <%0> [#uses=1] %2 = bitcast %struct.DeclGroup* %D to %0* ; <%0*> [#uses=1] store %0 %1, %0* %2, 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 } This implements rdar://7375902 - [codegen quality] clang x86-64 ABI lowering code punishing StringRef llvm-svn: 107123
* PR7503: uxtb16 is not available for ARMv7-M. Patch by Brian G. Lucas.Evan Cheng2010-06-292-27/+70
| | | | llvm-svn: 107122
* Change if-cvt options to something that actually as useable.Evan Cheng2010-06-291-4/+6
| | | | llvm-svn: 107121
* Minix doesn't support dylibs, PR7294Chris Lattner2010-06-291-1/+1
| | | | llvm-svn: 107120
* When processing loops for scheduling latencies (used for live outs on loopJim Grosbach2010-06-291-1/+4
| | | | | | | back-edges), make sure not to include dbg_value instructions in the count. Closing in on the end of rdar://7797940 llvm-svn: 107119
* A little code cleanup to not create an script bridging object just to feedGreg Clayton2010-06-291-5/+2
| | | | | | the private object back to another internal function. llvm-svn: 107118
* Just as its not safe to blindly transfer the nsw bit from an addDan Gohman2010-06-291-5/+9
| | | | | | | | instruction to an add scev, it's not safe to blindly transfer the inbounds flag from a gep instruction to an nsw on the scev for the gep. llvm-svn: 107117
* Refactoring of arithmetic instruction classes with unary operatorBruno Cardoso Lopes2010-06-291-118/+60
| | | | llvm-svn: 107116
* plumb preferred types down into X86_64ABIInfo::classifyArgumentType,Chris Lattner2010-06-291-4/+14
| | | | | | no functionality change. llvm-svn: 107115
* When no memoperands are present, assume unaligned, volatile.Jakob Stoklund Olesen2010-06-291-10/+13
| | | | llvm-svn: 107114
* Strip resulting binaries.Bill Wendling2010-06-291-0/+7
| | | | llvm-svn: 107112
* Pass the LLVM IR version of argument types down into computeInfo.Chris Lattner2010-06-293-10/+38
| | | | | | | | | This is somewhat annoying to do this at this level, but it avoids having ABIInfo know depend on CodeGenTypes for a hint. Nothing is using this yet, so no functionality change. llvm-svn: 107111
* Reapply my if-conversion cleanup from svn r106939 with fixes.Bob Wilson2010-06-292-35/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are 2 changes relative to the previous version of the patch: 1) For the "simple" if-conversion case, there's no need to worry about RemoveExtraEdges not handling an unanalyzable branch. Predicated terminators are ignored in this context, so RemoveExtraEdges does the right thing. This might break someday if we ever treat indirect branches (BRIND) as predicable, but for now, I just removed this part of the patch, because in the case where we do not add an unconditional branch, we rely on keeping the fall-through edge to CvtBBI (which is empty after this transformation). The change relative to the previous patch is: @@ -1036,10 +1036,6 @@ IterIfcvt = false; } - // RemoveExtraEdges won't work if the block has an unanalyzable branch, - // which is typically the case for IfConvertSimple, so explicitly remove - // CvtBBI as a successor. - BBI.BB->removeSuccessor(CvtBBI->BB); RemoveExtraEdges(BBI); // Update block info. BB can be iteratively if-converted. 2) My patch exposed a bug in the code for merging the tail of a "diamond", which had previously never been exercised. The code was simply checking that the tail had a single predecessor, but there was a case in MultiSource/Benchmarks/VersaBench/dbms where that single predecessor was neither edge of the diamond. I added the following change to check for that: @@ -1276,7 +1276,18 @@ // tail, add a unconditional branch to it. if (TailBB) { BBInfo TailBBI = BBAnalysis[TailBB->getNumber()]; - if (TailBB->pred_size() == 1 && !TailBBI.HasFallThrough) { + bool CanMergeTail = !TailBBI.HasFallThrough; + // There may still be a fall-through edge from BBI1 or BBI2 to TailBB; + // check if there are any other predecessors besides those. + unsigned NumPreds = TailBB->pred_size(); + if (NumPreds > 1) + CanMergeTail = false; + else if (NumPreds == 1 && CanMergeTail) { + MachineBasicBlock::pred_iterator PI = TailBB->pred_begin(); + if (*PI != BBI1->BB && *PI != BBI2->BB) + CanMergeTail = false; + } + if (CanMergeTail) { MergeBlocks(BBI, TailBBI); TailBBI.IsDone = true; } else { With these fixes, I was able to run all the SingleSource and MultiSource tests successfully. llvm-svn: 107110
* Add an Intraprocedural form of BasicAliasAnalysis, which aims toDan Gohman2010-06-295-37/+173
| | | | | | | properly handles instructions and arguments defined in different functions, or across recursive function iterations. llvm-svn: 107109
OpenPOWER on IntegriCloud