Commit Graph

212049 Commits

Author SHA1 Message Date
Dan Gohman baba8c648b [WebAssembly] Add a resize_memory intrinsic.
llvm-svn: 249178
2015-10-02 20:10:26 +00:00
Sanjoy Das d0671346ae [SCEV] Refactor out a createNodeForSelect
Summary:
We will shortly re-use this for select-like br-phi pairs.

Reviewers: atrick, joker-eph, joker.eph

Subscribers: sanjoy, llvm-commits

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

llvm-svn: 249177
2015-10-02 19:39:59 +00:00
Dan Gohman d4c5fb597d [WebAssembly] Add a __builtin_wasm_memory_size() intrinsic.
llvm-svn: 249176
2015-10-02 19:38:47 +00:00
Rafael Espindola 7757224466 Add static initialization/finalization array support.
This adds entries in the dynamic table for .init_array, .fini_array and
.preinit_array.

llvm-svn: 249175
2015-10-02 19:37:55 +00:00
Michael Zolotukhin d57f4b9011 [Tests] Add one more case to LoopUnroll/pr18861.ll for better coverage.
llvm-svn: 249174
2015-10-02 19:21:52 +00:00
Michael Zolotukhin 8df4bddd16 [Tests] Give meaningful names to blocks in LoopUnroll/pr18861.ll, add a description of what's going on.
llvm-svn: 249173
2015-10-02 19:21:49 +00:00
Michael Zolotukhin 47eef7a3c9 [Tests] Slightly reduce test LoopUnroll/pr18861.ll.
llvm-svn: 249172
2015-10-02 19:21:43 +00:00
Dan Gohman 72f1692a2c [WebAssembly] Add a memory_size intrinsic.
llvm-svn: 249171
2015-10-02 19:21:15 +00:00
Matt Arsenault d092a068ba AMDGPU/SI: Add verifier check for exec reads
Make sure we aren't accidentally not setting
these in the instruction definitions.

llvm-svn: 249170
2015-10-02 18:58:37 +00:00
Matt Arsenault 3d3b4d0c2c Add way to test for generic TargetOpcodes
The alternative would be to add a bit to the target's
InstrFlags but that seems like a waste of a bit.

llvm-svn: 249169
2015-10-02 18:58:33 +00:00
Sanjoy Das 7d910f2b11 [SCEV] Try to prove predicates by splitting them
Summary:
This change teaches SCEV that to prove `A u< B` it is sufficient to
prove each of these facts individually:

 - B >= 0
 - A s< B
 - A >= 0

In practice, SCEV sometimes finds it easier to prove these facts
individually than to prove `A u< B` as one atomic step.

Reviewers: reames, atrick, nlewycky, hfinkel

Subscribers: sanjoy, llvm-commits

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

llvm-svn: 249168
2015-10-02 18:50:30 +00:00
Sean Callanan a994b0b273 Made GetScratchTypeSystemForLanguage return an error if desired.
Also made it not store nullptrs in its TypeSystemMap, so it will retry to make
the AST context if it errored out last time.

llvm-svn: 249167
2015-10-02 18:40:30 +00:00
Douglas Katzman 9e31cb9ea7 [Myriad]: Accept '-nostdlib' option
llvm-svn: 249166
2015-10-02 18:39:08 +00:00
Roman Divacky 4b5507a037 Actually switch the arch when we see .arch. PR21695
llvm-svn: 249165
2015-10-02 18:25:25 +00:00
Tim Northover 8d67b8e053 ARM: diagnose invalid local fixups on Thumb1
We previously stopped producing Thumb2 relaxations when they weren't supported,
but only diagnosed the case where an actual relocation was produced. We should
also tell people if local symbols aren't going to work rather than silently
overflowing.

llvm-svn: 249164
2015-10-02 18:07:18 +00:00
Tim Northover 956b008db6 ARM: correctly align constant pool value on Thumb1 targets.
Since we're using tLDRpci to access it, the constant pool's address must be 0
(mod 4).

llvm-svn: 249163
2015-10-02 18:07:13 +00:00
Hal Finkel 58d7ee397d [ELF2] Simplify test from r249150
As Rafael pointed out, we don't need quite so many flags on the llvm-readobj
RUN line here.

llvm-svn: 249162
2015-10-02 17:57:29 +00:00
Hal Finkel 942e949f0d [lit] Raise the default soft process limit when possible
It is common to have a default soft process limit, at least on some families of
Linux distributions, of 1024. This is normally more than enough, but if you
have many cores, and you're running tests that create many threads, this can
become a problem. My POWER7 development machine has 48 cores, and when running
the lld regression tests, which often want to create up to 48 threads, I run
into problems. lit, by default, will want to run 48 tests in parallel, and
48*48 < 1024, and so many tests fail like this:

terminate called after throwing an instance of 'std::system_error'

what():  Resource temporarily unavailable
or lit fails like this when launching a test:

OSError: [Errno 11] Resource temporarily unavailable

lit can easily detect this situation and attempt to repair it before launching
tests (by raising the soft process limit to something that will allow ncpus^2
threads to be created), and should do so to prevent spurious test failures.

This is the follow-up to this thread:
http://lists.llvm.org/pipermail/llvm-dev/2015-October/090942.html

llvm-svn: 249161
2015-10-02 17:50:28 +00:00
Rafael Espindola b2a5cafb37 Weak undefined symbols should not fetch archive members.
llvm-svn: 249160
2015-10-02 17:41:22 +00:00
Yaron Keren e9021117a1 constify four getInstantiatedFromMemberTemplate() in DeclTemplate.h.
llvm-svn: 249159
2015-10-02 17:38:57 +00:00
Chris Bieneman b22351cb18 [CMake] Workaround for the lipo output directory not being created.
This should resolve an issue reported by mclow.

llvm-svn: 249158
2015-10-02 17:37:40 +00:00
Adrian Prantl 335f5c7e3e Module debugging: Don't emit forward declarations in module scopes.
A forward declaration inside a module header does not belong to the module.

llvm-svn: 249157
2015-10-02 17:36:14 +00:00
Adrian Prantl 992d820e30 Break long lines for readability.
llvm-svn: 249156
2015-10-02 17:36:10 +00:00
Adrian Prantl 7f30b4a14e Remove unused variable.
llvm-svn: 249155
2015-10-02 17:36:03 +00:00
Samuel Antao 4be30e92dc [OpenMP] Capture global variables in target regions.
All global variables that are not enclosed in a declare target region 
must be captured in the target region as local variables do. Currently, 
there is no support for declare target, so this patch adds support for 
capturing all the global variables used in a the target region.

llvm-svn: 249154
2015-10-02 17:14:03 +00:00
Chad Rosier 1f385618c0 [ARM] Typo. NFC.
llvm-svn: 249153
2015-10-02 16:42:59 +00:00
Yaron Keren ad3f6686ab constify ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember and VarTemplatePartialSpecializationDecl::getInstantiatedFromMember.
llvm-svn: 249152
2015-10-02 16:40:48 +00:00
Michael Kruse afe0670863 Bail-out early if all statements have been simplified away
Treat the scop as invalid instead of creating dummy domains.

llvm-svn: 249151
2015-10-02 16:33:27 +00:00
Hal Finkel d26da9258f [ELF2] Fix mixed-Endian handling in DynamicSection<ELFT>::writeTo
Using the "raw" Elf64_Dyn or Elf32_Dyn structures in
DynamicSection<ELFT>::writeTo does not correctly handle mixed-Endian
situations. Instead, use the corresponding llvm::object::* structures which
have Endian-converting members (like the rest of the code).

This fixes all currently-failing elf2 tests when running on big-Endian
PPC64/Linux (I've added a big-Endian test case which should fail on
little-Endian machines in the same way that test/elf2/shared.s failed on
big-Endian machines prior to this change).

llvm-svn: 249150
2015-10-02 16:21:30 +00:00
Rafael Espindola 4876c886fc Ignore --version-script.
llvm-svn: 249149
2015-10-02 16:20:39 +00:00
Samuel Antao bed3c46632 [OpenMP] Target directive host codegen.
This patch implements the outlining for offloading functions for code 
annotated with the OpenMP target directive. It uses a temporary naming 
of the outlined functions that will have to be updated later on once 
target side codegen and registration of offloading libraries is 
implemented - the naming needs to be made unique in the produced 
library.

llvm-svn: 249148
2015-10-02 16:14:20 +00:00
Andrea Di Biagio 77f62652c1 Reapply r249121 : "[FastISel][x86] Teach how to select SSE2/AVX bitcasts between 128/256-bit vector types."
This patch teaches FastIsel the following two things:
1) On SSE2, no instructions are needed for bitcasts between 128-bit vector types;
2) On AVX, no instructions are needed for bitcasts between 256-bit vector types.

Example:

  %1 = bitcast <4 x i31> %V to <2 x i64>

Before (-fast-isel -fast-isel-abort=1):

  FastIsel miss: %1 = bitcast <4 x i31> %V to <2 x i64>

Now we don't fall back to SelectionDAG and we correctly fold that computation
propagating the register associated to %V.

Originally reviewed here: http://reviews.llvm.org/D13347

llvm-svn: 249147
2015-10-02 16:08:05 +00:00
Ed Maste 2dab6c9bcc Allow -soname arg in addition to -soname=arg
Differential Revision: http://reviews.llvm.org/D13387

llvm-svn: 249146
2015-10-02 15:45:26 +00:00
Johannes Doerfert 3e7d171866 [FIX] Repair broken commit
The last invariant load fix was based on a later patch not
  polly/master, thus needs to be adjusted.

llvm-svn: 249145
2015-10-02 15:35:03 +00:00
Ed Maste 9c95ac2946 Ignore --enable-new-dtags and --no-fatal-warnings
Found while testing a FreeBSD base system build with lld.  Ignored for
now while we continue to identify missing options and functionality.

llvm-svn: 249144
2015-10-02 15:29:31 +00:00
Bruno Cardoso Lopes a5efe3a66b [DarwinDriver] Reapply: Use -lto_library to specify the path for libLTO.dylib
Reapply r248935.

Usually, when using LTO with a clang installation newer than the
system's one, there's a libLTO.dylib version mismatch and LTO fails. One
solution to this is to make ld point to the right libLTO.dylib by
changing DYLD_LIBRARY_PATH.

However, ld64 supports specifying the complete path to the desired
libLTO.dylib through the -lto_library option. This commit adds support
for the clang driver to use this option whenever it's capable of finding
a libLTO.dylib in clang's installed library directory. This way, we
don't need to rely on DYLD_LIBRARY_PATH nor get caught by version
mismatches.

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

rdar://problem/7363476

llvm-svn: 249143
2015-10-02 15:10:33 +00:00
Andrea Di Biagio f9989b04bf Make test more resilient to FastIsel changes. NFC.
Currently FastISel doesn't know how to select vector bitcasts.
During instruction selection, fast-isel always falls back to SelectionDAG 
every time it encounters a vector bitcast.
As a consequence of this, all the 'packed vector shift by immedate count'
test cases in avx2-builtins.c are optimized by the DAGCombiner.
In particular, the DAGCombiner would always fold trivial stack loads of
constant shift counts into the operands of packed shift builtins.

This behavior would start changing as soon as I reapply revision 249121.
That revision would teach x86 fast-isel how to select bitcasts between vector
types of the same size.

As a consequence of that change, fast-isel would less often fall back to
SelectionDAG. More importantly, DAGCombiner would no longer be able to 
simplify the code by folding the stack reload of a constant.

No functional change.

llvm-svn: 249142
2015-10-02 15:10:22 +00:00
Vasileios Kalintiris ddb517da7c Revert "Add support for the new mips-mti-linux toolchain."
This reverts commit r249137 because it broke the Windows buildbots and
a Linux buildbot for LLD.

llvm-svn: 249141
2015-10-02 15:00:55 +00:00
Alexandros Lamprineas f5a8e6c5ab Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] targets.
Differential Revision: http://reviews.llvm.org/D12633

llvm-svn: 249140
2015-10-02 14:56:37 +00:00
Johannes Doerfert 8930f4846c [FIX] Do not hoist from inside a non-affine subregion
We have to skip accesses in non-affine subregions during hoisting as
  they might not be executed under the same condition as the entry of
  the non-affine subregion.

llvm-svn: 249139
2015-10-02 14:51:00 +00:00
Douglas Katzman 9dc81a4d0d Fix bogus comment.
llvm-svn: 249138
2015-10-02 14:41:38 +00:00
Vasileios Kalintiris 712f0887f6 Add support for the new mips-mti-linux toolchain.
Summary:
This new toolchain uses primarily LLVM-based tools, eg. compiler-rt, lld,
libcxx, etc. Because of this, it doesn't require neither an existing GCC
installation nor a GNU environment. Ideally, in a follow-up patch we
would like to add a new --{llvm|clang}-toolchain option (similar to
--gcc-toolchain) in order to allow the use of this toolchain with
independent Clang builds. For the time being, we use the --sysroot
option just to test the correctness of the paths generated by the
driver.

Reviewers: atanasyan, dsanders, rsmith

Subscribers: jfb, tberghammer, danalbert, srhines, dschuff, cfe-commits

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

llvm-svn: 249137
2015-10-02 14:38:23 +00:00
Aaron Ballman b91d64c6cc Taking a stab at fixing failing build bots that use make. Unfortunately, the build logs do not point to much useful information for tracking this down, such as:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/31782/steps/compile/logs/stdio

llvm-svn: 249136
2015-10-02 14:28:44 +00:00
Rafael Espindola fc96a263a1 Ignore options used during a clang build.
llvm-svn: 249135
2015-10-02 14:25:26 +00:00
Rafael Espindola 327b178dd6 Accept some options with both -- and -.
This matches what both gold and bfd ld accept.

llvm-svn: 249134
2015-10-02 14:21:24 +00:00
Aaron Ballman 67e06ddb51 Hopefully rectifying a build bot issue with:
http://bb.pgr.jp/builders/i686-mingw32-RA-on-linux/builds/2833/steps/build_llvmclang/logs/stdio

Also, drive-by comment fix in a makefile.

llvm-svn: 249133
2015-10-02 14:01:55 +00:00
Michael Kruse cac948ef46 Earlier creation of ScopStmt objects
This moves the construction of ScopStmt to the beginning of the 
ScopInfo pass. The late creation was a result of the earlier separation 
of ScopInfo and TempScopInfo. This will avoid introducing more 
ScopStmt-like maps in future commits. The AccFuncMap will also be 
removed in some future commit. DomainMap might also be included into 
ScopStmt.

The order in which ScopStmt are created changes and initially creates 
empty statements that are removed in a simplification.

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

llvm-svn: 249132
2015-10-02 13:53:07 +00:00
James Y Knight b8bfd96a10 Move functions declared in Stmt{ObjC,CXX}.h and OpenMPClause.h into
their associated .cpp file.

Previous refactorings long long ago had split out the above categories
of classes from Stmt.h into their own header files, but failed to also
split the Stmt.cpp implementation file similarly. Do so for
readability's sake.

llvm-svn: 249131
2015-10-02 13:41:04 +00:00
Aaron Ballman ea2f90c96b Adding a new clang-tidy module to house CERT-specific checkers, and map existing checkers to CERT secure coding rules and recommendations for both C (https://www.securecoding.cert.org/confluence/display/c/SEI+CERT+C+Coding+Standard) and C++ (https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=637).
llvm-svn: 249130
2015-10-02 13:27:19 +00:00
Angel Garcia Gomez b1a73fa94d Divide TraverseInitListExpr to a different function for each form.
Summary: create TraverseSyntacticInitListExpr and TraverseSemanticInitListExpr.

Reviewers: rsmith, klimek

Subscribers: klimek, cfe-commits, alexfh

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

llvm-svn: 249129
2015-10-02 13:25:51 +00:00