Commit Graph

211718 Commits

Author SHA1 Message Date
Chad Rosier 11c825f7db [AArch64] Remove an unnecessary restriction on pre-index instructions.
Previously, the index was constrained to the size of the memory operation for
no apparent reason.  This change removes that constraint so that we can form
pre-index instructions with any valid offset.

llvm-svn: 248931
2015-09-30 19:44:40 +00:00
Davide Italiano c02fcafef6 [ELF2] Expand test comment a little bit, use reloc name as section name.
llvm-svn: 248930
2015-09-30 19:44:30 +00:00
Daniel Jasper 0a63c6bffe clang-format: Add clangRewrite dependency to fix cmake build.
llvm-svn: 248929
2015-09-30 19:28:47 +00:00
Kaelyn Takata d14c06169c Don't correct non-class using declarations to class members.
Such declarations would be invalid anyway, and trying to make the
correction will lead to a crash. Fixes PR 24781.

llvm-svn: 248928
2015-09-30 18:23:35 +00:00
Fiona Glaser b0c6d9174e DeadCodeElimination: rewrite to be faster
Same strategy as simplifyInstructionsInBlock. ~1/3 less time
on my test suite. This pass doesn't have many in-tree users,
but getting rid of an O(N^2) worst case and making it cleaner
should at least make it a viable alternative to ADCE, since
it's now consistently somewhat faster.

llvm-svn: 248927
2015-09-30 17:49:49 +00:00
Johannes Doerfert bb9387444c [FIX] Remove unknown variable
llvm-svn: 248926
2015-09-30 17:31:31 +00:00
Reid Kleckner 21525e7fd4 [Sema] Avoid crashing during this-> insertion recovery
We get into this bad state when someone defines a new member function
for a class but forgets to add the declaration to the class body.
Calling the new member function from a member function template of the
class will crash during instantiation.

llvm-svn: 248925
2015-09-30 17:30:48 +00:00
Hal Finkel 4c45775880 [PowerPC] Disable shrink wrapping
Shrink wrapping is causing a self-hosting failure on PPC64/Linux. Disable for
now until the problem can be fixed.

llvm-svn: 248924
2015-09-30 17:29:03 +00:00
Erik Eckstein 91c49810f2 SLPVectorizer: add a test to check if the minimum region size works.
This is an addition to rL248917.

llvm-svn: 248923
2015-09-30 17:28:19 +00:00
Rui Ueyama 7971152589 ELF2: Do not set default values that will always be overwritten.
These member variables are overwritten unconditionally by Driver,
so setting default values would be confusing.

llvm-svn: 248922
2015-09-30 17:26:13 +00:00
Artyom Skrobov 72ca6b8f3f [ARM] Support for ARMv6-Z / ARMv6-ZK missing
As Richard Barton observed at http://reviews.llvm.org/D12937#inline-107121
TargetParser in LLVM has insufficient support for ARMv6Z and ARMv6ZK.

In particular, there were no tests for TrustZone being supported in these
architectures.

The patch clears a FIXME: left by Saleem Abdulrasool in r201471, and fixes
his test case which hadn't really been testing what it was claiming to test.

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

llvm-svn: 248921
2015-09-30 17:25:52 +00:00
Rui Ueyama f7c5fbb1ca ELF2: Create LinkerScript.cpp and move code from DriverUtils to there.
llvm-svn: 248920
2015-09-30 17:23:26 +00:00
Rui Ueyama bf506b7d48 ELF2: LinkerScript: Handle quoted tokens.
llvm-svn: 248919
2015-09-30 17:15:29 +00:00
Rui Ueyama f5c4aca98f ELF2: Add basic linker script support.
This linker script parser and evaluator is powerful enough to read
Linux's libc.so, which is (despite its name) a linker script that
contains OUTPUT_FORMAT, GROUP and AS_NEEDED directives.

The parser implemented in this patch is a recursive-descendent one.
It does *not* construct an AST but consumes directives in place and
sets the results to Symtab object, like what Driver is doing.
This should be very fast since less objects are allocated, and
this is also more readable.

http://reviews.llvm.org/D13232

llvm-svn: 248918
2015-09-30 17:06:09 +00:00
Erik Eckstein 848c1aa452 SLPVectorizer: limit the scheduling region size per basic block.
Usually large blocks are not a problem. But if a large block (> 10k instructions)
contains many (potential) chains of vector instructions, and those chains are
spread over a wide range of instructions, then scheduling becomes a compile time problem.
This change introduces a limit for the accumulate scheduling region size of a block.
For real-world functions this limit will never be exceeded (it's about 10x larger than
the maximum value seen in the test-suite and external test suite).

llvm-svn: 248917
2015-09-30 17:00:44 +00:00
Johannes Doerfert c0729a3216 Move remapping functionality in the ScopExpander
Because we handle more than SCEV does it is not possible to rewrite an
  expression on the top-level using the SCEVParameterRewriter only. With
  this patch we will do the rewriting on demand only and also
  recursively, thus not only on the top-level.

llvm-svn: 248916
2015-09-30 16:52:03 +00:00
Johannes Doerfert 6206d7a67c [FIX] Clear all maps between runs
llvm-svn: 248915
2015-09-30 16:51:05 +00:00
Chad Rosier 4f04e2ec87 [AArch64] Use helper function to improve readability. NFC.
llvm-svn: 248914
2015-09-30 16:50:41 +00:00
Andrea Di Biagio 0594e2a1e9 [InstCombine] Teach how to convert SSSE3/AVX2 byte shuffles to builtin shuffles if the shuffle mask is constant.
This patch teaches InstCombiner how to convert a SSSE3/AVX2 byte shuffle to a
builtin shuffle if the mask is constant.

Converting byte shuffle intrinsic calls to builtin shuffles can help finding
more opportunities for combining shuffles later on in selection dag.

We may end up with byte shuffles with constant masks as the result of inlining.

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

llvm-svn: 248913
2015-09-30 16:44:39 +00:00
Douglas Katzman 9a2ef281bc Alias "-ggdbN" to "-gN" options, fixing some incompatibilities.
* assembling from a .s file mistook -ggdb0 for -g
* -ggdb1 is supposed to mean basically -g1, not -gN for N>1

llvm-svn: 248912
2015-09-30 15:55:59 +00:00
John Brawn c11ef2a89c [CMake] Make the bindir and libdir arguments to set_output_directory optional
When building a plugin against an installed LLVM toolchain using
add_llvm_loadable_module (in the documented manner) doesn't work as nothing sets
the *_OUTPUT_INTDIR variables causing an error when set_output_directory is
called. Making those arguments optional (causing the default output directory
to be used) fixes this.

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

llvm-svn: 248911
2015-09-30 15:20:51 +00:00
Tamas Berghammer 4e28ee243c Make the ArmUnwindInfo parsing code endian independent
Differential revision: http://reviews.llvm.org/D13291

llvm-svn: 248910
2015-09-30 15:17:06 +00:00
Adrian McCarthy a0bad88e59 Removed an unused member variable. Affects Windows only.
llvm-svn: 248909
2015-09-30 14:57:21 +00:00
Tamas Berghammer 150c87c859 Fix xcode build after rL248903
llvm-svn: 248908
2015-09-30 14:55:08 +00:00
Aaron Ballman 8db15e4a4d Adding a checker (misc-non-copyable-objects) that detects situations where a non-copyable C type is being dereferenced, such as FILE or pthread_mutex_t. Corresponds to the CERT C++ secure coding rule: https://www.securecoding.cert.org/confluence/display/c/FIO38-C.+Do+not+copy+a+FILE+object
llvm-svn: 248907
2015-09-30 14:09:38 +00:00
Anastasia Stulova bcea69669f [OpenCL 2.0] Enable program scope variables, Section 6.5.1.
- Remove virtual SC_OpenCLWorkGroupLocal storage type specifier
as it conflicts with static local variables now and prevents
diagnosing static local address space variables correctly.

 - Allow static local and global variables (OpenCL2.0 s6.8 and s6.5.1).

 - Improve diagnostics of allowed ASes for variables in different scopes:
(i) Global or static local variables have to be in global
or constant ASes (OpenCL1.2 s6.5, OpenCL2.0 s6.5.1);
(ii) Non-kernel function variables can't be declared in local
or constant ASes (OpenCL1.1 s6.5.2 and s6.5.3).

http://reviews.llvm.org/D13105

llvm-svn: 248906
2015-09-30 14:08:20 +00:00
James Y Knight 48fefa3724 Fix FunctionParmPackExpr::Create() to take a ParmVarDecl* array.
FunctionParmPackExpr actually stores an array of ParmVarDecl* (and
accessors return that). But, the FunctionParmPackExpr::Create()
constructor accepted an array of Decl *s instead.

It was easy for this mismatch to occur without any obvious sign of
something wrong, since both the store and the access used independent
'reinterpet_cast<XX>(this+1)' calls.

llvm-svn: 248905
2015-09-30 14:04:23 +00:00
Daniel Jasper 867a938246 clang-format: Use Rewriter again to write the output files.
This has two advantages:
1. Atomic writes.
2. Proper handling of line endings (hopefully solving llvm.org/PR24999

llvm-svn: 248904
2015-09-30 13:59:29 +00:00
Tamas Berghammer 648f3c7efa Add support for .ARM.exidx unwind information
.ARM.exidx/.ARM.extab sections contain unwind information used on ARM
architecture from unwinding from an exception.

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

llvm-svn: 248903
2015-09-30 13:50:14 +00:00
Anastasia Stulova e6e082348d [OpenCL] Add missing OpenCL LangOpts in address space compatibility checks
and test checking broken (due to CL specific diagnostics) C functionality

M    test/Sema/address_spaces.c
M    lib/Sema/SemaExpr.cpp

llvm-svn: 248902
2015-09-30 13:49:55 +00:00
Tamas Berghammer b926d01d2a XFAIL 2 test in TestTargetCommands on android-aarch64
The 2 test just get enabled with the recemt test system refactor.

llvm-svn: 248901
2015-09-30 13:42:06 +00:00
Tobias Grosser aff56c8a78 Reapply "BlockGenerator: Generate synthesisable instructions only on-demand"
Instructions which we can synthesis from a SCEV expression are not
generated directly, but only when they are used as an operand of
another instruction. This avoids generating unnecessary instructions
and works more reliably than first inserting them and then deleting
them later on.

This commit was reverted in r248860 due to a remaining miscompile, where
we forgot to synthesis the operand values that were referenced from scalar
writes. test/Isl/CodeGen/scalar-store-from-same-bb.ll tests that we do this
now correctly.

llvm-svn: 248900
2015-09-30 13:36:54 +00:00
Alexander Kornienko 87e1da6205 [clang-tidy] Added missing check lines, made the checking stricter.
llvm-svn: 248899
2015-09-30 13:32:42 +00:00
Teresa Johnson eaa3d2a63c Add support for sub-byte aligned writes to lib/Support/Endian.h
Summary:
As per Duncan's review for D12536, I extracted the sub-byte bit aligned
reading and writing code into lib/Support, and generalized it. Added calls from
BackpatchWord. Also added unittests.

Reviewers: dexonsmith

Subscribers: llvm-commits

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

llvm-svn: 248897
2015-09-30 13:20:37 +00:00
Anastasia Stulova de0e424e8a [OpenCL 2.0] This change adds extra diagnostics to atomic types
Applied restrictions from OpenCL v2.0 s6.13.11.8
that mainly disallow operations on atomic types (except for taking their address - &).

The patch is taken from SPIR2.0 provisional branch, contributed by Guy Benyei!

llvm-svn: 248896
2015-09-30 13:18:52 +00:00
Alexander Kornienko 08023c696d [clang-tidy] Fix an assertion in the readability-braces-around-statements check.
llvm-svn: 248895
2015-09-30 12:48:42 +00:00
Rafael Espindola 3c412e14cc Expand a comment a bit.
llvm-svn: 248894
2015-09-30 12:30:58 +00:00
Tobias Grosser 33cb9f9419 BlockGenerator: Extract value synthesis into its own function [NFC]
This will allow us to reuse this code in a subsequent commit.

llvm-svn: 248893
2015-09-30 11:56:19 +00:00
Artur Pilipenko 029d8531e6 Refactor computeKnownBits alignment handling code
Reviewed By: reames, hfinkel

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

llvm-svn: 248892
2015-09-30 11:55:45 +00:00
Anastasia Stulova dade196575 [OpenCL 2.0] Fix wrong atomic type detection in the diagnostics of allowed types
llvm-svn: 248891
2015-09-30 11:48:15 +00:00
George Rimar 431f94c8e0 test commit
llvm-svn: 248890
2015-09-30 11:42:29 +00:00
Pavel Labath 8f4db787d5 Fix TestAttachDenied on linux
This test was timing out because the test inferior was forking a child, which was not terminated
correctly. The test contained provisions to terminate this child, but these were no longer
working. The idea was to wake up upon receiving SIGTERM and then kill the child. However, this
was failing because the test first tried to use SIGHUP, which ended up killing the inferior.

Fix: make sure we catch SIGHUP also.
llvm-svn: 248889
2015-09-30 10:59:39 +00:00
Jeroen Ketema 55a8e80de8 [ARM][NEON] Use address space in vld([1234]|[234]lane) and vst([1234]|[234]lane) instructions
This is the clang commit associated with llvm r248887.

This commit changes the interface of the vld[1234], vld[234]lane, and vst[1234],
vst[234]lane ARM neon intrinsics and associates an address space with the
pointer that these intrinsics take. This changes, e.g.,

<2 x i32> @llvm.arm.neon.vld1.v2i32(i8*, i32)

to

<2 x i32> @llvm.arm.neon.vld1.v2i32.p0i8(i8*, i32)

This change ensures that address spaces are fully taken into account in the ARM
target during lowering of interleaved loads and stores.

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

llvm-svn: 248888
2015-09-30 10:56:56 +00:00
Jeroen Ketema ab99b59e8c [ARM][NEON] Use address space in vld([1234]|[234]lane) and vst([1234]|[234]lane) instructions
This commit changes the interface of the vld[1234], vld[234]lane, and vst[1234],
vst[234]lane ARM neon intrinsics and associates an address space with the
pointer that these intrinsics take. This changes, e.g.,

<2 x i32> @llvm.arm.neon.vld1.v2i32(i8*, i32)

to

<2 x i32> @llvm.arm.neon.vld1.v2i32.p0i8(i8*, i32)

This change ensures that address spaces are fully taken into account in the ARM
target during lowering of interleaved loads and stores.

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

llvm-svn: 248887
2015-09-30 10:56:37 +00:00
Alexander Kornienko 42e651fa43 [clang-tidy] Better diagnostic in tests when clang-tidy fails.
llvm-svn: 248886
2015-09-30 10:41:53 +00:00
Igor Kudrin f03d2b4d1c [ELF2] Simplify buildSysrootedPath()
Reviewed by: rafael

llvm-svn: 248885
2015-09-30 10:39:37 +00:00
John Brawn 8a3ec2aec2 [CMake] Adjust the variables set by LLVMConfig.cmake
When using LLVMConfig.cmake from an installed toolchain in order to build a
loadable pass using add_llvm_loadable_module LLVM_ENABLE_PLUGINS and
LLVM_PLUGIN_EXT must be set. Also make LLVM_DEFINITIONS be set to what it
actually is.

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

llvm-svn: 248884
2015-09-30 10:34:06 +00:00
Tamas Berghammer c8fd130a2c Merge dwarf and dsym tests
Currently most of the test files have a separate dwarf and a separate
dsym test with almost identical content (only the build step is
different). With adding dwo symbol file handling to the test suit it
would increase this to a 3-way duplication. The purpose of this change
is to eliminate this redundancy with generating 2 test case (one dwarf
and one dsym) for each test function specified (dwo handling will be
added at a later commit).

Main design goals:
* There should be no boilerplate code in each test file to support the
  multiple debug info in most of the tests (custom scenarios are
  acceptable in special cases) so adding a new test case is easier and
  we can't miss one of the debug info type.
* In case of a test failure, the debug symbols used during the test run
  have to be cleanly visible from the output of dotest.py to make
  debugging easier both from build bot logs and from local test runs
* Each test case should have a unique, fully qualified name so we can
  run exactly 1 test with "-f <test-case>.<test-function>" syntax
* Test output should be grouped based on test files the same way as it
  happens now (displaying dwarf/dsym results separately isn't
  preferable)

Proposed solution (main logic in lldbtest.py, rest of them are test
cases fixed up for the new style):
* Have only 1 test fuction in the test files what will run for all
  debug info separately and this test function should call just
  "self.build(...)" to build an inferior with the right debug info
* When a class is created by python (the class object, not the class
  instance), we will generate a new test method for each debug info
  format in the test class with the name "<test-function>_<debug-info>"
  and remove the original test method. This way unittest2 see multiple
  test methods (1 for each debug info, pretty much as of now) and will
  handle the test selection and the failure reporting correctly (the
  debug info will be visible from the end of the test name)
* Add new annotation @no_debug_info_test to disable the generation of
  multiple tests for each debug info format when the test don't have an
  inferior

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

llvm-svn: 248883
2015-09-30 10:12:40 +00:00
Johannes Doerfert ebfd72493c [NFC] Extract materialization of parameters
llvm-svn: 248882
2015-09-30 09:52:08 +00:00
Johannes Doerfert ef19ead20e [FIX] Use escape logic for invariant loads
Before we unconditinoally forced all users outside the SCoP to use
  the preloaded value. However, if the SCoP is not executed due to the
  runtime checks, we need to use the original value because it might not
  be invariant in the first place.

llvm-svn: 248881
2015-09-30 09:43:20 +00:00