Commit Graph

208204 Commits

Author SHA1 Message Date
Peter Collingbourne 4cfa086df2 Support: Clean up TSan annotations.
Remove support for Valgrind-based TSan, which hasn't been maintained for a
few years. We now use the TSan annotations only if LLVM is compiled with
-fsanitize=thread. We no longer need the weak function definitions as we
are guaranteed that our program is linked directly with the TSan runtime.

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

llvm-svn: 245374
2015-08-18 22:31:24 +00:00
Greg Clayton 2ad6ac5461 Quiet build warnings on MacOSX.
llvm-svn: 245373
2015-08-18 22:30:25 +00:00
Alex Lorenz a314d81328 MIR Serialization: Serialize the frame information's stack protector index.
llvm-svn: 245372
2015-08-18 22:26:26 +00:00
Zachary Turner 913f776ff9 Fix TestArrayTypes on Windows.
Whether or not frames print their tid in hex or decimal is apparently
hardcoded to depend on the operating system.  For now a comment was
added that this should be changed to a more sane check (for example
a setting), and the OS check is updated to do the right thing for
Windows.

llvm-svn: 245371
2015-08-18 22:25:40 +00:00
Alex Lorenz dc9dadf683 MIR Parser: Extract the code that parses stack object references into a new
method.

This commit extracts the code that parses the stack object references into a
new method named 'parseStackFrameIndex', so that it can be reused when
parsing standalone stack object references.

llvm-svn: 245370
2015-08-18 22:18:52 +00:00
David Majnemer 8e335ca278 [InstSimplify] Remove unused variable
No functionality change is intended.

llvm-svn: 245369
2015-08-18 22:18:22 +00:00
David Blaikie 50ccaa653a Fix for MSVC
llvm-svn: 245368
2015-08-18 22:10:49 +00:00
David Blaikie fb2b796ecc Wdeprecated: Support movability of EHScopeStack::Cleanup objects as they are move constructed in ConditionalCleanup::restore
llvm-svn: 245367
2015-08-18 22:09:28 +00:00
David Majnemer c6bb0e2a51 [InstSimplify] Don't assume getAggregateElement will succeed
It isn't always possible to get a value from getAggregateElement.
This fixes PR24488.

llvm-svn: 245365
2015-08-18 22:07:25 +00:00
David Majnemer 5eaf08ff1f [VectorUtils] Replace 'llvm::' qualification with 'using llvm'
No funcitonal change is intended, this just makes the file look more
like the rest of LLVM.

llvm-svn: 245364
2015-08-18 22:07:20 +00:00
Alexey Samsonov 0a779d7e3d [Sanitizer] Initialize common flags to default values in unit tests.
llvm-svn: 245363
2015-08-18 21:54:32 +00:00
Alexey Samsonov 9a28358a03 [DFSan] Properly initialize and parse common flags in DFSan.
llvm-svn: 245362
2015-08-18 21:54:29 +00:00
Richard Smith 080056ba5a Range-based-for-convert some loops in ASTWriter. No functionality change intended.
llvm-svn: 245361
2015-08-18 21:53:42 +00:00
Joerg Sonnenberger b0ce8747c3 Load/store instructions for floating points with address space require SparcV9.
To properly handle this, define the *a instructions as separate
instruction classes by refactoring the LoadA and StoreA multiclasses.
Move the instruction tests into the sparcv9 file to test the difference.

llvm-svn: 245360
2015-08-18 21:31:46 +00:00
Chris Bieneman 1e7ac1b99a [autoconf] Fixing reversed logic introduced r245304.
Thanks for the catch Hal!

llvm-svn: 245359
2015-08-18 21:23:44 +00:00
Simon Pilgrim 4bce6d6b73 [X86] Refreshed sign extension tests.
llvm-svn: 245358
2015-08-18 21:21:35 +00:00
Oleksiy Vyalov 6e295cd179 Mark TestCModules as XFAIL on OSX.
http://reviews.llvm.org/D11962

llvm-svn: 245357
2015-08-18 21:20:25 +00:00
Hans Wennborg 7ad173dc8a Release script: correctly symlink clang-tools-extra into the build (PR22765)
llvm-svn: 245355
2015-08-18 21:10:17 +00:00
Eric Fiselier e8fd164569 Move atomic_support.h and config_elast.h into src/include
llvm-svn: 245354
2015-08-18 21:08:54 +00:00
Michael Kruse d568a3e20d Update test case multidim_indirect_access.ll
This test was written to check the workings of IndependentBlocks on
arrays which doesn't do such transformations anymore. The test itself
is still useful to check that the region is rejected as SCoP.  

llvm-svn: 245353
2015-08-18 21:08:41 +00:00
David Blaikie 06abbceebc Workaround -Wdeprecated on SemDiagnosticConsumer's tricksy copy ctor.
llvm-svn: 245352
2015-08-18 20:54:26 +00:00
Simon Pilgrim ce30ae62e2 [X86][AVX] Added shuffle concatenation tests
llvm-svn: 245351
2015-08-18 20:51:15 +00:00
Matthias Braun fa3b248a66 DAGCombiner: Improve DAGCombiner select normalization
The current code normalizes select(C0, x, select(C1, x, y)) towards
select(C0|C1, x, y) if the targets prefers that form. This patch adds an
additional rule that if the select(C1, x, y) part already exists in the
function then we want to normalize into the other direction because the
effects of reusing the existing value are bigger than transforming into
the target preferred form.

This addresses regressions following r238793, see also:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150727/290272.html

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

llvm-svn: 245350
2015-08-18 20:48:36 +00:00
Matthias Braun 2e920bd04f DAGCombiner: Optimize SELECTs first before turning them into SELECT_CC
This is part of http://reviews.llvm.org/D11616 - I just decided to split
this up into a separate commit.

llvm-svn: 245349
2015-08-18 20:48:29 +00:00
Simon Pilgrim edaba3b7c3 Updated constants to give more useful min/max constant folding tests
llvm-svn: 245348
2015-08-18 20:46:48 +00:00
Richard Smith 293534b1a5 Initialize the AST consumer as soon as we have both an ASTConsumer and an
ASTContext. Fixes some cases where we could previously initialize the AST
consumer more than once.

llvm-svn: 245346
2015-08-18 20:39:29 +00:00
Evgeniy Stepanov 35b0eaf23d [msan] Intercept openpty and forkpty.
llvm-svn: 245345
2015-08-18 20:36:48 +00:00
Evgeniy Stepanov 775d905644 [sanitizer] Add -lutil to static runtime link flags.
This is needed to prevent breakage of -Wl,-as-needed link when
interceptors for functions in libutil are added. See PR15823.

llvm-svn: 245344
2015-08-18 20:36:11 +00:00
Joerg Sonnenberger 44a0a59c50 GC empty directory.
llvm-svn: 245343
2015-08-18 20:34:33 +00:00
Nico Weber 19999b4816 Revert r245323, it caused PR24493.
llvm-svn: 245342
2015-08-18 20:32:55 +00:00
Chandler Carruth a364173219 [PM/AA] Add using declarations to avoid hiding virtual overloads.
Note that this actually has no functional change -- we never call these
methods using the derived type. But it is still cleaner and fixes a GCC
warning.

Spotted by Dave in code review and the warning spotted by Joerg on IRC.

llvm-svn: 245341
2015-08-18 20:28:40 +00:00
Aaron Ballman 73a8f05e5d We no longer need a custom matcher for this; use the builtin AST matcher instead. NFC, and existing tests should cover this change.
llvm-svn: 245340
2015-08-18 20:27:44 +00:00
David Blaikie dbe1a794f1 Simplify Diagnostic's ctors a bit by using in-class initializers for its members
llvm-svn: 245339
2015-08-18 20:24:06 +00:00
Zachary Turner 2878bf44b1 [Windows] XFAIL tests that depend on expression name lookup.
Name lookup doesn't work properly with Windows targets.  This is
most likely due to issues with name mangling, although there is at
least one set of debug info related issues as well, since some of
the name lookup requests appear to be failing on types rather than
symbols.

Specifically, this patch XFAILS the following set of tests:

TestChar1632T.py
TestRdar12991846.py
TestConstVariables.py
TestCallCPPFunction.py
TestCallStopAndContinue.py
TestCallUserDefinedFunction.py
TestCModules.py
TestCPPThis.py
TestExprs2.py
TestOverloadedFunctions.py
TestRvalueReferences.py

And fixing the underlying issue is tracked in http://llvm.org/pr24489

llvm-svn: 245338
2015-08-18 20:01:28 +00:00
Aaron Ballman 11825f2592 Add AST narrowing matchers for inline and anonymous namespaces. Since the inline keyword can also be specified on a FunctionDecl, this is a polymorphic matcher.
llvm-svn: 245337
2015-08-18 19:55:20 +00:00
Marshall Clow 29f11b381f Broke C++03 compatibility in 245330. Fix that.
llvm-svn: 245336
2015-08-18 19:51:37 +00:00
Eric Fiselier 0d28f78401 [libcxx] Fix PR23589: std::function doesn't recognize null pointer to varargs function.
Summary:
This patch fixes __not_null's detection of nullptr by breaking it down into 4 cases.

1. `__not_null(Tp const&)`: Default case. Tp is not null.
2. `__not_null(Tp* __ptr);` Case for pointers to functions.
3. `__not_null(_Ret _Class::* __ptr);` Case for pointers to members.
4. `__not_null(function<Tp> const&);`: Cases for other std::functions.

Reviewers: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 245335
2015-08-18 19:41:51 +00:00
Eric Fiselier 4504cf2c8d [libc++] Fix PR22606 - Leak pthread_key with static storage duration to ensure all of thread-local destructors are called.
Summary:
See https://llvm.org/bugs/show_bug.cgi?id=22606 for more discussion.

Most of the changes in this patch are file reorganization to help ensure assumptions about how __thread_specific_pointer is used hold. The assumptions are:

* `__thread_specific_ptr<Tp>` is only created with a `__thread_struct` pointer.
* `__thread_specific_ptr<Tp>` can only be constructed inside the `__thread_local_data()` function.

I'll remove the comments before committing. They are there for clarity during review.

Reviewers: earthdok, mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 245334
2015-08-18 19:40:38 +00:00
Eric Fiselier 556f9340f7 [libcxx] Disable -Wnon-virtual-dtor warning in <locale>
Summary:
Normally people won't see warnings in libc++ headers, but if they compile with "-Wsystem-headers -Wnon-virtual-dtor" they will likely see issues in <locale>.

In the libc++ implementation `time_get' has a private base class, `__time_get_c_storage`, with virtual methods but a non-virtual destructor. 
`time_get` itself can safely be used as a polymorphic base class because it inherits a virtual destructor from `locale::facet`. To placate the compiler we change `__time_get_c_storage`'s destructor from public to protected, ensuring that it will never be deleted polymorphically.

Reviewers: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 245333
2015-08-18 19:39:35 +00:00
Aaron Ballman 519ec4b9be Removing useless whitespace; NFC.
llvm-svn: 245332
2015-08-18 19:11:07 +00:00
David Majnemer 0ad363eebc [WinEH] Calculate state numbers for the new EH representation
State numbers are calculated by performing a walk from the innermost
funclet to the outermost funclet.   Rudimentary support for the new EH
constructs has been added to the assembly printer, just enough to test
the new machinery.

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

llvm-svn: 245331
2015-08-18 19:07:12 +00:00
Marshall Clow 1378a5aec3 implement more of N4258 - Cleaning up noexcept in the standard library. Specifically add new noexcept stuff to vector and string's move-assignment operations
llvm-svn: 245330
2015-08-18 18:57:00 +00:00
Matthias Braun d55bcf2646 MachineRegisterInfo: Introduce isPhysRegUsed()
This method checks whether a physical regiser or any of its aliases are
used in the function.

Using this function in SIRegisterInfo::findUnusedReg() should also fix
this reported failure:

http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150803/292143.html
http://reviews.llvm.org/rL242173#inline-533

The report doesn't come with a testcase and I don't know enough about
AMDGPU to create one myself.

llvm-svn: 245329
2015-08-18 18:54:27 +00:00
Chandler Carruth 2f02ea462c [LPM] Cleanup some loops to be range based for loops before hacking on
this code. NFC.

llvm-svn: 245327
2015-08-18 18:41:53 +00:00
Chris Bieneman d8b76ce3bf [CMake] Backing out part of r245317. Turns out safestack and profile don't work correctly on the iOS simulator and enabling it breaks tests.
llvm-svn: 245326
2015-08-18 18:35:18 +00:00
Nico Weber da99734d89 Revert r243752, it broke running tests on OS X (PR24491).
llvm-svn: 245325
2015-08-18 18:29:33 +00:00
Chandler Carruth 7819a65425 [LPM] Group the addPreserved template with the non-template variants,
NFC.

llvm-svn: 245324
2015-08-18 18:18:37 +00:00
George Burgess IV 232c76213d Make __builtin_object_size always answer correctly
__builtin_object_size would return incorrect answers for many uses where
type=3. This fixes the inaccuracy by making us emit 0 instead of LLVM's
objectsize intrinsic.

Additionally, there are many cases where we would emit suboptimal (but
correct) answers, such as when arrays are involved. This patch fixes
some of these cases (please see new tests in test/CodeGen/object-size.c
for specifics on which cases are improved)

Patch mostly by Richard Smith.
Differential Revision: http://reviews.llvm.org/D12000
This fixes PR15212.

llvm-svn: 245323
2015-08-18 18:18:27 +00:00
Lang Hames 09bf4c102f [Kaleidoscope] Start C++11'ifying the kaleidoscope tutorials.
llvm-svn: 245322
2015-08-18 18:11:06 +00:00
Dan Albert b5226576ea Implement __aeabi_{f,d}rsub.
Summary: Implement the missing ARM EABI functions _aeabi_frsub and __aeabi_drsub.

Reviewers: rengolin, compnerd

Subscribers: pirama, srhines, danalbert, aemerson, llvm-commits

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

llvm-svn: 245321
2015-08-18 18:10:33 +00:00