Commit Graph

87016 Commits

Author SHA1 Message Date
Nick Lewycky cb89a2a150 Add __builtin_snprintf.
llvm-svn: 108290
2010-07-13 22:35:05 +00:00
Greg Clayton b6f75dfd96 Removed unused variable "log".
Fixed the llvm build for Mac OS X builds to look in llvm/lib/Release+Asserts 
output directory for all configurations (Debug, Release, BuildAndIntegration).

llvm-svn: 108289
2010-07-13 22:26:45 +00:00
John McCall 5c0e69ef0e Switch the __cxa_rethrow cleanup to be lazy.
llvm-svn: 108288
2010-07-13 22:24:23 +00:00
John McCall 5c08ab956b Allow for the possibility that __cxa_end_catch might throw for a catch-all block
or a catch of a record type by value or reference.  Also convert this to a
lazy cleanup.

llvm-svn: 108287
2010-07-13 22:12:14 +00:00
Bruno Cardoso Lopes 6c6c14a55c Add AVX 256-bit compare instructions and a bunch of testcases
llvm-svn: 108286
2010-07-13 22:06:38 +00:00
Greg Clayton f6cc9dde46 Updated to latest llvm from July 13th, 2010 at 13:00.
llvm-svn: 108285
2010-07-13 22:06:06 +00:00
Fariborz Jahanian 5848d333b4 Check on property attributes which are declared
in class extensions (radar 8171968).

llvm-svn: 108283
2010-07-13 22:04:56 +00:00
Howard Hinnant 8ab959c961 Bracket expressions are working (lightly tested).
llvm-svn: 108280
2010-07-13 21:48:06 +00:00
Sean Callanan 549c9f7f9a "expr -i" now performs the required transforms to
prepare the IR for JIT compilation.  We still need
to do the JIT compilation and move the arguments
in/out of target memory.

llvm-svn: 108279
2010-07-13 21:41:46 +00:00
Jakob Stoklund Olesen 50bcf13a7b Remove vestigial decl.
llvm-svn: 108278
2010-07-13 21:19:08 +00:00
Jakob Stoklund Olesen cd7a40f4ec Print VNInfo flags.
llvm-svn: 108277
2010-07-13 21:19:05 +00:00
John McCall bb0260139a Switch the __cxa_free_exception cleanup to be lazy.
llvm-svn: 108276
2010-07-13 21:17:51 +00:00
Bob Wilson a3f1901531 Use a target-specific VMOVIMM DAG node instead of BUILD_VECTOR to represent
NEON VMOV-immediate instructions.  This simplifies some things.

llvm-svn: 108275
2010-07-13 21:16:48 +00:00
Bruno Cardoso Lopes fd8bfcd6e1 AVX 256-bit conversion instructions
Add the x86 VEX_L form to handle special cases where VEX_L must be set.

llvm-svn: 108274
2010-07-13 21:07:28 +00:00
Fariborz Jahanian 714447b2ed Set DeclContext of ParamVarDecl only. No need
to set that of VarDecl for block variables
(they are already set). Per Doug's comment.

llvm-svn: 108273
2010-07-13 21:05:02 +00:00
Evan Cheng f0b175328f Update comment.
llvm-svn: 108272
2010-07-13 21:03:14 +00:00
Greg Clayton d764ecc0de Removed Xcode project files that aren't needed right now.
llvm-svn: 108271
2010-07-13 20:57:41 +00:00
John McCall 2b7fc3828e Teach IR generation how to lazily emit cleanups. This has a lot of advantages,
mostly in avoiding unnecessary work at compile time but also in producing more
sensible block orderings.

Move the destructor cleanups for local variables over to use lazy cleanups.
Eventually all cleanups will do this;  for now we have some awkward code
duplication.

Tell IR generation just to never produce landing pads in -fno-exceptions.
This is a much more comprehensive solution to a problem which previously was
half-solved by checks in most cleanup-generation spots.

llvm-svn: 108270
2010-07-13 20:32:21 +00:00
Dale Johannesen caca5488dc In inline asm treat indirect 'X' constraint as 'm'.
This may not be right in all cases, but it's better
than asserting which it was doing before.  PR 7528.

llvm-svn: 108268
2010-07-13 20:17:05 +00:00
Sebastian Redl 117b01b2da Add two small utility functions to PCHReader that the writer will use. WIP.
llvm-svn: 108267
2010-07-13 20:12:07 +00:00
Fariborz Jahanian a6c7efec2b More block instantiation stuff. Set variable/param DeclContext
to block context when first instantiating them.

llvm-svn: 108266
2010-07-13 20:05:58 +00:00
Kevin Enderby 76a6b663a3 Added a check that pusha cannot be encoded in 64-bit mode.
llvm-svn: 108265
2010-07-13 20:05:41 +00:00
Jakob Stoklund Olesen fc4b8b8e80 Add an assertion to make PR7542 fail consistently.
LiveInterval::overlapsFrom dereferences end() if it is called on an empty
interval.

It would be reasonable to just return false - an empty interval doesn't overlap
anything, but I want to know who is doing it first.

llvm-svn: 108264
2010-07-13 19:56:28 +00:00
Dan Gohman 58cd65f2fe Fix the Named Metadata example to make it clear which specific
construct is the named metadata.

llvm-svn: 108263
2010-07-13 19:48:13 +00:00
Dan Gohman afd69cf5b7 Add support for empty named metadata too. This isn't particularly
useful, but it is nice for consistency.

llvm-svn: 108262
2010-07-13 19:42:44 +00:00
Jakob Stoklund Olesen b43455feaf Fix LiveInterval::overlaps so it doesn't claim touching intervals overlap.
Also, one binary search is enough.

llvm-svn: 108261
2010-07-13 19:42:20 +00:00
Chris Lattner 8406c5197b Add a warning to catch a bug recently caught by code review, like this:
t2.c:2:12: warning: use of logical && with constant operand; switch to bitwise &
      or remove constant [-Wlogical-bitwise-confusion]
  return x && 4;
           ^  ~

wording improvement suggestions are welcome.

llvm-svn: 108260
2010-07-13 19:41:32 +00:00
Dan Gohman 1e0213a758 Add support for empty metadata nodes: !{}.
llvm-svn: 108259
2010-07-13 19:33:27 +00:00
Evan Cheng 0cc4ad983d Extend the r107852 optimization which turns some fp compare to code sequence using only i32 operations. It now optimize some f64 compares when fp compare is exceptionally slow (e.g. cortex-a8). It also catches comparison against 0.0.
llvm-svn: 108258
2010-07-13 19:27:42 +00:00
Chris Lattner ca9f2a025c 80 column issues.
llvm-svn: 108257
2010-07-13 19:22:31 +00:00
Evan Cheng 58066e337d Add an ARM "feature". Cortex-a8 fp comparison is very slow (> 20 cycles).
llvm-svn: 108256
2010-07-13 19:21:50 +00:00
Greg Clayton f9d177622e Patched Makefile.rules to allow objective C and objective C++ compilation.
This allows LLDB (llvm/tools/lldb) to build on Mac OS X.

llvm-svn: 108255
2010-07-13 18:47:09 +00:00
Evan Cheng f43961007c -enable-unsafe-fp-math should not imply -enable-finite-only-fp-math.
llvm-svn: 108254
2010-07-13 18:46:14 +00:00
Douglas Gregor a8a089bfd5 Whenever we're creating an expression that is typically an rvalue
(e.g., a call, cast, etc.), immediately adjust the expression's type
to strip cv-qualifiers off of all non-class types (in C++) or all
types (in C). This effectively extends my previous fix for PR7463,
which was restricted to calls, to other kinds of expressions within
similar characteristics. I've audited every use of
getNonReferenceType() in the code base, switching to the newly-renamed
getNonLValueExprType() where necessary. 

Big thanks to Eli for pointing out just how incomplete my original fix
for PR7463 actually was. We've been handling cv-qualifiers on rvalues
wrong for a very, very long time. Fixes PR7463.

llvm-svn: 108253
2010-07-13 18:40:04 +00:00
Eric Christopher ea282034b6 Grammar.
llvm-svn: 108252
2010-07-13 18:27:13 +00:00
Dale Johannesen f241d4626c Fix PR number.
llvm-svn: 108251
2010-07-13 18:14:47 +00:00
Chandler Carruth bc3e8a7c93 Switch from EXPECT_EQ({true,false, ...) to the more canonical
EXPECT_{TRUE,FALSE}(...) macros. This also prevents suprious warnings about
bool-to-pointer conversion that occurs withit EXPECT_EQ.

llvm-svn: 108248
2010-07-13 17:28:05 +00:00
Chandler Carruth 46e8978c69 Silence Doug's favorite GCC warning.
llvm-svn: 108247
2010-07-13 17:07:17 +00:00
Devang Patel 4a7904d652 Fix compile unit in example. Thanks Renato Golin!
llvm-svn: 108246
2010-07-13 16:53:20 +00:00
Devang Patel 01c8c100c2 Add volatile qualifiers for "this".
llvm-svn: 108245
2010-07-13 16:23:13 +00:00
Douglas Gregor f39cf26cb5 Properly add to 32
llvm-svn: 108243
2010-07-13 15:57:00 +00:00
Douglas Gregor f2753b3b4e Downgrade the "when type is in parentheses, array cannot have dynamic
size" error for code like 

  new (int [size])

to a warning, add a Fix-It to remove the parentheses, and make this
diagnostic work properly when it occurs in a template
instantiation. <rdar://problem/8018245>.

llvm-svn: 108242
2010-07-13 15:54:32 +00:00
Duncan Sands f88a284579 Handle the case of a tail recursion in which the tail call is followed
by a return that returns a constant, while elsewhere in the function
another return instruction returns a different constant.  This is a
special case of accumulator recursion, so just generalize the existing
logic a bit.

llvm-svn: 108241
2010-07-13 15:41:41 +00:00
Gabor Greif 03e7e68caa rotate CallInst operands
with this commit the callee moves to the end of
the operand array (from the start) and the call
arguments now start at index 0 (formerly 1)

this ordering is now consistent with InvokeInst

this commit only flips the switch,
functionally it is equivalent to
r101465

I intend to commit several cleanups after a few
days of soak period

llvm-svn: 108240
2010-07-13 15:31:36 +00:00
Benjamin Kramer 79698be162 HTML cleanup and validation.
llvm-svn: 108239
2010-07-13 12:26:09 +00:00
Duncan Sands a522e563a8 When doing sext/zext of constants, the target type must be strictly
wider than the source type.  Correct LangRef.

llvm-svn: 108238
2010-07-13 12:06:14 +00:00
Argyrios Kyrtzidis 36745fda34 Modify the pragma handlers to accept and use StringRefs instead of IdentifierInfos.
When loading the PCH, IdentifierInfos that are associated with pragmas cause declarations that use these identifiers to be deserialized (e.g. the "clang" pragma causes the "clang" namespace to be loaded).
We can avoid this if we just use StringRefs for the pragmas.

As a bonus, since we don't have to create and pass IdentifierInfos, the pragma interfaces get a bit more simplified.

llvm-svn: 108237
2010-07-13 09:07:17 +00:00
Douglas Gregor e82f087378 Improve diagnostics for the "type qualifier on return type has no
effect warning" by printing the qualifiers we saw and correctly
pluralizing the message, e.g.,

test/SemaCXX/conditional-expr.cpp:295:3: warning: 'const volatile' type
      qualifiers on return type have no effect
  const volatile Enum g2() {
  ^~~~~ ~~~~~~~~

llvm-svn: 108236
2010-07-13 08:50:30 +00:00
Douglas Gregor f5b160f89c When computing the canonical profile of a DeclRefExpr or MemberExpr,
don't include the nested-name-specifier or template arguments: they
were only relevant when resolving the declaration. Fixes PR7460.

llvm-svn: 108235
2010-07-13 08:37:11 +00:00
Douglas Gregor 603d81bf8d When forming a function call or message send expression, be sure to
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types. 

Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().

Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).

llvm-svn: 108234
2010-07-13 08:18:22 +00:00