Commit Graph

83797 Commits

Author SHA1 Message Date
Howard Hinnant
45a999719b Beefed up the tests for all of the distributions to include checks against the expected skewness and kurtosis
llvm-svn: 103910
2010-05-16 17:56:20 +00:00
Anders Carlsson
e6ae81b0a2 Correctly diagnose array 'new' with initialization arguments when the new type is a typedef to an array type.
llvm-svn: 103909
2010-05-16 16:24:20 +00:00
Douglas Gregor
cda95f47e5 When the type-id or new-type-id of a C++ "new" expression is a typedef
of an array type, use the outermost array bound as the number of
elements to allocate. Fixes PR7147.

llvm-svn: 103908
2010-05-16 16:01:03 +00:00
Howard Hinnant
5ce10a6744 Replaced :: with _ in several path names
llvm-svn: 103907
2010-05-16 12:46:02 +00:00
Howard Hinnant
70d0fe5fae Replaced :: with _ in several path names
llvm-svn: 103906
2010-05-16 12:42:38 +00:00
John McCall
5c6ec8c797 Don't emit any fallthrough / missing-noreturn warnings if we can't
compute a CFG for a function.

llvm-svn: 103905
2010-05-16 09:34:11 +00:00
Chandler Carruth
e299ba66f5 When constant folding reference variables with an initializer to the
initializer, don't fold paramters. Their initializers are just default
arguments which can be overridden. This fixes some spectacular regressions due
to more things making it into the constant folding.

llvm-svn: 103904
2010-05-16 09:32:51 +00:00
Anton Korobeynikov
497d831966 Chris said that the comment char should be escaped. Fix all the occurences of "@" in *.td
llvm-svn: 103903
2010-05-16 09:15:36 +00:00
Anton Korobeynikov
8f35fabbc1 Add support for thiscall calling convention.
Patch by Charles Davis and Steven Watanabe!

llvm-svn: 103902
2010-05-16 09:08:45 +00:00
Anton Korobeynikov
4c719c4515 Generalize the ARM DAG combiner of mul with constants to all power-of-two cases.
llvm-svn: 103901
2010-05-16 08:54:20 +00:00
Chris Lattner
fc1e1c649f really use valist.
llvm-svn: 103900
2010-05-16 05:00:34 +00:00
Chris Lattner
bb53efb016 fix rdar://7985267 - Don't emit an error about a non-pod argument
passed to va_start, it doesn't actually pass it.

llvm-svn: 103899
2010-05-16 04:01:30 +00:00
Evan Cheng
298e6b82eb Model vst lane instructions with REG_SEQUENCE.
llvm-svn: 103898
2010-05-16 03:27:48 +00:00
Rafael Espindola
0af6889b89 Avoid renaming loadable modules at install time. Now the gold plugin is named
LLVMgold.so both in both the build and install directories.

llvm-svn: 103897
2010-05-16 03:13:23 +00:00
Rafael Espindola
9d2fe3cadb Use $ORIGIN in the rpath of libraries.
llvm-svn: 103896
2010-05-16 03:05:14 +00:00
John McCall
94f619ac2b Emit a type record for TYPE_OBJC_OBJECT in the PCH file. I'm not
entirely sure what this does, to be honest.

llvm-svn: 103895
2010-05-16 02:12:35 +00:00
John McCall
7f0a3dfc01 Be sure to initialize the "has base type as written" field of an
ObjCObjectTypeLoc.  This should clear up some valgrind errors we've
been seeing.

llvm-svn: 103894
2010-05-16 02:12:01 +00:00
John McCall
3f435e6693 Avoid doing two switches in TypeLoc's initialize() loop. The optimizer
can probably do this for us, but it's actually somewhat nicer to write it
out here.

llvm-svn: 103893
2010-05-16 02:09:32 +00:00
Douglas Gregor
51150ab1f1 When initializing thread-safe statics, put the call to
__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures, along with the regressions that r103880
caused.

The crucial difference between this and r103880 is that we now follow
LLVM's little dance with the llvm.eh.exception and llvm.eh.selector
calls, then use _Unwind_Resume_or_Rethrow to rethrow.

llvm-svn: 103892
2010-05-16 01:24:12 +00:00
Howard Hinnant
b8829825f1 [rand.dist.pois.weibull]
llvm-svn: 103891
2010-05-16 01:09:02 +00:00
Douglas Gregor
c278d1b3b9 Revert r103880 (thread-safe static initialization w/ exceptions),
because it's causing strange linker errors. Unfixes PR7144.

llvm-svn: 103890
2010-05-16 00:44:00 +00:00
Fariborz Jahanian
1b8b8bf25f Minor twik to my last patch. (for radar 7986354).
llvm-svn: 103889
2010-05-16 00:10:46 +00:00
Howard Hinnant
e3900731f6 [rand.dist.norm.chisq]
llvm-svn: 103888
2010-05-15 23:36:00 +00:00
Fariborz Jahanian
e1b45a5e6b Fix API gen for objc_msgSend property of aggregate types
in Objective-c++ mode. Fixes radar 7986354.

llvm-svn: 103887
2010-05-15 23:05:52 +00:00
Howard Hinnant
932ce81fe9 Revisited [rand.dist.bern.bin] and [rand.dist.pois.poisson] with better algorithms
llvm-svn: 103886
2010-05-15 21:36:23 +00:00
Dale Johannesen
3a366a88f2 Fix uint64->{float, double} conversion to do rounding correctly in 32-bit.
The implementation in LegalizeIntegerTypes to handle this as 
sint64->float + appropriate power of 2 is subject to double rounding,
considered incorrect by numerics people.  Use this implementation only
when it is safe.  This leads to using library calls in some cases
that produced inline code before, but it's correct now.
(EVTToAPFloatSemantics belongs somewhere else, any suggestions?)

Add a correctly rounding (though not particularly fast) conversion
that uses X87 80-bit computations for x86-32.

7885399, 5901940.  This shows up in gcc.c-torture/execute/ieee/rbug.c
in the gcc testsuite on some platforms.

llvm-svn: 103883
2010-05-15 18:51:12 +00:00
Dale Johannesen
bb4656c05e Improve assertion messages.
llvm-svn: 103882
2010-05-15 18:38:02 +00:00
Anton Korobeynikov
1bf28a128b Some cheap DAG combine goodness for multiplication with a particular constant.
This can be extended later on to handle more "complex" constants.

llvm-svn: 103881
2010-05-15 18:16:59 +00:00
Douglas Gregor
58142dd8a1 When initializing thread-safe statics, put the call to
__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures.

llvm-svn: 103880
2010-05-15 17:55:51 +00:00
Douglas Gregor
4f0ed42601 Attempt to satisfy Release-Asserts build
llvm-svn: 103879
2010-05-15 17:28:53 +00:00
Anton Korobeynikov
2b7aace2e0 "trap" pseudo-op turned out to be apple-local.
Temporary emit it as raw bytes until it will be added to binutils as well.

llvm-svn: 103878
2010-05-15 17:19:20 +00:00
Chris Lattner
9e01b615a4 improve portability to systems that don't have round, patch by
Evzen Muller!

llvm-svn: 103877
2010-05-15 17:11:55 +00:00
Chris Lattner
93cd0f1c89 improve portability to systems that don't have powf/modf (e.g. solaris 9)
patch by Evzen Muller!

llvm-svn: 103876
2010-05-15 17:10:24 +00:00
John McCall
b0efad148c Modify this comment per Doug's suggestion: we don't need to mangle protocols.
llvm-svn: 103875
2010-05-15 17:06:29 +00:00
Chris Lattner
6459bbe14a sigh
llvm-svn: 103874
2010-05-15 16:56:34 +00:00
Chris Lattner
8b3b145342 fix _mm_shuffle_pd too, thanks to Joel Falcou for pointing this out.
llvm-svn: 103873
2010-05-15 16:54:46 +00:00
Douglas Gregor
170125648c When applying the named return value optimization, we still need to
destroy the variable along the exceptional edge; it's only during
normal execution that we avoid destroying this variable.

llvm-svn: 103872
2010-05-15 16:39:56 +00:00
John McCall
8b07ec253d Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
  one of {primitive-id, primitive-Class, user-defined @class}
with
  a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared).  ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType.  Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet.  Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.

llvm-svn: 103870
2010-05-15 11:32:37 +00:00
Chandler Carruth
75142e6bfc Fix an GCC warning that seems to have actually caught a bug (!!!) in
a condition's grouping. Every other use of Allocatable.test(Hint) groups it the
same way as it is indented, so move the parentheses to agree with that
grouping.

llvm-svn: 103869
2010-05-15 10:23:23 +00:00
Evan Cheng
9e688cbcc9 Model 128-bit vld lane with REG_SEQUENCE.
llvm-svn: 103868
2010-05-15 07:53:37 +00:00
Douglas Gregor
290c93ec0d Implement a simple form of the C++ named return value optimization for
return statements. We perform NRVO only when all of the return
statements in the function return the same variable. Fixes some link
failures in Boost.Interprocess (which is relying on NRVO), and
probably improves performance for some C++ applications.

llvm-svn: 103867
2010-05-15 06:46:45 +00:00
Jakob Stoklund Olesen
84ce290822 Calculate liveness on the fly for local registers.
When working top-down in a basic block, substituting physregs for virtregs, the use-def chains are kept up to date. That means we can recognize a virtreg kill by the use-def chain becoming empty.

This makes the fast allocator independent of incoming kill flags.

llvm-svn: 103866
2010-05-15 06:09:08 +00:00
Douglas Gregor
6fd1b1802f Implement semantic analysis and an AST representation for the named
return value optimization. Sema marks return statements with their
NRVO candidates (which may or may not end up using the NRVO), then, at
the end of a function body, computes and marks those variables that
can be allocated into the return slot.

I've checked this locally with some debugging statements (not
committed), but there won't be any tests until CodeGen comes along.

llvm-svn: 103865
2010-05-15 06:01:05 +00:00
Chris Lattner
6625c7028e add type casts to _mm_shuffle_ps so the front-end applies
implicit conversions where needed.  This fixes an error reported
on cfe-dev, not really worth a testcase though.

llvm-svn: 103864
2010-05-15 05:53:53 +00:00
Nick Lewycky
b35818eb25 Teach the always inliner to release its inline cost estimates, like the basic
inliner did in r103653. Why does the always inliner even bother with cost
estimates anyways?

llvm-svn: 103858
2010-05-15 04:26:25 +00:00
Nick Lewycky
002a45eb64 Clean up, no functional change.
llvm-svn: 103857
2010-05-15 03:41:58 +00:00
Jakob Stoklund Olesen
3ced97c0a0 Add reg_nodbg_iterator
llvm-svn: 103856
2010-05-15 02:52:58 +00:00
Evan Cheng
3d214cdfaf v4i64 and v8i64 are only synthesizable when NEON is available.
llvm-svn: 103855
2010-05-15 02:20:21 +00:00
Evan Cheng
4cad68eb34 Allow TargetLowering::getRegClassFor() to be called on illegal types. Also
allow target to override it in order to map register classes to illegal
but synthesizable types. e.g. v4i64, v8i64 for ARM / NEON.

llvm-svn: 103854
2010-05-15 02:18:07 +00:00
Nick Kledzik
749dc33dff <rdar://problem/7987491> Libcompiler_rt isn't platform aware
llvm-svn: 103852
2010-05-15 01:42:04 +00:00