Silviu Baranga [Wed, 9 Dec 2015 15:25:28 +0000 (15:25 +0000)]
Revert r255115 until we figure out how to fix the bot failures.
llvm-svn: 255117
Bill Schmidt [Wed, 9 Dec 2015 15:18:30 +0000 (15:18 +0000)]
Avoid extended mnemonic 'mfvrsave' in assembly code
llvm-svn: 255116
Silviu Baranga [Wed, 9 Dec 2015 15:03:52 +0000 (15:03 +0000)]
[LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV expressions
Summary:
This change creates a layer over ScalarEvolution for LAA and LV, and centralizes the
usage of SCEV predicates. The SCEVPredicatedLayer takes the statically deduced knowledge
by ScalarEvolution and applies the knowledge from the SCEV predicates. The end goal is
that both LAA and LV should use this interface everywhere.
This also solves a problem involving the result of SCEV expression rewritting when
the predicate changes. Suppose we have the expression (sext {a,+,b}) and two predicates
P1: {a,+,b} has nsw
P2: b = 1.
Applying P1 and then P2 gives us {a,+,1}, while applying P2 and the P1 gives us
sext({a,+,1}) (the AddRec expression was changed by P2 so P1 no longer applies).
The SCEVPredicatedLayer maintains the order of transformations by feeding back
the results of previous transformations into new transformations, and therefore
avoiding this issue.
The SCEVPredicatedLayer maintains a cache to remember the results of previous
SCEV rewritting results. This also has the benefit of reducing the overall number
of expression rewrites.
Reviewers: mzolotukhin, anemet
Subscribers: jmolloy, sanjoy, llvm-commits
Differential Revision: http://reviews.llvm.org/D14296
llvm-svn: 255115
Robert Lougher [Wed, 9 Dec 2015 14:34:10 +0000 (14:34 +0000)]
Fix cycle in selection DAG introduced by extractelement legalization
During selection DAG legalization, extractelement is replaced with a load
instruction. To do this, a temporary store to the stack is used unless an
existing store is found that can be re-used.
If re-using a store, the chain going out of the store must be replaced by
the one going out of the new load (this ensures that any stores that must
take place after the store happens after the load, else the value might
be overwritten before it is loaded).
The problem is, if the extractelement index is dependent on the store
replacing the chain will introduce a cycle in the selection DAG (the load
uses the index, and by replacing the chain we will make the index dependent
on the load).
To fix this, if the index is dependent on the store, the store is skipped.
This is conservative as we may end up creating an unnecessary extra store
to the stack. However, the situation is not expected to occur very often.
Differential Revision: http://reviews.llvm.org/D15330
llvm-svn: 255114
Oliver Stannard [Wed, 9 Dec 2015 14:32:11 +0000 (14:32 +0000)]
[AArch64] Fix FP16 vector instructions that should only accept low registers
llvm-svn: 255113
Daniel Sanders [Wed, 9 Dec 2015 13:48:05 +0000 (13:48 +0000)]
[mips][ias] Range check uimm10 operands
Summary:
Reviewers: vkalintiris
Subscribers: dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D15229
llvm-svn: 255112
JF Bastien [Wed, 9 Dec 2015 13:29:32 +0000 (13:29 +0000)]
WebAssembly: add known failures
The bots are now running the torture tests properly. Bin all failures from the GCC C torture tests so that we can tackle failures and make the tree go red on regressions.
llvm-svn: 255111
Vasileios Kalintiris [Wed, 9 Dec 2015 13:24:22 +0000 (13:24 +0000)]
[mips] Use multiclass patterns for f32/f64 comparisons and i32 selects.
Summary:
Although the multiclass for i32 selects might seem redundant as it has
only one instantiation, we will use it to replace the correspondent
patterns in Mips64r6InstrInfo.td in follow-up commits.
Reviewers: dsanders
Subscribers: llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D14612
llvm-svn: 255110
Zlatko Buljan [Wed, 9 Dec 2015 13:07:45 +0000 (13:07 +0000)]
Revert r254897 "[mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions"
Commited patch was intended to implement LH, LHE, LHU and LHUE instructions.
After commit test-suite failed with error message in the form of:
fatal error: error in backend: Cannot select: t124: i32,ch = load<LD2[%d](tbaa=<0x94acc48>), sext from i16> t0, t2, undef:i32
For that reason I decided to revert commit r254897 and make new patch which besides implementation and standard regression tests will also have dedicated tests (CodeGen) for the above error.
llvm-svn: 255109
Sagar Thakur [Wed, 9 Dec 2015 12:31:01 +0000 (12:31 +0000)]
[LLDB][MIPS] Adding call to IsMSAAvailable() while creating RegisterInfoInterface
This patch will fix the test case test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs_* of TestLldbGdbServer.py on mips. The test fails because we were sending RegisterInfo for msa registers to client even when msa registers are not available. With this commit server will send E45(end of resigters) response if msa registers are not available.
llvm-svn: 255108
Tobias Grosser [Wed, 9 Dec 2015 11:38:22 +0000 (11:38 +0000)]
executeScopConditionally: Introduce special exiting block
When introducing separate control flow for the original and optimized code we
introduce now a special 'ExitingBlock':
\ /
EnteringBB
|
SplitBlock---------\
_____|_____ |
/ EntryBB \ StartBlock
| (region) | |
\_ExitingBB_/ ExitingBlock
| |
MergeBlock---------/
|
ExitBB
/ \
This 'ExitingBlock' contains code such as the final_reloads for scalars, which
previously were just added to whichever statement/loop_exit/branch-merge block
had been generated last. Having an explicit basic block makes it easier to
find these constructs when looking at the CFG.
llvm-svn: 255107
Tobias Grosser [Wed, 9 Dec 2015 11:38:08 +0000 (11:38 +0000)]
test: Fix misspelled test line
llvm-svn: 255106
Pavel Labath [Wed, 9 Dec 2015 10:54:18 +0000 (10:54 +0000)]
XFAIL TestReturnValue for remote Windows->Android tests
this also adds the ability to match the host platform to the expectedFailureAll decorator.
llvm-svn: 255105
Tamas Berghammer [Wed, 9 Dec 2015 10:16:05 +0000 (10:16 +0000)]
Fix a cleanup error in TestPlatformProcessConnect.py
llvm-svn: 255104
George Rimar [Wed, 9 Dec 2015 09:55:54 +0000 (09:55 +0000)]
[ELF] - Implement the TLS relocation optimization for 32-bit x86.
Implement the TLS relocation optimization for 32-bit x86 that is described in
"ELF Handling For Thread-Local Storage" by Ulrich Drepper, chapter 5,
"IA-32 Linker Optimizations". Specifically, this patch implements these
optimizations: LD->LE, GD->IE, GD->LD, and IE->LE.
Differential revision: http://reviews.llvm.org/D15292
llvm-svn: 255103
JF Bastien [Wed, 9 Dec 2015 09:05:42 +0000 (09:05 +0000)]
EarlyCSE: fix typo from rL255054.
llvm-svn: 255102
Mehdi Amini [Wed, 9 Dec 2015 08:17:42 +0000 (08:17 +0000)]
Revert "Implement a new pass - LiveDebugValues - to compute the set of live DEBUG_VALUEs at each basic block and insert them. Reviewed and accepted at: reviews.llvm.org/D11933"
This reverts commit r255096.
Break the bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/16378/
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255101
Mehdi Amini [Wed, 9 Dec 2015 08:17:35 +0000 (08:17 +0000)]
The current importing scheme is processing one function at a time,
loading the source Module, linking the function in the destination
module, and destroying the source Module before repeating with the
next function to import (potentially from the same Module).
Ideally we would keep the source Module alive and import the next
Function needed from this Module. Unfortunately this is not possible
because the linker does not leave it in a usable state.
However we can do better by first computing the list of all candidates
per Module, and only then load the source Module and import all the
function we need for it.
The trick to process callees is to materialize function in the source
module when building the list of function to import, and inspect them
in their source module, collecting the list of callees for each
callee.
When we move the the actual import, we will import from each source
module exactly once. Each source module is loaded exactly once.
The only drawback it that it requires to have all the lazy-loaded
source Module in memory at the same time.
Currently this patch already improves considerably the link time,
a multithreaded link of llvm-dis on my laptop was:
real 1m12.175s user 6m32.430s sys 0m10.529s
and is now:
real 0m40.697s user 2m10.237s sys 0m4.375s
Note: this is the full link time (linker+Import+Optimizer+CodeGen)
Differential Revision: http://reviews.llvm.org/D15178
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255100
Daniel Jasper [Wed, 9 Dec 2015 07:56:52 +0000 (07:56 +0000)]
clang-format: Improve documentation of AlignOperands.
llvm-svn: 255099
NAKAMURA Takumi [Wed, 9 Dec 2015 07:52:46 +0000 (07:52 +0000)]
Reformat linefeeds.
llvm-svn: 255098
Todd Fiala [Wed, 9 Dec 2015 06:45:43 +0000 (06:45 +0000)]
wire timeouts and exceptional inferior process exits through the test event system
The results formatter system is now fed timeouts and exceptional process
exits (i.e. inferior dotest.py process that exited by signal on POSIX
systems).
If a timeout or exceptional exit happens while a test method is running
on the worker queue, the timeout or exceptional exit is charged and
reported against that test method. Otherwise, if no test method was
running at the time of the timeout or exceptional exit, only the test
filename will be reported as the TIMEOUT or ERROR.
Implements:
https://llvm.org/bugs/show_bug.cgi?id=24830
https://llvm.org/bugs/show_bug.cgi?id=25703
In support of:
https://llvm.org/bugs/show_bug.cgi?id=25450
llvm-svn: 255097
Vikram TV [Wed, 9 Dec 2015 05:49:14 +0000 (05:49 +0000)]
Implement a new pass - LiveDebugValues - to compute the set of live DEBUG_VALUEs at each basic block and insert them. Reviewed and accepted at: reviews.llvm.org/D11933
llvm-svn: 255096
Vikram TV [Wed, 9 Dec 2015 05:16:24 +0000 (05:16 +0000)]
Test commit access - Fix few missing '.' in comments of LoopInterchange code.
llvm-svn: 255095
NAKAMURA Takumi [Wed, 9 Dec 2015 04:35:57 +0000 (04:35 +0000)]
Revert r255001, "Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule."
It causes memory leak. Some tests in test/OpenMP would fail.
llvm-svn: 255094
Jason Molenda [Wed, 9 Dec 2015 04:15:47 +0000 (04:15 +0000)]
Add some additional safety checks to the StructuredData access
methods - lldb can still crash pretty easily on corrupt JSON text,
and these will help eliminate a bunch of cases where that would
result in a crash. Some of the methods would check that e.g.
GetItemAtIndex would actually return an item before dereferencing it,
some would not, that kind of thing.
<rdar://problem/
23768693>
llvm-svn: 255093
Steven Wu [Wed, 9 Dec 2015 03:37:51 +0000 (03:37 +0000)]
Fix the order of destructors in LibLTOCodeGenerator
Summary:
The order of destructors in LTOCodeGenerator gets changed in r254696.
It is possible for LTOCodeGenerator to have a MergedModule created in
the OwnedContext, in which case the module must be destructed before
the context.
Reviewers: rafael, dexonsmith
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D15346
llvm-svn: 255092
Vedant Kumar [Wed, 9 Dec 2015 01:44:02 +0000 (01:44 +0000)]
[Basic] Rangify two for loops. NFC.
llvm-svn: 255091
Sean Callanan [Wed, 9 Dec 2015 01:25:01 +0000 (01:25 +0000)]
When printing warnings, the repeat_key should be
const void * because the data is never accessed,
the pointer is the only useful piece of data.
llvm-svn: 255090
Ahmed Bougacha [Wed, 9 Dec 2015 01:19:50 +0000 (01:19 +0000)]
[AArch64][ARM] Don't base interleaved op legality on type alloc size.
Otherwise, we think that most types that look like they'd fit in a
legal vector type are legal (so, basically, *any* vector type with a
size between 33 and 128 bits, I think, since we use pow2 alignment;
e.g., v2i25, v3f32, ...).
DataLayout::getTypeAllocSize rounds up based on alignment.
When checking for target intrinsic legality, that's not what we want:
if rounding makes a difference, the type isn't legal, and the
target intrinsics shouldn't be used, as they are always assumed legal.
One could make the argument that alloc size is ultimately the most
relevant here, since we're dealing with LD/ST intrinsics. That's only
true if we did legalize them though; that's a problem for another day.
Use DataLayout::getTypeSizeInBits instead of getTypeAllocSizeInBits.
Type::getSizeInBits can't be used because that'd gratuitously break
pointer vector support.
Some of these uses are currently fine, because we only hit them when
the type is already known legal (e.g., r114454). Update them for
consistency. It's faster to avoid the rounding anyway!
llvm-svn: 255089
Sanjoy Das [Wed, 9 Dec 2015 01:01:28 +0000 (01:01 +0000)]
Don't drop attributes when inlining through "deopt" operand bundles
Test case attached (test case also checks that we don't drop the calling
convention, but that functionality was correct before this patch).
llvm-svn: 255088
Rafael Espindola [Wed, 9 Dec 2015 00:55:05 +0000 (00:55 +0000)]
Simplify testMergedProgram.
It now receives and returns std::unique_ptr.
llvm-svn: 255087
Rafael Espindola [Wed, 9 Dec 2015 00:51:06 +0000 (00:51 +0000)]
Simplify memory management. NFC.
This passes std::unique_ptr to predicates that are expected to delete
their argument.
llvm-svn: 255086
Pete Cooper [Wed, 9 Dec 2015 00:46:02 +0000 (00:46 +0000)]
Don't bypass the GOT for delta32toGOT references.
The gcc_except_tab was generating these references to point to the typeinfo in the data section.
gcc_except_tab also had the DW_EH_PE_indirect flag set which means that at runtime we are going
to dereference this entry as if it is in the GOT.
Reviewed by Nick Kledzik in http://reviews.llvm.org/D15360.
llvm-svn: 255085
Rafael Espindola [Wed, 9 Dec 2015 00:34:10 +0000 (00:34 +0000)]
Return std::unique_ptr from SplitFunctionsOutOfModule. NFC.
llvm-svn: 255084
Adrian McCarthy [Wed, 9 Dec 2015 00:29:38 +0000 (00:29 +0000)]
Fix DoReadMemory for Windows mini dumps.
Differential Revision: http://reviews.llvm.org/D15359
llvm-svn: 255083
Rafael Espindola [Wed, 9 Dec 2015 00:18:41 +0000 (00:18 +0000)]
Simplify memory management. NFC.
llvm-svn: 255082
Alexey Samsonov [Wed, 9 Dec 2015 00:12:57 +0000 (00:12 +0000)]
[UBSan] Clarify the way we disable de-duplication of reports from unrecoverable handlers.
Let unrecoverable handlers be responsbile for killing the
program with Die(), and let functions which print the error
report know if it's going to happen. Re-write the comments to
describe the situation.
llvm-svn: 255081
Vyacheslav Klochkov [Wed, 9 Dec 2015 00:12:13 +0000 (00:12 +0000)]
X86-FMA3: Defined the ExeDomain property for Scalar FMA3 opcodes.
Reviewer: Simon Pilgrim.
Differential Revision: http://reviews.llvm.org/D15317
llvm-svn: 255080
Rafael Espindola [Wed, 9 Dec 2015 00:08:22 +0000 (00:08 +0000)]
Simplify memory management a bit. NFC.
llvm-svn: 255079
Rafael Espindola [Tue, 8 Dec 2015 23:57:17 +0000 (23:57 +0000)]
Return a std::unique_ptr from CloneModule. NFC.
llvm-svn: 255078
Sanjoy Das [Tue, 8 Dec 2015 23:52:58 +0000 (23:52 +0000)]
[IndVars] Use any_of and foreach instead of explicit for loops; NFC
llvm-svn: 255077
Reid Kleckner [Tue, 8 Dec 2015 23:36:35 +0000 (23:36 +0000)]
Adjust line numbers to account for new XFAIL comments
llvm-svn: 255076
Alexey Samsonov [Tue, 8 Dec 2015 23:29:36 +0000 (23:29 +0000)]
[UBSan] Remove "-fsanitize=" prefix from ubsan_checks.inc. NFC.
llvm-svn: 255075
Alexey Samsonov [Tue, 8 Dec 2015 23:29:33 +0000 (23:29 +0000)]
[UBSan] Always calculate ErrorType (kind of UB) before printing a report.
Currently, this is an NFC. However, knowing out the kind of error
report before we bring up all the reporting machinery (implemented in
ScopedReport class) is important once we teach UBSan runtime
suppressions.
llvm-svn: 255074
Sanjoy Das [Tue, 8 Dec 2015 23:16:52 +0000 (23:16 +0000)]
[OperandBundles] Have PruneEH work correct with operand bundles.
For an invoke with operand bundles, the [op_begin(), op_end()-3] range
can contain things other than invoke arguments. This change teaches
PruneEH to use arg_begin() and arg_end() explicitly.
llvm-svn: 255073
Pirama Arumuga Nainar [Tue, 8 Dec 2015 23:07:06 +0000 (23:07 +0000)]
Define selection for v4f16, v8f16 scalar_to_vector
Summary:
This fixes failure when trying to select
insertelement <4 x half> undef, half %a, i64 0
which gets transformed to a scalar_to_vector node.
The accompanying v4 and v8 tests fail instruction selection without this
patch.
Reviewers: ab, jmolloy
Subscribers: srhines, llvm-commits
Differential Revision: http://reviews.llvm.org/D15322
llvm-svn: 255072
Mehdi Amini [Tue, 8 Dec 2015 23:04:19 +0000 (23:04 +0000)]
Fix/Improve Debug print in FunctionImport pass
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255071
Reid Kleckner [Tue, 8 Dec 2015 23:00:03 +0000 (23:00 +0000)]
[CGP] Reimplement r255055 a different way
llvm-svn: 255070
Sanjoy Das [Tue, 8 Dec 2015 22:53:36 +0000 (22:53 +0000)]
[SCEV] Use for-each; NFC
llvm-svn: 255069
Xinliang David Li [Tue, 8 Dec 2015 22:51:40 +0000 (22:51 +0000)]
Fix typo
llvm-svn: 255068
Bill Schmidt [Tue, 8 Dec 2015 22:48:02 +0000 (22:48 +0000)]
[PPC64, TSAN] Enable thread sanitizer for PPC64
Patch by Simone Atzeni.
This enables the -fsanitize=thread flag for PPC64 and PPC64LE.
llvm-svn: 255067
Douglas Gregor [Tue, 8 Dec 2015 22:45:17 +0000 (22:45 +0000)]
Objective-C properties: fix bogus use of "isa<>" on a QualType.
The code used "isa" to check the type and then "getAs" to look through
sugar; we need to look through the sugar when checking, too, otherwise
any kind of sugar (nullability qualifiers in the example; or a
typedef) will thwart this semantic check. Fixes rdar://problem/
23804250.
llvm-svn: 255066
Douglas Gregor [Tue, 8 Dec 2015 22:43:32 +0000 (22:43 +0000)]
Module file extensions: pass a Sema through to the extension writer.
Module file extensions are likely to need access to
Sema/Preprocessor/ASTContext, and cannot get it through other
sources.
llvm-svn: 255065
Mehdi Amini [Tue, 8 Dec 2015 22:39:40 +0000 (22:39 +0000)]
Remove caching in FunctionImport: a Module can't be reused after being linked from
The Linker destroys the source module (API change coming to make it explicit)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255064
Reid Kleckner [Tue, 8 Dec 2015 22:33:23 +0000 (22:33 +0000)]
Revert "[CGP] Check that we have an insert point before moving llvm.dbg.value around"
This reverts commit r255055.
Breakage has been reported.
llvm-svn: 255063
Sanjoy Das [Tue, 8 Dec 2015 22:26:08 +0000 (22:26 +0000)]
[OperandBundles] Fix a transform in simplifycfg
Reviewers: pcc, majnemer, reames
Subscribers: reames, llvm-commits
Differential Revision: http://reviews.llvm.org/D15345
llvm-svn: 255062
Simon Pilgrim [Tue, 8 Dec 2015 22:17:11 +0000 (22:17 +0000)]
[X86][AVX] Fold loads + splats into broadcast instructions
On AVX and AVX2, BROADCAST instructions can load a scalar into all elements of a target vector.
This patch improves the lowering of 'splat' shuffles of a loaded vector into a broadcast - currently the lowering only works for cases where we are splatting the zero'th element, which is now generalised to any element.
Fix for PR23022
Differential Revision: http://reviews.llvm.org/D15310
llvm-svn: 255061
Zachary Turner [Tue, 8 Dec 2015 22:15:48 +0000 (22:15 +0000)]
Remove the -c option from dotest.py.
This seems to be a legacy relic from days gone by where the
remote test suite runner operated completely differently than it
does today. git blames and comments traced this functionality
back to about 2012, and nobody seems to know anything about it
now.
llvm-svn: 255060
Bill Schmidt [Tue, 8 Dec 2015 22:14:34 +0000 (22:14 +0000)]
[PPC64, TSAN] Provide setjmp interceptor support for PPC64
This patch provides the assembly support for setjmp/longjmp for use
with the thread sanitizer. This is a big more complicated than for
aarch64, because sibcalls are only legal under our ABIs if the TOC
pointer is unchanged. Since the true setjmp function trashes the TOC
pointer, and we have to leave the stack in a correct state, we emulate
the setjmp function rather than branching to it.
We also need to materialize the TOC for cases where the _setjmp code
is called from libc. This is done differently under the ELFv1 and
ELFv2 ABIs.
llvm-svn: 255059
George Burgess IV [Tue, 8 Dec 2015 22:02:00 +0000 (22:02 +0000)]
[Sema] Add warning when comparing nonnull and null
Currently, we emit warnings in some cases where nonnull function
parameters are compared against null. This patch extends this support
to warn when comparing the result of `returns_nonnull` functions
against null.
More specifically, we will now warn cases like:
int *foo() __attribute__((returns_nonnull));
int main() {
if (foo() == NULL) {} // warning: will always evaluate to false
}
Differential Revision: http://reviews.llvm.org/D15324
llvm-svn: 255058
Bill Schmidt [Tue, 8 Dec 2015 21:54:39 +0000 (21:54 +0000)]
[PPC64, TSAN] LLVM basic enablement of thread sanitizer for PPC64 (BE and LE)
This patch is by Simone Atzeni with portions by Adhemerval Zanella.
This contains the LLVM patches to enable the thread sanitizer for
PPC64, both big- and little-endian. Two different virtual memory
sizes are supported: Old kernels use a 44-bit address space, while
newer kernels require a 46-bit address space.
There are two companion patches that will be added shortly. There is
a Clang patch to actually turn on the use of the thread sanitizer for
PPC64. There is also a patch that I wrote to provide interceptor
support for setjmp/longjmp on PPC64.
Patch discussion at reviews.llvm.org/D12841.
llvm-svn: 255057
Chris Bieneman [Tue, 8 Dec 2015 21:51:48 +0000 (21:51 +0000)]
[CMake] Ignore externalizing debuginfo for unit tests
If you externalize debug info for unit tests the test runner finds the mach-o inside the dsym bundle and tries to execute it as a test.
llvm-svn: 255056
Reid Kleckner [Tue, 8 Dec 2015 21:50:52 +0000 (21:50 +0000)]
[CGP] Check that we have an insert point before moving llvm.dbg.value around
llvm-svn: 255055
Philip Reames [Tue, 8 Dec 2015 21:45:41 +0000 (21:45 +0000)]
[EarlyCSE] Value forwarding for unordered atomics
This patch teaches the fully redundant load part of EarlyCSE how to forward from atomic and volatile loads and stores, and how to eliminate unordered atomics (only). This patch does not include dead store elimination support for unordered atomics, that will follow in the near future.
The basic idea is that we allow all loads and stores to be tracked by the AvailableLoad table. We store a bit in the table which tracks whether load/store was atomic, and then only replace atomic loads with ones which were also atomic.
No attempt is made to refine our handling of ordered loads or stores. Those are still treated as full fences. We could pretty easily extend the release fence handling to release stores, but that should be a separate patch.
Differential Revision: http://reviews.llvm.org/D15337
llvm-svn: 255054
Simon Pilgrim [Tue, 8 Dec 2015 21:43:41 +0000 (21:43 +0000)]
[X86][SSE4A] Added fast-isel intrinsics tests
As discussed on PR24580, this patch adds fast-isel codegen tests to match the IR generated in clang/test/CodeGen/sse4a-builtins.c
llvm-svn: 255053
Simon Pilgrim [Tue, 8 Dec 2015 21:32:08 +0000 (21:32 +0000)]
[X86][SSSE3] Added fast-isel intrinsics tests
As discussed on PR24580, this patch adds fast-isel codegen tests to match the IR generated in clang/test/CodeGen/ssse3-builtins.c
llvm-svn: 255052
Simon Pilgrim [Tue, 8 Dec 2015 21:27:19 +0000 (21:27 +0000)]
[X86][SSE3] Added fast-isel intrinsics tests
As discussed on PR24580, this patch adds fast-isel codegen tests to match the IR generated in clang/test/CodeGen/sse3-builtins.c
llvm-svn: 255051
Simon Pilgrim [Tue, 8 Dec 2015 21:16:45 +0000 (21:16 +0000)]
[X86][AVX2] Stripped backend codegen tests
As discussed on the ml, backend tests need to be put in llvm/test/CodeGen/X86 as fast-isel tests using IR that is as close to what is generated here as possible.
The llvm tests will (re)added in a future commit.
llvm-svn: 255050
Ed Maste [Tue, 8 Dec 2015 20:50:35 +0000 (20:50 +0000)]
Remove default case in switch which covers all enumeration values
This also conveniently eliminates another warning from the unintentional
use of a trigraph:
warning: trigraph converted to '[' character [-Wtrigraphs]
default: printf("???(%u)", type);
^
llvm-svn: 255049
Zachary Turner [Tue, 8 Dec 2015 20:36:22 +0000 (20:36 +0000)]
Remove the -X option from dotest.py
This removes the option to exclude a single directory. This is
part of an effort to remove unused options and cleanup the interface
to the test suite.
llvm-svn: 255048
Artyom Skrobov [Tue, 8 Dec 2015 19:59:01 +0000 (19:59 +0000)]
Fix ARMv4T (Thumb1) epilogue generation
Summary:
Before ARMv5T, Thumb1 code could not pop PC, as described at D14357 and D14986;
so we need the special fixup in the epilogue.
Reviewers: jroelofs, qcolombet
Subscribers: aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D15126
llvm-svn: 255047
Chris Bieneman [Tue, 8 Dec 2015 19:31:33 +0000 (19:31 +0000)]
[CMake] Adding simulator supported runtimes should be done in the block that tests simulator capabilities.
Not sure why I put this in the iOS block originally, it shouldn't be there.
llvm-svn: 255046
Mehdi Amini [Tue, 8 Dec 2015 19:13:31 +0000 (19:13 +0000)]
Revert "Add Available Externally linkage type to isWeakForLinker()"
This reverts r255043, as per post-review concern were raised on the correctness.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255045
Mehdi Amini [Tue, 8 Dec 2015 19:02:55 +0000 (19:02 +0000)]
Cleanup test: remove useless alignment
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255044
Mehdi Amini [Tue, 8 Dec 2015 19:01:29 +0000 (19:01 +0000)]
Add Available Externally linkage type to isWeakForLinker()
Per LangRef: "Globals with available_externally linkage are
allowed to be discarded at will, and are otherwise the same
as linkonce_odr", since linkonce_odr is in this list it makes
sense to have available_externally there as well.
Reviewers: rafael
Differential Revision: http://reviews.llvm.org/D15323
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255043
Eugene Zelenko [Tue, 8 Dec 2015 18:49:01 +0000 (18:49 +0000)]
Use range loops and autos in utils/TableGen/ClangAttrEmitter.cpp and generated code.
Differential revision: http://reviews.llvm.org/D15313
llvm-svn: 255042
Zachary Turner [Tue, 8 Dec 2015 18:48:53 +0000 (18:48 +0000)]
Remove the -g option from dotest.py
This removes the non-exclusive filterspec option as part of an
effort to remove unused / deprecated command line options from
dotest.
llvm-svn: 255041
Zachary Turner [Tue, 8 Dec 2015 18:43:16 +0000 (18:43 +0000)]
Remove the -b option from dotest.py
This removes the blacklist option as part of an effort to remove
unused / unmaintained command line options from the test suite.
llvm-svn: 255040
Rui Ueyama [Tue, 8 Dec 2015 18:39:55 +0000 (18:39 +0000)]
COFF: Create an empty but valid PDF file.
MSVC linker considers PDB files created with this patch valid.
So you don't have to remove PDB files created by lld before
running MSVC linker.
This patch has no test since llvm-pdbdump dislikes PDB files
with no metadata streams.
llvm-svn: 255039
Greg Clayton [Tue, 8 Dec 2015 18:39:50 +0000 (18:39 +0000)]
Change DeclContextFindDeclByName to return a vector of CompilerDecl objects. Opaque pointers should only be used for the decl context object. Also made a default implementation so that GoASTContext doesn't need to override DeclContextFindDeclByName.
llvm-svn: 255038
Zachary Turner [Tue, 8 Dec 2015 18:36:05 +0000 (18:36 +0000)]
Remove +b option from dotest.py
llvm-svn: 255037
Tim Northover [Tue, 8 Dec 2015 18:31:35 +0000 (18:31 +0000)]
X86: produce more friendly errors during MachO relocation handling
llvm-svn: 255036
Zachary Turner [Tue, 8 Dec 2015 18:25:38 +0000 (18:25 +0000)]
Remove the -D option from dotest.py.
This removes the option to dump Python sys.path variable as part
of an effort to remove unused options.
llvm-svn: 255035
Renato Golin [Tue, 8 Dec 2015 18:10:58 +0000 (18:10 +0000)]
[ARM] Allowing SP/PC for AND/BIC mod_imm_not
AND/BIC instructions do accept SP/PC, so the register class should be
more generic (rGPR -> GPR) to cope with that case. Adding more tests.
llvm-svn: 255034
Eugene Zelenko [Tue, 8 Dec 2015 18:00:11 +0000 (18:00 +0000)]
Use range loops and autos in lib/Serialization/ASTWriter.cpp.
Differential revision: http://reviews.llvm.org/D15311
llvm-svn: 255033
Alexey Samsonov [Tue, 8 Dec 2015 17:59:33 +0000 (17:59 +0000)]
[TSan] Remove legacy Makefile.old!
Summary:
It was barely supported for a several years for now, somewhat
rotten and doesn't correspond to the way we build/test TSan runtime
in Clang anymore.
CMake build has proper compile flags, library layout, build
dependencies etc.
Shell scripts that depended on the output of Makefile.old are
either obsolete now (check_cmake.sh), or moved to lit tests
(check_memcpy.sh), or kept as a standalone scripts not suitable
for generic test suite, but invoked on bots (check_analyze.sh).
It is not used on bots anymore: all "interesting" configurations
(gcc/clang as a host compiler; debug/release build types) are now
tested via CMake.
Reviewers: dvyukov, kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15316
llvm-svn: 255032
Alexey Samsonov [Tue, 8 Dec 2015 17:59:30 +0000 (17:59 +0000)]
[CMake] Remove debug output leftovers.
llvm-svn: 255031
Dmitry Vyukov [Tue, 8 Dec 2015 17:54:47 +0000 (17:54 +0000)]
tsan: fix test invisible barrier
Another attempt at fixing tsan_invisible_barrier.
Current implementation causes:
https://llvm.org/bugs/show_bug.cgi?id=25643
There were several unsuccessful iterations for this functionality:
Initially it was implemented in user code using REAL(pthread_barrier_wait). But pthread_barrier_wait is not supported on MacOS. Futexes are linux-specific for this matter.
Then we switched to atomics+usleep(10). But usleep produced parasitic "as-if synchronized via sleep" messages in reports which failed some output tests.
Then we switched to atomics+sched_yield. But this produced tons of tsan- visible events, which lead to "failed to restore stack trace" failures.
Move implementation into runtime and use internal_sched_yield in the wait loop.
This way tsan should see no events from the barrier, so not trace overflows and
no "as-if synchronized via sleep" messages.
llvm-svn: 255030
Hans Wennborg [Tue, 8 Dec 2015 17:54:27 +0000 (17:54 +0000)]
Update clang-format-vs README
VS2013 is requried after r231084.
llvm-svn: 255029
Mike Aizatsky [Tue, 8 Dec 2015 17:44:51 +0000 (17:44 +0000)]
adding readability-identifier-naming to llvm clang-tidy configuration.
Differential Revision: http://reviews.llvm.org/D15196
llvm-svn: 255028
Ron Lieberman [Tue, 8 Dec 2015 16:28:32 +0000 (16:28 +0000)]
[Hexagon] Add NewValueJump support for C4_cmpneq, C4_cmplte, C4_cmplteu
llvm-svn: 255027
Todd Fiala [Tue, 8 Dec 2015 16:22:27 +0000 (16:22 +0000)]
flip on executable bit on test runner tests
llvm-svn: 255025
Rafael Espindola [Tue, 8 Dec 2015 14:54:49 +0000 (14:54 +0000)]
Move all private members together. NFC.
llvm-svn: 255021
Kuba Brecka [Tue, 8 Dec 2015 14:54:43 +0000 (14:54 +0000)]
[tsan] Add dispatch_group API interceptors and synchronization
This patch adds release and acquire semantics for dispatch groups, plus a test case.
Differential Revision: http://reviews.llvm.org/D15048
llvm-svn: 255020
Kuba Brecka [Tue, 8 Dec 2015 14:48:21 +0000 (14:48 +0000)]
[tsan] Fix memcmp interceptor to correctly use COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED
The memcmp interceptor checks COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED only after it calls COMMON_INTERCEPTOR_ENTER, which causes an early process launch crash when running TSan in iOS simulator. Let's fix this by checking COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED as the very first thing in the interceptor.
Differential Revision: http://reviews.llvm.org/D15287
llvm-svn: 255019
Daniel Sanders [Tue, 8 Dec 2015 14:42:10 +0000 (14:42 +0000)]
[mips][ias] Range check uimm8 operands
Summary:
Reviewers: vkalintiris
Subscribers: llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D15226
llvm-svn: 255018
Tamas Berghammer [Tue, 8 Dec 2015 14:27:40 +0000 (14:27 +0000)]
Fix MSVC build after rL255016
llvm-svn: 255017
Tamas Berghammer [Tue, 8 Dec 2015 14:08:19 +0000 (14:08 +0000)]
Modify "platform connect" to connect to processes as well
The standard remote debugging workflow with gdb is to start the
application on the remote host under gdbserver (e.g.: gdbserver :5039
a.out) and then connect to it with gdb.
The same workflow is supported by debugserver/lldb-gdbserver with a very
similar syntax but to access all features of lldb we need to be
connected also to an lldb-platform instance running on the target.
Before this change this had to be done manually with starting a separate
lldb-platform on the target machine and then connecting to it with lldb
before connecting to the process.
This change modifies the behavior of "platform connect" with
automatically connecting to the process instance if it was started by
the remote platform. With this command replacing gdbserver in a gdb
based worflow is usually as simple as replacing the command to execute
gdbserver with executing lldb-platform.
Differential revision: http://reviews.llvm.org/D14952
llvm-svn: 255016
Daniel Sanders [Tue, 8 Dec 2015 13:49:19 +0000 (13:49 +0000)]
[mips][ias] Range check uimm6 operands and fix a bug this revealed.
Summary:
We don't check the size operand on ext/dext*/ins/dins* yet because the
permitted range depends on the pos argument and we can't check that using
this mechanism.
The bug was that dextu/dinsu accepted 0..31 in the pos operand instead of 32..63.
Reviewers: vkalintiris
Subscribers: llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D15190
llvm-svn: 255015
Tamas Berghammer [Tue, 8 Dec 2015 13:43:59 +0000 (13:43 +0000)]
Add a new option to Platform::LoadImage to install the image
This change introduce 3 different working mode for Platform::LoadImage
depending on the file specs specified.
* If only a remote file is specified then the remote file is loaded on
the target (same behavior as before)
* If only a local file is specified then the local file is installed to
the current working directory and then loaded from there.
* If both local and remote file is specified then the local file is
installed to the specified location and then loaded from there.
The same options are exposed on the SB API with a new method LoadImage
method while the old signature presers its meaning.
On the command line the installation of the shared library can be specified
with the "--install" option of "process load".
Differential revision: http://reviews.llvm.org/D15152
llvm-svn: 255014