Commit Graph

209051 Commits

Author SHA1 Message Date
Petar Jovanovic 28e2b717fc [mips] Remove incorrect DebugLoc entries from prologue
This has been causing the prologue_end to be incorrectly positioned.

Patch by Vladimir Radosavljevic.

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

llvm-svn: 246309
2015-08-28 17:53:26 +00:00
Matt Arsenault d9c830154f Make MergeConsecutiveStores look at other stores on same chain
When combiner AA is enabled, look at stores on the same chain.
Non-aliasing stores are moved to the same chain so the existing
code fails because it expects to find an adajcent store on a consecutive
chain.

Because of how DAGCombiner tries these store combines,
MergeConsecutiveStores doesn't see the correct set of stores on the chain
when it visits the other stores. Each store individually has its chain
fixed before trying to merge consecutive stores, and then tries to merge
stores from that point before the other stores have been processed to
have their chains fixed. To fix this, attempt to use FindBetterChain
on any possibly neighboring stores in visitSTORE.

Suppose you have 4 32-bit stores that should be merged into 1 vector
store. One store would be visited first, fixing the chain. What happens is
because not all of the store chains have yet been fixed, 2 of the stores
are merged. The other 2 stores later have their chains fixed,
but because the other stores were already merged, they have different
memory types and merging the two different sized stores is not
supported and would be more difficult to handle.

llvm-svn: 246307
2015-08-28 17:31:28 +00:00
David Majnemer 9c51053dd5 Test case for r246304.
llvm-svn: 246306
2015-08-28 17:19:54 +00:00
JF Bastien f5aa1ca655 Remove Merge Functions pointer comparisons
Summary:
This patch removes two remaining places where pointer value comparisons
are used to order functions: comparing range annotation metadata, and comparing
block address constants. (These are both rare cases, and so no actual
non-determinism was observed from either case).

The fix for range metadata is simple: the annotation always consists of a pair
of integers, so we just order by those integers.

The fix for block addresses is more subtle. Two constants are the same if they
are the same basic block in the same function, or if they refer to corresponding
basic blocks in each respective function. Note that in the first case, merging
is trivially correct. In the second, the correctness of merging relies on the
fact that the the values of block addresses cannot be compared. This change is
actually an enhancement, as these functions could not previously be merged (see
merge-block-address.ll).

There is still a problem with cross function block addresses, in that constants
pointing to a basic block in a merged function is not updated.

This also more robustly compares floating point constants by all fields of their
semantics, and fixes a dyn_cast/cast mixup.

Author: jrkoenig
Reviewers: dschuff, nlewycky, jfb
Subscribers llvm-commits
Differential revision: http://reviews.llvm.org/D12376

llvm-svn: 246305
2015-08-28 16:49:09 +00:00
David Majnemer a787de3227 [CodeGen] isInTailCallPosition didn't consider readnone tailcalls
A readnone tailcall may still have a chain of computation which follows
it that would invalidate a tailcall lowering.  Don't skip the analysis
in such cases.

This fixes PR24613.

llvm-svn: 246304
2015-08-28 16:44:09 +00:00
Sanjay Patel 69e7f6e436 fix typo; NFC
llvm-svn: 246303
2015-08-28 14:42:54 +00:00
Adrian McCarthy 23d14b6ade Differential Review: http://reviews.llvm.org/D12363
llvm-svn: 246302
2015-08-28 14:42:03 +00:00
James Molloy 85d58684da [LoopUtils] Move a private constructor nearer the other private members
This was part of Adam Nemet's review feedback that I forgot to implement.

llvm-svn: 246301
2015-08-28 14:40:29 +00:00
Sanjay Patel 7c912898a5 [x86] enable machine combiner reassociations for scalar 'and' insts
llvm-svn: 246300
2015-08-28 14:09:48 +00:00
Aaron Ballman f36a425eba Reapplying r246209, which exposed language options to the checkers. This time disable UseNullptrCheck when not compiling in C++ mode, but still allow in C++11 mode since it's likely the user wishes to modernize their code.
llvm-svn: 246298
2015-08-28 13:20:46 +00:00
Rafael Espindola c20fee5dc5 Add a -target to this test.
Without it it fails on 32 bit windows.

llvm-svn: 246297
2015-08-28 13:15:05 +00:00
Davide Italiano f00e94546e [MC] Convert tests to use llvm-readobj --macho-version-min.
As an added bonus this also tests the newly introduced feature.

llvm-svn: 246296
2015-08-28 12:40:05 +00:00
Sylvestre Ledru c0babf2bc0 Support Debian s390x multiarch paths
Summary: Patch by Steven Chamberlain <steven@pyro.eu.org>

Reviewers: uweigand

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

llvm-svn: 246295
2015-08-28 12:26:09 +00:00
Sylvestre Ledru 79cb0090ff Avoid usage of F_DUPFD_CLOEXEC where not available (e.g. kfreebsd*)
Summary:
kfreebsd doesn't have F_DUPFD_CLOEXEC, so use it conditionally.

Author: Emilio Pozuelo Monfort <pochu@debian.org>
Author: Petr Salinger <Petr.Salinger@seznam.cz>
Author: Gianfranco Costamagna

Reviewers: emaste

Subscribers: emaste

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

llvm-svn: 246294
2015-08-28 12:24:07 +00:00
Mohit K. Bhakkad 16ad032183 [LLDB][MIPS] Aligning code with rL245831
Reviewers: jaydeep
Subscribers: lldb-commits.
Differential Revision: http://reviews.llvm.org/D12427

llvm-svn: 246293
2015-08-28 12:08:26 +00:00
Rui Ueyama 40f4d86f5f COFF: Create short import files instead of using lib.exe.
lib.exe has a feature to create import library files (which contain
short import files) from module-definition files. Previously, we were
using that feature, but it turned out that the feature is not complete
for us.

There seems no way to specify "Import Types" in module-definition file.
lib.exe always adds "_" to given symbols and specify IMPORT_NAME_UNDECORATE.
We need more fine-grainded control on that value.

This patch teaches LLD to create short import files itself.
We are still using lib.exe, but the use of the tool is limited to create
empty import library files. We then create short import files and add them
to the empty files as new members.

This patch does not intend to change the functionality. LLD produces
the same import libraries as before. I'll make another change to create
different import libraries in a follow-up patch.

llvm-svn: 246292
2015-08-28 10:52:05 +00:00
Rui Ueyama 932108912d llvm-readobj: Dump more info for COFF import libraries.
This patch teaches llvm-readobj to print out COFF import file header fields.

llvm-svn: 246291
2015-08-28 10:27:50 +00:00
Johannes Doerfert b409fdc0d7 [NFC] Make SCEVAffinator work without a statement
llvm-svn: 246290
2015-08-28 09:24:35 +00:00
Chandler Carruth 4b682f6f24 [SROA] Fix PR24463, a crash I introduced in SROA by allowing it to
handle more allocas with loads past the end of the alloca.

I suspect there are some related crashers with slightly different
patterns, but I'll fix those and add test cases as I find them.

Thanks to David Majnemer for the excellent test case reduction here.
Made this super simple to debug and fix.

llvm-svn: 246289
2015-08-28 09:03:52 +00:00
Daniel Jasper ad5b7962c9 Revert "[OPENMP 4.0] Codegen for array sections."
The test is currently failing on bots:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/12747/

llvm-svn: 246288
2015-08-28 08:42:22 +00:00
Tobias Grosser 6dc4441884 IslNodeBuilder: Make functionality available to subclasses
llvm-svn: 246287
2015-08-28 08:30:52 +00:00
Tobias Grosser 3f2783b254 IslNodeBuilder: Add function to export BlockGenerator
llvm-svn: 246286
2015-08-28 08:23:38 +00:00
Tobias Grosser b79a67df78 BlockGenerator: Make scalar memory locations accessible
For external users, the memory locations into which we generate scalar values
may be of interest. This change introduces two functions that allow to obtain
(or create) the AllocInsts for a given BasePointer.

We use this change to simplify the code in BlockGenerators.

llvm-svn: 246285
2015-08-28 08:23:35 +00:00
Rui Ueyama f42d508360 Attempt to unbreak Win32 build.
llvm-svn: 246284
2015-08-28 07:48:41 +00:00
Rui Ueyama 71ba9bdd23 Re-apply r246276 - Object: Teach llvm-ar to create symbol table for COFF short import files
This patch includes a fix for a llvm-readobj test. With this patch, 
the tool does no longer print out COFF headers for the short import
file, but that's probably desirable because the header for the short
import file is dummy.

llvm-svn: 246283
2015-08-28 07:40:30 +00:00
Steven Wu 5528da76ef Revert r246214 and r246213
These two commits causes llvm LTO bootstrap to hang in ScalarEvolution.

llvm-svn: 246282
2015-08-28 07:14:10 +00:00
Tobias Grosser 1e5a8c1a5c Virtualize the IslNodeBuilder
This allows users to extend the IslNodeBuilder to create their own optimization
passes. This feature is not used in Polly's codebase itself, but as these
funtions are not performance critical, the cost of making experiments of
external users easier seems low enough to do so.

llvm-svn: 246281
2015-08-28 07:07:04 +00:00
Eric Fiselier e57e3aebe3 Fix most GCC warnings during build. Only -Wattribute left.
llvm-svn: 246280
2015-08-28 07:02:42 +00:00
Steven Wu 61db34d12e Revert r246244 and r246243
These two commits cause clang/llvm bootstrap to hang.

llvm-svn: 246279
2015-08-28 06:52:00 +00:00
Alexey Bataev 117fb35cf7 [OPENMP 4.0] Codegen for array sections.
Added codegen for array section in 'depend' clause of 'task' directive. It emits to pointers, one for the begin of array section and another for the end of array section. Size of the section is calculated as (end + 1 - start) * sizeof(basic_element_type).

llvm-svn: 246278
2015-08-28 06:09:05 +00:00
Rui Ueyama 8cff17469f Rollback r246276 - Object: Teach llvm-ar to create symbol table for COFF short import files
This change caused a test for llvm-readobj to fail.

llvm-svn: 246277
2015-08-28 06:03:01 +00:00
Rui Ueyama 22b1b7aad2 Object: Teach llvm-ar to create symbol table for COFF short import files.
COFF short import files are special kind of files that contains only
DLL-exported symbol names. That's different from object files because
it has no data except symbol names.

This change implements a SymbolicFile interface for the short import
files so that symbol names can be accessed through that interface.
llvm-ar is now able to read the file and create symbol table entries
for short import files.

llvm-svn: 246276
2015-08-28 05:47:46 +00:00
Eric Fiselier 1e051aab0c Finally get the test suite passing in C++03!!
After months of work there are only 4 tests still failing in C++03.
This patch fixes those tests.

All of the libc++ builders should be green.

llvm-svn: 246275
2015-08-28 05:46:17 +00:00
NAKAMURA Takumi bc3af7b031 LLVMCodeGen: Update libdeps corresponding to r246236.
llvm-svn: 246274
2015-08-28 05:38:49 +00:00
Eric Fiselier 8ec5189656 Remove empty file that arcanist created
llvm-svn: 246273
2015-08-28 05:18:13 +00:00
Eric Fiselier d48306e704 [libcxx] Constrain unique_ptr::operator=(unique_ptr<Tp, Dp>) in C++03 mode
Summary:
This patch properly constrains the converting assignment operator in C++03. It also fixes a bug where std::forward was given the wrong type.
The following two tests begin passing in C++03:

* `unique_ptr.single.asgn/move_convert.pass.cpp`
* `unique_ptr.single.asgn/move_convert13.fail.cpp`

Reviewers: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 246272
2015-08-28 05:07:06 +00:00
Eric Fiselier cb38f75e29 [libcxx] Mark most test/std/future tests as UNSUPPORTED in C++03
Summary:
This patch marks *most* tests for `std::promise`, `std::future` and `std::shared_future` as unsupported in C++03. These tests fail in C++03 mode because they attempt to copy a `std::future` even though it is a `MoveOnly` type. AFAIK the missing move-semantics in `std::future` is the only reason these tests fail but without move semantics these classes are useless. For example even though `std::promise::set_value` and `std::promise::set_exception(...)` work in C++03 `std::promise` is still useless because we cannot call `std::promise::get_future(...)`.

It might be possible to hack `std::move(...)` like we do for `std::unique_ptr` to make the move semantics work but I don't think it is worth the effort. Instead I think we should leave the `<future>` header as-is and mark the failing tests as `UNSUPPORTED`. I don't believe there are any users of `std::future` or `std::promise` in C++03 because they are so unusable. Therefore I am not concerned about losing test coverage and possibly breaking users. However because there are still parts of `<future>` that work in C++03 it would be wrong to `#ifdef` out the entire header.

@mclow.lists Should we take further steps to prevent the use of `std::promise`, `std::future` and `std::shared_future` in C++03?


Note: This patch also cleans up the tests and converts them to use `support/test_allocator.h` instead of a duplicate class in `test/std/futures/test_allocator.h`.

Reviewers: mclow.lists

Subscribers: vsk, mclow.lists, cfe-commits

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

llvm-svn: 246271
2015-08-28 05:06:04 +00:00
Eric Fiselier fc8e8c0360 Fix bug in test_allocator<void> that used the wrong value to represent object state
llvm-svn: 246270
2015-08-28 05:00:25 +00:00
Peter Collingbourne 6cba53ec6c Tweak XFAIL line for mips.
llvm-svn: 246269
2015-08-28 04:07:52 +00:00
NAKAMURA Takumi ac9d373116 Kaleidoscope: Prune __attribute__((used)). Some compilers wouldn't accept one.
llvm-svn: 246268
2015-08-28 03:34:33 +00:00
NAKAMURA Takumi 004653755c Disable llvm/test/Examples/ for now while investigating.
FIXME:
  - Introduce explicit mapping.
  - Investigate crash on win32. Could we introduce crash handler in examples?

llvm-svn: 246267
2015-08-28 03:32:43 +00:00
Eric Fiselier 8465ea4440 [libcxx] Optimize away unneeded length calculation in basic_string::compare(const char*)
Summary:
This patch optimizes basic_string::compare to use strcmp when the default char_traits has been given.
See PR19900 for more information. https://llvm.org/bugs/show_bug.cgi?id=19900

Reviewers: mclow.lists

Subscribers: bkramer, cfe-commits

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

llvm-svn: 246266
2015-08-28 03:02:37 +00:00
Rafael Espindola ad5ca2245e Remove irrelevant parts of the test.
llvm-svn: 246265
2015-08-28 02:53:05 +00:00
Rafael Espindola 871765c321 Make sure we output symbols in the same order on 32 and 64 bit builds.
llvm-svn: 246264
2015-08-28 02:46:41 +00:00
Richard Smith 52a980a97f PR24597: Fix in-place evaluation of call expressions to provide a proper "this"
pointer to an RVO construction of a returned object.

llvm-svn: 246263
2015-08-28 02:43:42 +00:00
Rafael Espindola f2f41a9f97 Fix the gcc build:
InputFiles.h:98:53: error: invalid use of incomplete type ‘class lld::elf2::SymbolBody’
     return SymbolBodies[SymbolIndex - FirstNonLocal]->getReplacement();

llvm-svn: 246262
2015-08-28 02:40:04 +00:00
Peter Collingbourne 834f937c93 XFAIL parallel.ll test on MIPS and AArch64 until test failures can be investigated.
llvm-svn: 246261
2015-08-28 02:14:15 +00:00
Eric Christopher e6b6488c70 Instead of duplicating code, call the base implementation.
llvm-svn: 246260
2015-08-28 02:14:00 +00:00
Eric Christopher ef1e295a8c Merge the two feature map setting functions into a single function
and replace all callers.

llvm-svn: 246259
2015-08-28 02:13:58 +00:00
Ahmed Bougacha f9c19da03a [CodeGen] Support (and default to) expanding READCYCLECOUNTER to 0.
For targets that didn't support this, this will let us respect the
langref instead of failing to select.

Note that we don't need to change the 32-bit x86/PPC lowerings (to
account for the result type/# difference) because they're both
custom and bypass type legalization.

llvm-svn: 246258
2015-08-28 01:49:59 +00:00