- Jul 29, 2010
-
-
Chris Lattner authored
llvm-svn: 109735
-
Jordy Rose authored
Use a LazyCompoundVal to handle initialization with a string literal, rather than copying each character. llvm-svn: 109734
-
Chris Lattner authored
have a "coerce to" type which often matches the default lowering of Clang type to LLVM IR type, but the coerce case can be handled by making them not be the same. This simplifies things and fixes issues where X86-64 abi lowering would return coerce after making preferred types exactly match up. This caused us to compile: typedef float v4f32 __attribute__((__vector_size__(16))); v4f32 foo(v4f32 X) { return X+X; } into this code at -O0: define <4 x float> @foo(<4 x float> %X.coerce) nounwind { entry: %retval = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2] %coerce = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2] %X.addr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3] store <4 x float> %X.coerce, <4 x float>* %coerce %X = load <4 x float>* %coerce ; <<4 x float>> [#uses=1] store <4 x float> %X, <4 x float>* %X.addr %tmp = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1] %tmp1 = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1] %add = fadd <4 x float> %tmp, %tmp1 ; <<4 x float>> [#uses=1] store <4 x float> %add, <4 x float>* %retval %0 = load <4 x float>* %retval ; <<4 x float>> [#uses=1] ret <4 x float> %0 } Now we get: define <4 x float> @foo(<4 x float> %X) nounwind { entry: %X.addr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3] store <4 x float> %X, <4 x float>* %X.addr %tmp = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1] %tmp1 = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1] %add = fadd <4 x float> %tmp, %tmp1 ; <<4 x float>> [#uses=1] ret <4 x float> %add } This implements rdar://8248065 llvm-svn: 109733
-
Chris Lattner authored
Before we'd compile the example into something like: %coerce.dive2 = getelementptr %struct.v4f32wrapper* %retval, i32 0, i32 0 ; <<4 x float>*> [#uses=1] %1 = bitcast <4 x float>* %coerce.dive2 to <2 x double>* ; <<2 x double>*> [#uses=1] %2 = load <2 x double>* %1, align 1 ; <<2 x double>> [#uses=1] ret <2 x double> %2 Now we produce: %coerce.dive2 = getelementptr %struct.v4f32wrapper* %retval, i32 0, i32 0 ; <<4 x float>*> [#uses=1] %0 = load <4 x float>* %coerce.dive2, align 1 ; <<4 x float>> [#uses=1] ret <4 x float> %0 llvm-svn: 109732
-
Chris Lattner authored
with return values, improving stuff that returns __m128 etc. llvm-svn: 109731
-
Chris Lattner authored
llvm-svn: 109730
-
Chris Lattner authored
for return values too. Instead of compiling something like: struct foo { int *X; float *Y; }; struct foo test(struct foo *P) { return *P; } to: %1 = type { i64, i64 } define %1 @test(%struct.foo* %P) nounwind { entry: %retval = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2] %P.addr = alloca %struct.foo*, align 8 ; <%struct.foo**> [#uses=2] store %struct.foo* %P, %struct.foo** %P.addr %tmp = load %struct.foo** %P.addr ; <%struct.foo*> [#uses=1] %tmp1 = bitcast %struct.foo* %retval to i8* ; <i8*> [#uses=1] %tmp2 = bitcast %struct.foo* %tmp to i8* ; <i8*> [#uses=1] call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false) %0 = bitcast %struct.foo* %retval to %1* ; <%1*> [#uses=1] %1 = load %1* %0, align 1 ; <%1> [#uses=1] ret %1 %1 } We now get the result more type safe, with: define %struct.foo @test(%struct.foo* %P) nounwind { entry: %retval = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2] %P.addr = alloca %struct.foo*, align 8 ; <%struct.foo**> [#uses=2] store %struct.foo* %P, %struct.foo** %P.addr %tmp = load %struct.foo** %P.addr ; <%struct.foo*> [#uses=1] %tmp1 = bitcast %struct.foo* %retval to i8* ; <i8*> [#uses=1] %tmp2 = bitcast %struct.foo* %tmp to i8* ; <i8*> [#uses=1] call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false) %0 = load %struct.foo* %retval ; <%struct.foo> [#uses=1] ret %struct.foo %0 } That memcpy is completely terrible, but I don't know how to fix it. llvm-svn: 109729
-
Chris Lattner authored
improve codegen for vaarg or something, because its codepath is getting preferred types now. llvm-svn: 109728
-
Daniel Dunbar authored
llvm-svn: 109727
-
Chris Lattner authored
compute its own preferred types instead of having CGT compute them then pass them (circuituously) down into ABIInfo. llvm-svn: 109726
-
Daniel Dunbar authored
llvm-svn: 109725
-
Chris Lattner authored
llvm-svn: 109724
-
Chris Lattner authored
things as TargetData, ASTContext, LLVMContext etc. Stop passing them through so many APIs. llvm-svn: 109723
-
Chris Lattner authored
This will simplify a bunch of code, coming up next. llvm-svn: 109722
-
Daniel Dunbar authored
llvm-svn: 109721
-
Daniel Dunbar authored
llvm-svn: 109720
-
Ted Kremenek authored
Teach GRExprEngine::VisitLValue() about FloatingLiteral, ImaginaryLiteral, and CharacterLiteral. Fixes an assertion failure reported in PR 7675. llvm-svn: 109719
-
Eric Christopher authored
angst. llvm-svn: 109718
-
Daniel Dunbar authored
- This works, but won't handle crashes on stack overflow, or signals delivered to a thread other than the one that crashed. The latter is particular annoying on Darwin, because SIGABRT tends to go to the main thread. llvm-svn: 109717
-
Howard Hinnant authored
llvm-svn: 109716
-
Jakob Stoklund Olesen authored
multiple defs, like t2LDRSB_POST. The first def could accidentally steal the physreg that the second, tied def was required to be allocated to. Now, the tied use-def is treated more like an early clobber, and the physreg is reserved before allocating the other defs. This would never be a problem when the tied def was the only def which is the usual case. This fixes MallocBench/gs for thumb2 -O0. llvm-svn: 109715
-
Jakob Stoklund Olesen authored
llvm-svn: 109714
-
Ted Kremenek authored
Check for an invalid SourceLocation in clang_getCursor(). This avoids a possible assertion failure in SourceManager in the call to Lexer::GetBeginningOfToken(). Fixes <rdar://problem/8244873>. llvm-svn: 109713
-
Johnny Chen authored
llvm-svn: 109712
-
Howard Hinnant authored
llvm-svn: 109711
-
Ted Kremenek authored
Augment RegionStore::BindStruct() to bind symbolicated struct values. This fixes a false path issue reported in <rdar://problem/8243408> and also spurs another cause where the idempotent operations checker fires. llvm-svn: 109710
-
Ted Kremenek authored
llvm-svn: 109709
-
Ted Kremenek authored
llvm-svn: 109708
-
Ted Kremenek authored
Remove extraneous guards around the call to getConjuredSymbolVal(). These checks are already done within getConjuredSymbolVal() itself. llvm-svn: 109707
-
Douglas Gregor authored
libclang, so that clang_annotateTokens() doesn't get confused and miss annotations. llvm-svn: 109706
-
Dan Gohman authored
extend it to handle the case where multiple RAUWs affect a single SCEVUnknown. Add a ScalarEvolution unittest to test for this situation. llvm-svn: 109705
-
Douglas Gregor authored
for AST nodes that aren't actually out-of-line (i.e., require a nested-name-specifier). Fixes <rdar://problem/8204126>. llvm-svn: 109704
-
Owen Anderson authored
Pass the queried value by argument rather than in a member, in preparation for supporting PHI translation. llvm-svn: 109701
-
Chris Lattner authored
possible. This improves the example to pass <4 x float> instead of <2 x double> but we still get awful code, and still don't get the return value right. llvm-svn: 109700
-
Chris Lattner authored
llvm-svn: 109699
-
Fariborz Jahanian authored
block's synthesized constructor initalizer list. Fixes radar 8240371. llvm-svn: 109698
-
Eli Friedman authored
inside a template class. llvm-svn: 109697
-
Jim Grosbach authored
ARM mode version of r109693. Remove incorrect substitution pattern for UXTB16. It wrongly assumed the input shift was actually a rotate. rdar://8240138 llvm-svn: 109696
-
Howard Hinnant authored
llvm-svn: 109695
-
Devang Patel authored
Override selected builtin names (e.g. "long int" instead of "long") to match names used by gcc in debug info. This makes gdb testsuite happy. llvm-svn: 109694
-