Commit Graph

54194 Commits

Author SHA1 Message Date
Douglas Gregor a9add4ea76 Fix a bug with designated initializers where we were stepping out of a
union subobject initialization before checking whether the next
initiailizer was actually a designated initializer. This led to
spurious "excess elements in union initializer" errors. Thanks to
rdivacky for reporting the bug!

llvm-svn: 64392
2009-02-12 19:00:39 +00:00
Fariborz Jahanian c335c40a4b Fix a bug whereby, an ivar used to synthesize a property belongs
to a base class (nonfragile abi ir gen bug).

llvm-svn: 64391
2009-02-12 18:51:23 +00:00
Mike Stump ab3afd8f2d Initial codegen for block literals. This is a work in progress. I've
tried to put FIXMEs on the most important things to fix up.  Lots left
to do including more codegen, more documentation and cleaning code and
style cleanups.

llvm-svn: 64390
2009-02-12 18:29:15 +00:00
Steve Naroff c49b22a5c8 Sema::ActOnObjCAtThrowStmt(): return from recently added errors. Thanks Chris!
llvm-svn: 64389
2009-02-12 18:09:32 +00:00
Dan Gohman 656b097b8a Add a utility function to LoopInfo to return the exit block
when the loop has exactly one exit, and make use of it in
LoopIndexSplit.

llvm-svn: 64388
2009-02-12 18:08:24 +00:00
Anders Carlsson 6a60fa2428 Add a very basic implemenation of global blocks. This needs to be cleaned up.
llvm-svn: 64387
2009-02-12 17:55:02 +00:00
Fariborz Jahanian 13de253bd6 Make nonfragile-abi the default for darwin's 64bit
abi for objective-c programs.

llvm-svn: 64386
2009-02-12 17:54:33 +00:00
Steve Naroff b76051534c Several cleanups:
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
- add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
- move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).

llvm-svn: 64385
2009-02-12 17:52:19 +00:00
Chris Lattner 844deb73f4 fix PR3538 for ARM.
llvm-svn: 64384
2009-02-12 17:38:23 +00:00
Chris Lattner 4d4c702d5f fix PR3538 for PPC
llvm-svn: 64383
2009-02-12 17:37:15 +00:00
Chris Lattner aed3a4215b fix the X86 backend to just drop llvm.declare nodes for VLAs instead of
leaving them in the DAG and then getting selection errors.  This is a 
fix for PR3538.

llvm-svn: 64382
2009-02-12 17:33:11 +00:00
Dan Gohman e366c29fa0 Adjust the sizes for a few SmallVectors to reflect their usage.
llvm-svn: 64381
2009-02-12 17:29:01 +00:00
Daniel Dunbar 648bf78333 Support __attribute__(section(<name>))
llvm-svn: 64380
2009-02-12 17:28:23 +00:00
Chris Lattner 90880e2598 make fast isel fall back to selectiondags for VLA llvm.declare intrinsics.
llvm-svn: 64379
2009-02-12 17:23:20 +00:00
Chris Lattner 24ca124fc4 Add operator->, patch by Ben Laurie!
llvm-svn: 64378
2009-02-12 17:14:49 +00:00
Chris Lattner cede94ddc9 add PR
llvm-svn: 64377
2009-02-12 17:04:57 +00:00
Dan Gohman e0d32c490a This code doesn't actually use the ExitingBlocks list.
llvm-svn: 64376
2009-02-12 16:36:26 +00:00
Steve Naroff 0fa412cc6d Turn warning into error. Minor incompatibility with GCC (for scalar types, GCC only produces a warning).
llvm-svn: 64375
2009-02-12 15:54:59 +00:00
Evan Cheng cf5cd6ecfe It's (currently) not safe to keep certain physical registers live across basic blocks, e.g. x86 fp stack registers.
llvm-svn: 64374
2009-02-12 10:32:17 +00:00
Evan Cheng b570499c25 Oops. Last second clean up messed things up.
llvm-svn: 64373
2009-02-12 09:52:13 +00:00
Evan Cheng 8b39b545a9 If availability info is kept when fallthrough into a bb, add the available registers to live-in set.
llvm-svn: 64372
2009-02-12 09:43:23 +00:00
Daniel Dunbar 6d0402d468 Fix va_arg bug noticed by Eli, __builtin_va_arg is not an l-value
designating an object.

llvm-svn: 64371
2009-02-12 09:21:08 +00:00
Daniel Dunbar 753cc07d13 x86_64: Initial varargs support.
- Doesn't yet handle case where values are passed in mixed (general
   purpose & floating point) registers; otherwise largely
   functional. Code still needs some cleaning.

Fixes:
MultiSource/Applications/lua/lua
MultiSource/Applications/siod/siod
MultiSource/Applications/sqlite3/sqlite3
SingleSource/Regression/C/PR640
SingleSource/UnitTests/2003-07-09-SignedArgs
SingleSource/UnitTests/2007-03-02-VaCopy

gcc compat test suite results (Darwin x86-32 & -64):
--
# of expected passes		1262
# of unexpected failures	56
# of unresolved testcases	34
# of unsupported tests		2

Compare to: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090209/012050.html

llvm-svn: 64370
2009-02-12 09:04:14 +00:00
Evan Cheng 3a14efacb6 Replace one of burr scheduling heuristic with something more sensible. Now calcMaxScratches simply compute the number of true data dependencies. This actually improve a couple of tests in dejagnu suite as many tests in llvm nightly test suite.
llvm-svn: 64369
2009-02-12 08:59:45 +00:00
Daniel Dunbar eef883327a Test case for emitting va_arg as l-value; apparently I only *thought* I had committed this.
llvm-svn: 64368
2009-02-12 08:41:10 +00:00
Julien Lerouge cbc2491deb Fix MingW build: define GTEST_OS_WINDOWS if OS is MingW, but disable
exceptions.

llvm-svn: 64367
2009-02-12 08:02:35 +00:00
Julien Lerouge 7682ffdeb9 Fix MingW build, patch by Kenneth Boyd!
llvm-svn: 64366
2009-02-12 07:39:10 +00:00
Ted Kremenek 0ae9df8377 Update checker build.
llvm-svn: 64365
2009-02-12 07:09:27 +00:00
Chris Lattner feb129e813 Fix a nasty bug (PR3550) where the inline pass could incorrectly mark
calls with the tail marker when inlining them through an invoke.  Patch,
testcase, and perfect analysis by Jay Foad!

llvm-svn: 64364
2009-02-12 07:06:42 +00:00
Chris Lattner 096f44de61 improve naming of values in GVN, patch by Jay Foad!
llvm-svn: 64363
2009-02-12 07:00:35 +00:00
Chris Lattner 5297c63565 fix PR3537: if resetting bbi back to the start of a block, we need to
forget about already inserted expressions.

llvm-svn: 64362
2009-02-12 06:56:08 +00:00
Chris Lattner 1331d53c27 rename test to avoid messing with tab completion of dates.
llvm-svn: 64361
2009-02-12 06:54:55 +00:00
Ted Kremenek 24760d113b Add method 'isSingleton()' to ImmutableSet. This returns true if the set contains exactly one element.
llvm-svn: 64359
2009-02-12 05:17:02 +00:00
Ted Kremenek b4c85ccaaa Re-enable PTH stat caching. All tests pass now.
llvm-svn: 64356
2009-02-12 03:45:39 +00:00
Ted Kremenek c6a2a37222 Fix bad reading of bytes in ReadUnalignedLE64() (copy-paste error).
llvm-svn: 64355
2009-02-12 03:39:55 +00:00
Ted Kremenek 3280145da4 Temporarily disable PTH stat caching as it appears to be failing on some machines.
llvm-svn: 64354
2009-02-12 03:36:54 +00:00
Ted Kremenek a5c2c27ebd PTH: Cache stat information for files in the PTH file. Hook up FileManager
to use this stat information in the PTH file using a 'StatSysCallCache' object.

Performance impact (Cocoa.h, PTH):
- number of stat calls reduces from 1230 to 425
- fsyntax-only: time improves by 4.2% 

We can reduce the number of stat calls to almost zero by caching negative stat
calls and directory stat calls in the PTH file as well.

llvm-svn: 64353
2009-02-12 03:26:59 +00:00
Nick Lewycky b92c4d72a7 Don't mark all args to strtod and friends as nocapture.
llvm-svn: 64352
2009-02-12 03:18:34 +00:00
Ted Kremenek 5d7e2e1781 FileManager:
- set the 'StatSysCallCache' object using a setter method instead of
  FileManager's constructor. This allows the cache to be installed after the
  FileManager object is created.
- Add 'file mode' to FileEntry (useful for stat caching)

llvm-svn: 64351
2009-02-12 03:17:57 +00:00
Mike Stump 3f6c631ea1 Add tags; this is documented to work, just need the wiring to enable it.
llvm-svn: 64350
2009-02-12 02:25:47 +00:00
Chris Lattner f4174b0c80 for now, disable all debug info generation at -O1 and above. This mirrors
similar logic in llvm-gcc and will hopefully be fixed soon.

llvm-svn: 64349
2009-02-12 01:50:58 +00:00
Chris Lattner 882018b890 search and replaceo?
llvm-svn: 64348
2009-02-12 01:37:35 +00:00
Douglas Gregor 4d0bd8bfc9 Add test for overloading with _Complex in C
llvm-svn: 64347
2009-02-12 00:57:03 +00:00
Anders Carlsson 2437cbfa3b Add support for generating block call expressions.
llvm-svn: 64346
2009-02-12 00:39:25 +00:00
Ted Kremenek c8b740eade Add lightweight shim "clang::StatSysCallCache" that caches 'stat' system calls
for use by FileManager. FileManager now takes a StatSysCallCache* in its
constructor (which defaults to NULL). This will be used for evaluating whether
or not caching 'stat' system calls in PTH is a performance win. This shim adds
no observable performance impact in the case where the 'StatSysCallCache*' is
null.

llvm-svn: 64345
2009-02-12 00:39:05 +00:00
Douglas Gregor 6752502b81 Expand the definition of a complex promotion to include complex ->
complex conversions where the conversion between the real types is an
integral promotion. This is how G++ handles complex promotions for its
complex integer extension.

llvm-svn: 64344
2009-02-12 00:26:06 +00:00
Douglas Gregor 78ca74d81d Introduce _Complex conversions into the function overloading
system. Since C99 doesn't have overloading and C++ doesn't have
_Complex, there is no specification for    this. Here's what I think
makes sense.

Complex conversions come in several flavors:

  - Complex promotions:  a complex -> complex   conversion where the
    underlying real-type conversion is a floating-point promotion. GCC
    seems to call this a promotion, EDG does something else. This is
    given "promotion" rank for determining the best viable function.
  - Complex conversions: a complex -> complex conversion that is
    not a complex promotion. This is given "conversion" rank for
    determining the best viable   function.
  - Complex-real conversions: a real -> complex or complex -> real
    conversion. This is given "conversion" rank for determining the
    best viable function.

These rules are the same for C99 (when using the "overloadable"
attribute) and C++. However, there is one difference in the handling
of floating-point promotions: in C99, float -> long double and double
-> long double are considered promotions (so we give them "promotion" 
rank), while C++ considers these conversions ("conversion" rank).

llvm-svn: 64343
2009-02-12 00:15:05 +00:00
Bill Wendling f6d609a227 Move debug loc info along when the spiller creates new instructions.
llvm-svn: 64342
2009-02-12 00:02:55 +00:00
Fariborz Jahanian 77b6b5d6d8 Last @encode'ing fix for objc2's nonfragile abi.
All relevant dejagnu enocding tests pass in this mode.

llvm-svn: 64341
2009-02-11 23:59:18 +00:00
Evan Cheng 6f6abfd94b Apparently some MachineBasicBlock's don't have corresponding llvm basic blocks.
llvm-svn: 64340
2009-02-11 23:42:39 +00:00