platform/upstream/llvm.git
10 years agoThread Safety Analysis: minor changes to TIL pretty-printing.
DeLesley Hutchins [Thu, 29 May 2014 20:28:53 +0000 (20:28 +0000)]
Thread Safety Analysis: minor changes to TIL pretty-printing.

llvm-svn: 209842

10 years agoAdd documentation for -Rpass*
Diego Novillo [Thu, 29 May 2014 20:13:27 +0000 (20:13 +0000)]
Add documentation for -Rpass*

Summary:
This adds documentation for -Rpass, -Rpass-missed and -Rpass-analysis.
It also adds release notes for 3.5.

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 209841

10 years agoUpdate Credits.
Chad Rosier [Thu, 29 May 2014 19:59:58 +0000 (19:59 +0000)]
Update Credits.

llvm-svn: 209840

10 years agoAdd flags -Rpass-missed and -Rpass-analysis.
Diego Novillo [Thu, 29 May 2014 19:55:06 +0000 (19:55 +0000)]
Add flags -Rpass-missed and -Rpass-analysis.

Summary:
These two flags are in the same family as -Rpass, but are used in
different situations.

-Rpass-missed is used by optimizers to inform the user when they tried
to apply an optimization but couldn't (or wouldn't).

-Rpass-analysis is used by optimizers to report analysis results back
to the user (e.g., why the transformation could not be applied).

Depends on D3682.

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 209839

10 years agoimplement missing SCEVDivision case
Sebastian Pop [Thu, 29 May 2014 19:44:09 +0000 (19:44 +0000)]
implement missing SCEVDivision case

without this case we would end on an infinite recursion: the remainder is zero,
so Numerator - Remainder is equal to Numerator and so we would recursively ask
for the division of Numerator by Denominator.

llvm-svn: 209838

10 years agofail to find dimensions when ElementSize is nullptr
Sebastian Pop [Thu, 29 May 2014 19:44:05 +0000 (19:44 +0000)]
fail to find dimensions when ElementSize is nullptr

when ScalarEvolution::getElementSize returns nullptr it is safe to early return
in ScalarEvolution::findArrayDimensions such that we avoid later problems when
we try to divide the terms by ElementSize.

llvm-svn: 209837

10 years agoMake the -mno-global-merge option work for arm64/aarch64. rdar://17024719
Bob Wilson [Thu, 29 May 2014 19:43:02 +0000 (19:43 +0000)]
Make the -mno-global-merge option work for arm64/aarch64. rdar://17024719

llvm-svn: 209836

10 years agolight up sanitizers for ARM
Greg Fitzgerald [Thu, 29 May 2014 19:01:32 +0000 (19:01 +0000)]
light up sanitizers for ARM

You can expect the sanitizers to be built under any of the following conditions:

1) CMAKE_C_COMPILER is GCC built to cross-compile to ARM
2) CMAKE_C_COMPILER is Clang built to cross-compile to ARM (ARM is default target)
3) CMAKE_C_COMPILER is Clang and CMAKE_C_FLAGS contains -target and --sysroot

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

llvm-svn: 209835

10 years agoUse range-based for loops in ASan, TSan and MSan
Alexey Samsonov [Thu, 29 May 2014 18:40:48 +0000 (18:40 +0000)]
Use range-based for loops in ASan, TSan and MSan

llvm-svn: 209834

10 years agoFixed the Module::Module(ModuleSpec) constructor to properly copy the file offset...
Greg Clayton [Thu, 29 May 2014 17:52:46 +0000 (17:52 +0000)]
Fixed the Module::Module(ModuleSpec) constructor to properly copy the file offset and object file mod time from the actual module specifications so we will always be able to directly load the image we care about when calling Module::GetObjectFile().

llvm-svn: 209833

10 years ago[ADT] Delete the Twine assignment operator
Reid Kleckner [Thu, 29 May 2014 17:12:05 +0000 (17:12 +0000)]
[ADT] Delete the Twine assignment operator

This makes it slightly harder to misuse Twines.  It is still possible to
refer to destroyed temporaries with the regular constructors, though.

Patch by Marco Alesiani!

llvm-svn: 209832

10 years agoMake runlines consistent with other dll attribute tests
Nico Rieck [Thu, 29 May 2014 16:57:34 +0000 (16:57 +0000)]
Make runlines consistent with other dll attribute tests

llvm-svn: 209831

10 years agoFix some minor typos in tests
Nico Rieck [Thu, 29 May 2014 16:57:18 +0000 (16:57 +0000)]
Fix some minor typos in tests

llvm-svn: 209830

10 years agoDebug Info: Remove unused code. The MInsn of an _abstract_ variable is
Adrian Prantl [Thu, 29 May 2014 16:56:48 +0000 (16:56 +0000)]
Debug Info: Remove unused code. The MInsn of an _abstract_ variable is
never used again and updating the abstract variable for each inlined
instance of it was questionable in the first place.

llvm-svn: 209829

10 years agoAdd missing -S to avoid invoking assembler unnecessarily.
Diego Novillo [Thu, 29 May 2014 16:52:06 +0000 (16:52 +0000)]
Add missing -S to avoid invoking assembler unnecessarily.

llvm-svn: 209828

10 years agoSema: Functions with dll attributes cannot be deleted
Nico Rieck [Thu, 29 May 2014 16:51:19 +0000 (16:51 +0000)]
Sema: Functions with dll attributes cannot be deleted

llvm-svn: 209827

10 years agoMS ABI: Emit static data members with proper linkage
Nico Rieck [Thu, 29 May 2014 16:50:46 +0000 (16:50 +0000)]
MS ABI: Emit static data members with proper linkage

llvm-svn: 209826

10 years agoSema: Check dll attributes on static data members
Nico Rieck [Thu, 29 May 2014 16:50:20 +0000 (16:50 +0000)]
Sema: Check dll attributes on static data members

Redeclarations cannot add a dll attribute and static data members cannot
be defined.

llvm-svn: 209825

10 years agoNo longer allow the -std options to entirely override the -x language option. This...
Aaron Ballman [Thu, 29 May 2014 16:39:42 +0000 (16:39 +0000)]
No longer allow the -std options to entirely override the -x language option. This allows -x cuda -std=c++11, for instance.

llvm-svn: 209824

10 years agoFix spurious remarks when -Weverything is used.
Diego Novillo [Thu, 29 May 2014 16:19:27 +0000 (16:19 +0000)]
Fix spurious remarks when -Weverything is used.

With -Weverything, the backend remarks are enabled. This was
causing spurious diagnostics for remarks that we don't yet
handle (cf http://reviews.llvm.org/D3683).

This will stop being a problem once http://reviews.llvm.org/D3683
is committed.

llvm-svn: 209823

10 years agoRename alias variables to make it easier to add new tests to the file.
Rafael Espindola [Thu, 29 May 2014 16:16:12 +0000 (16:16 +0000)]
Rename alias variables to make it easier to add new tests to the file.

llvm-svn: 209822

10 years ago[PPC] Use alias symbols in address computation.
Rafael Espindola [Thu, 29 May 2014 15:41:38 +0000 (15:41 +0000)]
[PPC] Use alias symbols in address computation.

This seems to match what gcc does for ppc and what every other llvm
backend does.

This is a fixed version of r209638. The difference is to avoid any change
in behavior for functions. The logic for using constant pools for function
addresseses is spread over a few places and we have to keep them in sync.

llvm-svn: 209821

10 years agoAdd a test showing the ppc code sequence for getting a function pointer.
Rafael Espindola [Thu, 29 May 2014 15:13:23 +0000 (15:13 +0000)]
Add a test showing the ppc code sequence for getting a function pointer.

This would have found the miscompile in r209638.

llvm-svn: 209820

10 years agofix typo
Nico Weber [Thu, 29 May 2014 14:58:38 +0000 (14:58 +0000)]
fix typo

llvm-svn: 209819

10 years ago[sanitizer] Update flags test.
Evgeniy Stepanov [Thu, 29 May 2014 14:55:12 +0000 (14:55 +0000)]
[sanitizer] Update flags test.

llvm-svn: 209818

10 years agoRevert "Revert "Revert "InstCombine: Improvement to check if signed addition overflow...
Rafael Espindola [Thu, 29 May 2014 14:39:16 +0000 (14:39 +0000)]
Revert "Revert "Revert "InstCombine: Improvement to check if signed addition overflows."""

This reverts commit r209776.

It was miscompiling llvm::SelectionDAGISel::MorphNode.

llvm-svn: 209817

10 years agoParsing/Sema for OMPAlignedClause.
Alexander Musman [Thu, 29 May 2014 14:36:25 +0000 (14:36 +0000)]
Parsing/Sema for OMPAlignedClause.

llvm-svn: 209816

10 years ago[sanitizer] Add coverage_dir flag.
Evgeniy Stepanov [Thu, 29 May 2014 14:33:16 +0000 (14:33 +0000)]
[sanitizer] Add coverage_dir flag.

llvm-svn: 209815

10 years ago[sanitizer] Require that options end with '='.
Evgeniy Stepanov [Thu, 29 May 2014 14:32:32 +0000 (14:32 +0000)]
[sanitizer] Require that options end with '='.

llvm-svn: 209814

10 years agotsan: write memory profile in one line (which is much more readable)
Dmitry Vyukov [Thu, 29 May 2014 14:11:38 +0000 (14:11 +0000)]
tsan: write memory profile in one line (which is much more readable)
e.g.:
RSS 420 MB: shadow:35 meta:231 file:2 mmap:129 trace:19 heap:0 other:0 nthr=1/31
RSS 365 MB: shadow:3 meta:231 file:2 mmap:106 trace:19 heap:0 other:0 nthr=1/31
RSS 429 MB: shadow:23 meta:234 file:2 mmap:143 trace:19 heap:6 other:0 nthr=1/31
RSS 509 MB: shadow:78 meta:241 file:2 mmap:147 trace:19 heap:19 other:0 nthr=1/31

llvm-svn: 209813

10 years agoRefactoring. Remove Owned method from Sema.
Nikola Smiljanic [Thu, 29 May 2014 14:05:12 +0000 (14:05 +0000)]
Refactoring. Remove Owned method from Sema.

llvm-svn: 209812

10 years agotsan: allow to write memory profile to stdout/stderr
Dmitry Vyukov [Thu, 29 May 2014 14:02:06 +0000 (14:02 +0000)]
tsan: allow to write memory profile to stdout/stderr

llvm-svn: 209811

10 years agotsan: refactor storage of meta information for heap blocks and sync objects
Dmitry Vyukov [Thu, 29 May 2014 13:50:54 +0000 (13:50 +0000)]
tsan: refactor storage of meta information for heap blocks and sync objects
The new storage (MetaMap) is based on direct shadow (instead of a hashmap + per-block lists).
This solves a number of problems:
 - eliminates quadratic behaviour in SyncTab::GetAndLock (https://code.google.com/p/thread-sanitizer/issues/detail?id=26)
 - eliminates contention in SyncTab
 - eliminates contention in internal allocator during allocation of sync objects
 - removes a bunch of ad-hoc code in java interface
 - reduces java shadow from 2x to 1/2x
 - allows to memorize heap block meta info for Java and Go
 - allows to cleanup sync object meta info for Go
 - which in turn enabled deadlock detector for Go

llvm-svn: 209810

10 years agoFix r209807 which inadvertently removed things
Arnaud A. de Grandmaison [Thu, 29 May 2014 13:42:17 +0000 (13:42 +0000)]
Fix r209807 which inadvertently removed things

llvm-svn: 209809

10 years agoFixing a test case which was failing the MSVC build bots. When -std isn't specified...
Aaron Ballman [Thu, 29 May 2014 12:59:11 +0000 (12:59 +0000)]
Fixing a test case which was failing the MSVC build bots. When -std isn't specified with an MSVC build, it defaults to -std=c++11, which overrides the -x cuda option. In turn, this causes all CUDA language option checks to fail.

This fix is possibly temporary while we determine whether -x cuda should be considered along with -std=c++11 when setting language options.

llvm-svn: 209808

10 years agoFix build. Method was renamed in r209800.
Nikola Smiljanic [Thu, 29 May 2014 12:38:17 +0000 (12:38 +0000)]
Fix build. Method was renamed in r209800.

llvm-svn: 209807

10 years ago[ASan Win tests] Add a couple more memcpy/memset tests
Timur Iskhodzhanov [Thu, 29 May 2014 12:15:17 +0000 (12:15 +0000)]
[ASan Win tests] Add a couple more memcpy/memset tests

llvm-svn: 209806

10 years agoSupport getting executable's name for sanitizers needs on FreeBSD
Viktor Kutuzov [Thu, 29 May 2014 12:12:42 +0000 (12:12 +0000)]
Support getting executable's name for sanitizers needs on FreeBSD

llvm-svn: 209805

10 years agoFix building 32-bit common sanitizer tests on FreeBSD 9.2
Viktor Kutuzov [Thu, 29 May 2014 11:35:05 +0000 (11:35 +0000)]
Fix building 32-bit common sanitizer tests on FreeBSD 9.2

llvm-svn: 209804

10 years agoRestore getInvertedCondCode() from the phased-out backend, fixing disassembly for NV
Artyom Skrobov [Thu, 29 May 2014 11:34:50 +0000 (11:34 +0000)]
Restore getInvertedCondCode() from the phased-out backend, fixing disassembly for NV

llvm-svn: 209803

10 years agoAdd missing check when MatchInstructionImpl() reports failure
Artyom Skrobov [Thu, 29 May 2014 11:26:15 +0000 (11:26 +0000)]
Add missing check when MatchInstructionImpl() reports failure

llvm-svn: 209802

10 years ago[elf2yaml][ELF] Move Info field to the RelocationSection structure. This
Simon Atanasyan [Thu, 29 May 2014 11:05:31 +0000 (11:05 +0000)]
[elf2yaml][ELF] Move Info field to the RelocationSection structure. This
field represents ELF section header sh_info field and does not have any
sense for regular sections. Its interpretation depends on section type.

llvm-svn: 209801

10 years agoRefactoring. Remove release and take methods from ActionResult. Rename takeAs to...
Nikola Smiljanic [Thu, 29 May 2014 10:55:11 +0000 (10:55 +0000)]
Refactoring. Remove release and take methods from ActionResult. Rename takeAs to getAs.

llvm-svn: 209800

10 years agoRename a test case to contain correct date info.
Hao Liu [Thu, 29 May 2014 09:21:23 +0000 (09:21 +0000)]
Rename a test case to contain correct date info.

llvm-svn: 209799

10 years agoFix an assertion failure caused by v1i64 in DAGCombiner Shrink.
Hao Liu [Thu, 29 May 2014 09:19:07 +0000 (09:19 +0000)]
Fix an assertion failure caused by v1i64 in DAGCombiner Shrink.

llvm-svn: 209798

10 years agoLCSSA should be performed on the outermost affected loop while unrolling loop.
Dinesh Dwivedi [Thu, 29 May 2014 06:47:23 +0000 (06:47 +0000)]
LCSSA should be performed on the outermost affected loop while unrolling loop.

During loop-unroll, loop exits from the current loop may end up in in different
outer loop. This requires to re-form LCSSA recursively for one level down from
the outer most loop where loop exits are landed during unroll. This fixes PR18861.

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

llvm-svn: 209796

10 years agoLinux: Correctly identify valid error codes
David Majnemer [Thu, 29 May 2014 05:02:22 +0000 (05:02 +0000)]
Linux: Correctly identify valid error codes

[syserr.errcat.objects]p4 specifies that
system_category().default_error_condition(ev) map to
error_condition(posv, generic_category()) if ev could map to a POSIX
errno.

Linux reserves up to and including 4095 for errno values, use this as a
bound.

This fixes syserr.errcat.objects/system_category.pass.cpp on Linux.

llvm-svn: 209795

10 years agoWhen merging functions across modules (and in particular, instantiations of
Richard Smith [Thu, 29 May 2014 03:15:31 +0000 (03:15 +0000)]
When merging functions across modules (and in particular, instantiations of
member functions), ensure that the redecl chain never transitions from 'inline'
to 'not inline', since that violates an AST invariant.

llvm-svn: 209794

10 years agoImplement a convenience recursive walk method over a cursor and its descendants.
Eli Bendersky [Thu, 29 May 2014 02:35:27 +0000 (02:35 +0000)]
Implement a convenience recursive walk method over a cursor and its descendants.

Before r160106 there was a way to recursively visit all descendants of a cursor
via Cursor_visit, but it was removed. Since then, every user needs to
reimplement the recursive descent into get_children.

Adding a walk_preorder() method to Cursor that conveniently implements recursive
walking in a Pythonic way. This also greatly simplifies get_cursor and
get_cursors in tests/cindex/util.py (walk_preorder is now tested through these
utility functions, since they are used in many tests).

llvm-svn: 209793

10 years ago[LoadCombine] Missed a file.
Michael J. Spencer [Thu, 29 May 2014 02:05:37 +0000 (02:05 +0000)]
[LoadCombine] Missed a file.

llvm-svn: 209792

10 years agoAdd LoadCombine pass.
Michael J. Spencer [Thu, 29 May 2014 01:55:07 +0000 (01:55 +0000)]
Add LoadCombine pass.

This pass is disabled by default. Use -combine-loads to enable in -O[1-3]

Differential revision: http://reviews.llvm.org/D3580

llvm-svn: 209791

10 years ago[ASan] Hoist blacklisting globals from init-order checking to Clang.
Alexey Samsonov [Thu, 29 May 2014 01:44:13 +0000 (01:44 +0000)]
[ASan] Hoist blacklisting globals from init-order checking to Clang.

Clang knows about the sanitizer blacklist and it makes no sense to
add global to the list of llvm.asan.dynamically_initialized_globals if it
will be blacklisted in the instrumentation pass anyway. Instead, we should
do as much blacklisting as possible (if not all) in the frontend.

llvm-svn: 209790

10 years ago[ASan] Hoist blacklisting globals from init-order checking to Clang.
Alexey Samsonov [Thu, 29 May 2014 01:43:53 +0000 (01:43 +0000)]
[ASan] Hoist blacklisting globals from init-order checking to Clang.

Clang knows about the sanitizer blacklist and it makes no sense to
add global to the list of llvm.asan.dynamically_initialized_globals if it
will be blacklisted in the instrumentation pass anyway. Instead, we should
do as much blacklisting as possible (if not all) in the frontend.

llvm-svn: 209789

10 years ago[x86] Fold extract_vector_elt of a load into the Load's address computation.
Michael J. Spencer [Thu, 29 May 2014 01:42:45 +0000 (01:42 +0000)]
[x86] Fold extract_vector_elt of a load into the Load's address computation.

An address only use of an extract element of a load can be simplified to a
load. Without this the result of the extract element is spilled to the
stack so that an address is available.

llvm-svn: 209788

10 years agoR600/SI: Fix pattern variable names.
Matt Arsenault [Thu, 29 May 2014 01:18:01 +0000 (01:18 +0000)]
R600/SI: Fix pattern variable names.

These are confusing enough since the order swaps,
so give them more useful names.

llvm-svn: 209787

10 years agoPR19878: If a pack expansion appears within another pack expansion, correctly
Richard Smith [Thu, 29 May 2014 01:12:14 +0000 (01:12 +0000)]
PR19878: If a pack expansion appears within another pack expansion, correctly
deduce any packs that are expanded by both expansions.

llvm-svn: 209786

10 years agoFix a problem exposed by r208825, which caused bind (and other bits of libc++) to...
Marshall Clow [Thu, 29 May 2014 01:10:28 +0000 (01:10 +0000)]
Fix a problem exposed by r208825, which caused bind (and other bits of libc++) to stop working. And tests

llvm-svn: 209785

10 years agoFix typo in variable name
Alexey Samsonov [Thu, 29 May 2014 01:10:14 +0000 (01:10 +0000)]
Fix typo in variable name

llvm-svn: 209784

10 years agoAdd __extenddftf2 and __extendsftf2 for IEEE quad precision.
Joerg Sonnenberger [Thu, 29 May 2014 01:00:39 +0000 (01:00 +0000)]
Add __extenddftf2 and __extendsftf2 for IEEE quad precision.

Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D2802

llvm-svn: 209783

10 years agoImplement __trunctfdf2 and __trunctfsf2 for IEEE quad precision.
Joerg Sonnenberger [Thu, 29 May 2014 00:58:27 +0000 (00:58 +0000)]
Implement __trunctfdf2 and __trunctfsf2 for IEEE quad precision.

Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D2803

llvm-svn: 209782

10 years agoRefactor extendsfdf2.
Joerg Sonnenberger [Thu, 29 May 2014 00:54:26 +0000 (00:54 +0000)]
Refactor extendsfdf2.

Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D3887

llvm-svn: 209781

10 years ago[ASan] Use llvm.global_ctors to insert init-order checking calls into ASan runtime.
Alexey Samsonov [Thu, 29 May 2014 00:51:15 +0000 (00:51 +0000)]
[ASan] Use llvm.global_ctors to insert init-order checking calls into ASan runtime.

Don't assume that dynamically initialized globals are all initialized from
_GLOBAL__<module_name>I_ function. Instead, scan the llvm.global_ctors and
insert poison/unpoison calls to each function there.

Patch by Nico Weber!

llvm-svn: 209780

10 years agoRefactor truncdfsf2.
Joerg Sonnenberger [Thu, 29 May 2014 00:49:57 +0000 (00:49 +0000)]
Refactor truncdfsf2.

Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D3888

llvm-svn: 209779

10 years agoMoved the builtins documentation to lib/builtins/
Greg Fitzgerald [Wed, 28 May 2014 23:09:45 +0000 (23:09 +0000)]
Moved the builtins documentation to lib/builtins/

And fixed typos in the ASan readme.

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

llvm-svn: 209778

10 years agoAdd a simple helper function to create a 64-bit integer.
Reid Kleckner [Wed, 28 May 2014 22:49:12 +0000 (22:49 +0000)]
Add a simple helper function to create a 64-bit integer.

Add a function to combine two 32-bit integers into a 64-bit integer.
There are no calls to this function yet, although a subsequent change
will add some in LLDB.

Reviewers: rnk

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

llvm-svn: 209777

10 years agoRevert "Revert "InstCombine: Improvement to check if signed addition overflows.""
Rafael Espindola [Wed, 28 May 2014 21:43:52 +0000 (21:43 +0000)]
Revert "Revert "InstCombine: Improvement to check if signed addition overflows.""

This reverts commit r209762, bringing back r209746. It was not responsible for the libc++ build failure

llvm-svn: 209776

10 years agoRevert "Add support for combining GEPs across PHI nodes"
Rafael Espindola [Wed, 28 May 2014 21:41:21 +0000 (21:41 +0000)]
Revert "Add support for combining GEPs across PHI nodes"

This reverts commit r209755.

it was the real cause of the libc++ build failure.

llvm-svn: 209775

10 years agoThread Safety Analysis: update TIL traversal mechanism to allow arbitrary
DeLesley Hutchins [Wed, 28 May 2014 21:28:13 +0000 (21:28 +0000)]
Thread Safety Analysis: update TIL traversal mechanism to allow arbitrary
local contexts.  Also includes some minor refactoring.

llvm-svn: 209774

10 years ago[Sanitizer] Always prefer cached contents of /proc/self/exe if it's available
Alexey Samsonov [Wed, 28 May 2014 21:23:53 +0000 (21:23 +0000)]
[Sanitizer] Always prefer cached contents of /proc/self/exe if it's available

llvm-svn: 209773

10 years agoFix wrong setcc result type when legalizing uaddo/usubo
Matt Arsenault [Wed, 28 May 2014 20:51:42 +0000 (20:51 +0000)]
Fix wrong setcc result type when legalizing uaddo/usubo

No test because no in-tree targets change the bitwidth of the
setcc type depending on the bitwidth of the compared type.

Patch by Ke Bai

llvm-svn: 209771

10 years agoUpdate CREDITS to be at least moderately more current.
Jim Grosbach [Wed, 28 May 2014 20:31:52 +0000 (20:31 +0000)]
Update CREDITS to be at least moderately more current.

llvm-svn: 209770

10 years agoadded Intel's BMI intrinsic variants
Sanjay Patel [Wed, 28 May 2014 20:26:57 +0000 (20:26 +0000)]
added Intel's BMI intrinsic variants
(fixes PR19431 - http://llvm.org/bugs/show_bug.cgi?id=19431)

llvm-svn: 209769

10 years agofixed a few typos
Sanjay Patel [Wed, 28 May 2014 20:07:37 +0000 (20:07 +0000)]
fixed a few typos

llvm-svn: 209768

10 years agoExpose CUDA function attributes to the C interface.
Eli Bendersky [Wed, 28 May 2014 19:29:58 +0000 (19:29 +0000)]
Expose CUDA function attributes to the C interface.

Until now all CUDA-specific attributes were represented with
CXCursor_UnexposedAttr; now they are actually implemented, including the Python
bindings.

llvm-svn: 209767

10 years agoReverting 209503 - Breaks asan blacklists
Warren Hunt [Wed, 28 May 2014 19:17:45 +0000 (19:17 +0000)]
Reverting 209503 - Breaks asan blacklists
I opened a discussion on cfe-commits.  Ideally we've got a few things
that need to happen.  CompilerRT should probably have blacklists tests.
Asan should probably not depend on that specific field.

llvm-svn: 209766

10 years agoDebug Info: Fix the source range for IfStmt's ConditionScope.
Adrian Prantl [Wed, 28 May 2014 19:10:59 +0000 (19:10 +0000)]
Debug Info: Fix the source range for IfStmt's ConditionScope.
Since the continuation block of the if statement is emitted within the
condition scope this had the undesirable effect of creating a line table
entry at the end of the then or else statement, a line that may have never
been executed.
PR19864 / rdar://problem/17052973

llvm-svn: 209764

10 years agotest check-in: added missing parenthesis in comment
Sanjay Patel [Wed, 28 May 2014 19:03:33 +0000 (19:03 +0000)]
test check-in: added missing parenthesis in comment

llvm-svn: 209763

10 years agoRevert "InstCombine: Improvement to check if signed addition overflows."
Rafael Espindola [Wed, 28 May 2014 18:48:10 +0000 (18:48 +0000)]
Revert "InstCombine: Improvement to check if signed addition overflows."

This reverts commit r209746.

It looks it is causing a crash while building libcxx. I am trying to get a
reduced testcase.

llvm-svn: 209762

10 years agoMove misplaced Documentation note in Attr.td
Reid Kleckner [Wed, 28 May 2014 18:43:46 +0000 (18:43 +0000)]
Move misplaced Documentation note in Attr.td

llvm-svn: 209761

10 years agoFix standard integer definitions for MSVC in DataTypes.h
Reid Kleckner [Wed, 28 May 2014 18:19:55 +0000 (18:19 +0000)]
Fix standard integer definitions for MSVC in DataTypes.h

Previously, DataTypes.h would #define a variety of symbols any time
they weren't already defined.  However, some versions of Visual
Studio do provide the appropriate headers, so if those headers are
included after DataTypes.h, it can lead to macro redefinition
warnings.

The fix is to include the appropriate headers if they exist, and
only #define the symbols if the required header does not exist.

Patch by Zachary Turner!

---

The big change here is that we no longer have our own stdint.h
typedefs because now all supported toolchains have stdint.h.
Hooray!

llvm-svn: 209760

10 years ago[pr19844] Add thread local mode to aliases.
Rafael Espindola [Wed, 28 May 2014 18:15:43 +0000 (18:15 +0000)]
[pr19844] Add thread local mode to aliases.

This matches gcc's behavior. It also seems natural given that aliases
contain other properties that govern how it is accessed (linkage,
visibility, dll storage).

Clang still has to be updated to expose this feature to C.

llvm-svn: 209759

10 years agoObjective-C. Diagnose use of properties in functions nested in,
Fariborz Jahanian [Wed, 28 May 2014 18:12:10 +0000 (18:12 +0000)]
Objective-C. Diagnose use of properties in functions nested in,
now deprecated, ObjC containers instead of crashing.
// rdar://16859666

llvm-svn: 209758

10 years agotsan: refactor suppressions machinery
Dmitry Vyukov [Wed, 28 May 2014 18:03:32 +0000 (18:03 +0000)]
tsan: refactor suppressions machinery
The refactoring makes suppressions more flexible
and allow to suppress based on arbitrary number of stacks.
In particular it fixes:
https://code.google.com/p/thread-sanitizer/issues/detail?id=64
"Make it possible to suppress deadlock reports by any stack (not just first)"

llvm-svn: 209757

10 years agoDisabled warning C4251 on MSVC builds.
Todd Fiala [Wed, 28 May 2014 17:58:29 +0000 (17:58 +0000)]
Disabled warning C4251 on MSVC builds.

See http://reviews.llvm.org/D3934 for more details.
This is only the CMakeLists.txt portion of that change.

Change by Zachary Turner.

llvm-svn: 209756

10 years agoAdd support for combining GEPs across PHI nodes
Louis Gerbarg [Wed, 28 May 2014 17:38:31 +0000 (17:38 +0000)]
Add support for combining GEPs across PHI nodes

Currently LLVM will generally merge GEPs. This allows backends to use more
complex addressing modes. In some cases this is not happening because there
is PHI inbetween the two GEPs:

  GEP1--\
        |-->PHI1-->GEP3
  GEP2--/

This patch checks to see if GEP1 and GEP2 are similiar enough that they can be
cloned (GEP12) in GEP3's BB, allowing GEP->GEP merging (GEP123):

  GEP1--\                     --\                           --\
        |-->PHI1-->GEP3  ==>    |-->PHI2->GEP12->GEP3 == >    |-->PHI2->GEP123
  GEP2--/                     --/                           --/

This also breaks certain use chains that are preventing GEP->GEP merges that the
the existing instcombine would merge otherwise.

Tests included.

llvm-svn: 209755

10 years agoTrim trailing whitespace in cindex.py
Eli Bendersky [Wed, 28 May 2014 17:35:14 +0000 (17:35 +0000)]
Trim trailing whitespace in cindex.py

llvm-svn: 209754

10 years agoAdded option for n-dimensional rectangular tiling
Johannes Doerfert [Wed, 28 May 2014 17:21:02 +0000 (17:21 +0000)]
Added option for n-dimensional rectangular tiling

+ CL-option --polly-tile-sizes=<int,...,int>
  The i'th value is used as a tile size for dimension i, if
  there is no i'th value, the value of --polly-default-tile-size is
  used

+ CL-option --polly-default-tile-size=int
  Used if no tile size is given for a dimension i

+ 3 Simple testcases

llvm-svn: 209753

10 years agoCmake build changes.
Todd Fiala [Wed, 28 May 2014 17:06:04 +0000 (17:06 +0000)]
Cmake build changes.

Disables exception handling in LLDB, using appropriate compiler
flags depending on the platform. This is consistent with the build
of LLVM, should improve performance, and also removes a substantial number
of warnings from the Windows build.

See http://reviews.llvm.org/D3929 for more details.

Change by Zachary Turner

llvm-svn: 209752

10 years agoObjective-C. Deprecate use of function definitions
Fariborz Jahanian [Wed, 28 May 2014 17:02:35 +0000 (17:02 +0000)]
Objective-C. Deprecate use of function definitions
in Objective-C container declarations (but not
in their definitions. // rdar://10414277

llvm-svn: 209751

10 years agoReorder cmake include folders (polly source first)
Johannes Doerfert [Wed, 28 May 2014 16:54:42 +0000 (16:54 +0000)]
Reorder cmake include folders (polly source first)

llvm-svn: 209750

10 years agoFix Windows warnings.
Todd Fiala [Wed, 28 May 2014 16:43:26 +0000 (16:43 +0000)]
Fix Windows warnings.

This fixes a number of trivial warnings in the Windows build. This is part of a larger effort to make the Windows build warning-free.

See http://reviews.llvm.org/D3914 for more details.

Change by Zachary Turner

llvm-svn: 209749

10 years agoRevert "[DAGCombiner] Split up an indexed load if only the base pointer value is...
Hal Finkel [Wed, 28 May 2014 15:33:19 +0000 (15:33 +0000)]
Revert "[DAGCombiner] Split up an indexed load if only the base pointer value is live"

This reverts r208640 (I've just XFAILed the test) because it broke ppc64/Linux
self-hosting. Because nearly every regression test triggers a segfault, I hope
this will be easy to fix.

llvm-svn: 209747

10 years agoInstCombine: Improvement to check if signed addition overflows.
Rafael Espindola [Wed, 28 May 2014 15:30:40 +0000 (15:30 +0000)]
InstCombine: Improvement to check if signed addition overflows.

This patch implements two things:

1. If we know one number is positive and another is negative, we return true as
   signed addition of two opposite signed numbers will never overflow.

2. Implemented TODO : If one of the operands only has one non-zero bit, and if
   the other operand has a known-zero bit in a more significant place than it
   (not including the sign bit) the ripple may go up to and fill the zero, but
   won't change the sign. e.x -  (x & ~4) + 1

We make sure that we are ignoring 0 at MSB.

Patch by Suyog Sarda.

llvm-svn: 209746

10 years agoRevert "[PPC] Use alias symbols in address computation."
Hal Finkel [Wed, 28 May 2014 15:25:06 +0000 (15:25 +0000)]
Revert "[PPC] Use alias symbols in address computation."

This reverts commit r209638 because it broke self-hosting on ppc64/Linux. (the
Clang-compiled TableGen would segfault because it jumped to an invalid address
from within _ZNK4llvm17ManagedStaticBase21RegisterManagedStaticEPFPvvEPFvS1_E
(which is within the command-line parameter registration process)).

llvm-svn: 209745

10 years agotsan: do not use 64-bit atomics in allocator code
Dmitry Vyukov [Wed, 28 May 2014 15:22:12 +0000 (15:22 +0000)]
tsan: do not use 64-bit atomics in allocator code
64-bit atomics make porting of asan to 32-bits platforms problematic.

llvm-svn: 209744

10 years agoRenamed runClangTidy argument Ranges to InputFiles, removed a TODO comment.
Alexander Kornienko [Wed, 28 May 2014 15:21:14 +0000 (15:21 +0000)]
Renamed runClangTidy argument Ranges to InputFiles, removed a TODO comment.
No functional changes.

llvm-svn: 209743

10 years agoDon't hard-code ld when extracting host linker version, use ${LD} if
Joerg Sonnenberger [Wed, 28 May 2014 15:12:55 +0000 (15:12 +0000)]
Don't hard-code ld when extracting host linker version, use ${LD} if
it is set.

llvm-svn: 209742

10 years agoRefactor muldf3 and mulsf3.
Joerg Sonnenberger [Wed, 28 May 2014 15:08:05 +0000 (15:08 +0000)]
Refactor muldf3 and mulsf3.

Patch from: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D3886

llvm-svn: 209741

10 years agoRefactor addsf3.c and adddf3.c.
Joerg Sonnenberger [Wed, 28 May 2014 15:06:25 +0000 (15:06 +0000)]
Refactor addsf3.c and adddf3.c.

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

llvm-svn: 209740

10 years agoAvoid passing null signal name for Log %s argument
Ed Maste [Wed, 28 May 2014 14:11:20 +0000 (14:11 +0000)]
Avoid passing null signal name for Log %s argument

llvm-svn: 209739