Commit Graph

161884 Commits

Author SHA1 Message Date
Kostya Serebryany 0604c62d7b [asan] use GlobalValue::PrivateLinkage for coverage guard to save quite a bit of code size
llvm-svn: 194800
2013-11-15 09:52:05 +00:00
Benjamin Kramer 67421c1087 llvm-cov: Clean up memory leaks.
llvm-svn: 194799
2013-11-15 09:44:17 +00:00
Alexey Samsonov 07cdeb4a6c Redirect unused test case output to /dev/null
llvm-svn: 194798
2013-11-15 09:36:58 +00:00
Benjamin Kramer 63d39da992 Give unit test its own LLVMContext so MDNodes aren't leaked even if we never call llvm_shutdown.
Found by valgrind.

llvm-svn: 194797
2013-11-15 09:34:33 +00:00
Alexey Samsonov 352d0e52f5 Don't build unsupported compiler-rt pieces on Windows
llvm-svn: 194796
2013-11-15 09:09:23 +00:00
Richard Smith b09a4fe192 Tests for core issue 216-223.
llvm-svn: 194795
2013-11-15 08:55:01 +00:00
Renato Golin 8e3c8584e9 Adding some info about stability of ARM boards
Patch by Mikael Lyngvig

llvm-svn: 194794
2013-11-15 08:42:14 +00:00
Rui Ueyama 9a4fd7e582 Fix Windows buildbot on which size_t is not unsinged long.
llvm-svn: 194793
2013-11-15 08:08:29 +00:00
Zoran Jovanovic f4d4d789f7 Use instr mapping for microMIPS in llvm-mc.
llvm-svn: 194792
2013-11-15 08:07:34 +00:00
Rui Ueyama dbce022caf [PECOFF] Minimum size of DOS stub is 64 byte.
llvm-svn: 194791
2013-11-15 08:00:22 +00:00
Bob Wilson a08e9ac927 Reapply asan coverage changes 194702-194704.
I still don't know what is causing our bootstrapped LTO buildbots to fail,
but llvm r194701 seems to be OK and I can't imagine that these changes could
cause the problem.

llvm-svn: 194790
2013-11-15 07:18:15 +00:00
Bob Wilson da4147c743 Reapply "[asan] Poor man's coverage that works with ASan"
I was able to successfully run a bootstrapped LTO build of clang with
r194701, so this change does not seem to be the cause of our failing
buildbots.

llvm-svn: 194789
2013-11-15 07:16:09 +00:00
Andrew Trick 4f0794fd47 Platform proof a test case.
llvm-svn: 194788
2013-11-15 05:52:56 +00:00
Rui Ueyama 478d9f9e7d [PECOFF] Avoid using statically initialized std::vector.
Also slightly reduces PECOFFLinkingContext's memory footprint (~128B).

llvm-svn: 194787
2013-11-15 05:45:20 +00:00
Matt Arsenault a9e95abcbf Add instcombine visitor for addrspacecast
llvm-svn: 194786
2013-11-15 05:45:08 +00:00
Matt Arsenault 54a2a179a1 Fix grammar in addrspacecast description
llvm-svn: 194785
2013-11-15 05:44:56 +00:00
Rui Ueyama 3429d01f1a Refactor copy-paste-and-modifed code using callback.
llvm-svn: 194784
2013-11-15 04:58:54 +00:00
Matt Arsenault c5559bb14b Add target hook to prevent folding some bitcasted loads.
This is to avoid this transformation in some cases:
fold (conv (load x)) -> (load (conv*)x)

On architectures that don't natively support some vector
loads efficiently casting the load to a smaller vector of
larger types and loading is more efficient.

Patch by Micah Villmow.

llvm-svn: 194783
2013-11-15 04:42:23 +00:00
Richard Smith ce587f5eb9 When we hit a #include directive that maps to a module import, emit a token
representing the module import rather than making the module immediately
visible. This serves two goals:
 * It avoids making declarations in the module visible prematurely, if we
   walk past the #include during a tentative parse, for instance, and
 * It gives a diagnostic (although, admittedly, not a very nice one) if
   a header with a corresponding module is included anywhere other than
   at the top level.

llvm-svn: 194782
2013-11-15 04:24:58 +00:00
Peter Zotov 6519801a6e [OCaml] Add REQUIRES: native, object-emission to the Target test
While the test would work with any compiled in target with object
emission support, it's nontrivial to formulate this condition in
lit, so a conservative restriction is used instead.

llvm-svn: 194781
2013-11-15 03:43:51 +00:00
Bob Wilson ae73587c4b Revert "[asan] Poor man's coverage that works with ASan"
This reverts commit 194701. Apple's bootstrapped LTO builds have been failing,
and this change (along with compiler-rt 194702-194704) is the only thing on
the blamelist.  I will either reappy these changes or help debug the problem,
depending on whether this fixes the buildbots.

llvm-svn: 194780
2013-11-15 03:28:22 +00:00
Bob Wilson abc91eacac Speculatively revert asan coverage changes 194702-194704.
Apple's bootstrapped LTO builds have been failing, and these changes (along
with llvm 194701) are the only things on the blamelist.  I will either reapply
these changes or help debug the problem, depending on whether this fixes the
buildbots.

llvm-svn: 194779
2013-11-15 03:26:28 +00:00
Peter Zotov 9c0f67f13f [OCaml] Use native target in testsuite instead of hardcoding X86
llvm-svn: 194778
2013-11-15 03:19:08 +00:00
Rui Ueyama b4dca7f065 Select new undefined atom rather than old one if other conditions are the same.
We can add multiple undefined atoms having the same name to the symbol table.
If such atoms are added, the symbol table compares their canBeNull attributes,
and select one having a stronger constraint. If their canBeNulls are the same,
the choice is arbitrary. Currently it choose the existing one.

This patch changes the preference, so that the symbol table choose the new one
if the new atom has a greater canBeNull or a fallback atom. This shouldn't
change the behavior except the case described below.

A new undefined atom may have a new fallback atom attribute. By choosing the new
atom, we can update the fallback atom during Core Linking. PE/COFF actually need
that. For example, _lseek is an alias for __lseek on Windows. One of an object
file in OLDNAMES.LIB has an undefined atom for _lseek with the fallback to
__lseek. When the linker tries to resolve _read, it supposed to read the file
from OLDNAMES.LIB and use the new fallback from the file. Currently LLD cannot
handle such case because duplicate undefined atoms with the same attributes are
ignored.

Differential Revision: http://llvm-reviews.chandlerc.com/D2161

llvm-svn: 194777
2013-11-15 03:12:24 +00:00
Rui Ueyama 014192dbda Fix include guards.
llvm-svn: 194776
2013-11-15 03:09:26 +00:00
Richard Smith c156470be5 PR17533 and duplicates: don't compute the return type of an overloaded operator
until after we've referenced the operator; otherwise, we might pick up a
not-yet-deduced type.

llvm-svn: 194775
2013-11-15 02:58:23 +00:00
Peter Zotov 0c7f2977ca [OCaml] Add Target and TargetMachine bindings to Llvm_target
llvm-svn: 194774
2013-11-15 02:51:57 +00:00
Peter Zotov 8a1a3bfc05 [OCaml] Refactor Llvm_target interface
This commit brings the module structure, argument order and
primitive names in Llvm_target in order with the rest of the bindings,
in preparation for adding TargetMachine API.

llvm-svn: 194773
2013-11-15 02:51:44 +00:00
Peter Zotov b4fb964b99 [OCaml] Fix building of stub libraries
llvm-svn: 194772
2013-11-15 02:51:27 +00:00
Peter Zotov 5a6cfda02e [llvm-c] Make LLVMGetTargetFromName actually work
LLVMGetTargetFromName used to compare two char* strings directly.

llvm-svn: 194771
2013-11-15 02:51:18 +00:00
Peter Zotov 0e38fc8d5e [llvm-c] Add missing const qualifiers to LLVMCreateTargetMachine
llvm-svn: 194770
2013-11-15 02:51:12 +00:00
Peter Zotov b2c8b8a460 [llvm-c] Simplify signature of LLVMGetTargetFromName
LLVMGetTargetFromName was not yet present in an LLVM release,
so this does not break compatibility.

llvm-svn: 194769
2013-11-15 02:51:01 +00:00
Rui Ueyama 1c6fd20427 [PECOFF] Add tests for r194757.
llvm-svn: 194768
2013-11-15 02:31:47 +00:00
Richard Smith 83d4834597 Don't reject dependent range-based for loops in constexpr functions. The loop
variable isn't really uninitialized, it's just not initialized yet.

llvm-svn: 194767
2013-11-15 02:29:26 +00:00
Reed Kotler 09e59155ef Make all the conditional Mips 16 branches get initially set for the
short form. Constant islands will expand them if they are out of range.
Since there is not direct object emitter at this time, it does not
have any material affect because the assembler sorts this out. But we
need to know for the actual constant island work. We track the difference
by putting # 16 inst in the comments.

llvm-svn: 194766
2013-11-15 02:21:52 +00:00
Matt Arsenault 00e65b2afe Fix test failures after addrspacecast added.
Bitcasts between address spaces are no longer allowed.

llvm-svn: 194765
2013-11-15 02:19:52 +00:00
Jordan Rose 4c56c22634 [analyzer] Silence warnings coming from allocators used by std::basic_string.
This is similar to r194004: because we can't reason about the data structure
invariants of std::basic_string, the analyzer decides it's possible for an
allocator to be used to deallocate the string's inline storage. Just ignore
this by walking up the stack, skipping past methods in classes with
"allocator" in the name, and seeing if we reach std::basic_string that way.

PR17866

llvm-svn: 194764
2013-11-15 02:11:19 +00:00
Jordan Rose 11288ce34c [analyzer] Include bug column numbers in HTML output (in a comment).
This has no effect on user-visible output, but can be used by post-processing
tools that work with the generated HTML, rather than using CmpRuns.py's
interface to work with plists.

Patch by György Orbán!

llvm-svn: 194763
2013-11-15 02:11:11 +00:00
Richard Smith e6c19f22b2 Modern gcc is happy to constant evaluate __builtin_strlen in various cases
where we didn't. Extend our constant evaluation for __builtin_strlen to handle
any constant array of chars, not just string literals, to match.

llvm-svn: 194762
2013-11-15 02:10:04 +00:00
Eric Christopher 34a2c8718f Use a reference rather than a pointer as we don't expect a NULL
DbgVariable.

No functional change.

llvm-svn: 194761
2013-11-15 01:43:19 +00:00
Matt Arsenault b03bd4d96b Add addrspacecast instruction.
Patch by Michele Scandale!

llvm-svn: 194760
2013-11-15 01:34:59 +00:00
Rui Ueyama 08c0b1a1bd Include raw_ostream.h.
Including only Debug.h did not cause a compilation error, but you couldn't
do anything (like writing something with <<) to raw_ostreams returned by
llvm::dbgs() or llvm::errs() without including raw_ostream.h. So including
it from Debug.h should make sense.

Differential Revision: http://llvm-reviews.chandlerc.com/D2183

llvm-svn: 194759
2013-11-15 01:25:34 +00:00
Rui Ueyama e60d6e1b07 [PECOFF] Add /stub option.
llvm-svn: 194757
2013-11-15 00:18:41 +00:00
Jason Molenda a7b5afa91b Commit a work-in-progress system runtime for Mac OS X which won't
do anything right now.  Add a few new methods to the Thread base
class which HistoryThread needs.  I think I updated all the 
CMakeLists files correctly for the new plugin.

llvm-svn: 194756
2013-11-15 00:17:32 +00:00
Tom Stellard 8f9fc20751 R600: Fix scheduling of instructions that use the LDS output queue
The LDS output queue is accessed via the OQAP register.  The OQAP
register cannot be live across clauses, so if value is written to the
output queue, it must be retrieved before the end of the clause.
With the machine scheduler, we cannot statisfy this constraint, because
it lacks proper alias analysis and it will mark some LDS accesses as
having a chain dependency on vertex fetches.  Since vertex fetches
require a new clauses, the dependency may end up spiltting OQAP uses and
defs so the end up in different clauses.  See the lds-output-queue.ll
test for a more detailed explanation.

To work around this issue, we now combine the LDS read and the OQAP
copy into one instruction and expand it after register allocation.

This patch also adds some checks to the EmitClauseMarker pass, so that
it doesn't end a clause with a value still in the output queue and
removes AR.X and OQAP handling from the scheduler (AR.X uses and defs
were already being expanded post-RA, so the scheduler will never see
them).

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
llvm-svn: 194755
2013-11-15 00:12:45 +00:00
Rui Ueyama 5fe806e7a4 Move DOS stub data to PECOFFLinkingContext for /stub option.
llvm-svn: 194754
2013-11-14 23:54:24 +00:00
Chandler Carruth 9c33cfa47b Teach the Makefile build system how to handle SOURCES which include
subdirectories. The only thing needed here is to create the appropriate
object file directories and add those as dependencies for the
compilation rules.

As a consequence, factor the non-source-file-specific dependencies for
compilation rules into a helper variable. This fixes an issue where the
project makefile wasn't actually a dependency of a bunch of compilation
make rules for no apparant reason.

This should have no observable effect for current makefile usage, but
will simplify how we build other libraries and is something CMake
already supports.

llvm-svn: 194753
2013-11-14 23:51:29 +00:00
Tom Stellard 81229a14a3 R600/SI: Add processor type for Hawaii
Patch by: Alex Deucher

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
llvm-svn: 194752
2013-11-14 23:46:00 +00:00
Tom Stellard 5558304ba2 R600: Add processor type for Hawaii
llvm-svn: 194751
2013-11-14 23:45:53 +00:00
Andrew Trick a9f4d928ab When folding memory operands, preserve existing MachineMemOperands.
This comes into play with patchpoint, which can fold multiple
operands. Since the patchpoint is already treated as a call, the
machine mem operands won't affect anything, and there's nothing to
test. But we still want to do the right thing here to be sure that our
MIs obey the rules.

llvm-svn: 194750
2013-11-14 23:45:04 +00:00