Commit Graph

175808 Commits

Author SHA1 Message Date
Dmitry Vyukov 9ff85e9674 tsan: fix argument passing in Go interface
Go calling convention does not support bools (it probably works, but uptrs are safer)

llvm-svn: 210365
2014-06-06 18:53:52 +00:00
David Blaikie fcf31a73d1 Match the full hex offsets in test/DebugInfo/X86/gnu-public-names.ll
These checks were accidentally skipping the 0x prefix in the hex
offsets, then cunningly ignoring the prefix in the use of those captured
values.

Except in the case of the unit length, where the match was only matching
the leading '0' before the x in the 0x prefix, then matching that
against the length. We can't actually express the length association
here, as the length field in the Compile Unit header does not include
the length field itself, but the length field in the pubnames section
/does/ include the size of the length field in the Compile Unit header -
so the two numbers are actually 4 bytes different. Just skip matching
that.

llvm-svn: 210364
2014-06-06 18:45:14 +00:00
Dan Liew 599cec642f Fix a typo made in Programmer's Manual made in r210354. Spotted
by Paul Robinson.

llvm-svn: 210363
2014-06-06 18:44:21 +00:00
David Blaikie 941644d1bb Remove DWARF3 testing of test/DebugInfo/X86/gnu-public-names.ll
This was added to test that DW_AT_GNU_pubnames used sec_offset in DWARF4
and data4 in DWARF3 and below. Since then we've updated
DW_AT_GNU_pubnames to be a flag, rather than a section offset anyway.

Granted this still differs between DWARF 3 and DWARF 4
(FORM_flag_present versun FORM_flag) but it doesn't seem worthwhile
testing that codepath again here. It's covered adequately in many other
test cases.

And while I'm here, don't hardcode the byte size of the compile unit -
it's not relevant to this test and just makes it brittle if/when
anything changes in the way this CU is emitted.

llvm-svn: 210362
2014-06-06 18:22:04 +00:00
Filipe Cabecinhas 5181255696 Fixed a bug in lowering shuffle_vectors to insertps
Summary:
We were being too strict and not accounting for undefs.
Added a test case and fixed another one where we improved codegen.

Reviewers: grosbach, nadav, delena

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D4039

llvm-svn: 210361
2014-06-06 18:07:06 +00:00
Greg Fitzgerald e124a30fbe Un-xfail passing ARM Android tests
llvm-svn: 210360
2014-06-06 18:06:58 +00:00
Dmitry Vyukov 13793e5121 tsan: fix CurrentStackId
FuncEnter adds FuncEnter entry to trace that nobody removes later

llvm-svn: 210359
2014-06-06 18:05:12 +00:00
Dmitry Vyukov d858fa77d6 tsan: fix mutex in Go mode
In Go it's legal to unlock from a different goroutine.

llvm-svn: 210358
2014-06-06 18:04:05 +00:00
Hans Wennborg 80fb253fa7 test/SemaCXX/undefined-internal.cpp: Remove target triple.
This test seems to run fine in both MS and Itanium C++ ABI mode these days.

llvm-svn: 210357
2014-06-06 17:51:25 +00:00
Hans Wennborg dfcb7d6a97 Defer codegen of inline method definitions to the end of current top level declaration
We would previously fail to emit a definition of bar() for the following code:

  struct __declspec(dllexport) S {
    void foo() {
      t->bar();
    }
    struct T {
      void bar() {}
    };
    T *t;
  };

Note that foo() is an exported method, but bar() is not. However, foo() refers
to bar() so we need to emit its definition. We would previously fail to
realise that bar() is used.

By deferring the method definitions until the end of the top level declaration,
we can simply call EmitTopLevelDecl on them and rely on the usual mechanisms
to decide whether the method should be emitted or not.

Differential Revision: http://reviews.llvm.org/D4038

llvm-svn: 210356
2014-06-06 17:36:17 +00:00
Richard Smith 9467be4f74 Retain an expression pack expansion when the parameter pack expansion code asks
us to.

llvm-svn: 210355
2014-06-06 17:33:35 +00:00
Dan Liew c6ab58f426 Mention the IRBuilder in Programmer's Manual with a few small examples.
llvm-svn: 210354
2014-06-06 17:25:47 +00:00
Dmitry Vyukov fc9b5d67a6 tsan: disable reporting of mutex misuses in Go
llvm-svn: 210353
2014-06-06 17:23:27 +00:00
Dmitry Vyukov 9546afec62 tsan: minor optimizations for Go runtime
llvm-svn: 210351
2014-06-06 16:06:19 +00:00
Richard Smith 07f7991f30 PR14841: If partial substitution of explicitly-specified template arguments
results in a template having too many arguments, but all the trailing arguments
are packs, that's OK if we have a partial pack substitution: the trailing pack
expansions may end up empty.

llvm-svn: 210350
2014-06-06 16:00:50 +00:00
Dmitry Vyukov 75f5cf657e tsan: fix out-of-bounds access in Go runtime
FuncEntry can resize the shadow stack, while "thr->shadow_stack_pos[0] = pc" writes out-of-bounds.

llvm-svn: 210349
2014-06-06 15:56:08 +00:00
Dmitry Vyukov 32336152af tsan: fix mapping of meta shadow for Go
Go maps heap and data+bss, these regions are not adjacent.
data+bss is mapped first.

llvm-svn: 210348
2014-06-06 15:54:49 +00:00
Dmitry Vyukov ff194daead tsan: flush metamap per-thread cache when thread finishes
llvm-svn: 210347
2014-06-06 15:52:10 +00:00
Dmitry Vyukov feb4ede8ac tsan: fix clang warning:
comparison of unsigned expression >= 0 is always true

llvm-svn: 210346
2014-06-06 15:51:20 +00:00
Dmitry Vyukov 4f6de1d684 tsan: fix Go build with TSAN_COLLECT_STATS
Go does not have cur_thread function.

llvm-svn: 210345
2014-06-06 15:50:29 +00:00
Dmitry Vyukov 8744b1c1e3 tsan: allow to build Go runtime with clang + enable SSE3
llvm-svn: 210344
2014-06-06 15:49:49 +00:00
Michael Zolotukhin 07ee478829 Fix typo in a test from r210342.
llvm-svn: 210343
2014-06-06 15:49:47 +00:00
Michael Zolotukhin 1c51612d42 [SLP] Enable vectorization of GEP expressions.
The use cases look like the following:
    x->a = y->a + 10
    x->b = y->b + 12

llvm-svn: 210342
2014-06-06 15:34:24 +00:00
Bill Schmidt 8a7b4f18bd [PPC64LE] Implement little-endian semantics for vec_pack family
The PowerPC vector-pack instructions are defined architecturally with
a big-endian bias, in that the vector element numbering is assumed to
be "left to right" regardless of whether the processor is in
big-endian or little-endian mode.  This definition is unnatural for
little-endian code generation.

To facilitate ease of porting, the vec_pack and related interfaces are
designed to use natural element ordering, so that elements are
numbered according to little-endian design principles when code is
generated for a little-endian target.  The vec_pack calls are
implemented as calls to vec_perm, specifying selection of the
odd-numbered vector elements.  For little endian, this means the
odd-numbered elements counting from the right end of the register.
Since the underlying instructions count from the left end, we must
instead select the even-numbered vector elements for little endian to
achieve the desired semantics.

The correctness of this code is tested by the new pack.c test added in
a previous patch.  I plan to later make the existing ppc32 Altivec
compile-time tests work for ppc64 and ppc64le as well.

llvm-svn: 210340
2014-06-06 15:10:47 +00:00
Alp Toker 62438dab83 Fix RecursiveASTVisitor to visit types in ObjCPropertyDecl
Patch by Mathieu Baudet!

llvm-svn: 210339
2014-06-06 15:05:09 +00:00
Aaron Ballman 8bbb8446f3 Replacing r210333 with an improved solution; we should never reach this code with any other loop hint options.
llvm-svn: 210338
2014-06-06 15:01:47 +00:00
Bill Schmidt 7c0114f6e3 [PPC64LE] Implement little-endian semantics for vec_mul[eo]
The PowerPC vector-multiply-even and vector-multiply-odd instructions
are defined architecturally with a big-endian bias, in that the vector
element numbering is assumed to be "left to right" regardless of
whether the processor is in big-endian or little-endian mode.  This
definition is unnatural for little-endian code generation.

To facilitate ease of porting, the vec_mule and vec_mulo interfacs are
designed to use natural element ordering, so that elements are
numbered according to little-endian design principles when code is
generated for a little-endian target.  The desired semantics can be
achieved by using the opposite instruction for little-endian mode.
That is, when a call to vec_mule appears in the code, a
vector-multiply-odd is generated, and when a call to vec_mulo appears
in the code, a vector-multiply-even is generated.

The correctness of this code is tested by the new mult-even-odd.c test
added in a previous patch.  I plan to later make the existing ppc32
Altivec compile-time tests work for ppc64 and ppc64le as well.

llvm-svn: 210337
2014-06-06 14:45:06 +00:00
Bill Schmidt 4aedff8995 [PPC64LE] Fix lowering of BUILD_VECTOR and SHUFFLE_VECTOR for little endian
This patch fixes a couple of lowering issues for little endian
PowerPC.  The code for lowering BUILD_VECTOR contains a number of
optimizations that are only valid for big endian.  For now, we disable
those optimizations for correctness.  In the future, we will add
analogous optimizations that are correct for little endian.

When lowering a SHUFFLE_VECTOR to a VPERM operation, we again need to
make the now-familiar transformation of swapping the input operands
and complementing the permute control vector.  Correctness of this
transformation is tested by the accompanying test case.

llvm-svn: 210336
2014-06-06 14:06:26 +00:00
Evgeniy Stepanov ee98fb197b [msan] Fix wrong endianness when printing shadow.
llvm-svn: 210335
2014-06-06 14:06:14 +00:00
Daniel Jasper 58cb2edd69 clang-format: Fix incorrect indentation.
Before (JavaScript example, but can extend to other languages):
  return {
    a: 'E',
    b: function() {
      return function() {
      f();  // This is wrong.
      };
    }
  };

After:
  return {
    a: 'E',
    b: function() {
      return function() {
        f();  // This is better.
      };
    }
  };

llvm-svn: 210334
2014-06-06 13:49:04 +00:00
Aaron Ballman 9c8274254a Quieting a false-positive which was causing the sanitizer bots to go red.
llvm-svn: 210333
2014-06-06 13:39:32 +00:00
Evgeniy Stepanov 3e810b01c3 [msan] Partial revert of r210331.
Bots did not like it.

llvm-svn: 210332
2014-06-06 13:35:25 +00:00
Evgeniy Stepanov 9438bf1f62 [msan] Better diagnostic for invalid origin id.
llvm-svn: 210331
2014-06-06 12:58:44 +00:00
Aaron Ballman b06b15aa28 Adding a new #pragma for the vectorize and interleave optimization hints.
Patch thanks to Tyler Nowicki!

llvm-svn: 210330
2014-06-06 12:40:24 +00:00
Dmitry Vyukov 909b7490a3 sanitizer: document missing macro
llvm-svn: 210329
2014-06-06 12:16:26 +00:00
Alp Toker 15e62a37f0 Fix typos
llvm-svn: 210328
2014-06-06 12:02:07 +00:00
Pekka Jaaskelainen a304408789 Slight language tweak from Jonathan Humphreys.
llvm-svn: 210327
2014-06-06 11:21:44 +00:00
Alp Toker 7ce5f025a3 Don't generate assembly in backend diagnostic tests
A leftover -S was generating unwanted output in the source tree overriding
-only flags that normally disable output.

This reverts commit r210323 and implements the proper fix.

Reported by Timur Iskhodzhanov!

llvm-svn: 210326
2014-06-06 11:20:58 +00:00
Timur Iskhodzhanov eae19460a7 Fix C++ style // comments in a couple of C files
llvm-svn: 210325
2014-06-06 11:04:46 +00:00
Timur Iskhodzhanov f2a380325d Remove an unused variable
llvm-svn: 210324
2014-06-06 11:02:48 +00:00
Timur Iskhodzhanov 27700e28de Add -o /dev/null to one of the tests as it fails when run from a read-only checkout
llvm-svn: 210323
2014-06-06 10:58:21 +00:00
Evgeniy Stepanov e5c34ace7f [asan] Make ReplaceSystemMalloc optional on Android.
Don't fail if __libc_malloc_dispatch is missing; continue running
with normal linux interceptors instead.

llvm-svn: 210322
2014-06-06 10:57:21 +00:00
Alp Toker c84c5c9ac1 Touch configure to force clang's config.h.in reconfiguration on the build servers
Gutted that this is needed, folks who care about keeping the legacy build
system alive should sort this out already.

llvm-svn: 210321
2014-06-06 10:36:38 +00:00
Alp Toker f988d00682 Revert "Revert "Devise a package-private means to determine the LLVM version string""
We probably just need to touch LLVM's configure this time to work around the
totally inadequate Makefile build server integration.

This reverts commit r210314.

llvm-svn: 210320
2014-06-06 10:36:22 +00:00
Iain Sandoe f419931fa3 lld test for configure & make
r210177 added lld Makefiles, r210245 added automatic build when the source is present.

This revision completes the set by adding the lld test and unittests to the check-all target.

llvm-svn: 210318
2014-06-06 09:06:25 +00:00
Timur Iskhodzhanov 460cf8891b Revert r210298 'Correctly set the comdat symbol on COFF' as it asserts on Windows
llvm-svn: 210317
2014-06-06 08:18:18 +00:00
Simon Atanasyan 65e6467e69 [yaml2obj][obj2yaml] Support ELF symbol's visibility flags (default/hidden/protected).
llvm-svn: 210316
2014-06-06 07:41:57 +00:00
Kostya Serebryany 558b3363a7 [asan] initialize fake_stack_ to 0 before we call SetThreadStackAndTls, because that may actually try to use fake_stack_ (still don't know how). Yet another case where we desperately want https://sourceware.org/glibc/wiki/ThreadPropertiesAPI
llvm-svn: 210315
2014-06-06 07:35:35 +00:00
Alp Toker 27f333d3ad Revert "Devise a package-private means to determine the LLVM version string"
This didn't work out on the build servers. Investigating

This reverts commit r210313.

llvm-svn: 210314
2014-06-06 07:26:57 +00:00
Alp Toker 420d7ccbac Devise a package-private means to determine the LLVM version string
This will unbreak clang vendor builds as a follow-up to r210238, now that we
can't poke into LLVM's private config.h (nor should the string be exposed by
llvm-config.h).

This hopefully removes for good the last include of LLVM's config.h.

llvm-svn: 210313
2014-06-06 06:58:25 +00:00