platform/upstream/llvm.git
9 years agoRevert r227242 - Merge vector stores into wider vector stores (PR21711).
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

9 years agoAdded test case to make sure we don't regress on settings breakpoints by selector...
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

9 years agoIntrin.h: define _XCR_XFEATURE_ENABLED_MASK
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

9 years ago[mips] Use __clear_cache builtin instead of cacheflush()
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

9 years agoFix a typo in code-signing.txt
Enrico Granata [Tue, 27 Jan 2015 23:26:59 +0000 (23:26 +0000)]
Fix a typo in code-signing.txt

llvm-svn: 227268

9 years agoCleanups, and add some FIXMEs. No functional change.
Richard Smith [Tue, 27 Jan 2015 23:23:39 +0000 (23:23 +0000)]
Cleanups, and add some FIXMEs. No functional change.

llvm-svn: 227267

9 years ago[ASan] Fix test cases: don't assume that fast unwinder can't unwind through libc.
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

9 years agoFix definition of __has_feature in r227263
Eric Fiselier [Tue, 27 Jan 2015 23:05:41 +0000 (23:05 +0000)]
Fix definition of __has_feature in r227263

llvm-svn: 227264

9 years agoEnsure __has_feature is defined in test/support/count_new.hpp
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

9 years agoRun dos2unix against llvm-pdbdump.
Zachary Turner [Tue, 27 Jan 2015 23:02:23 +0000 (23:02 +0000)]
Run dos2unix against llvm-pdbdump.

llvm-svn: 227262

9 years agoSymbolRewriter: allow rewriting with comdats
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

9 years agoSymbolRewriter: prevent unnecessary rewrite
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

9 years agoRemove kindInGroup reference.
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

9 years ago[ASan] Fix use-after-scope in COMMON_INTERCEPTOR_ENTER implementation.
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

9 years agoAdd support for dumping debug tables to llvm-pdbdump.
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

9 years agoremove function names from comments; NFC
Sanjay Patel [Tue, 27 Jan 2015 22:26:56 +0000 (22:26 +0000)]
remove function names from comments; NFC

llvm-svn: 227256

9 years agoRe-landing changes to use ArrayRef instead of SmallVectorImpl, and new API test.
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

9 years ago[fuzzer] properly enable asan's coverage feedback
Kostya Serebryany [Tue, 27 Jan 2015 22:19:55 +0000 (22:19 +0000)]
[fuzzer] properly enable asan's coverage feedback

llvm-svn: 227254

9 years agofix typos; NFC
Sanjay Patel [Tue, 27 Jan 2015 22:16:52 +0000 (22:16 +0000)]
fix typos; NFC

llvm-svn: 227253

9 years agoAdd a Fuzzer library
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

9 years agoFix a think-o in handling ambiguous corrections for a TypoExpr.
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

9 years ago[SimplifyLibCalls] Don't confuse strcpy_chk for stpcpy_chk.
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

9 years agoTeach IRCE to look at branch weights when recognizing range checks
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

9 years agoRevert "[x86] Combine x86mmx/i64 to v2i64 conversion to use scalar_to_vector"
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

9 years ago[ExecutionEngine] Fix r227228 tests on Windows
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

9 years agodd the option, -link-opt-hints to llvm-objdump used with -macho to print the
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

9 years ago[Mips] Remove unused function argument
Simon Atanasyan [Tue, 27 Jan 2015 21:11:16 +0000 (21:11 +0000)]
[Mips] Remove unused function argument

No functional changes.

llvm-svn: 227245

9 years ago[Mips] Support R_MIPS_GPREL16 relocation
Simon Atanasyan [Tue, 27 Jan 2015 21:11:11 +0000 (21:11 +0000)]
[Mips] Support R_MIPS_GPREL16 relocation

llvm-svn: 227244

9 years agoMerge vector stores into wider vector stores (PR21711)
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

9 years agoAdd llvm-pdbdump to tools.
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

9 years agoFix linking pthread in tests on FreeBSD
Eric Fiselier [Tue, 27 Jan 2015 20:43:53 +0000 (20:43 +0000)]
Fix linking pthread in tests on FreeBSD

llvm-svn: 227240

9 years agoUse Reference::KindValue instead of uint16_t to pass and save a relocation kind
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

9 years ago[Core] Reformat the code with clang-format
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

9 years agotsan: properly instrument unaligned accesses
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

9 years agotsan: properly instrument unaligned accesses
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

9 years agooverloaded-intrinsic-name: exercise anyptr on struct
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

9 years ago[ExecutionEngine] Add weak symbol support to RuntimeDyld
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

9 years ago[ExecutionEngine] FindFunctionNamed: Skip declarations
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

9 years ago[libcxx] Make __wrap_iter work with gcc.
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

9 years ago[mips] Add range checks and transformation to octeon instructions in AsmParser.
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

9 years agoImplement the remaining portion of DR1467 from r227022. I may have overlooked a few...
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

9 years agoCheck wchar_t type on PS4.
Alex Rosenberg [Tue, 27 Jan 2015 18:43:05 +0000 (18:43 +0000)]
Check wchar_t type on PS4.

llvm-svn: 227223

9 years agoFix copy paste error in file header.
Chaoren Lin [Tue, 27 Jan 2015 18:40:25 +0000 (18:40 +0000)]
Fix copy paste error in file header.

llvm-svn: 227222

9 years agoUpdate the doxygen comments in CGDebugInfo.h to follow the coding standards.
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

9 years agoProperly handle typos in the conditional of ?: expressions in C.
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

9 years agoFix part of r227215. PS4 code just omits leaf frame pointers.
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

9 years agoClean lldb-mi test cases.
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

9 years agoThe MCJIT doesn't seem to call getPointerForNamedFunction from the MemoryManager...
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

9 years agoAdd cmake flag LLVM_USE_SANITIZE_COVERAGE
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

9 years agoAdded more PS4 defaults for code generation
Filipe Cabecinhas [Tue, 27 Jan 2015 17:27:37 +0000 (17:27 +0000)]
Added more PS4 defaults for code generation

llvm-svn: 227215

9 years agoR600/SI: Enable all tests that pass on VI without changes
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

9 years agoR600/SI: Fix MIN3/MAX3 on VI, define MED3
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

9 years agoR600/SI: Don't set patterns for chip-specific instructions while having pseudos
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

9 years agoR600/SI: Add VI versions of LDS atomics
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

9 years agoR600/SI: Add VI versions of MUBUF atomics
Marek Olsak [Tue, 27 Jan 2015 17:25:02 +0000 (17:25 +0000)]
R600/SI: Add VI versions of MUBUF atomics

llvm-svn: 227210

9 years agoR600/SI: Add VI versions of MUBUF loads and stores
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

9 years agoR600/SI: Add pseudos for MUBUF loads and stores
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

9 years agoComments only: removing the Revision and Date svn variables from the top of all the...
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

9 years agoprofile: add lib/profile to cc_kext on darwin,arm64
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

9 years agominor formatting change
Andrey Churbanov [Tue, 27 Jan 2015 17:06:18 +0000 (17:06 +0000)]
minor formatting change

llvm-svn: 227205

9 years agoEnables a cpuid leaf 4 check for non-MIC x86 architectures.
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

9 years agoAdds some new Windows processor groups trace messages
Andrey Churbanov [Tue, 27 Jan 2015 17:00:03 +0000 (17:00 +0000)]
Adds some new Windows processor groups trace messages

llvm-svn: 227203

9 years agoFixes error where proc-bind-var is not set when there is a parsing error of GOMP_AFFI...
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

9 years agoRemoves some unused variables (__kmp_ht_*) and changes__kmp_ncores and __kmp_nThreads...
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

9 years agoNo longer SCE_PRIVATE ;)
Sean Silva [Tue, 27 Jan 2015 16:53:56 +0000 (16:53 +0000)]
No longer SCE_PRIVATE ;)

llvm-svn: 227200

9 years agoReplaces KMP_OS_WINDOWS && KMP_ARCH_X86_64 or any combination of those two options...
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

9 years agoFixed implementation of the teams construct in case it contains parallel regions...
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

9 years ago[InstCombine] Teach how to fold a select into a cttz/ctlz with the 'is_zero_undef...
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

9 years agoRevert r226440.
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

9 years ago[sancov] Fix unspecified constructor order between sancov and asan.
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

9 years agoBegin to teach clang about the PS4.
Alex Rosenberg [Tue, 27 Jan 2015 14:47:44 +0000 (14:47 +0000)]
Begin to teach clang about the PS4.

llvm-svn: 227194

9 years ago[msan] Refactor memory layout specification and setup.
Evgeniy Stepanov [Tue, 27 Jan 2015 13:20:34 +0000 (13:20 +0000)]
[msan] Refactor memory layout specification and setup.

A flexible way of describing MSan memory layout details on various
platforms. No significant functional changes, but the memory layout
description that you get at verbosity=1 looks slightly different.
This change includes stronger sanity checks than before.

The goal of this change is to allow more than 2 application memory
ranges for https://code.google.com/p/memory-sanitizer/issues/detail?id=76.

llvm-svn: 227192

9 years agoAdd a FIXME in SelectionDAGBuilder before an assert that is valid only on X86.
Manuel Jacob [Tue, 27 Jan 2015 13:14:35 +0000 (13:14 +0000)]
Add a FIXME in SelectionDAGBuilder before an assert that is valid only on X86.

When lowering memcpy, memset or memmove, this assert checks whether the pointer
operands are in an address space < 256 which means "user defined address space"
on X86.  However, this notion of "user defined address space" does not exist
for other targets.

llvm-svn: 227191

9 years agotsan: add test for ANNOTATE_HAPPENS_BEFORE/AFTER annotations
Dmitry Vyukov [Tue, 27 Jan 2015 13:03:18 +0000 (13:03 +0000)]
tsan: add test for ANNOTATE_HAPPENS_BEFORE/AFTER annotations

llvm-svn: 227190

9 years ago[MSan] Enable MSan unit tests for all archs
Mohit K. Bhakkad [Tue, 27 Jan 2015 12:38:25 +0000 (12:38 +0000)]
[MSan] Enable MSan unit tests for all archs

Reviewers: Reviewers: eugenis, kcc, samsonov, petarj

Subscribers: dsanders, sagar, lldb-commits

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

llvm-svn: 227189

9 years ago[X86] Add intrinsics for AVX512 128 and 256 bit integer comparison of word and byte...
Craig Topper [Tue, 27 Jan 2015 09:16:29 +0000 (09:16 +0000)]
[X86] Add intrinsics for AVX512 128 and 256 bit integer comparison of word and byte vectors.

llvm-svn: 227186

9 years agoReplace some uses of getSubtargetImpl with the cached version
Eric Christopher [Tue, 27 Jan 2015 08:48:42 +0000 (08:48 +0000)]
Replace some uses of getSubtargetImpl with the cached version
off of the MachineFunction or with the version that takes a
Function reference as an argument.

llvm-svn: 227185

9 years ago[ARM] Correctly use make_unhandled_reloc_error
Denis Protivensky [Tue, 27 Jan 2015 08:47:15 +0000 (08:47 +0000)]
[ARM] Correctly use make_unhandled_reloc_error

llvm-svn: 227184

9 years ago[Mips] Fix createMipsRelocationHandler specialization (take 2)
Denis Protivensky [Tue, 27 Jan 2015 08:36:34 +0000 (08:36 +0000)]
[Mips] Fix createMipsRelocationHandler specialization (take 2)

Misread buildbot's log.
Both gcc and clang compile this fine.

Original fix reason:
gcc allows template specializations only in the same namespace
where template has been declared.

llvm-svn: 227183

9 years ago[PM] Clean up file banner comments prior to refactoring this code.
Chandler Carruth [Tue, 27 Jan 2015 08:28:33 +0000 (08:28 +0000)]
[PM] Clean up file banner comments prior to refactoring this code.

llvm-svn: 227182

9 years agoHave the PBQP register allocator use the subtarget on the MachineFunction.
Eric Christopher [Tue, 27 Jan 2015 08:27:06 +0000 (08:27 +0000)]
Have the PBQP register allocator use the subtarget on the MachineFunction.
(and remove an extraneous private).

llvm-svn: 227181

9 years agoRemove some extraneous includes.
Eric Christopher [Tue, 27 Jan 2015 08:27:03 +0000 (08:27 +0000)]
Remove some extraneous includes.

llvm-svn: 227180

9 years agoRevert "[Mips] Fix createMipsRelocationHandler specialization"
Denis Protivensky [Tue, 27 Jan 2015 08:22:07 +0000 (08:22 +0000)]
Revert "[Mips] Fix createMipsRelocationHandler specialization"

The buildbot reported build failures for clang.

llvm-svn: 227179

9 years agoFix build failure with pointer vs reference.
Eric Christopher [Tue, 27 Jan 2015 08:00:42 +0000 (08:00 +0000)]
Fix build failure with pointer vs reference.

NB: Saving files after editing helps.
llvm-svn: 227178

9 years ago[Mips] Fix createMipsRelocationHandler specialization
Denis Protivensky [Tue, 27 Jan 2015 07:56:25 +0000 (07:56 +0000)]
[Mips] Fix createMipsRelocationHandler specialization

gcc allows template specializations only in the same namespace
where template has been declared.

llvm-svn: 227177

9 years agoUpdate a few calls to getSubtarget<> to either be getSubtargetImpl
Eric Christopher [Tue, 27 Jan 2015 07:54:39 +0000 (07:54 +0000)]
Update a few calls to getSubtarget<> to either be getSubtargetImpl
when we didn't need the cast to the base class or the cached version
off of the subtarget.

llvm-svn: 227176

9 years agoClean up the AArch64 store pair suppression pass initialization
Eric Christopher [Tue, 27 Jan 2015 07:54:36 +0000 (07:54 +0000)]
Clean up the AArch64 store pair suppression pass initialization
and remove and unnecessary class variable.

llvm-svn: 227175

9 years ago[lld] Correct forming of ARM/Thumb atoms
Denis Protivensky [Tue, 27 Jan 2015 07:39:04 +0000 (07:39 +0000)]
[lld] Correct forming of ARM/Thumb atoms

Symbols addressing Thumb code have zero bit set in st_value to distinguish them from ARM instructions.
This caused wrong atoms' forming because of offset of one byte brought in by that corrected st_value.

Fixed reading of st_value & st_value-related things in ARMELFFile while forming atoms.
Symbol table generation is also fixed for Thumb atoms.

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

llvm-svn: 227174

9 years agoThe subtarget is cached on the MachineFunction. Access it directly.
Eric Christopher [Tue, 27 Jan 2015 07:31:29 +0000 (07:31 +0000)]
The subtarget is cached on the MachineFunction. Access it directly.

llvm-svn: 227173

9 years agoMigrate SeparateConstOffsetFromGEP to use a Function with
Eric Christopher [Tue, 27 Jan 2015 07:16:37 +0000 (07:16 +0000)]
Migrate SeparateConstOffsetFromGEP to use a Function with
getSubtarget.

llvm-svn: 227172

9 years agoLoopRotate: Don't walk the uses of a Constant
David Majnemer [Tue, 27 Jan 2015 06:21:43 +0000 (06:21 +0000)]
LoopRotate: Don't walk the uses of a Constant

LoopRotate wanted to avoid live range interference by looking at the
uses of a Value in the loop latch and seeing if any lied outside of the
loop.  We would wrongly perform this operation on Constants.

This fixes PR22337.

llvm-svn: 227171

9 years agoRemove unused include.
Eric Christopher [Tue, 27 Jan 2015 05:58:44 +0000 (05:58 +0000)]
Remove unused include.

llvm-svn: 227170

9 years agoDR1902: if overload resolution recurses, and the inner overload resolution
Richard Smith [Tue, 27 Jan 2015 03:30:40 +0000 (03:30 +0000)]
DR1902: if overload resolution recurses, and the inner overload resolution
selects a deleted function, the outer function is still a candidate even though
the initialization sequence is "otherwise ill-formed".

llvm-svn: 227169

9 years agoFix incorrect atom ordinal.
Rui Ueyama [Tue, 27 Jan 2015 03:05:34 +0000 (03:05 +0000)]
Fix incorrect atom ordinal.

Anonymous atoms created there were getting wrong atom ordinal.
LayoutAfter references take precedence over atom ordinals, so
the bug was not visible, though.

llvm-svn: 227168

9 years agoRevert r227148 & r227154 which added a test which infinitely loops.
Richard Trieu [Tue, 27 Jan 2015 03:03:47 +0000 (03:03 +0000)]
Revert r227148 & r227154 which added a test which infinitely loops.

r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly
outputs two following lines:

-tool: CommandLine Error: Option 'test-option-1' registered more than once!
-tool: CommandLine Error: Option 'test-option-2' registered more than once!

r227154 depends on changes from r227148

llvm-svn: 227167

9 years agoApply the transformation to the static type as well as the dynamic type. It doesn...
Enrico Granata [Tue, 27 Jan 2015 02:46:27 +0000 (02:46 +0000)]
Apply the transformation to the static type as well as the dynamic type. It doesn't make sense to carry along an untransformed static type

llvm-svn: 227166

9 years ago[PM] Run clang-format over this header to clean up the very few)
Chandler Carruth [Tue, 27 Jan 2015 02:20:43 +0000 (02:20 +0000)]
[PM] Run clang-format over this header to clean up the very few)
divergent formatting issues. This should prevent any format-only diffs
from sneaking into subsequent changes to port TTI to the new pass
manager.

llvm-svn: 227165

9 years ago[PM] Switch a doxygen comment to the standard format. NFC
Chandler Carruth [Tue, 27 Jan 2015 02:20:41 +0000 (02:20 +0000)]
[PM] Switch a doxygen comment to the standard format. NFC

llvm-svn: 227164

9 years agoAllow python command interpreter commands to be interruptable via CTRL+C.
Greg Clayton [Tue, 27 Jan 2015 01:58:22 +0000 (01:58 +0000)]
Allow python command interpreter commands to be interruptable via CTRL+C.

<rdar://problem/17935601>

llvm-svn: 227163

9 years ago[PM] Refactor the core logic to run EarlyCSE over a function into an
Chandler Carruth [Tue, 27 Jan 2015 01:34:14 +0000 (01:34 +0000)]
[PM] Refactor the core logic to run EarlyCSE over a function into an
object that manages a single run of this pass.

This was already essentially how it worked. Within the run function, it
would point members at *stack local* allocations that were only live for
a single run. Instead, it seems much cleaner to have a utility object
whose lifetime is clearly bounded by the run of the pass over the
function and can use member variables in a more direct way.

This also makes it easy to plumb the analyses used into it from the pass
and will make it re-usable with the new pass manager.

No functionality changed here, its just a refactoring.

llvm-svn: 227162