Commit Graph

122269 Commits

Author SHA1 Message Date
Greg Clayton bae2f2f812 Made loading sections in the DynamicLoaderDarwinKernel more robust as it
seems that sections in the memory module might be quite different from the
sections in the file module. Now we find all segments in the on disk file and
find that segment by name in the memory module and it is ok if any sections
from the file are missing in the memory image.

llvm-svn: 150443
2012-02-14 00:14:24 +00:00
Douglas Gregor 1b66d8c287 Simple test ensuring that we perform direct initialization when copy-capturing in lambdas
llvm-svn: 150442
2012-02-14 00:03:38 +00:00
Kostya Serebryany dc84eae1e0 [asan] fix asan-vs-gvn.ll test (it did not actually check much before this change)
llvm-svn: 150441
2012-02-14 00:02:35 +00:00
Douglas Gregor b4328233c1 Link together the call operator produced from transforming a lambda
expression with the original call operator, so that we don't try to
separately instantiate the call operator. Test and tweak a few more
bits for template instantiation of lambda expressions.

llvm-svn: 150440
2012-02-14 00:00:48 +00:00
Andrew Trick 10cc45336d Add simplifyLoopLatch to LoopRotate pass.
This folds a simple loop tail into a loop latch. It covers the common (in fortran) case of postincrement loops. It's a "free" way to expose this type of loop to downstream loop optimizations that bail out on non-canonical loops (getLoopLatch is a heavily used check).

llvm-svn: 150439
2012-02-14 00:00:23 +00:00
Andrew Trick a20f198747 whitespace
llvm-svn: 150438
2012-02-14 00:00:19 +00:00
Bill Wendling 05d6f2ff1e Don't reserve the R0 and R1 registers here. We don't use these registers, and
marking them as "live-in" into a BB ruins some invariants that the back-end
tries to maintain.

llvm-svn: 150437
2012-02-13 23:47:16 +00:00
Bill Wendling 05f7380b33 Don't recalculate the size of the vector each time through the loop.
llvm-svn: 150436
2012-02-13 23:45:26 +00:00
Nick Lewycky adcec49f96 Mark the cxa_guard_{abort,acquire,release} functions nounwind.
llvm-svn: 150435
2012-02-13 23:45:02 +00:00
Lang Hames aef4ca78c5 Make operands for VSWP read-modify-write.
llvm-svn: 150433
2012-02-13 23:37:19 +00:00
Tobias Grosser 1773fb1c00 Revert "CodeGen: Maintain a valid CFG during code generation"
This commit contained some bugs. Revert it until I get around to fix them.

llvm-svn: 150431
2012-02-13 23:31:43 +00:00
Tobias Grosser 98610eed34 ScheduleOptimizer: Change vars to start with uppercase letter
llvm-svn: 150430
2012-02-13 23:31:39 +00:00
Jakob Stoklund Olesen 2ceea93dd3 Add register mask support to ScheduleDAGRRList.
The scheduler will sometimes check the implicit-def list on instructions
to properly handle pre-colored DAG edges.

Also check any register mask operands for physreg clobbers.

llvm-svn: 150428
2012-02-13 23:25:24 +00:00
Johnny Chen 3e3f92eaf9 Add a test case for completion from 'settings set target.exec' to 'settings set target.exec-search-paths '.
llvm-svn: 150427
2012-02-13 23:25:06 +00:00
Greg Clayton c859e2d524 Full core file support has been added for mach-o core files.
Tracking modules down when you have a UUID and a path has been improved.

DynamicLoaderDarwinKernel no longer parses mach-o load commands and it
now uses the memory based modules now that we can load modules from memory.

Added a target setting named "target.exec-search-paths" which can be used
to supply a list of directories to use when trying to look for executables.
This allows one or more directories to be used when searching for modules
that may not exist in the SDK/PDK. The target automatically adds the directory
for the main executable to this list so this should help us in tracking down
shared libraries and other binaries. 

llvm-svn: 150426
2012-02-13 23:10:39 +00:00
Devang Patel 698452bc7e Check against umin while converting fcmp into an icmp.
llvm-svn: 150425
2012-02-13 23:05:18 +00:00
Dan Gohman eb6e01533a Just like in regular escape analysis, loads and stores through
(but not of) a block pointer do not cause the block pointer to
escape. This fixes rdar://10803830.

llvm-svn: 150424
2012-02-13 22:57:02 +00:00
Kostya Serebryany e2a0e4163a ThreadSanitizer, a race detector. First LLVM commit.
Clang patch (flags) will follow shortly.
The run-time library will also follow, but not immediately.

llvm-svn: 150423
2012-02-13 22:50:51 +00:00
Sean Callanan 59700591f1 Tightened up type uniq'ing so we don't uniq two
anonymous types to each other unless they have
the same byte_size.

llvm-svn: 150422
2012-02-13 22:30:16 +00:00
Jason Molenda 0fdb104bed Bump version number up to 115.
llvm-svn: 150421
2012-02-13 22:27:56 +00:00
Richard Smith 6331c408b5 Deal with a horrible C++11 special case. If a non-literal type has a constexpr
constructor, and that constructor is used to initialize an object of static
storage duration such that all members and bases are initialized by constant
expressions, constant initialization is performed. In this case, the object
can still have a non-trivial destructor, and if it does, we must emit a dynamic
initializer which performs no initialization and instead simply registers that
destructor.

llvm-svn: 150419
2012-02-13 22:16:19 +00:00
Matt Beaumont-Gay 4809fc1d9d Add a subgroup of -Wreturn-type, -Wreturn-type-c-linkage.
llvm-svn: 150418
2012-02-13 22:04:08 +00:00
Douglas Gregor 0c46b2b7ce Introduce support for template instantiation of lambda
expressions. This is mostly a simple refact, splitting the main "start
a lambda expression" function into smaller chunks that are driven
either from the parser (Sema::ActOnLambdaExpr) or during AST
transformation (TreeTransform::TransformLambdaExpr). A few minor
interesting points:

  - Added new entry points for TreeTransform, so that we can
  explicitly establish the link between the lambda closure type in the
  template and the lambda closure type in the instantiation.
  - Added a bit into LambdaExpr specifying whether it had an explicit
  result type or not. We should have had this anyway.

This code is 'lightly' tested.

llvm-svn: 150417
2012-02-13 22:00:16 +00:00
Owen Anderson 3bbcbeaeff v2f16 is a floating point type. Add symbolic floating point type ranges to prevent this kind of issue in the future.
llvm-svn: 150416
2012-02-13 21:47:20 +00:00
Fariborz Jahanian 1c1da171a8 modern objc translator. More ivar rewrite work.
llvm-svn: 150415
2012-02-13 21:34:45 +00:00
Kostya Serebryany fcd535ba6c [asan] implement __asan_set_death_callback
llvm-svn: 150414
2012-02-13 21:24:29 +00:00
Fariborz Jahanian 75e71b99ec objc modern translator. ivar offset symbols.
llvm-svn: 150413
2012-02-13 20:59:02 +00:00
Anna Zaks 8fd0f2a6cb [analyzer] Malloc Checker: realloc: correct the way we are handing the
case when size is 0.

llvm-svn: 150412
2012-02-13 20:57:07 +00:00
Andrew Trick 5188c0020c LiveIntervalAnalysis does not depend on MachineLoopInfo.
llvm-svn: 150411
2012-02-13 20:44:42 +00:00
Dmitri Gribenko 5dc3a6936d Add a script that produces a list of all diagnostics that are defined in
Diagnostic*.td files but not used in sources.

llvm-svn: 150410
2012-02-13 20:21:52 +00:00
Dmitri Gribenko c233a545e8 Remove unused diagnostics from include/clang/Basic/Diagnostic*.td files.
llvm-svn: 150409
2012-02-13 20:13:24 +00:00
Sebastian Redl 2b80af4949 Don't route explicit construction via list-initialization through the functional cast code path. It sometimes does the wrong thing, produces horrible error messages, and is just unnecessary.
llvm-svn: 150408
2012-02-13 19:55:43 +00:00
Matt Beaumont-Gay f2ee0679aa Sink variable into assert
llvm-svn: 150407
2012-02-13 19:29:45 +00:00
Fariborz Jahanian c3cdc41ac7 objective-c translator: more rewriting of ivar types
into a c-type which closely matches the objective-c type.

llvm-svn: 150406
2012-02-13 18:57:49 +00:00
Dylan Noblesmith c6c7a5819d add LLVM_VERSION_MAJOR and _MINOR defines
This is useful for clients that want to maintain compatibility
across multiple releases of LLVM. Currently users like Klee and
Mesa all have to roll their own 'parse llvm-config --version
output and generate defines' solution.

Also reuse the new macros so that version information is less
redundant/likely to fall out of sync again in the future.

llvm-svn: 150405
2012-02-13 18:48:10 +00:00
Jakob Stoklund Olesen 6f8fe71216 Check regmask interference for -join-physregs.
llvm-svn: 150404
2012-02-13 18:17:04 +00:00
Chad Rosier 636d283202 When generating diagnostic information due to a clang failure, allow multiple
-arch options if the're all the same.

Patch by Jeremy Huddleston.
rdar://10849701

llvm-svn: 150403
2012-02-13 18:16:28 +00:00
Anna Zaks d56c8794d3 [analyzer] Malloc checker: rework realloc handling:
1) Support the case when realloc fails to reduce False Positives. (We
essentially need to restore the state of the pointer being reallocated.)

2) Realloc behaves differently under special conditions (from pointer is
null, size is 0). When detecting these cases, we should consider
under-constrained states (size might or might not be 0). The
old version handled this in a very hacky way. The code did not
differentiate between definite and possible (no consideration for
under-constrained states). Further, after processing each special case,
the realloc processing function did not return but chained to the next
special case processing. So you could end up in an execution in which
you first see the states in which size is 0 and realloc ~ free(),
followed by the states corresponding to size is not 0 followed by the
evaluation of the regular realloc behavior.

llvm-svn: 150402
2012-02-13 18:05:39 +00:00
Douglas Gregor e556163a66 Split the storage of lambda information between the LambdaExpr and the
CXXRecordDecl in a way that actually makes some sense:
  - LambdaExpr contains all of the information for initializing the
  lambda object, including the capture initializers and associated
  array index variables.
  - CXXRecordDecl's LambdaDefinitionData contains the captures, which
  are needed to understand the captured variable references in the
  body of the lambda.

llvm-svn: 150401
2012-02-13 17:20:40 +00:00
Alexander Potapenko 438447a7f3 Fix compilation on Mac.
llvm-svn: 150400
2012-02-13 17:14:31 +00:00
Alexander Potapenko 234d8c2168 Lint fix
llvm-svn: 150399
2012-02-13 17:11:19 +00:00
Alexander Potapenko 720aaefb8d Move the non-trivial implementation of AsanShadowRangeIsAvailable to asan_mac.cc
to avoid crashes on Linux and Win.

llvm-svn: 150398
2012-02-13 17:09:40 +00:00
Benjamin Kramer 31ae8b62ea Remove empty directories.
llvm-svn: 150397
2012-02-13 16:40:26 +00:00
Douglas Gregor 54fcea6e16 Keep track of the set of array index variables we use when we
synthesize a by-copy captured array in a lambda. This information will
be needed by IR generation.

llvm-svn: 150396
2012-02-13 16:35:30 +00:00
Benjamin Kramer f299a55482 Remove empty directories left behind by git-svn.
llvm-svn: 150395
2012-02-13 16:32:02 +00:00
Douglas Gregor 1db5f1f1a0 Don't allocate unused storage for captures/capture initializers in lambda expressions
llvm-svn: 150394
2012-02-13 15:51:35 +00:00
Douglas Gregor c8a734938b Move the storage of lambda captures and capture initializers from
LambdaExpr over to the CXXRecordDecl. This allows us to eliminate the
back-link from the closure type to the LambdaExpr, which will simplify
and lazify AST deserialization.

llvm-svn: 150393
2012-02-13 15:44:47 +00:00
Alexander Potapenko ef4521e239 Check whether the shadow memory range intersects with an existing mapping.
This should help to detect problems with ASLR or linker tricks early.

llvm-svn: 150391
2012-02-13 15:11:23 +00:00
Eric Christopher fe52523b4c Add back in the code to create forward decls using temporary mdnodes.
llvm-svn: 150390
2012-02-13 15:08:45 +00:00
Eric Christopher d752e3d280 Testcase for previous commit.
PR11970.

llvm-svn: 150389
2012-02-13 15:04:15 +00:00