Commit Graph

137205 Commits

Author SHA1 Message Date
Alexey Samsonov 582d7de709 [ASan]: Add minimalistic support for turning off initialization-order checking for globals of specified types. Tests for this behavior will go to ASan test suite in compiler-rt.
llvm-svn: 167725
2012-11-12 14:00:01 +00:00
Gabor Greif ea5fa1004f do not play preprocessor tricks with 'private', use public interfaces instead; this appeases the VC++ buildbots
llvm-svn: 167724
2012-11-12 13:34:59 +00:00
Alexander Potapenko 8c07f55568 [ASan] Add llvm-symbolizer from to tools/
This is the second and last (2/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it
with both cmake and configure+make.

llvm-svn: 167723
2012-11-12 11:33:29 +00:00
Alexander Potapenko 9448581d9e [ASan] Remove llvm-symbolizer from compiler-rt/utils/
This is the first (1/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it
with both cmake and configure+make.

llvm-svn: 167722
2012-11-12 11:32:42 +00:00
Alexander Potapenko 5066c5d9b7 [ASan] Fix the golden stack for use-after-free.cc.
The change has been caused by the switch to llvm-symbolizer, that prints inlined stack frames.
This should fix PR 14251

llvm-svn: 167721
2012-11-12 11:27:24 +00:00
Gabor Greif fea6a551a9 add unit test for waymarking algorithm (Use::getUser)
llvm-svn: 167720
2012-11-12 10:01:17 +00:00
Eric Christopher 166311301c Remove unused field.
llvm-svn: 167719
2012-11-12 07:35:12 +00:00
Michael Liao d39c0fb19f Fix PR14314
- Fix operand order for atomic sub, where the minuend is the value
  loaded from memory and the subtrahend is the parameter specified.

llvm-svn: 167718
2012-11-12 06:49:17 +00:00
Bill Wendling 887b485dbe Check that the input size is correct for the given constraint.
The 'a', 'c', and 'd' constraints on i386 mean a 32-bit register. We cannot
place a 64-bit value into the 32-bit register. Error out instead of causing the
compiler to spew general badness.
<rdar://problem/12415959>

llvm-svn: 167717
2012-11-12 06:42:51 +00:00
Craig Topper b41000ed70 Add --enable-werror and --enable-cxx11 to projects/sample/
llvm-svn: 167716
2012-11-12 06:11:12 +00:00
Rafael Espindola ab53a72781 Remove calls to getMostRecentDecl. The case they were added for in r117526 are
now covered by attribute merging.

llvm-svn: 167714
2012-11-12 04:32:23 +00:00
Rafael Espindola d5ed033d56 In Sema::MergeVarDecl we handle merging of storage classes and visibility
attributes. In cases where the merged declaration is fully equivalent to the
two original ones, some of the code was getLVForDecl was duplicated.

Cases that are still handled in getLVForDecl are things like

__private_extern__ int N;
int N;

For which we cannot produce a single merged decl with all the information.

llvm-svn: 167703
2012-11-12 04:10:23 +00:00
Justin Holewinski 2700433f89 [NVPTX] Fix const modifier on builtins
Some NVVM intrinsics were incorrectly labeled.

llvm-svn: 167700
2012-11-12 03:16:56 +00:00
Justin Holewinski 1812ee9a5b [NVPTX] Add more precise PTX/SM target attributes
Each SM and PTX version is modeled as a subtarget feature/CPU. Additionally,
PTX 3.1 is added as the default PTX version to be out-of-the-box compatible
with CUDA 5.0.

Available CPUs for this target:

  sm_10 - Select the sm_10 processor.
  sm_11 - Select the sm_11 processor.
  sm_12 - Select the sm_12 processor.
  sm_13 - Select the sm_13 processor.
  sm_20 - Select the sm_20 processor.
  sm_21 - Select the sm_21 processor.
  sm_30 - Select the sm_30 processor.
  sm_35 - Select the sm_35 processor.

Available features for this target:

  ptx30 - Use PTX version 3.0.
  ptx31 - Use PTX version 3.1.
  sm_10 - Target SM 1.0.
  sm_11 - Target SM 1.1.
  sm_12 - Target SM 1.2.
  sm_13 - Target SM 1.3.
  sm_20 - Target SM 2.0.
  sm_21 - Target SM 2.1.
  sm_30 - Target SM 3.0.
  sm_35 - Target SM 3.5.

llvm-svn: 167699
2012-11-12 03:16:43 +00:00
Meador Inge f963a8ffcc Delete a stale comment. No functional change.
llvm-svn: 167698
2012-11-12 00:28:15 +00:00
Craig Topper dd13d3fda1 Move some helper methods to being static functions in the implementation file.
llvm-svn: 167696
2012-11-11 22:45:02 +00:00
Daniel Jasper 33806cdefc Fix binding of nodes in case of forEach..() matchers.
When recursively visiting the generated matches, the aggregated bindings need
to be copied during the recursion. Otherwise, we they might not be properly
overwritten (which is shown by the test), or there might be bound nodes present
that were bound on a different matching branch.

Review: http://llvm-reviews.chandlerc.com/D112
llvm-svn: 167695
2012-11-11 22:14:55 +00:00
Nico Weber 07351f8e78 Remove unneeded includes from IdentifierTable
llvm-svn: 167694
2012-11-11 21:39:39 +00:00
Nico Weber 496b6dd5b1 Delete comment reference to non-existent method
llvm-svn: 167692
2012-11-11 21:02:03 +00:00
Meador Inge 9493eb9bc4 Remove hard-coded constant in Transforms/InstCombine/memcmp-1.ll
Transforms/InstCombine/memcmp-1.ll has a test case that looks like:

  @foo = constant [4 x i8] c"foo\00"
  @hel = constant [4 x i8] c"hel\00"

  ...

  %mem1 = getelementptr [4 x i8]* @hel, i32 0, i32 0
  %mem2 = getelementptr [4 x i8]* @foo, i32 0, i32 0
  %ret = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 3)
  ret i32 %ret
  ; CHECK: ret i32 2

The folded return value (2 above) is computed using the system memcmp
that the compiler is linked with.  This can return different values on
different systems.  The test was originally written on an OS X 10.7.5
x86-64 box and passed.  However, it failed on one of the x86-64 FreeBSD
buildbots because the system memcpy on that machine returned a different
value (1 instead of 2).

I fixed the test by checking the folding constants with regexes.

llvm-svn: 167691
2012-11-11 07:10:25 +00:00
Nico Weber 158a31abe2 s/BCPLComment/LineComment/
llvm-svn: 167690
2012-11-11 07:02:14 +00:00
Meador Inge d4825780ed instcombine: Migrate memset optimizations
This patch migrates the memset optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167689
2012-11-11 06:49:03 +00:00
Nadav Rotem 913805703d Update the vectorizer docs.
llvm-svn: 167688
2012-11-11 06:47:51 +00:00
Meador Inge 9cf328b526 instcombine: Migrate memmove optimizations
This patch migrates the memmove optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167687
2012-11-11 06:22:40 +00:00
Meador Inge dd9234a10a instcombine: Migrate memcpy optimizations
This patch migrates the memcpy optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167686
2012-11-11 05:54:34 +00:00
Nadav Rotem 3b99dc62a7 Use the isTruncFree and isZExtFree API to figure out of these operations are free. Thanks Andy!
llvm-svn: 167685
2012-11-11 05:34:45 +00:00
Nadav Rotem 12930749ab Fix a comment typo and add comments.
llvm-svn: 167684
2012-11-11 05:15:00 +00:00
Meador Inge 4d2827c10d instcombine: Migrate memcmp optimizations
This patch migrates the memcmp optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167683
2012-11-11 05:11:20 +00:00
Meador Inge 56edbc9323 instcombine: Migrate strstr optimizations
This patch migrates the strstr optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167682
2012-11-11 03:51:48 +00:00
Meador Inge 76fc1a479a Add method for replacing instructions to LibCallSimplifier
In some cases the library call simplifier may need to replace instructions
other than the library call being simplified.  In those cases it may be
necessary for clients of the simplifier to override how the replacements
are actually done.  As such, a new overrideable method for replacing
instructions was added to LibCallSimplifier.

A new subclass of LibCallSimplifier is also defined which overrides
the instruction replacement method.  This is because the instruction
combiner defines its own replacement method which updates the worklist
when instructions are replaced.

llvm-svn: 167681
2012-11-11 03:51:43 +00:00
Nico Weber 1ed35ba2dd FileCheckize test
llvm-svn: 167680
2012-11-11 01:35:05 +00:00
Richard Smith 67ea635f7a Fix a typo which Matt pointed out.
llvm-svn: 167679
2012-11-11 00:28:33 +00:00
Fariborz Jahanian e14f98e0bc objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.
lower 24bit is currently being used.

llvm-svn: 167678
2012-11-10 18:30:40 +00:00
Daniel Malea 44a3d901c0 Test commit: clean up C++11 options in lldb (on Linux) build page
llvm-svn: 167677
2012-11-10 18:09:36 +00:00
Benjamin Kramer 933f41161d Provide definitions for all functions.
ICC refuses to compile a class in an anonymous namespace if some functions
aren't defined. Fixes PR13477.

llvm-svn: 167676
2012-11-10 16:10:16 +00:00
Meador Inge bcd88ef764 instcombine: Migrate strcspn optimizations
This patch migrates the strcspn optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167675
2012-11-10 15:16:48 +00:00
Benjamin Kramer 91b014cd66 Simplify the SmallVector pretty printer for LLDB a bit and make it work with reference types.
llvm-svn: 167674
2012-11-10 09:45:32 +00:00
Craig Topper a43e2fd3eb Remove unnecessary subtraction and addition by 1 around a couple for loops.
llvm-svn: 167673
2012-11-10 09:25:36 +00:00
Duncan Sands 61167ab2c2 Remove empty directory.
llvm-svn: 167672
2012-11-10 09:24:44 +00:00
Craig Topper 84afbf2b02 Tidy up spacing. No functional change.
llvm-svn: 167671
2012-11-10 09:02:47 +00:00
Craig Topper 2dfc1a4d24 Removed unimplemented method declaration.
llvm-svn: 167670
2012-11-10 09:00:12 +00:00
Craig Topper f5d527401f Simplify custom emitter code for pcmp(e/i)str(i/m) and make the helper functions static.
llvm-svn: 167669
2012-11-10 08:57:41 +00:00
Douglas Gregor dc97457178 Rework my implementation of circular-reference finding to not use
CXXRecordDecl::forallBases, which does *not* do what I need. Fixes the
failure introduced in r167651.

llvm-svn: 167668
2012-11-10 07:24:09 +00:00
Jason Molenda e424a9b5ca Add support for libdispatch version 4 structure layout for finding
GCD queue names of threads to
ProcessGDBRemote::GetDispatchQueueNameForThread()
May need tweaking once this version is rolled out but visual
inspection looks fine.
<rdar://problem/12333100> 

llvm-svn: 167667
2012-11-10 06:54:30 +00:00
Jason Molenda b9371a6961 Don't assume that Modules have directories. They may be in-memory-only
things like our favorite "cl_kernels" and so module_directory here
can be NULL.

llvm-svn: 167666
2012-11-10 06:52:37 +00:00
Michael Liao 625a875f05 Add clang support of RTM from TSX
- New options '-mrtm'/'-mno-rtm' are added to enable/disable RTM feature
- Builtin macro '__RTM__' is defined if RTM feature is enabled
- RTM intrinsic header is added and introduces 3 new intrinsics, namely
  '_xbegin', '_xend', and '_xabort'.
- 3 new builtins are added to keep compatible with gcc, namely
  '__builtin_ia32_xbegin', '__builtin_ia32_xend', and '__builtin_ia32_xabort'.
- Test cases for pre-defined macro and new intrinsic codegen are added.

llvm-svn: 167665
2012-11-10 05:17:46 +00:00
Richard Smith 9fbda3953b -momit-leaf-frame-pointer is a -m option, not a -f option.
llvm-svn: 167664
2012-11-10 04:54:44 +00:00
Evan Cheng a5d363ec24 Convert an improper CodeGen test to a MC test.
llvm-svn: 167663
2012-11-10 04:30:40 +00:00
Ted Kremenek ca90ecdb72 Revert "Disable -Wimplicit-fallthrough when not using C++.", pending further discussion on cfe-dev.
llvm-svn: 167662
2012-11-10 04:03:41 +00:00
Meador Inge 2461d8a6d5 Add a few more test cases for verifying -fno-builtin.
Some holes in testing where discovered while working on the LLVM library
call simplifiers.

llvm-svn: 167661
2012-11-10 03:56:55 +00:00