Dale Johannesen
764b056c30
Refix XTARGET. Previous attempt matches on powerpc-apple-darwin,
...
although I don't see why.
llvm-svn: 107090
2010-06-28 22:45:33 +00:00
Dale Johannesen
65cd5ba74d
Attempt to fix XTARGET.
...
llvm-svn: 107088
2010-06-28 22:31:52 +00:00
Argyrios Kyrtzidis
d0795b2d78
Modify the way sub-statements are stored and retrieved from PCH.
...
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
2010-06-28 22:28:35 +00:00
Bob Wilson
4469a892b4
Make the ARMCodeEmitter identify Thumb functions via ARMFunctionInfo instead
...
of the Subtarget.
llvm-svn: 107086
2010-06-28 22:23:17 +00:00
Devang Patel
1de21ec498
Use DW_FORM_addr for DW_AT_entry_pc.
...
llvm-svn: 107085
2010-06-28 22:22:47 +00:00
Dan Gohman
b160ba46e8
Add a blurb about -scev-aa.
...
llvm-svn: 107080
2010-06-28 22:09:52 +00:00
Dale Johannesen
17feb07c53
In asm's, output operands with matching input constraints
...
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
2010-06-28 22:09:45 +00:00
Chris Lattner
93af332819
pass/return structs of char and short as i8/i16 to avoid
...
aweful through-memory coersion, just like we do for i32 now.
llvm-svn: 107078
2010-06-28 21:59:07 +00:00
Kevin Enderby
e233dda2e2
Added the darwin .secure_log_unique and .secure_log_reset directives.
...
llvm-svn: 107077
2010-06-28 21:45:58 +00:00
Chris Lattner
d776fb150e
more tidying up.
...
llvm-svn: 107076
2010-06-28 21:43:59 +00:00
Greg Clayton
0c5cd90d63
Added function name types to allow us to set breakpoints by name more
...
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
2010-06-28 21:30:43 +00:00
Dan Gohman
e697a6f24f
Constant fold x == undef to undef.
...
llvm-svn: 107074
2010-06-28 21:30:07 +00:00
Jim Grosbach
f31c004666
tidy up style. no functional change.
...
llvm-svn: 107073
2010-06-28 21:29:17 +00:00
Dan Gohman
7c34ece501
Fix Value::stripPointerCasts and BasicAA to avoid trouble on
...
code in unreachable blocks, which have have use-def cycles.
This fixes PR7514.
llvm-svn: 107071
2010-06-28 21:16:52 +00:00
Bob Wilson
544317dfda
Refactor encoding function for NEON 1-register with modified immediate format.
...
llvm-svn: 107070
2010-06-28 21:16:30 +00:00
Bob Wilson
584387d5e3
Support Thumb mode encoding of NEON instructions.
...
llvm-svn: 107068
2010-06-28 21:12:19 +00:00
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