Commit Graph

223208 Commits

Author SHA1 Message Date
Eric Fiselier 43b121df05 Rename <__hash_table> traits so they don't conflict with similar traits.
In particular <__tree> defines many of the same types of traits classes.

llvm-svn: 261421
2016-02-20 07:59:16 +00:00
David Majnemer 862c5ba302 Move some code from doInitialization to runOnFunction
This has no observable behavior change, it just makes the state
insertion pass look a little more like normal passes.

llvm-svn: 261420
2016-02-20 07:34:21 +00:00
Eric Fiselier 0594ad713b Remove all usages of "const" node pointer typedefs in the assoc containers.
The "const" pointer typedefs such as "__node_const_pointer" and
"__node_base_const_pointer" are identical to their non-const pointer types.
This patch changes all usages of "const" pointer type names to their respective
non-const typedef.

Since "fancy pointers to const" cannot be converted back to a non-const pointer
type according to the allocator requirements it is important that we never
actually use "const" pointers.

Furthermore since "__node_const_pointer" and "__node_pointer" already
name the same type, it's very confusing to use both names. Especially
when defining const/non-const overloads for member functions.

llvm-svn: 261419
2016-02-20 07:12:17 +00:00
Craig Topper f5ef3f9ce6 [X86] Remove some unused encoding checks from the disassembler table building.
llvm-svn: 261418
2016-02-20 06:20:21 +00:00
Craig Topper 2bf0c0394d [X86] Add some missing reversed forms of XOP instructions.
llvm-svn: 261417
2016-02-20 06:20:17 +00:00
Eric Fiselier 089a7cc5de Cleanup node-type handling in the associative containers.
This patch is very similar to r260431.

This patch is the first in a series of patches that's meant to better
support map. map has a special "value_type" that
differs from pair<const Key, Value>. In order to meet the EmplaceConstructible
and CopyInsertable requirements we need to teach __tree about this
special value_type.

This patch creates a "__tree_node_types" traits class that contains
all of the typedefs needed by the associative containers and their iterators.
These typedefs include ones for each node type and  node pointer type,
as well as special typedefs for "map"'s value type.

Although the associative containers already supported incomplete types, this
patch makes it official by adding tests.

This patch will be followed up shortly with various cleanups within __tree and
fixes for various map bugs and problems.

llvm-svn: 261416
2016-02-20 05:28:30 +00:00
Alexey Bataev 74caaf27d8 [OPENMP 4.5] Initial support for data members in 'lastprivate' clause.
OpenMP 4.5 allows to privatize non-static data members of current class
in non-static member functions. Patch adds initial support for data
members.

llvm-svn: 261412
2016-02-20 04:09:36 +00:00
Chandler Carruth c1dc384b54 [PM/AA] Wire up TBAA to the new pass manager's registry and test it.
llvm-svn: 261411
2016-02-20 04:04:52 +00:00
Chandler Carruth d6091a0344 [PM/AA] Wire up the scoped-no-alias AA to the new pass manager's
registry and test it.

llvm-svn: 261410
2016-02-20 04:03:06 +00:00
Chandler Carruth 2b3d0446f4 [PM/AA] Wire up SCEVAA to the new pass manager's registry and test it.
llvm-svn: 261409
2016-02-20 04:01:45 +00:00
Matthias Braun c65e904be8 MachineCopyPropagation: Introduce Reg2MIMap typedef; NFC
llvm-svn: 261408
2016-02-20 03:56:41 +00:00
Matthias Braun bd18d751de MachineCopyPropagation: Move variables from function to pass
This avoids unnecessarily passing them around when calling helper
functions. It may also be slightly faster to call clear() on the
datastructures instead of freshly initializing them for each block.

llvm-svn: 261407
2016-02-20 03:56:39 +00:00
Matthias Braun 273575dcbe MachineCopyPropagation: Use ranged for, cleanup; NFC
llvm-svn: 261406
2016-02-20 03:56:36 +00:00
Matthias Braun 57b5f11aa7 MachineCopyPropagation: Use assert() instead of if{report_error()} for 'impossible' condition
llvm-svn: 261405
2016-02-20 03:56:33 +00:00
Chandler Carruth 342c671b66 [PM/AA] Wire up CFLAA to the new pass manager fully, and port one of its
tests over to exercise this code.

This uncovered a few missing bits here and there in the analysis, but
nothing interesting.

llvm-svn: 261404
2016-02-20 03:52:02 +00:00
Chandler Carruth 4f846a5f15 [PM/AA] Port alias analysis evaluator to the new pass manager, and use
it to actually test the new pass manager AA wiring.

This patch was extracted from the (somewhat too large) D12357 and
rebosed on top of the slightly different design of the new pass manager
AA wiring that I just landed. With this we can start testing the AA in
a thorough way with the new pass manager.

Some minor cleanups to the code in the pass was necessitated here, but
otherwise it is a very minimal change.

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

llvm-svn: 261403
2016-02-20 03:46:03 +00:00
Hongbin Zheng 2ac7ee7139 Add more isl object printing functions
llvm-svn: 261402
2016-02-20 03:40:19 +00:00
Hongbin Zheng 86f43eab8b Assign meaningful name to MemoryAccess. NFC
Now the name of MemoryAccess is <StatementName>_[Read|Write|MayWrite]<Number>_<BaseName>,
e.g. Stmt_for_body_4_Read0_MemRef_A

llvm-svn: 261401
2016-02-20 03:40:15 +00:00
Mike Aizatsky 82657cf01a fixing msvc warning.
llvm-svn: 261396
2016-02-20 02:11:49 +00:00
Sanjoy Das a809db7c29 [SCEV] Don't spell `SCEV *` variables as `Scev`; NFC
I missed a spot in rL261393.

llvm-svn: 261395
2016-02-20 01:59:15 +00:00
Sanjoy Das 807d33da96 [SCEV] Don't spell `SCEV *` variables as `Scev`; NFC
It reads odd since most other places name a `SCEV *` as `S`.  Pure
renaming change.

llvm-svn: 261393
2016-02-20 01:44:10 +00:00
Sanjoy Das c42f7cc3f8 [SCEV] Don't use std::make_pair; NFC
`{A, B}` reads cleaner than `std::make_pair(A, B)`.

llvm-svn: 261392
2016-02-20 01:35:56 +00:00
Eric Fiselier 3d8a30a9db Work around GCC bug in .fail.cpp tests
llvm-svn: 261391
2016-02-20 01:11:55 +00:00
David Majnemer 1efa23ddab [SimplifyCFG] Merge together cleanuppads
Cleanuppads may be merged together if one is the only predecessor of the
other in which case a simple transform can be performed: replace the
a cleanupret with a branch and remove an unnecessary cleanuppad.

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

llvm-svn: 261390
2016-02-20 01:07:45 +00:00
Eugene Zelenko 26cac3af0b Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.
llvm-svn: 261389
2016-02-20 00:58:29 +00:00
David Majnemer 7a0d7d6be9 Remove a duplicate declaration specifier from _ReadBarrier
This fixes PR26675.

llvm-svn: 261388
2016-02-20 00:57:00 +00:00
Davide Italiano 228978c0dc [X86ISelLowering] Fix TLSADDR lowering when shrink-wrapping is enabled.
TLSADDR nodes are lowered into actuall calls inside MC. In order to prevent
shrink-wrapping from pushing prologue/epilogue past them (which result
in TLS variables being accessed before the stack frame is set up), we 
put markers, so that the stack gets adjusted properly.
Thanks to Quentin Colombet for guidance/help on how to fix this problem!

llvm-svn: 261387
2016-02-20 00:44:47 +00:00
Tom Stellard 467b5b9024 AMDGPU/SI: Use v_readfirstlane to legalize SMRD with VGPR base pointer
Summary:
Instead of trying to replace SMRD instructions with a VGPR base pointer
with an equivalent MUBUF instruction, we now copy the base pointer to
SGPRs using v_readfirstlane.

This is safe to do, because any load selected as an SMRD instruction
has been proven to have a uniform base pointer, so each thread in the
wave will have the same pointer value in VGPRs.

This will fix some errors on VI from trying to replace SMRD instructions
with addr64-enabled MUBUF instructions that don't exist.

Reviewers: arsenm, cfang, nhaehnle

Subscribers: arsenm, llvm-commits

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

llvm-svn: 261385
2016-02-20 00:37:25 +00:00
Quentin Colombet e611698e84 [RegAllocFast] Properly track the physical register definitions on calls.
PR26485

llvm-svn: 261384
2016-02-20 00:32:29 +00:00
Eric Fiselier 3dfec7580b Fix PR26622 - Make CheckLibcxxAtomic.cmake use the libc++ headers.
llvm-svn: 261383
2016-02-20 00:24:43 +00:00
Eric Fiselier 39c193b1f0 Make __wrap_iter work with GCC again
Summary:
This bug was originally fixed in http://reviews.llvm.org/D7201. 

However it was broken again by the fix to https://llvm.org/bugs/show_bug.cgi?id=22605.

This patch re-fixes __wrap_iter with GCC by providing a forward declaration of <vector> before the friend declaration in __wrap_iter.
This patch avoids the issues in PR22605 by putting canonical forward declarations in <iosfwd> and including <iosfwd> in <vector>.

<iosfwd> was chosen as the canonical forward declaration headers for the following reasons:

1. `<iosfwd>` is small with almost no dependancies.
2. It already forward declares `std::allocator`
3. It is already included in `<iterator>` which we need to fix the GCC bug.

This patch fixes the test "gcc_workaround.pass.cpp"

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

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

llvm-svn: 261382
2016-02-20 00:19:45 +00:00
Eric Fiselier a6b7ebe2cd Add stdbool.h wrapper for libc++
Summary:
According to the C++ standard <stdbool.h> isn't allowed to define `true` `false` or `bool`. However these macros are sometimes defined by the compilers `stdbool.h`.

Clang defines the macros whenever `__STRICT_ANSI__` isn't defined (ie `-std=gnu++11`).
New GCC versions define the macros in C++03 mode only, older GCC versions (4.9 and before) always define the macros.

This patch adds a wrapper header for `stdbool.h` that undefs the required macros.

Reviewers: mclow.lists, rsmith, EricWF

Subscribers: cfe-commits

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

llvm-svn: 261381
2016-02-20 00:16:41 +00:00
Reid Kleckner 344078f51f [codeview] Fix emission of file changes in inline line tables
These are supposed to be file checksum table offsets, not file ids.

llvm-svn: 261379
2016-02-19 23:55:38 +00:00
Chris Bieneman 953d593cd7 [CMake] Adding a CMake cache file that matches Apple's build configs
This should have no impact on anyone, but we're going to use it from GreenDragon to make our builders match what we ship.

llvm-svn: 261377
2016-02-19 22:59:18 +00:00
Mike Aizatsky 635ade9305 [sancov] use GetLoadedModules for list of modules rather than sanitizer's list.
llvm-svn: 261376
2016-02-19 22:55:21 +00:00
Mike Aizatsky b28eef39f7 [sancov] sanitizer html report cosmetic improvements.
llvm-svn: 261375
2016-02-19 22:55:08 +00:00
Rafael Espindola 6feecec0b0 Handle undef symbols in LTO.
This also handles bc files is archives.

llvm-svn: 261374
2016-02-19 22:50:16 +00:00
Richard Smith e5b5350d98 [modules] Do less scanning of macro definition chains when computing the set of
exported module macros outside local submodule visibility mode. Related to
PR24667.

llvm-svn: 261373
2016-02-19 22:43:58 +00:00
Richard Smith 7e82e019c6 [modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single
option. Previously these options could both be used to specify that you were
compiling the implementation file of a module, with a different set of minor
bugs in each case.

This change removes -fmodule-implementation-of, and instead tracks a flag to
determine whether we're currently building a module. -fmodule-name now behaves
the same way that -fmodule-implementation-of previously did.

llvm-svn: 261372
2016-02-19 22:25:36 +00:00
Davide Italiano a8f1f2efaf [X86ISelLowering] Provide a more informative assert message.
I stumbled upon this while debugging a lowering bug.

llvm-svn: 261371
2016-02-19 22:18:49 +00:00
Davide Italiano 4cfe2a9e38 [X86ISelLowering] Merge two conditions inside a single if.
llvm-svn: 261370
2016-02-19 22:01:07 +00:00
Hans Wennborg a0f7090563 Revert r255691 "[LoopVectorizer] Refine loop vectorizer's register usage calculator by ignoring specific instructions."
It caused PR26509.

llvm-svn: 261368
2016-02-19 21:40:12 +00:00
Hans Wennborg 7c3077ca52 Revert r253557 "Alternative to long nops for X86 CPUs, by Andrey Turetsky"
Turns out the new nop sequences aren't actually nops on x86_64 (PR26554).

llvm-svn: 261365
2016-02-19 21:26:31 +00:00
David Blaikie 852c02baf9 llvm-dwp: Improve performance (N^2 to amortized N) by using a MapVector instead of linear searches through a vector
Figured this would be a problem, but didn't want to jump the gun - large
inputs demonstrate it pretty easily (mostly for type units, but might as
well do the same for CUs too). A random sample 6m27s -> 27s change.

Also, by checking this up-front for CUs (rather than when building the
cu_index) we can probably provide better error messages (see FIXMEs),
hopefully providing the name of the CUs rather than just their
signature.

llvm-svn: 261364
2016-02-19 21:09:26 +00:00
Mike Aizatsky 361a7bb338 [sancov] requiring dynamic asan.
llvm-svn: 261362
2016-02-19 20:47:25 +00:00
Xinliang David Li 3d731c5e44 minor test runline cleanup
llvm-svn: 261361
2016-02-19 20:28:51 +00:00
Dimitry Andric db417b6d40 Fix incorrect selection of AVX512 sqrt when OptForSize is on
Summary:
When optimizing for size, sqrt calls can be incorrectly selected as
AVX512 VSQRT instructions.  This is because X86InstrAVX512.td has a
`Requires<[OptForSize]>` in its `avx512_sqrt_scalar` multiclass
definition.  Even if the target does not support AVX512, the class can
apparently still be chosen, leading to an incorrect selection of
`vsqrtss`.

In PR26625, this lead to an assertion: Reg >= X86::FP0 && Reg <=
X86::FP6 && "Expected FP register!", because the `vsqrtss` instruction
requires an XMM register, which is not available on i686 CPUs.

Reviewers: grosbach, resistor, joker.eph

Subscribers: spatel, emaste, llvm-commits

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

llvm-svn: 261360
2016-02-19 20:14:11 +00:00
Sanjoy Das ffb7bd11f7 [StatepointLowering] Minor non-semantic cleanups
Use auto, bring file up to coding standards etc.

llvm-svn: 261358
2016-02-19 19:37:07 +00:00
Eugene Zelenko c8ecc2a9fa Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.
llvm-svn: 261356
2016-02-19 19:33:46 +00:00
Ed Maste 28cbb8616e Remove expectedFailureFreeBSD decorator
All invocations are updated to use the generic expectedFailureAll.

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

llvm-svn: 261355
2016-02-19 19:25:03 +00:00