Commit Graph

78330 Commits

Author SHA1 Message Date
Chris Lattner e983eae273 add two aliases for SSE functions we already have, fixing PR6316.
llvm-svn: 96363
2010-02-16 18:21:25 +00:00
Chris Lattner db5c16bc9c add freebsd/ppc[64] support, patch by Nathan Whitehorn, PR6318
llvm-svn: 96362
2010-02-16 18:14:57 +00:00
Fariborz Jahanian b6a68c0465 Minor rewriter cleanup and a test for a block rewriting bug.
llvm-svn: 96361
2010-02-16 17:26:03 +00:00
Bob Wilson 70aa8d0745 Fix pr6111: Avoid using the LR register for the target address of an indirect
branch in ARM v4 code, since it gets clobbered by the return address before
it is used.  Instead of adding a new register class containing all the GPRs
except LR, just use the existing tGPR class.

llvm-svn: 96360
2010-02-16 17:24:15 +00:00
Ted Kremenek 3eac2454dc Add test case showing that a recursive block that captures a block pointer that
isn't marked '__block' is bad.

llvm-svn: 96357
2010-02-16 16:55:10 +00:00
Anders Carlsson bc91b44a23 Add an extreme vbase offsets test. I'm kinda amazed that this works myself ;)
llvm-svn: 96356
2010-02-16 16:50:08 +00:00
Anders Carlsson 13f0f66223 Handle layout of vtables for virtual bases.
llvm-svn: 96355
2010-02-16 16:49:35 +00:00
Anders Carlsson b716a543c9 Move some code around in preparation for virtual base vtables.
llvm-svn: 96354
2010-02-16 16:26:28 +00:00
Fariborz Jahanian e1ff123214 Fix rewriter bug when function call inside block with block parameter
causes C++ compile error (radar 7651312).

llvm-svn: 96352
2010-02-16 16:21:26 +00:00
Anders Carlsson 14157939ab Fix a bug where we would not emit secondary vtables for bases of a primary base.
llvm-svn: 96351
2010-02-16 16:02:57 +00:00
Duncan Sands cbd43f89ac Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
methods to try to have the type predicates be more logically positioned.

llvm-svn: 96349
2010-02-16 14:50:09 +00:00
Duncan Sands 19d0b47b1f There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy().  Convert most instances of the first form to the second form.
Requested by Chris.

llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Benjamin Kramer d7d8afabd0 Minor warning fixes (semicolons, newline at EOF).
llvm-svn: 96343
2010-02-16 10:25:04 +00:00
Benjamin Kramer 64aae50539 Rename argument so the name reflects what it's doing.
llvm-svn: 96342
2010-02-16 10:07:31 +00:00
Ted Kremenek 228639746a Add simpler checker to check if variables captured by a block are uninitialized.
llvm-svn: 96341
2010-02-16 08:33:59 +00:00
Chris Lattner 52bfe24e2c mark all the generated node predicates 'const'.
llvm-svn: 96337
2010-02-16 07:26:36 +00:00
Chris Lattner 5ce8303950 generate code for node and pattern predicates. Note that this won't
build if enabled, it will fail with constness issues. I'll resolve 
these next.

llvm-svn: 96336
2010-02-16 07:21:10 +00:00
John McCall d8d0d43fa3 Support local namespace aliases and permit them to be instantiated.
llvm-svn: 96335
2010-02-16 06:53:13 +00:00
Chris Lattner 1d689a09a9 refactor some code into a local class.
llvm-svn: 96334
2010-02-16 06:52:01 +00:00
Chris Lattner 812586ad2a remove now dead code and fixme.
llvm-svn: 96333
2010-02-16 06:15:00 +00:00
Chris Lattner f400fd6aec remove dead code. This is never generated for any targets in mainline.
llvm-svn: 96332
2010-02-16 06:14:22 +00:00
Chris Lattner aa7d3e096b add support for the new isel matcher to generate
(isprofitable|islegal)tofold checks.

llvm-svn: 96331
2010-02-16 06:10:58 +00:00
Chris Lattner 4964ef88c2 make pcrel immediate values relative to the start of the field,
not the end of the field, fixing rdar://7651978

llvm-svn: 96330
2010-02-16 05:03:17 +00:00
Anders Carlsson 77904f1d5b Emit vbase offsets.
llvm-svn: 96329
2010-02-16 04:59:55 +00:00
Anders Carlsson dc2dba306c More work on the new layout code.
llvm-svn: 96328
2010-02-16 04:49:44 +00:00
John McCall 6ce747220a When emitting complete destructors for classes with virtual bases, compute
the offset to the virtual bases statically inside of relying on the virtual
base offsets in the object's vtable(s).  This is both more efficient and
sound against the destructor's manipulation of the vtables.

Also extract a few helper routines.

Oh and we seem to pass all tests with an optimized clang now.

llvm-svn: 96327
2010-02-16 04:15:37 +00:00
John McCall 1e3715acc3 White-list comma expressions with the literal 0 as their RHS against
unused-value warnings.  This is a common macro idiom.

llvm-svn: 96326
2010-02-16 04:10:53 +00:00
John McCall 81e38507bd Make the various type-decl Types (and their associated ASTContext routines)
accept const decls.

llvm-svn: 96325
2010-02-16 03:57:14 +00:00
Erick Tryzelaar 5bf1a325dc Fix a typo in an LLVMOpcode enum. LLVMTrunk -> LLVMTrunc.
llvm-svn: 96324
2010-02-16 03:45:23 +00:00
Erick Tryzelaar 3b391a6dfa Fix some ocaml documentation
llvm-svn: 96323
2010-02-16 03:45:17 +00:00
Sanjiv Gupta adcee844ea The code section for an ISR has a specific address.
Currently, whether a function is ISR or not is encoded in the section attribute for that function.

llvm-svn: 96322
2010-02-16 03:41:07 +00:00
Sanjiv Gupta ecd2600c52 Re-applying 96173. Looks like finally I got the test case right.
llvm-svn: 96321
2010-02-16 03:37:11 +00:00
Ted Kremenek 588fc83c74 Add test case to show that Clang now checks the format string
arguments of asprintf (<rdar://problem/6657191>).

llvm-svn: 96319
2010-02-16 02:14:24 +00:00
Dale Johannesen d7eb693643 Handle DBG_VALUE mixed with labels when doing PHI
elimination.  Before a DBG_VALUE could affect codegen.
The solution here is imperfect and not final.

llvm-svn: 96318
2010-02-16 01:57:28 +00:00
Daniel Dunbar ce79bc9c7a c-index-test: Pass appropriate client data.
llvm-svn: 96317
2010-02-16 01:55:10 +00:00
Daniel Dunbar 1951192213 ASTUnit: Constant fold UseBumpAllocator to true, we don't care to support this as an argument.
llvm-svn: 96316
2010-02-16 01:55:04 +00:00
Daniel Dunbar 7f21a7f7ce ASTUnit::LoadFromCompilerInvocation - Take ownership of the provided invocation.
llvm-svn: 96315
2010-02-16 01:54:54 +00:00
Daniel Dunbar e922d9bdf0 CompilerInstance: Move LLVMContext member out of constructor.
llvm-svn: 96314
2010-02-16 01:54:47 +00:00
Daniel Dunbar aced322c3c Switch clang to use its own LLVMContext (not the global one).
llvm-svn: 96313
2010-02-16 01:54:33 +00:00
Rafael Espindola af25cf825c Drop support for the InReg attribute on the ppc backend. This was used by
llvm-gcc but has been replaced with pad argument which don't need any
special backend support.

llvm-svn: 96312
2010-02-16 01:50:18 +00:00
Ted Kremenek ccf701d375 Fix test case.
llvm-svn: 96311
2010-02-16 01:47:05 +00:00
Ted Kremenek c8b188d541 Refactor the logic for printf argument type-checking into analyze_printf::ArgTypeResult.
Implement printf argument type checking for '%s'.

Fixes <rdar://problem/3065808>.

llvm-svn: 96310
2010-02-16 01:46:59 +00:00
Ted Kremenek 1ee27e6d9a Added 'AsWideChar' flag to LengthModifier.
llvm-svn: 96309
2010-02-16 01:46:47 +00:00
Dan Gohman 521efe68ab Split the main for-each-use loop again, this time for GenerateTruncates,
as it also peeks at which registers are being used by other uses. This
makes LSR less sensitive to use-list order.

llvm-svn: 96308
2010-02-16 01:42:53 +00:00
Dale Johannesen d37e7b5bc5 Reapply 96294; now that I've gotten around to looking
at older buildbot messages, I see the failure predates
this patch.

llvm-svn: 96307
2010-02-16 01:27:47 +00:00
Douglas Gregor 4563532043 Skeleton for importing Objective-C classes
llvm-svn: 96306
2010-02-16 01:20:57 +00:00
Bill Wendling 1776295bf1 Apply patch from http://llvm.org/bugs/attachment.cgi?id=4136 now that PR5004 is
finished.

llvm-svn: 96304
2010-02-16 00:58:02 +00:00
Dale Johannesen ae87fc43a7 Something broke. Hard to believe it was this patch
but it's harder to believe it's the other candidate,
so reverting.  Temporarily I hope.

llvm-svn: 96303
2010-02-16 00:43:58 +00:00
Chris Lattner 1b78ea446f mark __builtin_longjmp noreturn, PR6312
llvm-svn: 96302
2010-02-16 00:23:21 +00:00
Dan Gohman 148a972b67 When reusing an existing PHI node in a loop, be even more
strict about the requirements.

llvm-svn: 96301
2010-02-16 00:20:08 +00:00