Commit Graph

37736 Commits

Author SHA1 Message Date
Lauro Ramos Venancio 1a30c18e88 [ARM] Fix code generation for:
static __thread struct {
    int a;
    int b;
} teste = {0, 0};

llvm-svn: 43722
2007-11-05 18:33:37 +00:00
Ted Kremenek e93520d977 Fixed bug where tombstone key and empty key for DenseMap used for
pointer backpatching in deserializer were improperly created and
resulted in an assertion failure.

llvm-svn: 43721
2007-11-05 18:13:03 +00:00
Duncan Sands f7ae8bd090 Don't output ABI size padding twice. By using the store
size for the field we get ABI padding automatically, so
no need to put it in again when we emit the field.

llvm-svn: 43720
2007-11-05 18:03:02 +00:00
Chris Lattner 38eec3071a add link to llvmbuilder doxygen docs
llvm-svn: 43719
2007-11-05 18:02:15 +00:00
Chris Lattner 9b2f7773ac spell identifier correctly.
llvm-svn: 43718
2007-11-05 17:54:34 +00:00
Chris Lattner e02310d5e3 fix typo
llvm-svn: 43717
2007-11-05 17:52:04 +00:00
Fariborz Jahanian 63ac80e76a Misc. fixes. 1) Resurrect meta-data generation turned off by a previous patch.
2) Fixed a regression in meta-data generation caused by removal of '_interface' prefix from synthesize class name.
3) Added stubs for @try/@catch/@finally statements.

llvm-svn: 43716
2007-11-05 17:47:33 +00:00
Chris Lattner 2172186c7b Dan points out that mem2reg also promotes vectors: be more precise.
llvm-svn: 43715
2007-11-05 17:45:54 +00:00
Evan Cheng 8bb30184a8 Move SimpleRegisterCoalescing.h to lib/CodeGen since there is now a common
register coalescer interface: RegisterCoalescing.

llvm-svn: 43714
2007-11-05 17:41:38 +00:00
Ted Kremenek a6d9f3c2cf Made methods "Emit" and "Materialize" in ASTContext (used for serialization) public.
llvm-svn: 43713
2007-11-05 17:41:25 +00:00
Chris Lattner 3527796804 clarify
llvm-svn: 43712
2007-11-05 17:39:26 +00:00
Chris Lattner 3a39ad630a fix typo
llvm-svn: 43711
2007-11-05 17:38:34 +00:00
Ted Kremenek 31b789c0d8 Added TypeSerialization.cpp and DeclSerialization.cpp to the XCode project.
llvm-svn: 43710
2007-11-05 17:04:40 +00:00
Duncan Sands d6f131ba6f Fix some typos.
llvm-svn: 43709
2007-11-05 16:04:58 +00:00
Steve Naroff 96d20616c4 Sema::ActOnClassMessage()...if a class method isn't found, lookup an instance method. Since all classes are also instances, this is appropriate.
llvm-svn: 43708
2007-11-05 15:27:52 +00:00
Duncan Sands f8bc406d5d Trivial fixes.
llvm-svn: 43707
2007-11-05 15:15:50 +00:00
Steve Naroff bd72289baa Declare objc_selector outside the prototype for objc_msgSend(), removing a silly warning.
llvm-svn: 43706
2007-11-05 14:55:35 +00:00
Steve Naroff e4f9b23458 Rewrite @selector(sel).
llvm-svn: 43705
2007-11-05 14:50:49 +00:00
Steve Naroff 98eb8d1275 - change the synthesized typedef (for classes) to be of type "objc_object".
- fix a couple bugs in RewriteObjCStringLiteral.
- convert "Class" -> "id" in RewriteMessageExpr.

llvm-svn: 43704
2007-11-05 14:36:37 +00:00
Evan Cheng 9337929aae Use movups to spill / restore SSE registers on targets where stacks alignment is
less than 16. This is a temporary solution until dynamic stack alignment is
implemented.

llvm-svn: 43703
2007-11-05 07:30:01 +00:00
Chris Lattner 6cdadb6041 add a link.
llvm-svn: 43702
2007-11-05 07:02:49 +00:00
Chris Lattner 044edf41df finish the tutorial, yaay.
comments and feedback welcome.

llvm-svn: 43701
2007-11-05 07:00:54 +00:00
Evan Cheng 17b0e3e1ae Skip over deleted val#'s.
llvm-svn: 43700
2007-11-05 06:46:45 +00:00
Evan Cheng a406b47f14 Handle cases where a register and one of its super-register are both marked as
defined on the same instruction. This fixes PR1767.

llvm-svn: 43699
2007-11-05 03:11:55 +00:00
Evan Cheng e12363dac5 Fix test case. Chris didn't do make check. :-)
llvm-svn: 43698
2007-11-05 03:04:26 +00:00
Bruno Cardoso Lopes 3e0d030dad Added support for PIC code with "explicit relocations" *only*.
Removed all macro code for PIC (goodbye "la").
Support tested with shootout bench.

llvm-svn: 43697
2007-11-05 03:02:32 +00:00
Gordon Henriksen 2657b218ea Bringing Passes.html up-to-date with the deletion of the
-emitbitcode option and the addition of -preverify.

llvm-svn: 43696
2007-11-05 02:05:35 +00:00
Chris Lattner b7a5dbb4db Add the first section of chapter 8.
llvm-svn: 43695
2007-11-05 01:58:13 +00:00
Gordon Henriksen 2ed067a0d9 Deleting redundant copy of block extractor pass. See also PR1775.
llvm-svn: 43694
2007-11-05 01:54:05 +00:00
Evan Cheng c68023a955 Doh. PR1187 -> PR1766.
llvm-svn: 43693
2007-11-05 01:00:44 +00:00
Evan Cheng a8044084ac Fix PR1187.
llvm-svn: 43692
2007-11-05 00:59:10 +00:00
Duncan Sands f07fa24289 If a long double is in a packed struct, it may be
that there is no padding.

llvm-svn: 43691
2007-11-05 00:35:07 +00:00
Steve Naroff 3865e4d8b4 Remove HandleObjcMetaDataEmission(), I inadvertantly resurrected it.
llvm-svn: 43690
2007-11-05 00:25:00 +00:00
Chris Lattner 350759513b finish the chapter.
llvm-svn: 43689
2007-11-05 00:23:57 +00:00
Duncan Sands 283207a71c Eliminate the remaining uses of getTypeSize. This
should only effect x86 when using long double.  Now
12/16 bytes are output for long double globals (the
exact amount depends on the alignment).  This brings
globals in line with the rest of LLVM: the space
reserved for an object is now always the ABI size.
One tricky point is that only 10 bytes should be
output for long double if it is a field in a packed
struct, which is the reason for the additional
argument to EmitGlobalConstant.

llvm-svn: 43688
2007-11-05 00:04:43 +00:00
Steve Naroff f36987c79b Two additions...
- Synthesize the funky cast for objc_msgSend(). For the basic case, it looks like...

((id (*)(id, SEL))(void *)objc_msgSend)(obj, sel);

The "void *" cast is needed to workaround a GCC "bandaid" (Chris says it has something to do with the inliner). Without the extra "void *" cast, we get spurious warnings/notes that look like...

xx.m:17: warning: function called through a non-compatible type
xx.m:17: note: if this code is reached, the program will abort

- Add prototypes for the ObjC functions we call, objc_msgSend/objc_getClass for now (don't depend on them being included).

llvm-svn: 43685
2007-11-04 22:37:50 +00:00
Owen Anderson eea82746b3 Another step of stronger PHI elimination down.
llvm-svn: 43684
2007-11-04 22:33:26 +00:00
Gordon Henriksen 35f398a9cd Deleting -emitbitcode option which did nothing.
llvm-svn: 43683
2007-11-04 20:28:31 +00:00
Chris Lattner 0e6b674993 fix typos
llvm-svn: 43682
2007-11-04 19:42:13 +00:00
Chris Lattner 9329e780cd Fix PR1761 by not printing (rip) suffix when in -static mode.
Evan, please review this.

llvm-svn: 43680
2007-11-04 19:23:28 +00:00
Gordon Henriksen ad45991a86 Validation fix.
llvm-svn: 43679
2007-11-04 18:17:58 +00:00
Gordon Henriksen c55d1f6c7f Typo fix.
llvm-svn: 43678
2007-11-04 18:14:08 +00:00
Gordon Henriksen 9f6c4c45d7 Completing Passes.html with the exception of -emitbitcode, which should be
removed. This document could still stand for significant improvement:

  * Editing the pass descriptions; most were lifted with minimal editing from
    comments. Although implementation details were elided, many of the were not
    written for the audience that would be interested in this document.
  * More "before and after" examples.
  * More implicit dependency details. (Perhaps listing transforms in
    -std-compile-opts order would help alleviate this.)
  * Adding documentation for how to invoke passes programmatically.
  * Rearranging the document into a more logical taxonomy. For instance, putting
    profiling passes together.

llvm-svn: 43677
2007-11-04 18:10:18 +00:00
Nick Lewycky d954dcd138 Fix crash before main on ppc/linux with static constructors. PR1771
llvm-svn: 43676
2007-11-04 17:32:10 +00:00
Gordon Henriksen a18a276350 Fix a validation error.
llvm-svn: 43675
2007-11-04 16:17:00 +00:00
Gordon Henriksen d568767ecb Finishing initial docs for all transformations in Passes.html.
Also cleaned up some comments in source files.

llvm-svn: 43674
2007-11-04 16:15:04 +00:00
Gordon Henriksen d210e9d880 Removing a dead reference from LLVM.xcodeproj.
llvm-svn: 43673
2007-11-04 16:12:17 +00:00
Duncan Sands 399d97987b Change uses of getTypeSize to getABITypeSize, getTypeStoreSize
or getTypeSizeInBits as appropriate in ScalarReplAggregates.
The right change to make was not always obvious, so it would
be good to have an sroa guru review this.  While there I noticed
some bugs, and fixed them: (1) arrays of x86 long double have
holes due to alignment padding, but this wasn't being spotted
by HasStructPadding (renamed to HasPadding).  The same goes
for arrays of oddly sized ints.  Vectors also suffer from this,
in fact the problem for vectors is much worse because basic
vector assumptions seem to be broken by vectors of type with
alignment padding.   I didn't try to fix any of these vector
problems.  (2) The code for extracting smaller integers from
larger ones (in the "int union" case) was wrong on big-endian
machines for integers with size not a multiple of 8, like i1.
Probably this is impossible to hit via llvm-gcc, but I fixed
it anyway while there and added a testcase.  I also got rid of
some trailing whitespace and changed a function name which
had an obvious typo in it.

llvm-svn: 43672
2007-11-04 14:43:57 +00:00
Evan Cheng 5c1b044899 If an interval is being undone clear its preference as well since the source interval may have been undone as well.
llvm-svn: 43670
2007-11-04 08:32:21 +00:00
Chris Lattner 296160d443 Fix PR1763 by allowing the 'q' constraint to work with 64-bit
regs on x86-64.

llvm-svn: 43669
2007-11-04 06:51:12 +00:00