Bruno Cardoso Lopes [Fri, 6 Mar 2015 14:41:56 +0000 (14:41 +0000)]
[AsmPrinter][TLOF] Split tests and move to appropriate directories
Follow up from r231474 and 231475 to appease buildbots
llvm-svn: 231480
Robert Flack [Fri, 6 Mar 2015 14:36:33 +0000 (14:36 +0000)]
Rename test/tools/lldb-gdbserver to test/tools/lldb-server
As requested in http://reviews.llvm.org/D7545 this change moves test/tools/lldb-gdbserver to test/tools/lldb-server ot match the name of the target being tested.
Differential Revision: http://reviews.llvm.org/D8061
llvm-svn: 231479
Kuba Brecka [Fri, 6 Mar 2015 14:33:56 +0000 (14:33 +0000)]
Symbolizer refactoring: Make WinSymbolizer use SymbolizerTool interface
Reviewed at http://reviews.llvm.org/D8089
llvm-svn: 231478
Aaron Ballman [Fri, 6 Mar 2015 14:24:53 +0000 (14:24 +0000)]
Removing code that is unused after r231424; NFC.
llvm-svn: 231477
Benjamin Kramer [Fri, 6 Mar 2015 14:15:57 +0000 (14:15 +0000)]
Use delegating ctors to reduce code duplication. NFC.
llvm-svn: 231476
Bruno Cardoso Lopes [Fri, 6 Mar 2015 13:49:05 +0000 (13:49 +0000)]
[AsmPrinter][TLOF] 32-bit MachO support for replacing GOT equivalents
Add MachO 32-bit (i.e. arm and x86) support for replacing global GOT equivalent
symbol accesses. Unlike 64-bit targets, there's no GOTPCREL relocation, and
access through a non_lazy_symbol_pointers section is used instead.
-- before
_extgotequiv:
.long _extfoo
_delta:
.long _extgotequiv-_delta
-- after
_delta:
.long L_extfoo$non_lazy_ptr-_delta
.section __IMPORT,__pointers,non_lazy_symbol_pointers
L_extfoo$non_lazy_ptr:
.indirect_symbol _extfoo
.long 0
llvm-svn: 231475
Bruno Cardoso Lopes [Fri, 6 Mar 2015 13:48:45 +0000 (13:48 +0000)]
[AsmPrinter][TLOF] ARM64 MachO support for replacing GOT equivalents
Follow up r230264 and add ARM64 support for replacing global GOT
equivalent symbol accesses by references to the GOT entry for the final
symbol instead, example:
-- before
.globl _foo
_foo:
.long 42
.globl _gotequivalent
_gotequivalent:
.quad _foo
.globl _delta
_delta:
.long _gotequivalent-_delta
-- after
.globl _foo
_foo:
.long 42
.globl _delta
Ltmp3:
.long _foo@GOT-Ltmp3
llvm-svn: 231474
Benjamin Kramer [Fri, 6 Mar 2015 13:46:50 +0000 (13:46 +0000)]
CodingStyle: Allow delegating ctors
Delegating constructors seem to work fine with all supported compilers.
llvm-svn: 231473
Toma Tabacu [Fri, 6 Mar 2015 12:15:12 +0000 (12:15 +0000)]
[mips] [IAS] Add missing constraints and improve testing for the .module directive.
Summary:
None of the .set directives can be used before the .module directives. The .set mips0/pop/push were not triggering this constraint.
Also added testing for all the other implemented directives which are supposed to trigger this constraint.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7140
llvm-svn: 231465
Daniel Jasper [Fri, 6 Mar 2015 10:57:12 +0000 (10:57 +0000)]
clang-format: Slightly change indentation rules in for loops.
There was already a TODO to double-check whether the extra indenation
makes sense. A slightly different case reveals that it is actively harmful:
for (int i = 0; i <
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
bbbbbbbbbbbbbbbbbbbb <
ccccccccccccccc;
++i) {
}
Here (and it is probably not a totally infrequent case, it just works out that
"i < " is four spaces and so the four space extra indentation makes the
operator precedence confusing. So, this will now instead be formatted
as:
for (int i = 0; i <
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
bbbbbbbbbbbbbbbbbbbb <
ccccccccccccccc;
++i) {
}
llvm-svn: 231461
Pavel Labath [Fri, 6 Mar 2015 10:52:47 +0000 (10:52 +0000)]
Fix race condition with -o "process launch" on linux
Summary:
starting a debug session on linux with -o "process launch" lldb parameter was failing since
Target::Launch (in sychronous mode) is expecting to be able to receive public process events.
However, PlatformLinux did not set up event hijacking on process launch, which caused these
events to be processed elsewhere and left Target::Launch hanging. This patch enables event
interception in PlatformLinux (which was commented out).
Upon enabling event interception, I noticed an issue, which I traced back to the inconsistent
state of public run lock, which remained false even though public and private process states were
"stopped". I addressed this by making sure the run lock is "stopped" upon exit from
WaitForProcessToStop (which already had similar provisions for other return paths).
Test Plan: This should fix the intermittent TestFormats failure we have been experiencing on Linux.
Reviewers: jingham, clayborg, vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8079
llvm-svn: 231460
Daniel Jasper [Fri, 6 Mar 2015 10:39:14 +0000 (10:39 +0000)]
Change the way in which error case is being handled.
Specifically this:
* Prevents an "unused" warning in non-assert builds.
* In that error case return with out removing a child loop instead of
looping forever.
llvm-svn: 231459
Karthik Bhat [Fri, 6 Mar 2015 10:11:25 +0000 (10:11 +0000)]
Add a new pass "Loop Interchange"
This pass interchanges loops to provide a more cache-friendly memory access.
For e.g. given a loop like -
for(int i=0;i<N;i++)
for(int j=0;j<N;j++)
A[j][i] = A[j][i]+B[j][i];
is interchanged to -
for(int j=0;j<N;j++)
for(int i=0;i<N;i++)
A[j][i] = A[j][i]+B[j][i];
This pass is currently disabled by default.
To give a brief introduction it consists of 3 stages-
LoopInterchangeLegality : Checks the legality of loop interchange based on Dependency matrix.
LoopInterchangeProfitability: A very basic heuristic has been added to check for profitibility. This will evolve over time.
LoopInterchangeTransform : Which does the actual transform.
LNT Performance tests shows improvement in Polybench/linear-algebra/kernels/mvt and Polybench/linear-algebra/kernels/gemver becnmarks.
TODO:
1) Add support for reductions and lcssa phi.
2) Improve profitability model.
3) Improve loop selection algorithm to select best loop for interchange. Currently the innermost loop is selected for interchange.
4) Improve compile time regression found in llvm lnt due to this pass.
5) Fix issues in Dependency Analysis module.
A special thanks to Hal for reviewing this code.
Review: http://reviews.llvm.org/D7499
llvm-svn: 231458
Dmitry Vyukov [Fri, 6 Mar 2015 08:43:44 +0000 (08:43 +0000)]
asan: fix comment formatting
As per comments in http://reviews.llvm.org/D8032
llvm-svn: 231457
David Majnemer [Fri, 6 Mar 2015 08:11:32 +0000 (08:11 +0000)]
X86: Form IMGREL relocations for LLVM Functions
We supported forming IMGREL relocations from ConstantExprs involving
__ImageBase if the minuend was a GlobalVariable. Extend this
functionality to all GlobalObjects.
llvm-svn: 231456
Yaron Keren [Fri, 6 Mar 2015 07:49:14 +0000 (07:49 +0000)]
Silence C4715 'not all control paths return a value' warnings.
llvm-svn: 231455
Rui Ueyama [Fri, 6 Mar 2015 06:53:13 +0000 (06:53 +0000)]
PECOFF: Optimize the writer using parallel_for.
Previously applying 1 million relocations took about 2 seconds on my
Xeon 2.4GHz 8 core workstation. After this patch, it takes about 300
milliseconds. As a result, time to link chrome.dll becomes 23 seconds
to 21 seconds.
llvm-svn: 231454
Eric Fiselier [Fri, 6 Mar 2015 06:22:22 +0000 (06:22 +0000)]
Remove unneeded python import
llvm-svn: 231453
Rui Ueyama [Fri, 6 Mar 2015 06:07:32 +0000 (06:07 +0000)]
Support: Improve performance of FileOutputBuffer on Windows
We extend an underlying file before mmap'ing it, but it's not needed
on Windows. Extending file is slow on Windows, so we should avoid doing that.
The difference gets larger as the size of an output file gets larger.
It shove off 2 seconds out of 25 seconds when linking chrome.dll with LLD,
for example.
llvm-svn: 231452
Nico Weber [Fri, 6 Mar 2015 06:01:06 +0000 (06:01 +0000)]
Don't crash on non-public referenced dtors in toplevel classes.
Fixes PR22793, a bug that caused self-hosting to fail after the innocuous
r231254. See the bug for details.
llvm-svn: 231451
Enrico Granata [Fri, 6 Mar 2015 03:37:33 +0000 (03:37 +0000)]
Windows bot
llvm-svn: 231450
Enrico Granata [Fri, 6 Mar 2015 03:32:20 +0000 (03:32 +0000)]
Provide synthetic children for some vector types
Unlike GDB, we tackle the problem of representing vector types in different styles by having a synthetic child provider that recognizes the format you're trying to apply to the variable, and coming up with the right type and number of child values to match that format
This makes for a more compact representation and less visual noise
Fixes rdar://5429347
llvm-svn: 231449
Andrew Wilkins [Fri, 6 Mar 2015 02:49:07 +0000 (02:49 +0000)]
[llgo] Disable known failing packages in check-libgo
Summary:
There are two packages in libgo which have
known failures when running the "make check" rule.
This change disables those packages in the tests so
that we can run libgo tests without them until the
root causes are identified and resolved.
Test Plan: ran check-libgo rule
Reviewers: pcc
Reviewed By: pcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8003
llvm-svn: 231448
Michael Gottesman [Fri, 6 Mar 2015 02:10:03 +0000 (02:10 +0000)]
[objc-arc] Sprinkle some more auto on some iterators.
llvm-svn: 231447
Michael Gottesman [Fri, 6 Mar 2015 02:07:12 +0000 (02:07 +0000)]
[objc-arc] Move the detection of potential uses or altering of a ref count onto PtrState.
llvm-svn: 231446
Davide Italiano [Fri, 6 Mar 2015 02:05:03 +0000 (02:05 +0000)]
We want to add the entry point to the root set unconditionally, but these
asserts don't allow us to do it. Remove them, they're not really needed
anyway.
llvm-svn: 231445
Rui Ueyama [Fri, 6 Mar 2015 01:44:07 +0000 (01:44 +0000)]
Remove unused function.
llvm-svn: 231444
Michael Zolotukhin [Fri, 6 Mar 2015 01:13:01 +0000 (01:13 +0000)]
LegalizeTypes: Handle shift by 0 in ExpandShiftByConstant.
Though such shifts are usually optimized away by combiner, we still can
encounter them after a vector shift is legalized.
llvm-svn: 231443
Rafael Espindola [Fri, 6 Mar 2015 00:50:21 +0000 (00:50 +0000)]
Remember to move a type to the correct set when setting the body.
We would set the body of a struct type (therefore making it non-opaque)
but were forgetting to move it to the non-opaque set.
Fixes pr22807.
llvm-svn: 231442
Jason Molenda [Fri, 6 Mar 2015 00:45:01 +0000 (00:45 +0000)]
Bump major vers # in xcode project file from 330 to 340.
llvm-svn: 231441
John Thompson [Fri, 6 Mar 2015 00:39:42 +0000 (00:39 +0000)]
Renamed function to avoid confusion about purpose.
llvm-svn: 231440
Michael Gottesman [Fri, 6 Mar 2015 00:34:42 +0000 (00:34 +0000)]
[objc-arc] Move the checking of whether or not we can match onto PtrStates and out of the main dataflow.
These refactored computations check whether or not we are at a stage
of the sequence where we can perform a match. This patch moves the
computation out of the main dataflow and into
{BottomUp,TopDown}PtrState.
llvm-svn: 231439
Michael Gottesman [Fri, 6 Mar 2015 00:34:39 +0000 (00:34 +0000)]
[objc-arc] Refactor (Re-)initialization of PtrState from dataflow -> {TopDown,BottomUp}PtrState Class.
This initialization occurs when we see a new retain or release. Before
we performed the actual initialization inline in the dataflow. That is
just messy.
llvm-svn: 231438
Michael Gottesman [Fri, 6 Mar 2015 00:34:36 +0000 (00:34 +0000)]
[objc-arc] Create two subclasses of PtrState in preparation for moving per ptr state change behavior onto a PtrState class.
This will enable the main ObjCARCOpts dataflow to work with higher
level concepts such as "can this ptr state be modified by this ref
count" and not need to understand the nitty gritty details of how that
is determined. This makes the dataflow cleaner.
llvm-svn: 231437
Michael Gottesman [Fri, 6 Mar 2015 00:34:33 +0000 (00:34 +0000)]
[objc-arc] Extract out MDNodes into a cache structure so the information can be passed around.
llvm-svn: 231436
Michael Gottesman [Fri, 6 Mar 2015 00:34:29 +0000 (00:34 +0000)]
[objc-arc] Remove annotations code.
It will always be in the history if it is needed again. Now it is just dead
code.
llvm-svn: 231435
Rui Ueyama [Fri, 6 Mar 2015 00:28:41 +0000 (00:28 +0000)]
Core: Make the resolver faster.
In the resolver, we maintain a list of undefined symbols, and when we
visit an archive file, we check that file if undefined symbols can be
resolved using files in the archive. The archive file class provides
find() function to lookup a symbol.
Previously, we call find() for each undefined symbols. Archive files
may be visited multiple times if they are in a --start-group and
--end-group. If we visit a file M times and if we have N undefined
symbols, find() is called M*N times. I found that that is one of the
most significant bottlenecks in LLD when linking a large executable.
find() is not a very cheap operation because it looks up a hash table
for a given string. And a string, or a symbol name, can be pretty long
if you are dealing with C++ symbols.
We can eliminate the bottleneck.
Calling find() with the same symbol multiple times is a waste. If a
result of looking up a symbol is "not found", it stays "not found"
forever because the symbol simply doesn't exist in the archive.
Thus, we should call find() only for newly-added undefined symbols.
This optimization makes O(M*N) O(N).
In this patch, all undefined symbols are added to a vector. For each
archive/shared library file, we maintain a start position P. All
symbols [0, P) are already searched. [P, end of the vector) are not
searched yet. For each file, we scan the vector only once.
This patch changes the order in which undefined symbols are looked for.
Previously, we iterated over the result of _symbolTable.undefines().
Now we iterate over the new vector. This is a benign change but caused
differences in output if remaining undefines exist. This is why some
tests are updated.
The performance improvement of this patch seems sometimes significant.
Previously, linking chrome.dll on my workstation (Xeon 2.4GHz 8 cores)
took about 70 seconds. Now it takes (only?) 30 seconds!
http://reviews.llvm.org/D8091
llvm-svn: 231434
Nadav Rotem [Fri, 6 Mar 2015 00:23:58 +0000 (00:23 +0000)]
Teach ComputeNumSignBits about signed reminder.
This optimization a continuation of r231140 that reasoned about signed div.
llvm-svn: 231433
Rui Ueyama [Fri, 6 Mar 2015 00:22:48 +0000 (00:22 +0000)]
Optimize resolver by using std::unordered_multimap.
_reverseRef is a multimap from atoms to atoms. The map contains
reverse edges of "layout-before" and "group" edges for dead-stripping.
The type of the variable was DenseMap<Atom *, DenseSet<Atom *>>.
This patch changes that to std::unordered_multimap<Atom *, Atom *>.
A DenseMap with a value type of DenseSet was not fast. Inserting 900k
items to the map took about 1.6 seconds on my workstation.
unordered_multimap on the other hand took only 0.6 seconds.
Use of the map also got faster -- originally markLive took 1.3 seconds
in the same test case, and it now took 1.0 seconds. In total we shove
off 1.3 seconds out of 27 seconds in that test case.
llvm-svn: 231432
Hans Wennborg [Fri, 6 Mar 2015 00:13:55 +0000 (00:13 +0000)]
Add a download link to the web page (PR22764)
llvm-svn: 231431
Michael Gottesman [Thu, 5 Mar 2015 23:57:07 +0000 (23:57 +0000)]
Fix build error.
llvm-svn: 231430
Kuba Brecka [Thu, 5 Mar 2015 23:41:47 +0000 (23:41 +0000)]
Add a symbolizer testcase for closed stdin/stdout
Reviewed at http://reviews.llvm.org/D7973
llvm-svn: 231429
Kuba Brecka [Thu, 5 Mar 2015 23:38:23 +0000 (23:38 +0000)]
Print out which symbolizer are we using when verbosity >= 2
Reviewed at http://reviews.llvm.org/D8087
llvm-svn: 231428
Michael Gottesman [Thu, 5 Mar 2015 23:29:06 +0000 (23:29 +0000)]
[objc-arc] Change some casts and loop iterators to use auto.
llvm-svn: 231427
Michael Gottesman [Thu, 5 Mar 2015 23:29:03 +0000 (23:29 +0000)]
[objc-arc] Extract out state specific to a ref count from the main objc arc sequence dataflow. This will allow me to separate the actual ARC queries from the meat of the dataflow algorithm.
llvm-svn: 231426
Michael Gottesman [Thu, 5 Mar 2015 23:28:58 +0000 (23:28 +0000)]
[objc-arc] Extract blot map vector into its own file. NFC.
llvm-svn: 231425
Richard Smith [Thu, 5 Mar 2015 23:24:12 +0000 (23:24 +0000)]
[modules] Rework merging of redeclaration chains on module import.
We used to save out and eagerly load a (potentially huge) table of merged
formerly-canonical declarations when we loaded each module. This was extremely
inefficient in the presence of large amounts of merging, and didn't actually
save any merging lookup work, because we still needed to perform name lookup to
check that our merged declaration lists were complete. This also resulted in a
loss of laziness -- even if we only needed an early declaration of an entity, we
would eagerly pull in all declarations that had been merged into it regardless.
We now store the relevant fragments of the table within the declarations
themselves. In detail:
* The first declaration of each entity within a module stores a list of first
declarations from imported modules that are merged into it.
* Loading that declaration pre-loads those other entities, so that they appear
earlier within the redeclaration chain.
* The name lookup tables list the most recent local lookup result, if there
is one, or all directly-imported lookup results if not.
llvm-svn: 231424
Chaoren Lin [Thu, 5 Mar 2015 23:22:54 +0000 (23:22 +0000)]
Remove libedit and libncurses from LLDB_SYSTEM_LIBS if they're disabled.
Reviewers: clayborg, zturner, vharron, sbest
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8065
llvm-svn: 231423
Ahmed Bougacha [Thu, 5 Mar 2015 23:18:41 +0000 (23:18 +0000)]
[X86] Remove stale comment. NFC.
It turns out 256bit V[SZ]EXT nodes are still
generated by the new shuffle lowering, so this
is here to stay!
llvm-svn: 231422
Daniel Jasper [Thu, 5 Mar 2015 23:17:32 +0000 (23:17 +0000)]
Use std::string instead of StringRef to prevent use-after-free.
Discovered by asan.
llvm-svn: 231421
Greg Clayton [Thu, 5 Mar 2015 23:12:02 +0000 (23:12 +0000)]
When we have a symbol, like "NSLog" that we try to call in an expression, make sure we prioritize the external symbols over the internal one.
This is a temporary fix until a more comprehensive fix can be made for finding functions that we call in expressions.
We find "NSLog" in ClangExpressionDeclMap::FindExternalVisibleDecls() in after a call to target->GetImages().FindFunctions(...). Note that there are two symbols: NSLog from CFNetwork which is not external, and NSLog from Foundation which _is_ external. We do something with the external symbol with:
if (extern_symbol)
{
AddOneFunction (context, NULL, extern_symbol, current_id);
context.m_found.function = true;
}
Then later we try to lookup the _Z5NSLogP8NSStringz name and we don't find it so we call ClangExpressionDeclMap::GetFunctionAddress() with "_Z5NSLogP8NSStringz" as the name and the sc_list_size is zero at the "if" statement at line 568 because we don't find the mangled name and we extract the basename "NSLog" and call:
FindCodeSymbolInContext(ConstString(basename), m_parser_vars->m_sym_ctx, sc_list);
sc_list_size = sc_list.GetSize();
and we get a list size of two again, and we proceed to search for the symbol again, this time ignoring the external vs non-external-ness of the symbols that we find. This fix ensures we prioritize the external symbol until we get a real fix from Sean Callanan when he gets back to make sure we don't do multiple lookups for the same symbol we already resolved.
<rdar://problem/
19879282>
llvm-svn: 231420
Fariborz Jahanian [Thu, 5 Mar 2015 23:06:09 +0000 (23:06 +0000)]
[PATCH] Patch to fix the AST for vector splat from any
arithmetic type to a vector so that the arithmatic type
matches the vector element type. Without which it crashes
in Code Gen. rdar://
20000762
llvm-svn: 231419
Paul Robinson [Thu, 5 Mar 2015 23:04:26 +0000 (23:04 +0000)]
All FileCheck directives allow patterns.
llvm-svn: 231418
Peter Collingbourne [Thu, 5 Mar 2015 22:55:42 +0000 (22:55 +0000)]
Fix test to use explicit load type.
llvm-svn: 231417
Peter Collingbourne [Thu, 5 Mar 2015 22:55:38 +0000 (22:55 +0000)]
Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith.
Fixes llgo following Duncan's changes to debug info in r231082. llgo needs
to replace composite types, which are no longer represented using MDTuple.
llvm-svn: 231416
Greg Clayton [Thu, 5 Mar 2015 22:53:06 +0000 (22:53 +0000)]
symbolicate the application specific backtraces that are in MacOSX crash log files.
<rdar://problem/
20039160>
llvm-svn: 231415
Philip Reames [Thu, 5 Mar 2015 22:28:06 +0000 (22:28 +0000)]
[RewriteStatepointsForGC] Yet more test cases for relocation
At this point, we should have decent coverage of the involved code. I've got a few more test cases to cleanup and submit, but what's here is already reasonable.
I've got a collection of liveness tests which will be posted for review along with a decent liveness algorithm in the next few days. Once those are in, the code in this file should be well tested and I can start renaming things without risk of serious breakage.
llvm-svn: 231414
Kostya Serebryany [Thu, 5 Mar 2015 22:19:25 +0000 (22:19 +0000)]
[sanitizer] Reconstruct the function that dumps block/edge coverage, hopefully making it more robust. Also increase the allowed coverage size on 32-bit.
llvm-svn: 231413
Quentin Colombet [Thu, 5 Mar 2015 22:15:17 +0000 (22:15 +0000)]
[CODE_OWNERS] Change the ownership of register allocators.
llvm-svn: 231412
Benjamin Kramer [Thu, 5 Mar 2015 22:05:26 +0000 (22:05 +0000)]
Instructions: Use delegated constructors to reduce duplication
NFC.
llvm-svn: 231411
Alexey Samsonov [Thu, 5 Mar 2015 21:57:47 +0000 (21:57 +0000)]
Revert "[UBSan] Add testcases for -fsanitize=shift-base and -fsanitize=shift-exponent."
The test case fails on AArch64.
llvm-svn: 231410
Alexey Samsonov [Thu, 5 Mar 2015 21:57:35 +0000 (21:57 +0000)]
Revert "[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and -fsanitize=shift-exponent."
It's not that easy. If we're only checking -fsanitize=shift-base we
still need to verify that exponent has sane value, otherwise
UBSan-inserted checks for base will contain undefined behavior
themselves.
llvm-svn: 231409
Sanjay Patel [Thu, 5 Mar 2015 21:46:54 +0000 (21:46 +0000)]
[AVX] Lower / fast-isel scalar FP selects into VBLENDV instructions (PR22483)
This patch reduces code size for all AVX targets and increases speed for some chips.
SSE 4.1 introduced the useless (see code comments) 2-register form of BLENDV and
only in the packed float/double flavors.
AVX subsequently made the instruction useful by adding a 4-register operand form.
So we just need to paper over the lack of scalar forms of this instruction, complicate
the code to choose float or double forms, and use blendv on scalars since all FP is in
xmm registers anyway.
This gives us an approximately 50% speed up for a blendv microbenchmark sequence
on SandyBridge and Haswell:
blendv : 29.73 cycles/iter
logic : 43.15 cycles/iter
No new test cases with this patch because:
1. fast-isel-select-sse.ll tests the positive side for regular X86 lowering and fast-isel
2. sse-minmax.ll and fp-select-cmp-and.ll confirm that we're not firing for scalar selects without AVX
3. fp-select-cmp-and.ll and logical-load-fold.ll confirm that we're not firing for scalar selects with constants.
http://llvm.org/bugs/show_bug.cgi?id=22483
Differential Revision: http://reviews.llvm.org/D8063
llvm-svn: 231408
Vince Harron [Thu, 5 Mar 2015 21:35:28 +0000 (21:35 +0000)]
XFAIL tests that are known to fail occasionally on Linux
Trying to get the build green so we can notice new failures easier.
Differential Revision: http://reviews.llvm.org/D8039
llvm-svn: 231407
Benjamin Kramer [Thu, 5 Mar 2015 21:13:08 +0000 (21:13 +0000)]
SelectionDAGBuilder: Merge 3 copies of the limited precision exp2 emission code.
NFC intended.
llvm-svn: 231406
Andrew Kaylor [Thu, 5 Mar 2015 21:06:42 +0000 (21:06 +0000)]
Fix uninitialized memory references in WinEHPrepare
llvm-svn: 231405
Eric Fiselier [Thu, 5 Mar 2015 20:27:01 +0000 (20:27 +0000)]
Run ShTests when the executor is an instance of LocalExecutor
llvm-svn: 231404
Rui Ueyama [Thu, 5 Mar 2015 20:22:14 +0000 (20:22 +0000)]
Early return. NFC.
llvm-svn: 231403
Joerg Sonnenberger [Thu, 5 Mar 2015 20:17:05 +0000 (20:17 +0000)]
Move use of __builtin_longjmp under the same conditions as the only
caller of the function.
llvm-svn: 231402
Benjamin Kramer [Thu, 5 Mar 2015 20:04:29 +0000 (20:04 +0000)]
SDAG: Merge the meat of two ExpandAtomic implementations.
The copies already diverged, don't let them become any worse. Reduce
redundancy in code with a little macro metaprogramming.
llvm-svn: 231401
Ahmed Bougacha [Thu, 5 Mar 2015 20:04:21 +0000 (20:04 +0000)]
[AArch64] Teach AsmPrinter about GlobalAddress operands.
Fixes PR22761, rdar://
20024866.
Differential Revision: http://reviews.llvm.org/D8042
llvm-svn: 231400
Philip Reames [Thu, 5 Mar 2015 19:52:13 +0000 (19:52 +0000)]
[RewriteStatepointsForGC] Add additional tests around relocation
These are focused around the actual relocation rewriting itself, not the rest of the infrastructure.
llvm-svn: 231399
Rafael Espindola [Thu, 5 Mar 2015 19:47:50 +0000 (19:47 +0000)]
Use the correct func begin symbol in all places in ppc.
I missed an occurrence of the old symbol in my previous patch.
llvm-svn: 231398
Tom Stellard [Thu, 5 Mar 2015 19:46:55 +0000 (19:46 +0000)]
TableGen: Initialize ErrorInfo to ~0ULL in the MatchInstructionImpl
This is what all the targets check for and is consistent with the
initialized value of MissingFeatures, which is sometimes assinged
to ErrorInfo.
llvm-svn: 231397
Ahmed Bougacha [Thu, 5 Mar 2015 19:37:53 +0000 (19:37 +0000)]
[ARM] Enable vector extload combine for legal types.
This commit enables forming vector extloads for ARM.
It only does so for legal types, and when we can't fold the extension
in a wide/long form of the user instruction.
Enabling it for larger types isn't as good an idea on ARM as it is on
X86, because:
- we pretend that extloads are legal, but end up generating vld+vmov
- we have instructions like vld {dN, dM}, which can't be generated
when we "manually expand" extloads to vld+vmov.
For legal types, the combine doesn't fire that often: in the
integration tests only in a big endian testcase, where it removes a
pointless AND.
Related to rdar://
19723053
Differential Revision: http://reviews.llvm.org/D7423
llvm-svn: 231396
Rui Ueyama [Thu, 5 Mar 2015 19:25:58 +0000 (19:25 +0000)]
Resolver: Update preload map after File::beforeLink().
We maintain a map from symbols to archive files for the archive file
pre-loading. That map is created at the beginning of the resolve()
and is never updated. However, the input file list may be updated by
File::beforeLink(). This is a patch to update the map after beforeLink.
llvm-svn: 231395
Pavel Labath [Thu, 5 Mar 2015 19:17:56 +0000 (19:17 +0000)]
Correctly quote arguments in LLDB driver
Summary:
LLDB driver was simply tacking quotes around the strings in lldb commands, hoping that will work.
This changes it to properly escape quotes and backslashes.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8083
llvm-svn: 231394
Zachary Turner [Thu, 5 Mar 2015 19:15:09 +0000 (19:15 +0000)]
Clang side change following r231392.
Changes call to PrintStackTrace(FILE*) to call
PrintStackTrace(raw_ostream&)
llvm-svn: 231393
Zachary Turner [Thu, 5 Mar 2015 19:10:52 +0000 (19:10 +0000)]
Replace PrintStackTrace(FILE*) with PrintStackTrace(raw_ostream&)
This will be followed by a change on the clang side to update
the only user of this function with the new version.
Differential Revision: http://reviews.llvm.org/D8074
Reviewed By: Reid Kleckner
llvm-svn: 231392
Reid Kleckner [Thu, 5 Mar 2015 19:05:25 +0000 (19:05 +0000)]
Remove accidental errs() call in Verifier
llvm-svn: 231391
Rafael Espindola [Thu, 5 Mar 2015 18:55:50 +0000 (18:55 +0000)]
Use the generic Lfunc_begin label on ppc.
This removes yet another custom label to mark the start of a function.
llvm-svn: 231390
David Majnemer [Thu, 5 Mar 2015 18:50:12 +0000 (18:50 +0000)]
X86: Optimize address mode matching for FRAME_ALLOC_RECOVER nodes
We know that the absolute symbol will be less than 2GB and thus will
always fit.
llvm-svn: 231389
Reid Kleckner [Thu, 5 Mar 2015 18:32:14 +0000 (18:32 +0000)]
Revert busted CallSite change from r231386
llvm-svn: 231388
Reid Kleckner [Thu, 5 Mar 2015 18:26:58 +0000 (18:26 +0000)]
Silence -Wmissing-braces warning from clang-cl
The first element of STACKFRAME64 is a struct and Clang wants us to put
braces around it's initialization. Instead, drop the zero. The result
should be the same.
llvm-svn: 231387
Reid Kleckner [Thu, 5 Mar 2015 18:26:34 +0000 (18:26 +0000)]
Replace llvm.frameallocate with llvm.frameescape
Turns out it's pretty straightforward and simplifies the implementation.
Reviewers: andrew.w.kaylor
Differential Revision: http://reviews.llvm.org/D8051
llvm-svn: 231386
Erik Eckstein [Thu, 5 Mar 2015 17:53:00 +0000 (17:53 +0000)]
Revert r231276 (including r231277): Add a lock() function in PassRegistry to speed up multi-thread synchronization.
llvm-svn: 231385
Andrey Churbanov [Thu, 5 Mar 2015 17:50:48 +0000 (17:50 +0000)]
moved Windows-specific flags under the WINDOWS guard in CMake
llvm-svn: 231384
Andrey Churbanov [Thu, 5 Mar 2015 17:48:53 +0000 (17:48 +0000)]
added KMP_NESTED_HOT_TEAMS macro definition
llvm-svn: 231383
Zachary Turner [Thu, 5 Mar 2015 17:47:52 +0000 (17:47 +0000)]
[Windows] Implement PrintStackTrace(FILE*)
llvm::sys::PrintBacktrace(FILE*) is supposed to print a backtrace
of the current thread given the current PC. This function was
unimplemented on Windows, and instead the only time we could
print a backtrace was as the result of an exception through
LLVMUnhandledExceptionFilter.
This patch implements backtracing of self by using
RtlCaptureContext to get a CONTEXT for the current thread, and
moving the printing and StackWalk64 code to a common method that
printing own stack trace and printing stack trace of an exception
can use.
Differential Revision: http://reviews.llvm.org/D8068
Reviewed by: Reid Kleckner
llvm-svn: 231382
Andrey Churbanov [Thu, 5 Mar 2015 17:46:50 +0000 (17:46 +0000)]
minor change: comment improved
llvm-svn: 231381
Simon Pilgrim [Thu, 5 Mar 2015 17:14:04 +0000 (17:14 +0000)]
[DagCombiner] Allow shuffles to merge through bitcasts
Currently shuffles may only be combined if they are of the same type, despite the fact that bitcasts are often introduced in between shuffle nodes (e.g. x86 shuffle type widening).
This patch allows a single input shuffle to peek through bitcasts and if the input is another shuffle will merge them, shuffling using the smallest sized type, and re-applying the bitcasts at the inputs and output instead.
Dropped old ShuffleToZext test - this patch removes the use of the zext and vector-zext.ll covers these anyhow.
Differential Revision: http://reviews.llvm.org/D7939
llvm-svn: 231380
Duncan P. N. Exon Smith [Thu, 5 Mar 2015 17:00:05 +0000 (17:00 +0000)]
FileCheck: Document CHECK-SAME, follow-up to r230612
llvm-svn: 231379
Kit Barton [Thu, 5 Mar 2015 16:24:38 +0000 (16:24 +0000)]
While reviewing the changes to Clang to add builtin support for the vsld, vsrd, and vsrad instructions, it was pointed out that the builtins are generating the LLVM opcodes (shl, lshr, and ashr) not calls to the intrinsics. This patch changes the implementation of the vsld, vsrd, and vsrad instructions from from intrinsics to VXForm_1 instructions and makes them legal with P8 Altivec. It also removes the definition of the int_ppc_altivec_vsld, int_ppc_altivec_vsrd, and int_ppc_altivec_vsrad intrinsics.
llvm-svn: 231378
Marshall Clow [Thu, 5 Mar 2015 16:07:37 +0000 (16:07 +0000)]
Rework reverse_iterator::operator[] so as not to use the base iterators operator [], which can cause constness problems. Fixes PR17883
llvm-svn: 231375
Igor Laevsky [Thu, 5 Mar 2015 15:41:14 +0000 (15:41 +0000)]
Revert change r231366 as it broke clang-native-arm-cortex-a9 Analysis/properties.m test.
llvm-svn: 231374
Tom Stellard [Thu, 5 Mar 2015 15:31:05 +0000 (15:31 +0000)]
Fix bitselect for float/double types v2
We need to reinterpret float/double types as uint/ulong in order to
perform the bitwise operations.
This has been tested with piglit, OpenCV, and the ocl conformance tests.
v2:
- Use vector operations rather than splitting vectors into scalar
components.
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 231373
Elena Demikhovsky [Thu, 5 Mar 2015 15:11:35 +0000 (15:11 +0000)]
AVX-512, SKX: Enabled masked_load/store operations for this target.
Added lowering for ISD::CONCAT_VECTORS and ISD::INSERT_SUBVECTOR for i1 vectors,
it is needed to pass all masked_memop.ll tests for SKX.
llvm-svn: 231371
Alexander Kornienko [Thu, 5 Mar 2015 14:58:03 +0000 (14:58 +0000)]
[clang-tidy] Slighly clarified a comment.
llvm-svn: 231370
Alexander Kornienko [Thu, 5 Mar 2015 14:56:11 +0000 (14:56 +0000)]
[clang-tidy] Replace unrecognized namespace ending comments.
Summary:
Replace unrecognized namespace ending comments. This will help in particular when a namespace ending comment is mistyped or doesn't fit the regexp for other reason, e.g.:
namespace a {
namespace b {
namespace {
} // anoynmous namespace
} // b
} // namesapce a
Reviewers: djasper
Reviewed By: djasper
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D8078
llvm-svn: 231369
Frederic Riss [Thu, 5 Mar 2015 14:43:15 +0000 (14:43 +0000)]
Fix -Woverflow warning in unittest.
llvm-svn: 231368