Commit Graph

54268 Commits

Author SHA1 Message Date
Mike Stump 1676c5b2d8 Reflow to 80col.
llvm-svn: 64475
2009-02-13 19:12:34 +00:00
Douglas Gregor 4feb36de04 Remove DeclGroupOwningRef, since we intend for declarations to be owned
by DeclContexts (always) rather than by statements. 

DeclContext currently goes out of its way to avoid destroying any
Decls that might be owned by a DeclGroupOwningRef. However, in an
error-recovery situation, a failure in a declaration statement can
cause all of the decls in a DeclGroupOwningRef to be destroyed after
they've already be added into the DeclContext. Hence, DeclContext is
left with already-destroyed declarations, and bad things happen. This
problem was causing failures that showed up as assertions on x86 Linux
in test/Parser/objc-forcollection-neg-2.m.

llvm-svn: 64474
2009-02-13 19:06:18 +00:00
Mike Stump 9319db8a11 Move GlobalUniqueCount up into CGM.
llvm-svn: 64473
2009-02-13 18:36:05 +00:00
Douglas Gregor 1d672f84a6 Fix capitalization in a diagnostic
llvm-svn: 64472
2009-02-13 18:20:19 +00:00
Anders Carlsson 860189c19d Add new files to Xcode project
llvm-svn: 64471
2009-02-13 18:09:59 +00:00
Fariborz Jahanian d8fc1053ab Fixed a 64bit code gen bug of a cateogory
implementation with no category declaration!

llvm-svn: 64470
2009-02-13 17:52:22 +00:00
Daniel Dunbar abe6ef932f x86_64 ABI: Support va_arg passed in mixed registers.
- Now at 1274 passes on gcc compat suite vs 1262.

llvm-svn: 64469
2009-02-13 17:46:31 +00:00
Dan Gohman 55ea72179c In CodeGenPrepare's debug output, use WriteAsOperand instead of
printing getName(), so that unnamed values are printed correctly.

llvm-svn: 64468
2009-02-13 17:45:12 +00:00
Daniel Dunbar 72e90d7fb0 ccc: Suffix for PCH files is appended, not replaced. (Test case)
llvm-svn: 64467
2009-02-13 17:42:52 +00:00
Daniel Dunbar b903a072b1 ccc: Suffix for PCH files is appended, not replaced.
llvm-svn: 64466
2009-02-13 17:42:34 +00:00
Dan Gohman a2730abaaa Complete the sentance in this comment. I have reservations
about the code it describes, but at least now the comment
is right.

llvm-svn: 64465
2009-02-13 17:36:42 +00:00
Duncan Sands a738e8b854 Correct a comment: since AccessArguments is now
being used for atomic intrinsics, it seems the
access may be volatile.  No code was exploiting
the original non-volatile definition, so only
the comment needs changing.

llvm-svn: 64464
2009-02-13 17:36:13 +00:00
Duncan Sands 566ed10244 If a function only reads memory, then we know that...
it only reads memory!  The other change has no
functional effect, it just seems more logical to
go in order of decreasing knowledge.

llvm-svn: 64463
2009-02-13 17:32:26 +00:00
Mike Stump 971f9b6619 Condense NSConcreteGlobalBlock handling.
llvm-svn: 64461
2009-02-13 17:23:42 +00:00
Nick Lewycky d234a845f9 Mark strto* as readonly when the endptr is null.
llvm-svn: 64460
2009-02-13 17:08:33 +00:00
Mike Stump 52197c7763 Calculate size correctly.
llvm-svn: 64459
2009-02-13 17:03:17 +00:00
Mike Stump c2c38331ca Size should be unsigned.
llvm-svn: 64458
2009-02-13 16:55:51 +00:00
Mike Stump 85284bacab Condense all the blocks code into CGBlocks.cpp.
llvm-svn: 64457
2009-02-13 16:19:19 +00:00
Mike Stump 92bbd6d435 Fixup types, the runtime uses int, not int32.
llvm-svn: 64456
2009-02-13 16:01:35 +00:00
Mike Stump 57d7354635 Fix cmake builds.
llvm-svn: 64455
2009-02-13 15:42:50 +00:00
Mike Stump b7074c0013 Fixup spacing a tad.
llvm-svn: 64454
2009-02-13 15:32:32 +00:00
Nick Lewycky a0e83a0952 On strtod and friends, mark 'endptr' nocapture in the function prototype, and
mark the first argument nocapture if endptr=NULL for each particular call.

llvm-svn: 64453
2009-02-13 15:31:46 +00:00
Mike Stump 005c9a62b5 Move GenericBlockLiteralType into CGM.
llvm-svn: 64452
2009-02-13 15:25:34 +00:00
Mike Stump 650c932d80 Move BlockDescriptorType into CGM.
llvm-svn: 64451
2009-02-13 15:16:56 +00:00
Mike Stump 5b31ed3ff0 80col.
llvm-svn: 64450
2009-02-13 14:24:50 +00:00
Duncan Sands 51495609df Reapply r64301. These uses of "inline" can cause strange
link-time failures when building with optimization.  Just
get rid of them.

llvm-svn: 64449
2009-02-13 09:42:34 +00:00
Evan Cheng cf4bd2319c Switch from new[] + delete[] to malloc + free since llvm does not catch C++ exceptions.
llvm-svn: 64448
2009-02-13 08:24:55 +00:00
Anders Carlsson 6ee8a7dac5 Start warning about unknown attributes.
llvm-svn: 64447
2009-02-13 08:22:04 +00:00
Anders Carlsson b4f3134ca3 Add a new Ignored attribute type, and use it for may_alias.
llvm-svn: 64446
2009-02-13 08:16:43 +00:00
Anders Carlsson 63784f4e5e Add CodeGen support for the nodebug attribute.
llvm-svn: 64445
2009-02-13 08:11:52 +00:00
Evan Cheng 333db7abbd If new[] fails, return 0 rather then trying to dereference a null pointer.
llvm-svn: 64444
2009-02-13 07:54:34 +00:00
Nick Lewycky cdccffe731 Reapply r64300:
Make sure the SCC pass manager initializes any contained
function pass managers.  Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.

llvm-svn: 64443
2009-02-13 07:15:53 +00:00
Nick Lewycky c60bd012bc BasicAA was making the assumption that a local allocation which hadn't escaped
couldn't ever be the return of call instruction. However, it's quite possible
that said local allocation is itself the return of a function call. That's
what malloc and calloc are for, actually.

llvm-svn: 64442
2009-02-13 07:06:27 +00:00
Anders Carlsson 76187b4d68 Add sema support for the nodebug attribute.
llvm-svn: 64441
2009-02-13 06:46:13 +00:00
Dan Gohman f71a473720 Fix the code that checked if a SCEVAddRecExpr Start contains an
addrec in a different loop to check the value being added to
the accumulated Start value, not the Start value before it has
the new value added to it. This prevents LSR from going crazy
on the included testcase. Dale, please review.

llvm-svn: 64440
2009-02-13 03:58:31 +00:00
Dale Johannesen 026b56a9bc Remove non-DebugLoc versions of BuildMI.
"I got blisters on my fingers."

llvm-svn: 64439
2009-02-13 02:35:20 +00:00
Dale Johannesen 3a8bd17fdb Remove non-DebugLoc versions of BuildMI from IA64, Mips.
llvm-svn: 64438
2009-02-13 02:34:39 +00:00
Dale Johannesen 9bba902c83 Remove non-DebugLoc versions of BuildMI from X86.
There were some that might even matter in X86FastISel.

llvm-svn: 64437
2009-02-13 02:33:27 +00:00
Dale Johannesen 57097d2a26 missed file
llvm-svn: 64436
2009-02-13 02:32:04 +00:00
Dale Johannesen 215a925766 Remove non-DebugLoc versions of buildMI from Sparc.
llvm-svn: 64435
2009-02-13 02:31:35 +00:00
Eli Friedman 1efaaeaa69 Initial implementation of arbitrary fixed-width integer types.
Currently only used for 128-bit integers.

Note that we can't use the fixed-width integer types for other integer 
modes without other changes because glibc headers redefines (u)int*_t 
and friends using the mode attribute.  For example, this means that uint64_t
has to be compatible with unsigned __attribute((mode(DI))), and 
uint64_t is currently defined to long long.  And I have a feeling we'll 
run into issues if we try to define uint64_t as something which isn't 
either long or long long.

This doesn't get the alignment right in most cases, including 
the 128-bit integer case; I'll file a PR shortly.  The gist of the issue 
is that the targets don't really expose the information necessary to 
figure out the alignment outside of the target description, so there's a 
non-trivial amount of work involved in getting it working right.  That 
said, the alignment used is conservative, so the only issue with the 
current implementation is ABI compatibility.

This makes it trivial to add some sort of "bitwidth" attribute to make 
arbitrary-width integers; I'll do that in a followup.

We could also use this for stuff like the following for compatibility 
with gcc, but I have a feeling it would be a better idea for clang to be 
consistent between C and C++ modes rather than follow gcc's example for 
C mode.
struct {unsigned long long x : 33;} x;
unsigned long long a(void) {return x.x+1;}

llvm-svn: 64434
2009-02-13 02:31:07 +00:00
Dale Johannesen 635f2a69d9 Remove non-DebugLoc versions of BuildMI from Alpha and Cell.
llvm-svn: 64433
2009-02-13 02:30:42 +00:00
Dale Johannesen 460bfeba8c Remove refs to non-DebugLoc version of BuildMI from XCore, PIC16.
llvm-svn: 64432
2009-02-13 02:29:03 +00:00
Dale Johannesen e9f623e27c Remove refs to non-DebugLoc version of BuildMI from PowerPC.
llvm-svn: 64431
2009-02-13 02:27:39 +00:00
Dale Johannesen b851a7853a and one more file
llvm-svn: 64430
2009-02-13 02:26:21 +00:00
Dale Johannesen 7647da67ea Remove refs to non-DebugLoc versions of BuildMI from ARM.
llvm-svn: 64429
2009-02-13 02:25:56 +00:00
Bill Wendling 65c0fd4c44 Revert this. It was breaking stuff.
llvm-svn: 64428
2009-02-13 02:16:35 +00:00
Bill Wendling 1c21ac3066 Turn off the old way of handling debug information in the code generator. Use
the new way, where all of the information is passed on SDNodes and machine
instructions.

llvm-svn: 64427
2009-02-13 02:01:04 +00:00
Ted Kremenek 17d541d40c GRExprEngine:
- Add 'EvalBind', which will be used by 'EvalStore' to pull much of the value binding logic out of GRTransferFuncs.
- Rename many cases of 'St' to 'state'.

llvm-svn: 64426
2009-02-13 01:45:31 +00:00
Douglas Gregor adb0201418 Add mangling for variadic functions and conversion functions
llvm-svn: 64425
2009-02-13 01:28:03 +00:00