Commit Graph

212706 Commits

Author SHA1 Message Date
Rui Ueyama 1613c018d4 ELF2: Do not put temporary files to the test toplevel directory.
llvm-svn: 250057
2015-10-12 15:58:38 +00:00
Oliver Stannard cca893ffac [Debug] Look through bitcasts to find argument registers
On targets where f32 is not legal, we have to look through a BITCAST SDNode to
find the register that an argument is stored in when emitting debug info, or we
will not be able to emit a DW_AT_location for it.

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

llvm-svn: 250056
2015-10-12 15:52:36 +00:00
Rui Ueyama 1c42afcbdc Remove explicit Twine instantiation if possible.
llvm-svn: 250055
2015-10-12 15:49:06 +00:00
Rui Ueyama 361d8b9350 Early return.
llvm-svn: 250054
2015-10-12 15:49:02 +00:00
Vasileios Kalintiris 2a95f82859 [mips][FastISel] Clang-format switch statement. NFC.
llvm-svn: 250053
2015-10-12 15:39:41 +00:00
Jun Bum Lim 54f3ddfbe2 [AArch64]Fix bug in function names in test case
Functions in this test case need to be renamed as its names are the same
as the instructions we are comparing with.

llvm-svn: 250052
2015-10-12 15:34:52 +00:00
Rui Ueyama c4b6506521 ELF2: Move createELFFile() from .h to .cpp.
llvm-svn: 250051
2015-10-12 15:31:09 +00:00
Rui Ueyama 2ee8e113ba Remove redundant namespace specifiers.
llvm-svn: 250050
2015-10-12 15:27:09 +00:00
Sanjay Patel 53d1d8b731 fix capitalization; NFC
llvm-svn: 250049
2015-10-12 15:24:01 +00:00
Rui Ueyama 0cef68913e ELF2: Handle default entry name in the driver.
llvm-svn: 250048
2015-10-12 15:23:54 +00:00
Rui Ueyama 4702b86176 Fix indentation.
llvm-svn: 250047
2015-10-12 15:15:45 +00:00
Greg Bedwell 7f68a71669 Fix rename() sometimes failing if another process uses openFileForRead()
On Windows, fs::rename() could fail is another process was reading the
file at the same time using fs::openFileForRead().  In most cases the user
wouldn't notice as fs::rename() will continue to retry for 2000ms.  Typically
this is enough for the read to complete and a retry to succeed, but if the
disk is being it too hard then the response time might be longer than the
retry time and the rename would fail with a permission error.

Add FILE_SHARE_DELETE to the sharing flags for CreateFileW() in
fs::openFileForRead() and try ReplaceFileW() prior to MoveFileExW()
in fs::rename().

Based on an initial patch by Edd Dawson!

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

llvm-svn: 250046
2015-10-12 15:11:47 +00:00
Simon Atanasyan 3b732ac7ee [ELF2][mips] Support R_MIPS_32 relocation
llvm-svn: 250045
2015-10-12 15:10:02 +00:00
Adrian McCarthy 040b31d386 Switch threading mode for tests on Windows when there are lots of cores.
This prevents a "too many files" error.

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

llvm-svn: 250044
2015-10-12 14:46:57 +00:00
Simon Atanasyan ecce7e1cac [Driver] Remove `else` after `return`
llvm-svn: 250043
2015-10-12 14:32:57 +00:00
Daniel Sanders b1ef88c172 [mips][ias] Implement macro expansion when bcc has an immediate where a register belongs.
Summary: Fixes PR24915.

Reviewers: vkalintiris

Subscribers: emaste, seanbruno, llvm-commits

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

llvm-svn: 250042
2015-10-12 14:24:05 +00:00
Daniel Sanders 332cef6c5f [mips] Whitespace cleanup in MIPS16 tests to reduce noise in following changes. NFC.
Mostly tabs -> spaces and double spacing.

llvm-svn: 250041
2015-10-12 14:16:52 +00:00
Daniel Sanders 2a5ce1ace0 [mips] Clean up most macro expansions to use the emit*() functions.
Reviewers: vkalintiris

Subscribers: llvm-commits

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

llvm-svn: 250040
2015-10-12 14:09:12 +00:00
Daniel Sanders 2fb8564d99 [mips] Handle undef when extracting subregs from FP64 registers.
Summary:
This removes unnecessary instructions when extracting from an undefined register
and also fixes a crash for O32 when passing undef to a double argument in
held in integer registers.

Reviewers: vkalintiris

Subscribers: llvm-commits, zoran.jovanovic, petarj

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

llvm-svn: 250039
2015-10-12 13:55:44 +00:00
Pavel Labath f882f6fcd5 dotest.py: Remove useless AttributeError catches
Summary:
Test decorators were ignoring AttributeError exceptions. These were introduced three years ago,
and copied to all decorators. They seem to serve no purpose and removing them produces no errors.
Given that they have prevented us from noticing the problem in r249819, I am removing them.

Reviewers: zturner, tfiala

Subscribers: iancottrell, lldb-commits

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

llvm-svn: 250038
2015-10-12 13:42:16 +00:00
Benjamin Kramer 753726d6a9 [VFS] Unbreak test.
llvm-svn: 250037
2015-10-12 13:39:33 +00:00
Benjamin Kramer 4ad1c43edd [VFS] Don't try to be heroic with '.' in paths.
Actually the only special path we have to handle is ./foo, the rest is
tricky to get right so do the same thing as the existing YAML vfs here.

llvm-svn: 250036
2015-10-12 13:30:38 +00:00
Oliver Stannard 939724cd02 GlobalOpt does not treat externally_initialized globals correctly
GlobalOpt currently merges stores into the initialisers of internal,
externally_initialized globals, but should not do so as the value of the global
may change between the initialiser and any code in the module being run.

llvm-svn: 250035
2015-10-12 13:20:52 +00:00
Aaron Ballman 20c1971db3 Added documentation for misc-throw-by-value-catch-by-reference.
Patch by Tobias Langner.

llvm-svn: 250034
2015-10-12 12:57:55 +00:00
James Molloy fa4e994a7a [ARM] Mark Swift MISched model as incomplete
The Swift Machine Scheduler Model is incomplete. There are instructions
missing which can trigger the "incomplete machine model" abort. This was
observed when a downstream SchedMachineModel was added to the ARM
target.

Patch by Christof Douma!

llvm-svn: 250033
2015-10-12 12:49:59 +00:00
James Molloy 55d633bd60 [LoopVectorize] Shrink integer operations into the smallest type possible
C semantics force sub-int-sized values (e.g. i8, i16) to be promoted to int
type (e.g. i32) whenever arithmetic is performed on them.

For targets with native i8 or i16 operations, usually InstCombine can shrink
the arithmetic type down again. However InstCombine refuses to create illegal
types, so for targets without i8 or i16 registers, the lengthening and
shrinking remains.

Most SIMD ISAs (e.g. NEON) however support vectors of i8 or i16 even when
their scalar equivalents do not, so during vectorization it is important to
remove these lengthens and truncates when deciding the profitability of
vectorization.

The algorithm this uses starts at truncs and icmps, trawling their use-def
chains until they terminate or instructions outside the loop are found (or
unsafe instructions like inttoptr casts are found). If the use-def chains
starting from different root instructions (truncs/icmps) meet, they are
unioned. The demanded bits of each node in the graph are ORed together to form
an overall mask of the demanded bits in the entire graph. The minimum bitwidth
that graph can be truncated to is the bitwidth minus the number of leading
zeroes in the overall mask.

The intention is that this algorithm should "first do no harm", so it will
never insert extra cast instructions. This is why the use-def graphs are
unioned, so that subgraphs with different minimum bitwidths do not need casts
inserted between them.

This algorithm works hard to reduce compile time impact. DemandedBits are only
queried if there are extends of illegal types and if a truncate to an illegal
type is seen. In the general case, this results in a simple linear scan of the
instructions in the loop.

No non-noise compile time impact was seen on a clang bootstrap build.

llvm-svn: 250032
2015-10-12 12:34:45 +00:00
Rafael Espindola fb677dfd73 Make getStaticELFKind a member function now that we can.
llvm-svn: 250031
2015-10-12 12:14:30 +00:00
Rafael Espindola b9ca7bb6ab Delete getFirstELF.
llvm-svn: 250030
2015-10-12 11:52:31 +00:00
Amjad Aboud 1db6d7af46 [X86] Add XSAVE intrinsic family
Add intrinsics for the
  XSAVE instructions (XSAVE/XSAVE64/XRSTOR/XRSTOR64)
  XSAVEOPT instructions (XSAVEOPT/XSAVEOPT64)
  XSAVEC instructions (XSAVEC/XSAVEC64)
  XSAVES instructions (XSAVES/XSAVES64/XRSTORS/XRSTORS64)

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

llvm-svn: 250029
2015-10-12 11:47:46 +00:00
Rafael Espindola 9b278a1695 This doesn't need to be virtual anymore.
llvm-svn: 250028
2015-10-12 11:26:55 +00:00
Andrea Di Biagio a0922ed8fe [x86] PR24562: fix incorrect folding of PSHUFB nodes with a mask where all indices have the most significant bit set.
This patch fixes a problem in function 'combineX86ShuffleChain' that causes a
chain of shuffles to be wrongly folded away when the combined shuffle mask has
only one element.

We may end up with a combined shuffle mask of one element as a result of
multiple calls to function 'canWidenShuffleElements()'.
Function canWidenShuffleElements attempts to simplify a shuffle mask by widening
the size of the elements being shuffled.
For every pair of shuffle indices, function canWidenShuffleElements checks if
indices refer to adjacent elements. If all pairs refer to "adjacent" elements
then the shuffle mask is safely widened. As a consequence of widening, we end up
with a new shuffle mask which is half the size of the original shuffle mask.

The byte shuffle (pshufb) from test pr24562.ll has a mask of all SM_SentinelZero
indices. Function canWidenShuffleElements would combine each pair of
SM_SentinelZero indices into a single SM_SentinelZero index. So, in a
logarithmic number of steps (4 in this case), the pshufb mask is simplified to
a mask with only one index which is equal to SM_SentinelZero.

Before this patch, function combineX86ShuffleChain wrongly assumed that a mask
of size one is always equivalent to an identity mask. So, the entire shuffle
chain was just folded away as the combined shuffle mask was treated as a no-op
mask.

With this patch we know check if the only element of a combined shuffle mask is
SM_SentinelZero. In case, we propagate a zero vector.

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

llvm-svn: 250027
2015-10-12 11:25:41 +00:00
Zlatko Buljan d76b666a06 Test commit
llvm-svn: 250026
2015-10-12 11:19:40 +00:00
Pawel Bylica b29e96d29f cmake: Avoid leading space in LLVM_DEFINITIONS.
Summary: Unnecessary space at the beginning of LLVM_DEFINITIONS in cmake shared files can break projects that use the variable.

Subscribers: llvm-commits

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

llvm-svn: 250025
2015-10-12 10:42:03 +00:00
Tamas Berghammer 6faa07fac5 Improve TestValueOfVectorVariable
* XFAIL it for android arm/aarch64 as watchpoints aren't supported there
* Remove the dwarf/dsym test separation as they will be generated automatically

llvm-svn: 250024
2015-10-12 10:33:04 +00:00
Jonas Paulsson 233b9ce8bf [SystemZ] testcase MC/SystemZ/insn-good-z13.s extended.
New instructions using floating point registers have been added, to check
that AsmParser can deal with fp regs in vector instructions.

This tests r249810.

llvm-svn: 250023
2015-10-12 10:13:57 +00:00
Abhishek Aggarwal b352a1c88f X86: Change FTAG register size in FXSAVE structure
Summary:
 - Changed from 16 bits to 8 bits for Intel Architecture
    -- FXSAVE structure now conforms with the layout of FXSAVE
       area specified by IA Architecture Software Developer Manual

 - Modified Linux and FreeBSD specific files to support this change
    -- MacOSX already uses 8 bits for ftag register

 - Modified TestRegisters.py and a.cpp:
    -- Change allows 8 bit comparison of ftag values

    -- Change resolves Bug 24733:
       Removed XFAIL for Clang as the test works and passes for
       Clang compiler as well

    -- Change provides a Generic/Better way of testing Bug 24457
       and Bug 25050 by using 'int3' inline assembly in inferior

Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>

Reviewers: ovyalov, jingham, clayborg

Subscribers: tfiala, emaste

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

llvm-svn: 250022
2015-10-12 09:57:00 +00:00
Benjamin Kramer c3741ec8d3 [VFS] remove handling of '..' for now.
This can fail badly if we're overlaying a real file system and there are
symlinks there. Just keep the path as-is for now.

This essentially reverts r249830.

llvm-svn: 250021
2015-10-12 09:22:07 +00:00
James Molloy 6558edcaf5 [MISched] Python script to check coverage of misched info
This script prints a CSV of all misched models of a target when given the output of the debug output of subtarget using:

    llvm-tblgen --gen-subtarget --debug-only=subtarget-emitter ...

With thanks to Dave Estes for mentioning the idea at the 2014 LLVM Developers' Meeting.

Patch by Christof Douma!

llvm-svn: 250020
2015-10-12 08:50:47 +00:00
Tobias Grosser e2c8275346 ScopInfo: Allow simple 'AddRec * Parameter' products in delinearization
We also allow such products for cases where 'Parameter' is loaded within the
scop, but where we can dynamically verify that the value of 'Parameter' remains
unchanged during the execution of the scop.

This change relies on Polly's new RequiredILS tracking infrastructure recently
contributed by Johannes.

llvm-svn: 250019
2015-10-12 08:02:30 +00:00
Tobias Grosser 374bce0c22 SCEV: Allow simple AddRec * Parameter products in delinearization
This patch also allows the -delinearize pass to delinearize expressions that do
not have an outermost SCEVAddRec expression. The SCEV::delinearize
infrastructure allowed this since r240952, but the -delinearize pass was not
updated yet.

llvm-svn: 250018
2015-10-12 08:02:00 +00:00
Alexey Bataev 6d45532961 [ATTR] Automatic line feed after pragma-like attribute.
Automatically insert line feed after pretty printing of all pragma-like attributes + fix printing of pragma-like pragmas on declarations.
Differential Revision: http://reviews.llvm.org/D13546

llvm-svn: 250017
2015-10-12 06:59:48 +00:00
Craig Topper 8d2e6bc25b [X86] Use u8imm for the immediate type for all shift and rotate instructions. This way the assembler will perform range checking. Believe this matches gas behavior.
llvm-svn: 250016
2015-10-12 06:23:10 +00:00
Tobias Grosser 3c037fd396 Delete leftover function declaration
The function's definition was already removed in r247289.

llvm-svn: 250015
2015-10-12 05:14:03 +00:00
Craig Topper d6b661dbf0 [X86] Add support to assembler and MCInst lowering to use the other vmovq %xmmX, %xmmX encoding if it would be a shorter VEX encoding.
llvm-svn: 250014
2015-10-12 04:57:59 +00:00
Craig Topper 635e05df0a [X86] Cleanup formatting a bit. NFC
llvm-svn: 250013
2015-10-12 04:27:17 +00:00
Craig Topper 5be914eda1 [X86] Change the immediate for IN/OUT instructions to u8imm so the assembly parser will check the size.
llvm-svn: 250012
2015-10-12 04:17:55 +00:00
Craig Topper 95fffba227 [X86] Add some instruction aliases to get the assembly parser table to favor arithmetic instructions with 8-bit immediates over the forms that implicitly use the ax/eax/rax.
This allows us to remove the explicit code for working around the existing priority

llvm-svn: 250011
2015-10-12 03:39:57 +00:00
Daniel Jasper 4d72449de6 clang-format: Fixed typecast getting put on a separate line from the
key in Obj-C dictionary literals

This fixes: https://llvm.org/PR22647

Patch by Kent Sutherland. Thank you.

llvm-svn: 250010
2015-10-12 03:19:07 +00:00
Daniel Jasper 8d0e223498 clang-format: [JS] handle character classes in regexes.
Slashes in regular expressions do not need to be escaped and do not
terminate the regular expression even without a preceding backslash.

Patch by Martin Probst. Thank you.

llvm-svn: 250009
2015-10-12 03:13:48 +00:00
Saleem Abdulrasool d79eec97fc bindings: add new C++ function attribute accessors
Add methods to index Cursor to see if a cxx method is pure_virtual,
virtual or const methods.

Patch by Jonathan B Coe!

llvm-svn: 250008
2015-10-12 03:10:20 +00:00