Commit Graph

85975 Commits

Author SHA1 Message Date
Bill Wendling 0a5bb081cc Reduce indentation via early exit. NFC.
llvm-svn: 107067
2010-06-28 21:08:32 +00:00
Johnny Chen 7e363f5571 Added test for a previously fixed bug where invoking lldb command from an emacs
shell and issuing 'help' would hang (was actually infinitely looping).

llvm-svn: 107066
2010-06-28 20:55:57 +00:00
Devang Patel d10b2af260 Include inlined function in list of processed subprograms.
llvm-svn: 107065
2010-06-28 20:53:04 +00:00
Ted Kremenek e60d304d13 Remove state assertion.
llvm-svn: 107064
2010-06-28 20:44:49 +00:00
Ted Kremenek ea78375ed4 Don't crash in InitializePreprocessor() when there is no valid PTHManager. Fixes <rdar://problem/8098441>.
llvm-svn: 107061
2010-06-28 20:32:40 +00:00
Jim Grosbach ee6e29aa72 new, no longer brain-dead, r106907
llvm-svn: 107060
2010-06-28 20:26:00 +00:00
Devang Patel 68c81196f9 Remove this weak test.
llvm-svn: 107059
2010-06-28 20:24:35 +00:00
Dale Johannesen 0e4d964bfe Testcase for llvm-gcc fix 107051.
llvm-svn: 107052
2010-06-28 20:07:30 +00:00
Chris Lattner 0cf2419cd7 random acts of tidying.
llvm-svn: 107050
2010-06-28 20:05:43 +00:00
Jakob Stoklund Olesen fde9c348e9 Don't write temporary files in test directory
llvm-svn: 107049
2010-06-28 20:01:15 +00:00
Chris Lattner a7d81ab7f3 X86-64:
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
2010-06-28 19:56:59 +00:00
Fariborz Jahanian c42461e145 Minor refactorin of my last patch (radar 7860965 related).
llvm-svn: 107047
2010-06-28 19:42:10 +00:00
Jakob Stoklund Olesen ffd628ec0a After physreg coalescing, physical registers might not have live ranges where
you would expect.

Don't assert on that case, just give up.

This fixes PR7513.

llvm-svn: 107046
2010-06-28 19:39:57 +00:00
Jakob Stoklund Olesen 0117091c16 Add a triple so test runs on Linux as well.
llvm-svn: 107045
2010-06-28 19:31:15 +00:00
Fariborz Jahanian 36ad0e99d5 Have __func__ and siblings point to block's implementation function
name. Fixes radar 7860965.

llvm-svn: 107044
2010-06-28 18:58:34 +00:00
Jakob Stoklund Olesen 0d94d7af78 Add more special treatment for inline asm in RegAllocFast.
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
2010-06-28 18:34:34 +00:00
Eric Christopher 7f103a2653 Fix thinko.
llvm-svn: 107042
2010-06-28 18:33:48 +00:00
Chris Lattner d250b8e9a8 tweak test to pass on windows
llvm-svn: 107040
2010-06-28 18:29:14 +00:00
Eric Christopher 51f2908328 Pull in the libCrashReporterClient.a information with a warning comment.
Remove library check and regenerate configure.

llvm-svn: 107028
2010-06-28 18:25:51 +00:00
Devang Patel f3b2db68c6 Preserve deleted function's local variables' debug info.
Radar 8122864.

llvm-svn: 107027
2010-06-28 18:25:03 +00:00
Devang Patel 6e34f19b17 Make this test darwin specific.
llvm-svn: 107025
2010-06-28 18:04:03 +00:00
Daniel Dunbar ebf9da9849 tests: Rewrite test to check intent instead of implementation.
llvm-svn: 107024
2010-06-28 17:43:18 +00:00
Howard Hinnant 99724799fb Minor fixup
llvm-svn: 107022
2010-06-28 17:19:47 +00:00
Rafael Espindola 0e1fb4f341 Set the default arch based on the triple.
llvm-svn: 107021
2010-06-28 17:18:09 +00:00
Chris Lattner c1028f689e Fix UnitTests/2004-02-02-NegativeZero.c, which regressed when
I broke negate of FP values.

llvm-svn: 107019
2010-06-28 17:12:37 +00:00
Chris Lattner 18bcf76f05 fix a silly fixme.
llvm-svn: 107018
2010-06-28 17:11:58 +00:00
Gabor Greif 5b1370ee80 use ArgOperand API
llvm-svn: 107017
2010-06-28 16:50:57 +00:00
Gabor Greif e23efeef10 use ArgOperand API
llvm-svn: 107016
2010-06-28 16:45:00 +00:00
Gabor Greif 18c5bae727 employ CallInst::ArgOffset (for now)
llvm-svn: 107015
2010-06-28 16:43:57 +00:00
Gabor Greif cd09869dfc simplify: we have solid argument iterator range
llvm-svn: 107014
2010-06-28 16:40:52 +00:00
Dan Gohman 875a296011 Generalize AAEval so that it can be used both per-function and
interprocedurally. Note that as of this writing, existing alias
analysis passes are not prepared to be used interprocedurally.

llvm-svn: 107013
2010-06-28 16:01:37 +00:00
Dan Gohman 3bc1b0c882 llvm::errs() is non-buffered, so it doesn't need to be flushed.
llvm-svn: 107012
2010-06-28 15:56:07 +00:00
Dan Gohman 8a62f18091 Fix this build message so that it displays the correct library
name, specifically the "lib" prefix.

llvm-svn: 107011
2010-06-28 15:55:15 +00:00
Daniel Dunbar b8c058cbb0 Revert r106907, "make sure to handle dbg_value instructions in the middle of the
block, not...", it caused a bunch of nightly test regressions.

llvm-svn: 107009
2010-06-28 15:47:17 +00:00
Craig Silverstein 282ddc646b Add support for traversing initializer lists (in constructors), which
we ignoring before.  To give access to the names on the initializer,
which aren't a type or an expr or a decl, I've introduced a new
TraverseInitializer.  By default, it just traverses on the expr that
the name is being initialized to.

Reviewed by chandlerc.  Tested via clang's 'make test'.

llvm-svn: 107008
2010-06-28 15:37:14 +00:00
Sebastian Redl f9463106b3 Introduce Expr::Classify and Expr::ClassifyModifiable, which determine the classification of an expression under the C++0x taxology (value category). Reimplement isLvalue and isModifiableLvalue using these functions. No regressions in the test suite from this, and my rough performance check doesn't show any regressions either.
llvm-svn: 107007
2010-06-28 15:09:07 +00:00
Gabor Greif 2dd4307e45 use setArgOperand
llvm-svn: 107004
2010-06-28 12:31:35 +00:00
Gabor Greif ec60adf161 use CallInst::ArgOffset
llvm-svn: 107003
2010-06-28 12:30:07 +00:00
Gabor Greif 2de43a7c5c use ArgOperand API and CallInst::ArgOffset
llvm-svn: 107002
2010-06-28 12:29:20 +00:00
Gabor Greif 70a0e4e0a0 extend ArgOperand interface: setArgOperand
(in both CallInst and InvokeInst)

also add a (short-lived) constant to CallInst, that names
the operand index of the first call argument. This is
strictly transitional and should not be used for new code.

llvm-svn: 107001
2010-06-28 12:23:36 +00:00
Gabor Greif 4300fc77ae use cached value
llvm-svn: 107000
2010-06-28 11:20:42 +00:00
Argyrios Kyrtzidis 99a226dde4 Support CXXPseudoDestructorExpr for PCH.
llvm-svn: 106999
2010-06-28 09:32:03 +00:00
Argyrios Kyrtzidis cd444d1af7 Support DependentScopeDeclRefExpr for PCH.
llvm-svn: 106998
2010-06-28 09:31:56 +00:00
Argyrios Kyrtzidis b5288de67c Refactor PCH reading/writing of template arguments passed to expressions.
llvm-svn: 106997
2010-06-28 09:31:48 +00:00
Argyrios Kyrtzidis ddf5f211d0 Fix PCH emitting/reading for template arguments that contain expressions.
llvm-svn: 106996
2010-06-28 09:31:42 +00:00
Argyrios Kyrtzidis 0b0369a6b3 Fix various bugs in recent commits for C++ PCH.
llvm-svn: 106995
2010-06-28 09:31:34 +00:00
Chandler Carruth 2d69ec7a72 Partial fix for PR7267 based on comments by John McCall on an earlier patch.
This is more targeted, as it simply provides toggle actions for the parser to
turn access checking on and off. We then use these to suppress access checking
only while we parse the template-id (included scope specifier) of an explicit
instantiation and explicit specialization of a class template. The
specialization behavior is an extension, as it seems likely a defect that the
standard did not exempt them as it does explicit instantiations.

This allows the very common practice of specializing trait classes to work for
private, internal types. This doesn't address instantiating or specializing
function templates, although those apparently already partially work.

The naming and style for the Action layer isn't my favorite, comments and
suggestions would be appreciated there.

llvm-svn: 106993
2010-06-28 08:39:25 +00:00
Jordy Rose 61176897ba Pointer comparisons (and pointer-pointer subtraction). Basically filling in SimpleSValuator::EvalBinOpLL().
llvm-svn: 106992
2010-06-28 08:26:15 +00:00
Devang Patel fb6f22f010 Remove dead code.
llvm-svn: 106990
2010-06-28 05:59:13 +00:00
Devang Patel f7869a4b81 Use named MDNode, llvm.dbg.sp, to collect subprogram info. This will be used to emit local variable's debug info of deleted functions.
llvm-svn: 106989
2010-06-28 05:53:08 +00:00