Commit Graph

209222 Commits

Author SHA1 Message Date
Adhemerval Zanella 15db6dc2fb [compiler-rt] [tsan] Enable TSan for AArch64/42-bit VMA
This patch adds support for tsan on aarch64-linux with 42-bit VMA
(current default config for 64K pagesize kernels).  The support is
enabled by defining the SANITIZER_AARCH64_VMA to 42 at build time
for both clang/llvm and compiler-rt.  The default VMA is 39 bits.

It also enabled tsan for previous supported VMA (39).

llvm-svn: 246330
2015-08-28 20:40:50 +00:00
Matthew Simpson 1006c91b5b Remove white space (test commit)
llvm-svn: 246329
2015-08-28 20:38:33 +00:00
Rafael Espindola cad82ccbb2 Split the gold tests into X86 and PowerPC directories.
Patch by Than McIntosh!

llvm-svn: 246328
2015-08-28 20:33:56 +00:00
Duncan P. N. Exon Smith 814b8e91c7 DI: Require subprogram definitions to be distinct
As a follow-up to r246098, require `DISubprogram` definitions
(`isDefinition: true`) to be 'distinct'.  Specifically, add an assembler
check, a verifier check, and bitcode upgrading logic to combat testcase
bitrot after the `DIBuilder` change.

While working on the testcases, I realized that
test/Linker/subprogram-linkonce-weak-odr.ll isn't relevant anymore.  Its
purpose was to check for a corner case in PR22792 where two subprogram
definitions match exactly and share the same metadata node.  The new
verifier check, requiring that subprogram definitions are 'distinct',
precludes that possibility.

I updated almost all the IR with the following script:

    git grep -l -E -e '= !DISubprogram\(.* isDefinition: true' |
    grep -v test/Bitcode |
    xargs sed -i '' -e 's/= \(!DISubprogram(.*, isDefinition: true\)/= distinct \1/'

Likely some variant of would work for out-of-tree testcases.

llvm-svn: 246327
2015-08-28 20:26:49 +00:00
Rafael Espindola 3a63f3fb22 Add support for weak absolute symbols.
On ELF being weak is independent of what we call the kind of the symbol. So
this also makes the code simpler.

llvm-svn: 246326
2015-08-28 20:19:34 +00:00
Aaron Ballman ed5e4ef853 Updated to make use of the AST matcher instead of a custom matcher; NFC.
llvm-svn: 246325
2015-08-28 19:40:30 +00:00
Aaron Ballman 6e14652550 Updating the AST matcher documentation with a new entry; NFC.
llvm-svn: 246324
2015-08-28 19:39:56 +00:00
Renato Golin b9365ae36a Revert "[X86][3DNow] Added debug codegen test for 3DNow! intrinsics"
This reverts commit r246223, as it broke all ARM/AArch64 bots.

llvm-svn: 246323
2015-08-28 19:39:29 +00:00
Aaron Ballman 6c79f352b8 Adding an AST matcher for namespaceAliasDecl.
llvm-svn: 246322
2015-08-28 19:39:21 +00:00
Renato Golin 0b4112341b Revert "[X86][XOP] Added debug codegen test for XOP intrinsics"
This reverts commit r246211, as it broke all ARM/AArch64 bots.

llvm-svn: 246321
2015-08-28 19:38:05 +00:00
Renato Golin a3265f5be7 Revert "[X86][FMA4] Added debug codegen test for FMA4 intrinsics"
This reverts commit r246206, as it broke all ARM/AArch64 bots.

llvm-svn: 246320
2015-08-28 19:36:27 +00:00
Renato Golin b44e54170e Revert "[X86][F16C] Added debug codegen test for F16C intrinsics"
This reverts commit r246204, as it was breaking all ARM/AArch64 bots.

llvm-svn: 246319
2015-08-28 19:34:53 +00:00
Aaron Ballman 327e97bb37 Disable clang-tidy misc checkers when not compiling in C++ mode. Many of the checkers do not require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct.
llvm-svn: 246318
2015-08-28 19:27:19 +00:00
Jonathan Peyton ff7da34bc3 Add kmp_config.h.cmake
In r246314 (Removing expand-vars.pl) patch, I forgot to add kmp_config.h.cmake
This patch just adds it.

llvm-svn: 246317
2015-08-28 19:24:39 +00:00
Sanjoy Das 9196733620 [IR] Add some asserts to CallInst and InvokeInst; NFCI.
The asserts check that accessors supposed to access call / invoke
arguments only ever access call / invoke arguments.

llvm-svn: 246316
2015-08-28 19:09:34 +00:00
Sanjoy Das 6f5dca70ed [InstCombine] Fix PR24605.
PR24605 is caused due to an incorrect insert point in instcombine's IR
builder.  When simplifying

  %t = add X Y
  ...
  %m = icmp ... %t

the replacement for %t should be placed before %t, not before %m, as
there could be a use of %t between %t and %m.

llvm-svn: 246315
2015-08-28 19:09:31 +00:00
Jonathan Peyton c0225ca276 [OpenMP] [CMake] Removing expand-vars.pl in favor of CMake's configure_file()
Currently, the libomp CMake build system uses a Perl script to configure files
(tools/expand-vars.pl). This patch replaces the use of the Perl script by using
CMake's configure_file() function. The major changes include:
1. *.var has every $KMP_* variable changed to @LIBOMP_*@
2. kmp_config.h.cmake is a new file which contains all the feature macros and
   #cmakedefine lines
3. Most of the -D lines have been moved from LibompDefinitions.cmake but some
   OS specific MACROs (e.g., _GNU_SOURCE) remain.
4. All expand-vars.pl related logic is removed from the CMake files.

One important note about this change is that it breaks the old Perl+Makefile
build system because it can't create kmp_config.h properly.

Differential Review: http://reviews.llvm.org/D12211

llvm-svn: 246314
2015-08-28 18:42:10 +00:00
Chad Rosier dc65532fd9 Optimize memcmp(x,y,n)==0 for small n and suitably aligned x/y.
http://reviews.llvm.org/D6952
PR20673

llvm-svn: 246313
2015-08-28 18:30:18 +00:00
Vedant Kumar 3171cabb34 [test] (NFC) Simplify Transforms/ConstProp/calls.ll
Differential Revision: http://reviews.llvm.org/D12421

llvm-svn: 246312
2015-08-28 18:04:20 +00:00
Petar Jovanovic 207a191a98 [mips64][mcjit] Add N64R6 relocations tests and fix N64R2 tests
This patch adds a test for MIPS64R6 relocations, it corrects check
expressions for R_MIPS_26 and R_MIPS_PC16 relocations in MIPS64R2 test, and
it adds run for big endian in MIPS64R2 test.

Patch by Vladimir Radosavljevic.

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

llvm-svn: 246311
2015-08-28 18:02:53 +00:00
Aaron Ballman 8b0583ef1b Disable several more clang-tidy modernize checkers when not compiling in C++ mode. Loop conversion would make recommendations for C code, so added a test to ensure that does not happen. The pass by value, use auto and replace auto_ptr checkers would not make recommendations for C code, and are disabled for performance reasons, but do not require an extra test.
llvm-svn: 246310
2015-08-28 17:58:10 +00:00
Petar Jovanovic 28e2b717fc [mips] Remove incorrect DebugLoc entries from prologue
This has been causing the prologue_end to be incorrectly positioned.

Patch by Vladimir Radosavljevic.

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

llvm-svn: 246309
2015-08-28 17:53:26 +00:00
Matt Arsenault d9c830154f Make MergeConsecutiveStores look at other stores on same chain
When combiner AA is enabled, look at stores on the same chain.
Non-aliasing stores are moved to the same chain so the existing
code fails because it expects to find an adajcent store on a consecutive
chain.

Because of how DAGCombiner tries these store combines,
MergeConsecutiveStores doesn't see the correct set of stores on the chain
when it visits the other stores. Each store individually has its chain
fixed before trying to merge consecutive stores, and then tries to merge
stores from that point before the other stores have been processed to
have their chains fixed. To fix this, attempt to use FindBetterChain
on any possibly neighboring stores in visitSTORE.

Suppose you have 4 32-bit stores that should be merged into 1 vector
store. One store would be visited first, fixing the chain. What happens is
because not all of the store chains have yet been fixed, 2 of the stores
are merged. The other 2 stores later have their chains fixed,
but because the other stores were already merged, they have different
memory types and merging the two different sized stores is not
supported and would be more difficult to handle.

llvm-svn: 246307
2015-08-28 17:31:28 +00:00
David Majnemer 9c51053dd5 Test case for r246304.
llvm-svn: 246306
2015-08-28 17:19:54 +00:00
JF Bastien f5aa1ca655 Remove Merge Functions pointer comparisons
Summary:
This patch removes two remaining places where pointer value comparisons
are used to order functions: comparing range annotation metadata, and comparing
block address constants. (These are both rare cases, and so no actual
non-determinism was observed from either case).

The fix for range metadata is simple: the annotation always consists of a pair
of integers, so we just order by those integers.

The fix for block addresses is more subtle. Two constants are the same if they
are the same basic block in the same function, or if they refer to corresponding
basic blocks in each respective function. Note that in the first case, merging
is trivially correct. In the second, the correctness of merging relies on the
fact that the the values of block addresses cannot be compared. This change is
actually an enhancement, as these functions could not previously be merged (see
merge-block-address.ll).

There is still a problem with cross function block addresses, in that constants
pointing to a basic block in a merged function is not updated.

This also more robustly compares floating point constants by all fields of their
semantics, and fixes a dyn_cast/cast mixup.

Author: jrkoenig
Reviewers: dschuff, nlewycky, jfb
Subscribers llvm-commits
Differential revision: http://reviews.llvm.org/D12376

llvm-svn: 246305
2015-08-28 16:49:09 +00:00
David Majnemer a787de3227 [CodeGen] isInTailCallPosition didn't consider readnone tailcalls
A readnone tailcall may still have a chain of computation which follows
it that would invalidate a tailcall lowering.  Don't skip the analysis
in such cases.

This fixes PR24613.

llvm-svn: 246304
2015-08-28 16:44:09 +00:00
Sanjay Patel 69e7f6e436 fix typo; NFC
llvm-svn: 246303
2015-08-28 14:42:54 +00:00
Adrian McCarthy 23d14b6ade Differential Review: http://reviews.llvm.org/D12363
llvm-svn: 246302
2015-08-28 14:42:03 +00:00
James Molloy 85d58684da [LoopUtils] Move a private constructor nearer the other private members
This was part of Adam Nemet's review feedback that I forgot to implement.

llvm-svn: 246301
2015-08-28 14:40:29 +00:00
Sanjay Patel 7c912898a5 [x86] enable machine combiner reassociations for scalar 'and' insts
llvm-svn: 246300
2015-08-28 14:09:48 +00:00
Aaron Ballman f36a425eba Reapplying r246209, which exposed language options to the checkers. This time disable UseNullptrCheck when not compiling in C++ mode, but still allow in C++11 mode since it's likely the user wishes to modernize their code.
llvm-svn: 246298
2015-08-28 13:20:46 +00:00
Rafael Espindola c20fee5dc5 Add a -target to this test.
Without it it fails on 32 bit windows.

llvm-svn: 246297
2015-08-28 13:15:05 +00:00
Davide Italiano f00e94546e [MC] Convert tests to use llvm-readobj --macho-version-min.
As an added bonus this also tests the newly introduced feature.

llvm-svn: 246296
2015-08-28 12:40:05 +00:00
Sylvestre Ledru c0babf2bc0 Support Debian s390x multiarch paths
Summary: Patch by Steven Chamberlain <steven@pyro.eu.org>

Reviewers: uweigand

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

llvm-svn: 246295
2015-08-28 12:26:09 +00:00
Sylvestre Ledru 79cb0090ff Avoid usage of F_DUPFD_CLOEXEC where not available (e.g. kfreebsd*)
Summary:
kfreebsd doesn't have F_DUPFD_CLOEXEC, so use it conditionally.

Author: Emilio Pozuelo Monfort <pochu@debian.org>
Author: Petr Salinger <Petr.Salinger@seznam.cz>
Author: Gianfranco Costamagna

Reviewers: emaste

Subscribers: emaste

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

llvm-svn: 246294
2015-08-28 12:24:07 +00:00
Mohit K. Bhakkad 16ad032183 [LLDB][MIPS] Aligning code with rL245831
Reviewers: jaydeep
Subscribers: lldb-commits.
Differential Revision: http://reviews.llvm.org/D12427

llvm-svn: 246293
2015-08-28 12:08:26 +00:00
Rui Ueyama 40f4d86f5f COFF: Create short import files instead of using lib.exe.
lib.exe has a feature to create import library files (which contain
short import files) from module-definition files. Previously, we were
using that feature, but it turned out that the feature is not complete
for us.

There seems no way to specify "Import Types" in module-definition file.
lib.exe always adds "_" to given symbols and specify IMPORT_NAME_UNDECORATE.
We need more fine-grainded control on that value.

This patch teaches LLD to create short import files itself.
We are still using lib.exe, but the use of the tool is limited to create
empty import library files. We then create short import files and add them
to the empty files as new members.

This patch does not intend to change the functionality. LLD produces
the same import libraries as before. I'll make another change to create
different import libraries in a follow-up patch.

llvm-svn: 246292
2015-08-28 10:52:05 +00:00
Rui Ueyama 932108912d llvm-readobj: Dump more info for COFF import libraries.
This patch teaches llvm-readobj to print out COFF import file header fields.

llvm-svn: 246291
2015-08-28 10:27:50 +00:00
Johannes Doerfert b409fdc0d7 [NFC] Make SCEVAffinator work without a statement
llvm-svn: 246290
2015-08-28 09:24:35 +00:00
Chandler Carruth 4b682f6f24 [SROA] Fix PR24463, a crash I introduced in SROA by allowing it to
handle more allocas with loads past the end of the alloca.

I suspect there are some related crashers with slightly different
patterns, but I'll fix those and add test cases as I find them.

Thanks to David Majnemer for the excellent test case reduction here.
Made this super simple to debug and fix.

llvm-svn: 246289
2015-08-28 09:03:52 +00:00
Daniel Jasper ad5b7962c9 Revert "[OPENMP 4.0] Codegen for array sections."
The test is currently failing on bots:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/12747/

llvm-svn: 246288
2015-08-28 08:42:22 +00:00
Tobias Grosser 6dc4441884 IslNodeBuilder: Make functionality available to subclasses
llvm-svn: 246287
2015-08-28 08:30:52 +00:00
Tobias Grosser 3f2783b254 IslNodeBuilder: Add function to export BlockGenerator
llvm-svn: 246286
2015-08-28 08:23:38 +00:00
Tobias Grosser b79a67df78 BlockGenerator: Make scalar memory locations accessible
For external users, the memory locations into which we generate scalar values
may be of interest. This change introduces two functions that allow to obtain
(or create) the AllocInsts for a given BasePointer.

We use this change to simplify the code in BlockGenerators.

llvm-svn: 246285
2015-08-28 08:23:35 +00:00
Rui Ueyama f42d508360 Attempt to unbreak Win32 build.
llvm-svn: 246284
2015-08-28 07:48:41 +00:00
Rui Ueyama 71ba9bdd23 Re-apply r246276 - Object: Teach llvm-ar to create symbol table for COFF short import files
This patch includes a fix for a llvm-readobj test. With this patch, 
the tool does no longer print out COFF headers for the short import
file, but that's probably desirable because the header for the short
import file is dummy.

llvm-svn: 246283
2015-08-28 07:40:30 +00:00
Steven Wu 5528da76ef Revert r246214 and r246213
These two commits causes llvm LTO bootstrap to hang in ScalarEvolution.

llvm-svn: 246282
2015-08-28 07:14:10 +00:00
Tobias Grosser 1e5a8c1a5c Virtualize the IslNodeBuilder
This allows users to extend the IslNodeBuilder to create their own optimization
passes. This feature is not used in Polly's codebase itself, but as these
funtions are not performance critical, the cost of making experiments of
external users easier seems low enough to do so.

llvm-svn: 246281
2015-08-28 07:07:04 +00:00
Eric Fiselier e57e3aebe3 Fix most GCC warnings during build. Only -Wattribute left.
llvm-svn: 246280
2015-08-28 07:02:42 +00:00
Steven Wu 61db34d12e Revert r246244 and r246243
These two commits cause clang/llvm bootstrap to hang.

llvm-svn: 246279
2015-08-28 06:52:00 +00:00