Eli Friedman
bdef5df44e
Generalize the float type generation code, and specifically fix the
...
codegen of X86 long double.
llvm-svn: 51578
2008-05-27 04:20:05 +00:00
Eli Friedman
3e113409cb
Implementation of gcc mode attribute; this is significant because
...
it fixes PR2204. Not too much to say about the implementation; it works
in a similar way to the vector size attribute.
At some point, we need to modify the targets to provide information
about the appropriate types.
llvm-svn: 51577
2008-05-27 03:33:27 +00:00
Eli Friedman
42ed07e10e
Rewrite struct/union layout. This is mostly cleanup; this might also fix
...
a few bugs, but I don't know of any in particular. This has good effects
besides cleanup, though: it also should make it easier to implement the
aligned and packed attributes, and also target-specific struct layouts,
because the code won't have to be duplicated in codegen.
llvm-svn: 51576
2008-05-27 03:14:44 +00:00
Eli Friedman
e2bbfe22c7
Stop leaking the TUDecl.
...
llvm-svn: 51575
2008-05-27 03:08:09 +00:00
Eli Friedman
1c2d5f56f8
Change diagnostic per suggestion, to make it a bit clearer what is
...
happening.
llvm-svn: 51574
2008-05-27 02:01:50 +00:00
Nick Lewycky
3ebe82b57a
InequalityGraph::node() can create new nodes, invalidating iterators across
...
the set of nodes. Fix makeEqual to handle this by creating the new node first
then iterating across them second.
llvm-svn: 51573
2008-05-27 00:59:05 +00:00
Nick Lewycky
6be65d2a84
Grammaro.
...
llvm-svn: 51572
2008-05-26 22:49:36 +00:00
Gabor Greif
2d3024d838
eliminate calls to deprecated Use::init() interface
...
llvm-svn: 51570
2008-05-26 21:33:52 +00:00
Nick Lewycky
a61cc6ece0
Whoops -- forgot PR reference on this test.
...
llvm-svn: 51569
2008-05-26 20:23:33 +00:00
Nick Lewycky
213e114a2c
The Linux ABI emits an extra "movl %esp, %ebp" in function prologue and
...
sometimes a "mov %ebp, %esp" in the epilogue.
Force these tests that rely on counting 'mov' to use i686-apple-darwin8.8.0
where they were written.
llvm-svn: 51568
2008-05-26 20:18:56 +00:00
Duncan Sands
dd7daee850
Factor code to copy global value attributes like
...
the section or the visibility from one global
value to another: copyAttributesFrom. This is
particularly useful for duplicating functions:
previously this was done by explicitly copying
each attribute in turn at each place where a
new function was created out of an old one, with
the result that obscure attributes were regularly
forgotten (like the collector or the section).
Hopefully now everything is uniform and nothing
is forgotten.
llvm-svn: 51567
2008-05-26 19:58:59 +00:00
Eli Friedman
df649f3da5
Emit memmove, not memcpy, for structure copies; this is unfortunately
...
required for correctness in cases of copying a struct to itself or to
an overlapping struct (itself for cases like *a = *a, and overlapping
is possible with unions).
Hopefully, this won't end up being a perf issue; LLVM *should* be able
to optimize memmove to memcpy in a lot of cases, and for small copies
the generated code *should* be mostly comparable. (In reality, LLVM
is currently horrible at optimizing memmove, but that's a bug, not a
fundamental issue.)
gcc currently generates wrong code; that's
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667 .
llvm-svn: 51566
2008-05-26 12:59:39 +00:00
Owen Anderson
d3f21d165f
Use a DenseMap instead of an std::map, speeding up the testcase in PR2368 by about a third.
...
llvm-svn: 51565
2008-05-26 10:07:43 +00:00
Bill Wendling
2e8c82893b
The enabling of remat in 2-address conversion breaks this test:
...
Running /Users/void/llvm/llvm.src/test/CodeGen/X86/dg.exp ...
FAIL: /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll
Failed with exit(1) at line 1
while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll | llc -march=x86 -mattr=+sse2 -stats |& grep {1 .*folded into instructions}
child process exited abnormally
Make this conditional for now.
llvm-svn: 51563
2008-05-26 05:49:49 +00:00
Bill Wendling
c737e4639a
A problem that's exposed when machine LICM is enabled. Consider this code:
...
LBB1_3: # bb
...
xorl %ebp, %ebp
subl (%ebx), %ebp
...
incl %ecx
cmpl %edi, %ecx
jl LBB1_3 # bb
Whe using machine LICM, LLVM converts it into:
xorl %esi, %esi
LBB1_3: # bb
...
movl %esi, %ebp
subl (%ebx), %ebp
...
incl %ecx
cmpl %edi, %ecx
jl LBB1_3 # bb
Two address conversion inserts the copy instruction. However, it's cheaper to
rematerialize it, and remat helps reduce register pressure.
llvm-svn: 51562
2008-05-26 05:18:34 +00:00
Nick Lewycky
be993358a7
Use {} instead of "" in RUN lines.
...
llvm-svn: 51561
2008-05-26 01:27:08 +00:00
Nick Lewycky
3195b393d6
Don't treat values as signed when looking at loop steppings in HowForToNonZero.
...
llvm-svn: 51560
2008-05-25 23:43:32 +00:00
Nick Lewycky
f6ccd2580c
"ret (constexpr)" can't be folded into a Constant. Add a method to
...
Analysis/ConstantFolding to fold ConstantExpr's, then make instcombine use it
to try to use targetdata to fold constant expressions on void instructions.
Also extend the icmp(inttoptr, inttoptr) folding to handle the case where
int size != ptr size.
llvm-svn: 51559
2008-05-25 20:56:15 +00:00
Eli Friedman
292e98cc18
Fix for PR2001. I'm not really fond of it, but it is correct (unless
...
someone tries to make a bitfield volatile?).
Not sure how to write a test; any suggestions?
llvm-svn: 51558
2008-05-25 14:13:57 +00:00
Eli Friedman
0e56c82e4a
Count the number of initializable members correctly in structs/unions
...
with unnamed members.
llvm-svn: 51557
2008-05-25 14:03:31 +00:00
Eli Friedman
e0f832bd4f
Diagnose implicit init list for empty aggregate, like struct {}. Fixes
...
PR2151 (by not creating the empty implicit init list).
llvm-svn: 51556
2008-05-25 13:49:22 +00:00
Eli Friedman
85f5497c4a
Move the error checking for variable-sized objects so we don't
...
double-report errors; fixes PR2362.
llvm-svn: 51555
2008-05-25 13:22:35 +00:00
Eli Friedman
b2bef7c1c2
Make sure to define __sparc__ on Solaris; this should "fix"
...
test/Codegen/mandel.c on Solaris. :-)
llvm-svn: 51554
2008-05-25 05:26:09 +00:00
Sanjiv Gupta
98070578bf
Generate subprogram debug info with -g.
...
Also take care of freeing memory at the right places.
llvm-svn: 51553
2008-05-25 05:15:42 +00:00
Eli Friedman
d042a969c9
Fix this test on non-X86 platforms.
...
llvm-svn: 51552
2008-05-25 04:43:38 +00:00
Eli Friedman
1f97e5798f
Always initialize NEXT_CATCH; fixes a Valgrind uninitialized read error
...
(originally reported in PR1682).
llvm-svn: 51551
2008-05-25 04:34:57 +00:00
Ted Kremenek
e37e612e7a
Fix variable misspelling.
...
llvm-svn: 51548
2008-05-24 16:16:30 +00:00
Ted Kremenek
37d6f58018
Don't use inferlanguage to override the default language for all files.
...
llvm-svn: 51547
2008-05-24 16:14:34 +00:00
Ted Kremenek
55842bd269
Don't analyze .o files.
...
llvm-svn: 51546
2008-05-24 16:09:00 +00:00
Ted Kremenek
f18f460716
Cleanup indentation and remove some dead code.
...
Analyze files not compiled using "-c". This fixes:
<rdar://problem/5961638> invoke checker when gcc is not called with "-c"
llvm-svn: 51545
2008-05-24 15:58:54 +00:00
Ted Kremenek
a08154d85f
Call the correct destructor.
...
llvm-svn: 51544
2008-05-24 15:09:56 +00:00
Owen Anderson
3f4ebba1fa
Create archives with the same permissions are ar.
...
Patch by Mikael Lepistö.
llvm-svn: 51540
2008-05-24 05:42:29 +00:00
Chris Lattner
65d18feef5
Fix win32 when no bison is around, PR2331, patch by 'hume'.
...
llvm-svn: 51539
2008-05-24 05:11:48 +00:00
Chris Lattner
305fcd493f
Add FreeBSD/PPC support, patch by Marcel Moolenaar!
...
llvm-svn: 51538
2008-05-24 04:58:48 +00:00
Chris Lattner
87a099a057
Fix a serious brain-o. Obviously no-one reviewed my patch :(
...
This fixes PR2359
llvm-svn: 51536
2008-05-24 04:06:28 +00:00
Chris Lattner
5c207c83c6
Fix PR2358 by resolving calls with undef arguments to overdefined.
...
llvm-svn: 51535
2008-05-24 03:59:33 +00:00
Evan Cheng
91a2e56b06
Eliminate x86.sse2.punpckh.qdq and x86.sse2.punpckl.qdq.
...
llvm-svn: 51533
2008-05-24 02:56:30 +00:00
Evan Cheng
2146270c9b
Eliminate x86.sse2.movs.d, x86.sse2.shuf.pd, x86.sse2.unpckh.pd, and x86.sse2.unpckl.pd intrinsics. These will be lowered into shuffles.
...
llvm-svn: 51531
2008-05-24 02:14:05 +00:00
Duncan Sands
91dea27d4c
Tweak how ConstantFP80Ty constants are output
...
so that gcc doesn't warn about them.
llvm-svn: 51529
2008-05-24 01:00:52 +00:00
Steve Naroff
04c3299652
This fixes a VC++ build failure.
...
llvm-svn: 51528
2008-05-24 00:16:40 +00:00
Dale Johannesen
18cc4d3ea4
Put initialized const weak objects into correct
...
sections on ppc32 darwin. g++.dg/abi/key2.C
llvm-svn: 51527
2008-05-24 00:10:20 +00:00
Evan Cheng
8647b875cc
This is done.
...
llvm-svn: 51526
2008-05-24 00:10:13 +00:00
Evan Cheng
948627aadd
New loadl_pd and loadh_pd tests.
...
llvm-svn: 51525
2008-05-24 00:10:02 +00:00
Evan Cheng
5065932276
Autoupgrade x86.sse2.loadh.pd and x86.sse2.loadl.pd.
...
llvm-svn: 51523
2008-05-24 00:08:39 +00:00
Evan Cheng
6f8cfac755
Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and shuffle instructions.
...
llvm-svn: 51522
2008-05-24 00:07:29 +00:00
Evan Cheng
02912418f1
Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and shuffle instructions.
...
llvm-svn: 51521
2008-05-24 00:07:06 +00:00
Chris Lattner
10a7bd6341
fix a nasty off-by-one error.
...
llvm-svn: 51519
2008-05-23 23:29:33 +00:00
Dale Johannesen
4188aadbb2
Document common linkage.
...
llvm-svn: 51517
2008-05-23 23:13:41 +00:00
Chris Lattner
78f37e6d28
add some assertions to catch bad things before they die
...
somewhere deep in rewrite rope.
llvm-svn: 51515
2008-05-23 23:10:58 +00:00
Chris Lattner
17c2476d0b
fix an inconsistency computing offsets that caused a crash on rewrite-nest.m
...
llvm-svn: 51514
2008-05-23 23:06:56 +00:00