Craig Topper [Wed, 28 Jan 2015 10:09:56 +0000 (10:09 +0000)]
[X86] Teach disassembler to handle illegal immediates on AVX512 integer compare instructions.
llvm-svn: 227302
Craig Topper [Wed, 28 Jan 2015 10:09:52 +0000 (10:09 +0000)]
[X86] Merge printSSECC and printAVXCC. They only differed by an assertion.
llvm-svn: 227301
Chandler Carruth [Wed, 28 Jan 2015 09:52:14 +0000 (09:52 +0000)]
[LPM] Rip all of ManagedStatic and ThreadLocal out of the pretty stack
tracing code.
Managed static was just insane overhead for this. We took memory fences
and external function calls in every path that pushed a pretty stack
frame. This includes a multitude of layers setting up and tearing down
passes, the parser in Clang, everywhere. For the regression test suite
or low-overhead JITs, this was contributing to really significant
overhead.
Even the LLVM ThreadLocal is really overkill here because it uses
pthread_{set,get}_specific logic, and has careful code to both allocate
and delete the thread local data. We don't actually want any of that,
and this code in particular has problems coping with deallocation. What
we want is a single TLS pointer that is valid to use during global
construction and during global destruction, any time we want. That is
exactly what every host compiler and OS we use has implemented for
a long time, and what was standardized in C++11. Even though not all of
our host compilers support the thread_local keyword, we can directly use
the platform-specific keywords to get the minimal functionality needed.
Provided this limited trial survives the build bots, I will move this to
Compiler.h so it is more widely available as a light weight if limited
alternative to the ThreadLocal class. Many thanks to David Majnemer for
helping me think through the implications across platforms and craft the
MSVC-compatible syntax.
The end result is *substantially* faster. When running llc in a tight
loop over a small IR file targeting the aarch64 backend, this improves
its performance by over 10% for me. It also seems likely to fix the
remaining regressions seen by JIT users with threading enabled.
This may actually have more impact on real-world compile times due to
the use of the pretty stack tracing utility throughout the rest of Clang
or LLVM, but I've not collected any detailed measurements.
llvm-svn: 227300
Chandler Carruth [Wed, 28 Jan 2015 09:47:21 +0000 (09:47 +0000)]
[LPM] A targeted but somewhat horrible fix to the legacy pass manager's
querying of the pass registry.
The pass manager relies on the static registry of PassInfo objects to
perform all manner of its functionality. I don't understand why it does
much of this. My very vague understanding is that this registry is
touched both during static initialization *and* while each pass is being
constructed. As a consequence it is hard to make accessing it not
require a acquiring some lock. This lock ends up in the hot path of
setting up, tearing down, and invaliditing analyses in the legacy pass
manager.
On most systems you can observe this as a non-trivial % of the time
spent in 'ninja check-llvm'. However, I haven't really seen it be more
than 1% in extreme cases of compiling more real-world software,
including LTO.
Unfortunately, some of the GPU JITs are seeing this taking essentially
all of their time because they have very small IR running through
a small pass pipeline very many times (at least, this is the vague
understanding I have of it).
This patch tries to minimize the cost of looking up PassInfo objects by
leveraging the fact that the objects themselves are immutable and they
are allocated separately on the heap and so don't have their address
change. It also requires a change I made the last time I tried to debug
this problem which removed the ability to de-register a pass from the
registry. This patch creates a single access path to these objects
inside the PMTopLevelManager which memoizes the result of querying the
registry. This is somewhat gross as I don't really know if
PMTopLevelManager is the *right* place to put it, and I dislike using
a mutable member to memoize things, but it seems to work.
For long-lived pass managers this should completely eliminate
the cost of acquiring locks to look into the pass registry once the
memoized cache is warm. For 'ninja check' I measured about 1.5%
reduction in CPU time and in total time on a machine with 32 hardware
threads. For normal compilation, I don't know how much this will help,
sadly. We will still pay the cost while we populate the memoized cache.
I don't think it will hurt though, and for LTO or compiles with many
small functions it should still be a win. However, for tight loops
around a pass manager with many passes and small modules, this will help
tremendously. On the AArch64 backend I saw nearly 50% reductions in time
to complete 2000 cycles of spinning up and tearing down the pipeline.
Measurements from Owen of an actual long-lived pass manager show more
along the lines of 10% improvements.
Differential Revision: http://reviews.llvm.org/D7213
llvm-svn: 227299
Elena Demikhovsky [Wed, 28 Jan 2015 08:03:58 +0000 (08:03 +0000)]
Fold fcmp in cases where value is provably non-negative. By Arch Robison.
This patch folds fcmp in some cases of interest in Julia. The patch adds a function CannotBeOrderedLessThanZero that returns true if a value is provably not less than zero. I.e. the function returns true if the value is provably -0, +0, positive, or a NaN. The patch extends InstructionSimplify.cpp to fold instances of fcmp where:
- the predicate is olt or uge
- the first operand is provably not less than zero
- the second operand is zero
The motivation for handling these cases optimizing away domain checks for sqrt in Julia for common idioms such as sqrt(x*x+y*y)..
http://reviews.llvm.org/D6972
llvm-svn: 227298
Simon Atanasyan [Wed, 28 Jan 2015 06:23:15 +0000 (06:23 +0000)]
[Mips] Fix enumeral and non-enumeral type in conditional expression warning
No functional changes.
llvm-svn: 227297
David Majnemer [Wed, 28 Jan 2015 06:00:01 +0000 (06:00 +0000)]
llvm-ar: Remove unimplemented -N option from -help
This fixes PR22358.
llvm-svn: 227296
David Majnemer [Wed, 28 Jan 2015 05:48:06 +0000 (05:48 +0000)]
Sema: Ensure that __c11_atomic_fetch_add has a pointer to complete type
Pointer arithmetic is only makes sense if the pointee type is complete.
This fixes PR22361.
llvm-svn: 227295
Chandler Carruth [Wed, 28 Jan 2015 04:57:56 +0000 (04:57 +0000)]
[LPM] Stop using the string based preservation API. It is an
abomination.
For starters, this API is incredibly slow. In order to lookup the name
of a pass it must take a memory fence to acquire a pointer to the
managed static pass registry, and then potentially acquire locks while
it consults this registry for information about what passes exist by
that name. This stops the world of LLVMs in your process no matter
how little they cared about the result.
To make this more joyful, you'll note that we are preserving many passes
which *do not exist* any more, or are not even analyses which one might
wish to have be preserved. This means we do all the work only to say
"nope" with no error to the user.
String-based APIs are a *bad idea*. String-based APIs that cannot
produce any meaningful error are an even worse idea. =/
I have a patch that simply removes this API completely, but I'm hesitant
to commit it as I don't really want to perniciously break out-of-tree
users of the old pass manager. I'd rather they just have to migrate to
the new one at some point. If others disagree and would like me to kill
it with fire, just say the word. =]
llvm-svn: 227294
Eric Christopher [Wed, 28 Jan 2015 03:51:33 +0000 (03:51 +0000)]
Migrate AArch64 except for TTI and AsmPrinter away from getSubtargetImpl.
llvm-svn: 227293
Chandler Carruth [Wed, 28 Jan 2015 03:04:54 +0000 (03:04 +0000)]
Introduce a section to the programmers manual about type hierarchies,
polymorphism, and virtual dispatch.
This is essentially trying to explain the emerging design techniques
being used in LLVM these days somewhere more accessible than the
comments on a particular piece of infrastructure. It covers the
"concepts-based polymorphism" that caused some confusion during initial
reviews of the new pass manager as well as the tagged-dispatch mechanism
used pervasively in LLVM and Clang.
Perhaps most notably, I've tried to provide some criteria to help
developers choose between these options when designing new pieces of
infrastructure.
Differential Revision: http://reviews.llvm.org/D7191
llvm-svn: 227292
David Blaikie [Wed, 28 Jan 2015 02:43:15 +0000 (02:43 +0000)]
Add description to assert
llvm-svn: 227291
David Blaikie [Wed, 28 Jan 2015 02:34:53 +0000 (02:34 +0000)]
PR22356: DebugInfo: Handle the size of a member where the type of that member is a typedef (or other sugar) of a declaration.
llvm-svn: 227290
Enrico Granata [Wed, 28 Jan 2015 01:41:00 +0000 (01:41 +0000)]
Emit a warning the first time that one tries to resolve the size of a type passing a nullptr ExecutionContext - but only when it might actually make a difference
This should help us find these cases and act on them
llvm-svn: 227289
Greg Clayton [Wed, 28 Jan 2015 01:33:37 +0000 (01:33 +0000)]
Changes in 226712 needed some fixing as a platform is almost always selected and even if platform options are specified when doing a "target create" they would get ignored if a platform was already selected.
The change was made so we could re-use a platform if one was already created instead of creating a new one, but it would fail in the above case. To fix this, if we have a selected platform, we verify that the platform matches the current platform before we try to re-use it. We do this by asking the OptionGroupPlatform if the platform matches. If so, it returns true and we don't create a new platform, else we do.
llvm-svn: 227288
Lang Hames [Wed, 28 Jan 2015 01:30:37 +0000 (01:30 +0000)]
Revert r227247 and r227228: "Add weak symbol support to RuntimeDyld".
This has wider implications than I expected when I reviewed the patch: It can
cause JIT crashes where clients have used the default value for AbortOnFailure
during symbol lookup. I'm currently investigating alternative approaches and I
hope to have this back in tree soon.
llvm-svn: 227287
Zachary Turner [Wed, 28 Jan 2015 01:22:33 +0000 (01:22 +0000)]
[llvm-pdbdump] Add basic symbol dumping.
This adds two command line options:
--symbols dumps a list of all symbols found in the PDB.
--symbol-details dumps the same list, but with detailed information
for every symbol such as type, attributes, etc.
llvm-svn: 227286
Jim Ingham [Wed, 28 Jan 2015 01:18:01 +0000 (01:18 +0000)]
SBThread::GetDescription should use the Thread format instead of making up
some format of its own.
llvm-svn: 227285
Reid Kleckner [Wed, 28 Jan 2015 01:17:38 +0000 (01:17 +0000)]
Move EH personality type classification to Analysis/LibCallSemantics.h
Summary:
Also add enum types for __C_specific_handler and _CxxFrameHandler3 for
which we know a few things.
Reviewers: majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7214
llvm-svn: 227284
Jim Ingham [Wed, 28 Jan 2015 01:17:26 +0000 (01:17 +0000)]
Use LLDB_INVALID_FRAME_ID for invalid frame ID's.
llvm-svn: 227283
Enrico Granata [Wed, 28 Jan 2015 01:09:45 +0000 (01:09 +0000)]
Move several GetByteSize() calls over to the brave new world of taking an ExecutionContext*
And since enough of these are doing the right thing, add a test case to verify we are doing the right thing with freeze drying ObjC object types
Fixes rdar://
18092770
llvm-svn: 227282
Greg Clayton [Wed, 28 Jan 2015 01:08:39 +0000 (01:08 +0000)]
If we say:
(lldb) b isEqual:
We end up calling "breakpoint set --name "isEqual:" and it was not checking for selectors due to a logic error.
llvm-svn: 227281
Larisse Voufo [Wed, 28 Jan 2015 01:01:21 +0000 (01:01 +0000)]
Re-arrange DR test cases, and update DR status page.
llvm-svn: 227279
Kaelyn Takata [Wed, 28 Jan 2015 00:46:09 +0000 (00:46 +0000)]
Use the real CXXScopeSpec when setting the correction SourceRange.
Otherwise, in the most important case and the only case where SS and
TempSS are different (which is when the CXXScopeSpec should be dropped,
and TempSS is NULL) the wrong SourceRange will be used in the fixit for
the typo correction. Fixes the remaining issue in PR20626.
llvm-svn: 227278
Enrico Granata [Wed, 28 Jan 2015 00:45:42 +0000 (00:45 +0000)]
More work for the dynamic type size feature
Namely, this commit provides an actual implementation of how to retrieve the byte size in a sane way for an ObjC class, by scanning ivar offsets and byte sizes, figuring out the farthest-from-base ivar, and adding its byte size to that
Still NFC
llvm-svn: 227277
Zachary Turner [Wed, 28 Jan 2015 00:33:00 +0000 (00:33 +0000)]
[llvm-pdbdump] Add support for printing source files and compilands.
This adds two command line options to llvm-pdbdump.
--source-files prints a flat list of all source files in the PDB.
--compilands prints a list of all compilands (e.g. object files)
that the PDB knows about, and for each one, a list of
source files that the compiland is composed of as well
as a hash of the original source file.
llvm-svn: 227276
Zachary Turner [Wed, 28 Jan 2015 00:32:49 +0000 (00:32 +0000)]
[llvm-pdbdump] Print more friendly names for enum values.
llvm-svn: 227275
Enrico Granata [Wed, 28 Jan 2015 00:07:51 +0000 (00:07 +0000)]
Preparatory infrastructural work to support dynamically determining sizes of ObjC types via the runtime
This is necessary because the byte size of an ObjC class type is not reliably statically knowable (e.g. because superclasses sit deep in frameworks that we have no debug info for)
The lack of reliable size info is a problem when trying to freeze-dry an ObjC instance (not the pointer, the pointee)
This commit lays the foundation for having language runtimes help in figuring out byte sizes, and having ClangASTType ask for runtime help
No feature change as no runtime actually implements the logic, and nowhere is an ExecutionContext passed in yet
llvm-svn: 227274
Eric Fiselier [Wed, 28 Jan 2015 00:05:48 +0000 (00:05 +0000)]
Fix flag order of -xc++ in CXXCompiler.
llvm-svn: 227273
Quentin Colombet [Tue, 27 Jan 2015 23:58:01 +0000 (23:58 +0000)]
Revert r227242 - Merge vector stores into wider vector stores (PR21711).
This commit creates infinite loop in DAG combine for in the LLVM test-suite
for aarch64 with mcpu=cylcone (just having neon may be enough to expose this).
llvm-svn: 227272
Greg Clayton [Tue, 27 Jan 2015 23:45:56 +0000 (23:45 +0000)]
Added test case to make sure we don't regress on settings breakpoints by selector and with the various partially specified ObjC specified breakpoints.
This test tests the equivalent of:
breakpoint set --name count
breakpoint set --selector count
breakpoint set --name isEqual:
breakpoint set --selector isEqual:
breakpoint set --name "-[MyClass(MyCategory) myCategoryFunction]"
breakpoint set --name "-[MyClass myCategoryFunction]"
breakpoint set --name "[MyClass myCategoryFunction]"
llvm-svn: 227271
Hans Wennborg [Tue, 27 Jan 2015 23:34:35 +0000 (23:34 +0000)]
Intrin.h: define _XCR_XFEATURE_ENABLED_MASK
Users expect to be able to use this with _xgetbv.
llvm-svn: 227270
Petar Jovanovic [Tue, 27 Jan 2015 23:30:18 +0000 (23:30 +0000)]
[mips] Use __clear_cache builtin instead of cacheflush()
Use __clear_cache builtin instead of cacheflush() in
Unix Memory::InvalidateInstructionCache().
Differential Revision: http://reviews.llvm.org/D7198
llvm-svn: 227269
Enrico Granata [Tue, 27 Jan 2015 23:26:59 +0000 (23:26 +0000)]
Fix a typo in code-signing.txt
llvm-svn: 227268
Richard Smith [Tue, 27 Jan 2015 23:23:39 +0000 (23:23 +0000)]
Cleanups, and add some FIXMEs. No functional change.
llvm-svn: 227267
Alexey Samsonov [Tue, 27 Jan 2015 23:06:48 +0000 (23:06 +0000)]
[ASan] Fix test cases: don't assume that fast unwinder can't unwind through libc.
llvm-svn: 227265
Eric Fiselier [Tue, 27 Jan 2015 23:05:41 +0000 (23:05 +0000)]
Fix definition of __has_feature in r227263
llvm-svn: 227264
Eric Fiselier [Tue, 27 Jan 2015 23:03:38 +0000 (23:03 +0000)]
Ensure __has_feature is defined in test/support/count_new.hpp
llvm-svn: 227263
Zachary Turner [Tue, 27 Jan 2015 23:02:23 +0000 (23:02 +0000)]
Run dos2unix against llvm-pdbdump.
llvm-svn: 227262
Saleem Abdulrasool [Tue, 27 Jan 2015 22:57:39 +0000 (22:57 +0000)]
SymbolRewriter: allow rewriting with comdats
COMDATs must be identically named to the symbol. When support for COMDATs was
introduced, the symbol rewriter was not updated, resulting in rewriting failing
for symbols which were placed into COMDATs. This corrects the behaviour and
adds test cases for this.
llvm-svn: 227261
Saleem Abdulrasool [Tue, 27 Jan 2015 22:57:35 +0000 (22:57 +0000)]
SymbolRewriter: prevent unnecessary rewrite
The rewrite for the pattern based rewrite is unnecessary if the existing name
matches the pattern.
llvm-svn: 227260
Rui Ueyama [Tue, 27 Jan 2015 22:55:29 +0000 (22:55 +0000)]
Remove kindInGroup reference.
That kind of reference was used only in ELFFile, and the use of
that reference there didn't seem to make sense. All test still
pass (after adjusting symbol names) without that code. LLD is
still be able to link LLD and Clang. Looks like we just don't
need this.
http://reviews.llvm.org/D7189
llvm-svn: 227259
Alexey Samsonov [Tue, 27 Jan 2015 22:50:19 +0000 (22:50 +0000)]
[ASan] Fix use-after-scope in COMMON_INTERCEPTOR_ENTER implementation.
Make sure "void *ctx" doesn't point to an object which already went out
of scope. This might also fix -Wuninitialized warnings GCC 4.7 produces
while building ASan runtime.
llvm-svn: 227258
Zachary Turner [Tue, 27 Jan 2015 22:40:14 +0000 (22:40 +0000)]
Add support for dumping debug tables to llvm-pdbdump.
PDB stores some of its data in streams and some in tables.
This patch teaches llvm-pdbdump to dump basic summary data
for the debug tables.
In support of this, this patch also adds some DIA helper
classes, such as a wrapper around an IDiaSymbol interface,
as well as helpers for outputting various enumerations to
a raw_ostream.
llvm-svn: 227257
Sanjay Patel [Tue, 27 Jan 2015 22:26:56 +0000 (22:26 +0000)]
remove function names from comments; NFC
llvm-svn: 227256
Chris Bieneman [Tue, 27 Jan 2015 22:21:06 +0000 (22:21 +0000)]
Re-landing changes to use ArrayRef instead of SmallVectorImpl, and new API test.
This contains the changes from r227148 & r227154, and also fixes to the test case to properly clean up the stack options.
llvm-svn: 227255
Kostya Serebryany [Tue, 27 Jan 2015 22:19:55 +0000 (22:19 +0000)]
[fuzzer] properly enable asan's coverage feedback
llvm-svn: 227254
Sanjay Patel [Tue, 27 Jan 2015 22:16:52 +0000 (22:16 +0000)]
fix typos; NFC
llvm-svn: 227253
Kostya Serebryany [Tue, 27 Jan 2015 22:08:41 +0000 (22:08 +0000)]
Add a Fuzzer library
Summary:
A simple genetic in-process coverage-guided fuzz testing library.
I've used this fuzzer to test clang-format
(it found 12+ bugs, thanks djasper@ for the fixes!)
and it may also help us test other parts of LLVM.
So why not keep it in the LLVM repository?
I plan to add the cmake build rules later (in a separate patch, if that's ok)
and also add a clang-format-fuzzer target.
See README.txt for details.
Test Plan: Tests will follow separately.
Reviewers: djasper, chandlerc, rnk
Reviewed By: rnk
Subscribers: majnemer, ygribov, dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D7184
llvm-svn: 227252
Kaelyn Takata [Tue, 27 Jan 2015 22:01:39 +0000 (22:01 +0000)]
Fix a think-o in handling ambiguous corrections for a TypoExpr.
Under certain circumstances, the identifier mentioned in the diagnostic
won't match the intended correction even though the replacement
expression and the note pointing to the decl are both correct.
Basically, the TreeTransform assumes the TypoExpr's Consumer points to
the correct TypoCorrection, but the handling of typos that appear to be
ambiguous from the point of view of TransformTypoExpr would cause that
assumption to be violated by altering the Consumer's correction stream.
This fix allows the Consumer's correction stream to be reset to the
right TypoCorrection after successfully resolving the percieved ambiguity.
Included is a fix to suppress correcting the RHS of an assignment to the
LHS of that assignment for non-C++ code, to prevent a regression in
test/SemaObjC/provisional-ivar-lookup.m.
This fixes PR22297.
llvm-svn: 227251
Ahmed Bougacha [Tue, 27 Jan 2015 21:52:16 +0000 (21:52 +0000)]
[SimplifyLibCalls] Don't confuse strcpy_chk for stpcpy_chk.
This was introduced in a faulty refactoring (r225640, mea culpa):
the tests weren't testing the return values, so, for both
__strcpy_chk and __stpcpy_chk, we would return the end of the
buffer (matching stpcpy) instead of the beginning (for strcpy).
The root cause was the prefix "__" being ignored when comparing,
which made us always pick LibFunc::stpcpy_chk.
Pass the LibFunc::Func directly to avoid this kind of error.
Also, make the testcases as explicit as possible to prevent this.
The now-useful testcases expose another, entangled, stpcpy problem,
with the further simplification. This was introduced in a
refactoring (r225640) to match the original behavior.
However, this leads to problems when successive simplifications
generate several similar instructions, none of which are removed
by the custom replaceAllUsesWith.
For instance, InstCombine (the main user) doesn't erase the
instruction in its custom RAUW. When trying to simplify say
__stpcpy_chk:
- first, an stpcpy is created (fortified simplifier),
- second, a memcpy is created (normal simplifier), but the
stpcpy call isn't removed.
- third, InstCombine later revisits the instructions,
and simplifies the first stpcpy to a memcpy. We now have
two memcpys.
llvm-svn: 227250
Sanjoy Das [Tue, 27 Jan 2015 21:38:12 +0000 (21:38 +0000)]
Teach IRCE to look at branch weights when recognizing range checks
Splitting a loop to make range checks redundant is profitable only if
the range check "never" fails. Make this fact a part of recognizing a
range check -- a branch is a range check only if it is expected to
pass (via branch_weights metadata).
Differential Revision: http://reviews.llvm.org/D7192
llvm-svn: 227249
Alexey Samsonov [Tue, 27 Jan 2015 21:34:11 +0000 (21:34 +0000)]
Revert "[x86] Combine x86mmx/i64 to v2i64 conversion to use scalar_to_vector"
This reverts commits r226953 and r226974.
llvm-svn: 227248
Keno Fischer [Tue, 27 Jan 2015 21:33:25 +0000 (21:33 +0000)]
[ExecutionEngine] Fix r227228 tests on Windows
On Windows, we're running MCJIT with ELF, so the module needs to have
its Triple explicitly adjusted.
llvm-svn: 227247
Kevin Enderby [Tue, 27 Jan 2015 21:28:24 +0000 (21:28 +0000)]
dd the option, -link-opt-hints to llvm-objdump used with -macho to print the
Mach-O AArch64 linker optimization hints for ADRP code optimization.
llvm-svn: 227246
Simon Atanasyan [Tue, 27 Jan 2015 21:11:16 +0000 (21:11 +0000)]
[Mips] Remove unused function argument
No functional changes.
llvm-svn: 227245
Simon Atanasyan [Tue, 27 Jan 2015 21:11:11 +0000 (21:11 +0000)]
[Mips] Support R_MIPS_GPREL16 relocation
llvm-svn: 227244
Sanjay Patel [Tue, 27 Jan 2015 20:50:27 +0000 (20:50 +0000)]
Merge vector stores into wider vector stores (PR21711)
This patch resolves part of PR21711 ( http://llvm.org/bugs/show_bug.cgi?id=21711 ).
The 'f3' test case in that report presents a situation where we have two 128-bit
stores extracted from a 256-bit source vector.
Instead of producing this:
vmovaps %xmm0, (%rdi)
vextractf128 $1, %ymm0, 16(%rdi)
This patch merges the 128-bit stores into a single 256-bit store:
vmovups %ymm0, (%rdi)
Differential Revision: http://reviews.llvm.org/D7208
llvm-svn: 227242
Zachary Turner [Tue, 27 Jan 2015 20:46:21 +0000 (20:46 +0000)]
Add llvm-pdbdump to tools.
llvm-pdbdump is a tool which can be used to dump the contents
of Microsoft-generated PDB files. It makes use of the Microsoft
DIA SDK, which is a COM based library designed specifically for
this purpose.
The initial commit of this tool dumps the raw bytes from PDB data
streams. Future commits will dump more semantic information such
as types, symbols, source files, etc similar to the types of
information accessible via llvm-dwarfdump.
Reviewed by: Aaron Ballman, Reid Kleckner, Chandler Carruth
Differential Revision: http://reviews.llvm.org/D7153
llvm-svn: 227241
Eric Fiselier [Tue, 27 Jan 2015 20:43:53 +0000 (20:43 +0000)]
Fix linking pthread in tests on FreeBSD
llvm-svn: 227240
Simon Atanasyan [Tue, 27 Jan 2015 20:24:08 +0000 (20:24 +0000)]
Use Reference::KindValue instead of uint16_t to pass and save a relocation kind
No functional changes.
llvm-svn: 227233
Simon Atanasyan [Tue, 27 Jan 2015 20:23:51 +0000 (20:23 +0000)]
[Core] Reformat the code with clang-format
No functional changes.
llvm-svn: 227232
Dmitry Vyukov [Tue, 27 Jan 2015 20:19:17 +0000 (20:19 +0000)]
tsan: properly instrument unaligned accesses
If a memory access is unaligned, emit __tsan_unaligned_read/write
callbacks instead of __tsan_read/write.
Required to change semantics of __tsan_unaligned_read/write to not do the user memory.
But since they were unused (other than through __sanitizer_unaligned_load/store) this is fine.
Fixes long standing issue 17:
https://code.google.com/p/thread-sanitizer/issues/detail?id=17
llvm-svn: 227231
Dmitry Vyukov [Tue, 27 Jan 2015 20:19:12 +0000 (20:19 +0000)]
tsan: properly instrument unaligned accesses
If a memory access is unaligned, emit __tsan_unaligned_read/write
callbacks instead of __tsan_read/write.
Required to change semantics of __tsan_unaligned_read/write to not do the user memory.
But since they were unused (other than through __sanitizer_unaligned_load/store) this is fine.
Fixes long standing issue 17:
https://code.google.com/p/thread-sanitizer/issues/detail?id=17
llvm-svn: 227230
Ramkumar Ramachandra [Tue, 27 Jan 2015 20:03:08 +0000 (20:03 +0000)]
overloaded-intrinsic-name: exercise anyptr on struct
No other test I know shows how struct names are mangled in overloaded
intrinsic functions.
Differential Revision: http://reviews.llvm.org/D7037
llvm-svn: 227229
Keno Fischer [Tue, 27 Jan 2015 20:02:31 +0000 (20:02 +0000)]
[ExecutionEngine] Add weak symbol support to RuntimeDyld
Support weak symbols by first looking up if there is an externally visible symbol we can find,
and only if that fails using the one in the object file we're loading.
Reviewed By: lhames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6950
llvm-svn: 227228
Keno Fischer [Tue, 27 Jan 2015 19:29:00 +0000 (19:29 +0000)]
[ExecutionEngine] FindFunctionNamed: Skip declarations
Summary:
Basically all other methods that look up functions by name skip them if they are mere declarations.
Do the same in FindFunctionNamed.
Reviewers: lhames
Reviewed By: lhames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7068
llvm-svn: 227227
Nico Weber [Tue, 27 Jan 2015 19:27:39 +0000 (19:27 +0000)]
[libcxx] Make __wrap_iter work with gcc.
he following snippet doesn't build when using gcc and libc++:
#include <string>
void f(const std::string& s) { s.begin(); }
#include <vector>
void AppendTo(const std::vector<char>& v) { v.begin(); }
The problem is that __wrap_iter has a private constructor. It lists vector<>
and basic_string<> as friends, but gcc seems to ignore this for vector<> for
some reason. Declaring vector before the friend declaration in __wrap_iter is
enough to work around this problem, so do that. With this patch, I'm able to
build chromium/android with libc++. Without it, two translation units fail to
build. (iosfwd already provides a forward declaration of basic_string.)
As far as I can tell, this is due to a gcc bug, which I filed as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64816.
Fixes PR22355.
http://reviews.llvm.org/D7201
llvm-svn: 227226
Kai Nacke [Tue, 27 Jan 2015 19:11:28 +0000 (19:11 +0000)]
[mips] Add range checks and transformation to octeon instructions in AsmParser.
This patch adds range checks to the immediate operands of octeon
instructions in the AsmParser. Like gas, it applies the following
transformations if the immediate is to large:
bbit0 $8, 42, foo => bbit032 $8, 10, foo
bbit1 $8, 46, foo => bbit132 $8, 14, foo
cins $8, $31, 32, 31 => cins32 $8, $31, 0, 31
exts $7, $4, 54, 9 => exts32 $7, $4, 22, 9
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D7080
llvm-svn: 227225
Larisse Voufo [Tue, 27 Jan 2015 18:47:05 +0000 (18:47 +0000)]
Implement the remaining portion of DR1467 from r227022. I may have overlooked a few things, but this implementation comes straight from the DR resolution itself.
llvm-svn: 227224
Alex Rosenberg [Tue, 27 Jan 2015 18:43:05 +0000 (18:43 +0000)]
Check wchar_t type on PS4.
llvm-svn: 227223
Chaoren Lin [Tue, 27 Jan 2015 18:40:25 +0000 (18:40 +0000)]
Fix copy paste error in file header.
llvm-svn: 227222
Adrian Prantl [Tue, 27 Jan 2015 18:32:19 +0000 (18:32 +0000)]
Update the doxygen comments in CGDebugInfo.h to follow the coding standards.
llvm-svn: 227221
Kaelyn Takata [Tue, 27 Jan 2015 18:26:18 +0000 (18:26 +0000)]
Properly handle typos in the conditional of ?: expressions in C.
In particular, remove the OpaqueExpr transformation from r225389 and
move the correction of the conditional from CheckConditionalOperands to
ActOnConditionalOp before the OpaqueExpr is created. This fixes the
typo correction behavior in C code that uses the GNU extension for a
binary ?: (without an expression between the "?" and the ":").
llvm-svn: 227220
Filipe Cabecinhas [Tue, 27 Jan 2015 18:08:32 +0000 (18:08 +0000)]
Fix part of r227215. PS4 code just omits leaf frame pointers.
llvm-svn: 227219
Hafiz Abid Qadeer [Tue, 27 Jan 2015 18:03:50 +0000 (18:03 +0000)]
Clean lldb-mi test cases.
This patch adds lldbmi_testcase.MiTestCaseBase class and removes
a lot of repitition in the lldb-mi test cases. Also cleans import
list and code-style.
Presented for review in http://reviews.llvm.org/D7162.
Patch from Ilia K <ki.stfu@gmail.com>.
llvm-svn: 227218
Jim Ingham [Tue, 27 Jan 2015 18:03:05 +0000 (18:03 +0000)]
The MCJIT doesn't seem to call getPointerForNamedFunction from the MemoryManager anymore, switching to getSymbolAddress, which
it does call, and implementing it so that we once again look up external symbols in the JIT.
Also juked the error reporting from the JIT a little bit.
This resolves:
http://llvm.org/bugs/show_bug.cgi?id=22314
llvm-svn: 227217
Kostya Serebryany [Tue, 27 Jan 2015 17:59:28 +0000 (17:59 +0000)]
Add cmake flag LLVM_USE_SANITIZE_COVERAGE
Summary:
When LLVM_USE_SANITIZE_COVERAGE=YES
and one of the sanitizers is used -fsanitize-coverage=3 will be added
to build flag. This will be used to run a coverage-guided fuzzer on various
llvm libraries.
Test Plan: n/a
Reviewers: rnk
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7116
llvm-svn: 227216
Filipe Cabecinhas [Tue, 27 Jan 2015 17:27:37 +0000 (17:27 +0000)]
Added more PS4 defaults for code generation
llvm-svn: 227215
Marek Olsak [Tue, 27 Jan 2015 17:27:15 +0000 (17:27 +0000)]
R600/SI: Enable all tests that pass on VI without changes
llvm-svn: 227214
Marek Olsak [Tue, 27 Jan 2015 17:25:15 +0000 (17:25 +0000)]
R600/SI: Fix MIN3/MAX3 on VI, define MED3
llvm-svn: 227213
Marek Olsak [Tue, 27 Jan 2015 17:25:11 +0000 (17:25 +0000)]
R600/SI: Don't set patterns for chip-specific instructions while having pseudos
Only pseudos have patterns on them.
Also don't set the asm string for VINTRP_Pseudo. All pseudos should have empty
asm.
This matches what all other multiclasses do.
llvm-svn: 227212
Marek Olsak [Tue, 27 Jan 2015 17:25:07 +0000 (17:25 +0000)]
R600/SI: Add VI versions of LDS atomics
Each class is split into two: one adds let statements around non-pseudos,
and the other one specifies the parameters.
llvm-svn: 227211
Marek Olsak [Tue, 27 Jan 2015 17:25:02 +0000 (17:25 +0000)]
R600/SI: Add VI versions of MUBUF atomics
llvm-svn: 227210
Marek Olsak [Tue, 27 Jan 2015 17:24:58 +0000 (17:24 +0000)]
R600/SI: Add VI versions of MUBUF loads and stores
This enables a lot of existing patterns for VI.
llvm-svn: 227209
Marek Olsak [Tue, 27 Jan 2015 17:24:54 +0000 (17:24 +0000)]
R600/SI: Add pseudos for MUBUF loads and stores
This defines the SI versions only, so it shouldn't change anything.
There are no changes other than using the new multiclasses, adding missing
mayLoad/mayStore, and formatting fixes.
llvm-svn: 227208
Andrey Churbanov [Tue, 27 Jan 2015 17:13:53 +0000 (17:13 +0000)]
Comments only: removing the Revision and Date svn variables from the top of all the source files.
llvm-svn: 227207
Justin Bogner [Tue, 27 Jan 2015 17:10:07 +0000 (17:10 +0000)]
profile: add lib/profile to cc_kext on darwin,arm64
These functions are already present in the cc_kext for arm32 and for x86 and
x86_64. It was an oversight that they were not included for arm64.
Based on a patch by Lawrence D'Anna. Thanks!
llvm-svn: 227206
Andrey Churbanov [Tue, 27 Jan 2015 17:06:18 +0000 (17:06 +0000)]
minor formatting change
llvm-svn: 227205
Andrey Churbanov [Tue, 27 Jan 2015 17:03:42 +0000 (17:03 +0000)]
Enables a cpuid leaf 4 check for non-MIC x86 architectures.
llvm-svn: 227204
Andrey Churbanov [Tue, 27 Jan 2015 17:00:03 +0000 (17:00 +0000)]
Adds some new Windows processor groups trace messages
llvm-svn: 227203
Andrey Churbanov [Tue, 27 Jan 2015 16:58:08 +0000 (16:58 +0000)]
Fixes error where proc-bind-var is not set when there is a parsing error of GOMP_AFFINITY environment variable.
llvm-svn: 227202
Andrey Churbanov [Tue, 27 Jan 2015 16:55:43 +0000 (16:55 +0000)]
Removes some unused variables (__kmp_ht_*) and changes__kmp_ncores and __kmp_nThreadsPerCore to static globals within kmp_affinity.cpp.
llvm-svn: 227201
Sean Silva [Tue, 27 Jan 2015 16:53:56 +0000 (16:53 +0000)]
No longer SCE_PRIVATE ;)
llvm-svn: 227200
Andrey Churbanov [Tue, 27 Jan 2015 16:52:57 +0000 (16:52 +0000)]
Replaces KMP_OS_WINDOWS && KMP_ARCH_X86_64 or any combination of those two options with the feature macro KMP_GROUP_AFFINITY.
llvm-svn: 227199
Andrey Churbanov [Tue, 27 Jan 2015 16:50:31 +0000 (16:50 +0000)]
Fixed implementation of the teams construct in case it contains parallel regions with different number of threads.
llvm-svn: 227198
Andrea Di Biagio [Tue, 27 Jan 2015 15:58:14 +0000 (15:58 +0000)]
[InstCombine] Teach how to fold a select into a cttz/ctlz with the 'is_zero_undef' flag.
This patch teaches the Instruction Combiner how to fold a cttz/ctlz followed by
a icmp plus select into a single cttz/ctlz with flag 'is_zero_undef' cleared.
Added test InstCombine/select-cmp-cttz-ctlz.ll.
llvm-svn: 227197
Evgeniy Stepanov [Tue, 27 Jan 2015 15:06:54 +0000 (15:06 +0000)]
Revert r226440.
It was fixed the right way in r227195.
llvm-svn: 227196
Evgeniy Stepanov [Tue, 27 Jan 2015 15:01:22 +0000 (15:01 +0000)]
[sancov] Fix unspecified constructor order between sancov and asan.
Sanitizer coverage constructor must run after asan constructor (for each DSO).
Bump constructor priority to guarantee that.
llvm-svn: 227195
Alex Rosenberg [Tue, 27 Jan 2015 14:47:44 +0000 (14:47 +0000)]
Begin to teach clang about the PS4.
llvm-svn: 227194