Commit Graph

54335 Commits

Author SHA1 Message Date
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
Evan Cheng eb5ec4a0db Remove a bogus assertion. It's possible a live-in available value is used by a previous instruction.
llvm-svn: 64339
2009-02-11 23:41:57 +00:00
Ted Kremenek 4c1d41f2b1 PTH: Have meta data be at the beginning of the PTH file, not the end.
llvm-svn: 64338
2009-02-11 23:34:32 +00:00
Mike Stump c89c8e3225 Fix comment.
llvm-svn: 64337
2009-02-11 23:03:27 +00:00
Douglas Gregor 4e5cbdcbed Initial implementation of function overloading in C.
This commit adds a new attribute, "overloadable", that enables C++
function overloading in C. The attribute can only be added to function
declarations, e.g.,

  int *f(int) __attribute__((overloadable));

If the "overloadable" attribute exists on a function with a given
name, *all* functions with that name (and in that scope) must have the
"overloadable" attribute. Sets of overloaded functions with the
"overloadable" attribute then follow the normal C++ rules for
overloaded functions, e.g., overloads must have different
parameter-type-lists from each other.

When calling an overloaded function in C, we follow the same
overloading rules as C++, with three extensions to the set of standard
conversions:

  - A value of a given struct or union type T can be converted to the
    type T. This is just the identity conversion. (In C++, this would
    go through a copy constructor).
  - A value of pointer type T* can be converted to a value of type U*
    if T and U are compatible types. This conversion has Conversion
    rank (it's considered a pointer conversion in C).
  - A value of type T can be converted to a value of type U if T and U
    are compatible (and are not both pointer types). This conversion
    has Conversion rank (it's considered to be a new kind of
    conversion unique to C, a "compatible" conversion).

Known defects (and, therefore, next steps):
  1) The standard-conversion handling does not understand conversions
  involving _Complex or vector extensions, so it is likely to get
  these wrong. We need to add these conversions.
  2) All overloadable functions with the same name will have the same
  linkage name, which means we'll get a collision in the linker (if
  not sooner). We'll need to mangle the names of these functions.

llvm-svn: 64336
2009-02-11 23:02:49 +00:00
Nate Begeman 318aea93bf the two non-mask arguments to a shufflevector must be the same width, but they do not have to be the same
width as the result value.

llvm-svn: 64335
2009-02-11 22:36:25 +00:00
Fariborz Jahanian 1f0a9ebf72 Patch to fix encoding in 64bit abi. With this patch
all but one dejagnu encoding tests for darwin
pass in nonfragile abi mode.

llvm-svn: 64334
2009-02-11 22:31:45 +00:00
Daniel Dunbar e9fcadd2a6 Use EmitVAListRef instead of EmitLValue directly to handle array decay
case on x86_64.

llvm-svn: 64333
2009-02-11 22:25:55 +00:00
Dale Johannesen cd4a301a1a Edit description of floating point constants to
reflect reality.  Acknowledgements to John Clements
for prodding me into this.

llvm-svn: 64332
2009-02-11 22:14:51 +00:00
Gabor Greif e3069ab6e5 Fill in a glaring omission in derived User classes, namely
add efficient versions of op_begin and op_end. Up to now always those from User have been
called, which in most cases follow an indirection (OperandList) even if the exact Instruction 
type is known.

llvm-svn: 64331
2009-02-11 22:09:00 +00:00