platform/upstream/llvm.git
10 years ago[UBSan] Introduce ScopedReport object.
Alexey Samsonov [Wed, 30 Jul 2014 01:49:19 +0000 (01:49 +0000)]
[UBSan] Introduce ScopedReport object.

This object is used to encapsulate all actions that need to be
done before/after printing UBSan diagnostics. Currently these
actions are:
* locking a mutex to ensure that UBSan diagnostics from several
threads won't mix with each other and with other sanitizers'
reports
* killing a program once the report is printed (if necessary).

Use this object in all UBSan handlers. Unify the way we implement
fatal and non-fatal handlers by making all the handlers simple
one-liners that redirect __ubsan_handle_foo(_abort)? to
handleFooImpl().

llvm-svn: 214279

10 years ago[mach-o] Fix test case comment and stray file copy
Nick Kledzik [Wed, 30 Jul 2014 01:43:21 +0000 (01:43 +0000)]
[mach-o] Fix test case comment and stray file copy

llvm-svn: 214278

10 years ago[mach-o] Fix arm interworking with movw/movt
Nick Kledzik [Wed, 30 Jul 2014 01:41:38 +0000 (01:41 +0000)]
[mach-o] Fix arm interworking with movw/movt

In some cases the address of a function will be materialized with a movw/movt
pair.  If the function is a thumb function, the low bit needs to be set on
the movw immediate value.

llvm-svn: 214277

10 years agoConvert a few more function pointer calls to just "f()".
Rafael Espindola [Wed, 30 Jul 2014 01:36:32 +0000 (01:36 +0000)]
Convert a few more function pointer calls to just "f()".

llvm-svn: 214276

10 years ago[AVX512] Test that _mm512_set1_* intrinsics generate broadcasts
Adam Nemet [Wed, 30 Jul 2014 01:30:51 +0000 (01:30 +0000)]
[AVX512] Test that _mm512_set1_* intrinsics generate broadcasts

llvm-svn: 214275

10 years agoMS ABI: Consider alignment attributes on typedefs for layout
David Majnemer [Wed, 30 Jul 2014 01:30:47 +0000 (01:30 +0000)]
MS ABI: Consider alignment attributes on typedefs for layout

The MS ABI has a notion of 'required alignment' for fields; this
alignment supercedes pragma pack directives.

MSVC takes into account alignment attributes on typedefs when
determining whether or not a field has a certain required alignment.

Do the same in clang by tracking whether or not we saw such an attribute
when calculating the type's bitwidth and alignment.

This fixes PR20418.

Reviewers: rnk

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

llvm-svn: 214274

10 years ago[AVX512] Add missing CHECK-LABEL
Adam Nemet [Wed, 30 Jul 2014 01:30:45 +0000 (01:30 +0000)]
[AVX512] Add missing CHECK-LABEL

llvm-svn: 214273

10 years agoDon't duplicate the function name in a comment.
Rafael Espindola [Wed, 30 Jul 2014 01:23:45 +0000 (01:23 +0000)]
Don't duplicate the function name in a comment.

llvm-svn: 214272

10 years agoReapply "UseListOrder: Order GlobalValue uses after initializers"
Duncan P. N. Exon Smith [Wed, 30 Jul 2014 01:22:16 +0000 (01:22 +0000)]
Reapply "UseListOrder: Order GlobalValue uses after initializers"

This reverts commit r214249, reapplying r214242 and r214243, now that
r214270 has fixed the UB.

llvm-svn: 214271

10 years agoUseListOrder: Fix undefined behaviour
Duncan P. N. Exon Smith [Wed, 30 Jul 2014 01:20:26 +0000 (01:20 +0000)]
UseListOrder: Fix undefined behaviour

This commit fixes undefined behaviour that caused the revert in r214249.

The problem was two unsequenced operations on a `DenseMap<>`, giving
different behaviour in GCC and Clang.  This:

    DenseMap<T*, unsigned> DM;
    for (auto &X : ...)
      DM[&X] = DM.size() + 1;

should have been:

    DenseMap<T*, unsigned> DM;
    for (auto &X : ...) {
      unsigned Size = DM.size();
      DM[&X] = Size + 1;
    }

Until r214242, this difference between compilers didn't matter.  In
r214242, `OrderMap::LastGlobalValueID` was introduced and compared
against IDs, which in GCC were off-by-one my expectations.

llvm-svn: 214270

10 years agoR600/SI: Consider adjacent offsets in getLdStBaseRegImmOfs
Matt Arsenault [Wed, 30 Jul 2014 01:01:10 +0000 (01:01 +0000)]
R600/SI: Consider adjacent offsets in getLdStBaseRegImmOfs

We can treat ds_read2_* as a single offset if the offsets are adjacent.

No test since emission of read2 instructions for partially
aligned loads isn't implemented yet.

llvm-svn: 214269

10 years ago[mach-o] Add support for -sectalign option
Nick Kledzik [Wed, 30 Jul 2014 00:58:06 +0000 (00:58 +0000)]
[mach-o] Add support for -sectalign option

The -sectalign option is used to increase the alignment required for a section.
It required some reworking of how the __TEXT segment is laid out because that
segment also contains the mach_header and load commands. And the size of load
commands depend on the number of segments, sections, and dependent dylibs used.

Using this option will simplify some future test cases because the final
address of code can be pinned down, making tests of its content easier.

llvm-svn: 214268

10 years agoNot all instantiated variable is odr-used. Do not mark non-odr-used variable template...
Larisse Voufo [Wed, 30 Jul 2014 00:49:55 +0000 (00:49 +0000)]
Not all instantiated variable is odr-used. Do not mark non-odr-used variable template specializations as such.

llvm-svn: 214267

10 years agoAdd support for scalarizing ctlz_zero_undef
Petar Jovanovic [Wed, 30 Jul 2014 00:44:03 +0000 (00:44 +0000)]
Add support for scalarizing ctlz_zero_undef

Fix the missing case in ScalarizeVectorResult() that was exposed with
libclcore.bc in Android.

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

llvm-svn: 214266

10 years agoUse function pointers with just f(1,2) instead of (*f)(1,2).
Rafael Espindola [Wed, 30 Jul 2014 00:38:58 +0000 (00:38 +0000)]
Use function pointers with just f(1,2) instead of (*f)(1,2).

llvm-svn: 214265

10 years agoRevert "UseListOrder: Remove move assignment"
Duncan P. N. Exon Smith [Wed, 30 Jul 2014 00:25:33 +0000 (00:25 +0000)]
Revert "UseListOrder: Remove move assignment"

This reverts commit r214260.  Turns out move assignment *is* necessary
for MSVC [1].

[1]: http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/9631

llvm-svn: 214264

10 years agoHeader hygiene: remove using directive and #undef DEBUG_TYPE once we're done.
Richard Smith [Wed, 30 Jul 2014 00:25:24 +0000 (00:25 +0000)]
Header hygiene: remove using directive and #undef DEBUG_TYPE once we're done.

llvm-svn: 214263

10 years agoUseListOrder: Remove move assignment
Duncan P. N. Exon Smith [Wed, 30 Jul 2014 00:05:02 +0000 (00:05 +0000)]
UseListOrder: Remove move assignment

Remove the move assignment added in r214213, since it wasn't necessary
to fix the bots (r214224 was the magic touch).

llvm-svn: 214260

10 years ago[UBSan] Allow to override runtime flags defaults by providing
Alexey Samsonov [Wed, 30 Jul 2014 00:01:41 +0000 (00:01 +0000)]
[UBSan] Allow to override runtime flags defaults by providing
compile definition UBSAN_DEFAULT_OPTIONS when building the runtime.
This mirrors similar ASan functionality.

llvm-svn: 214259

10 years ago[UBSan] Move all runtime flags parsing to ubsan_flags.cc.
Alexey Samsonov [Tue, 29 Jul 2014 23:49:20 +0000 (23:49 +0000)]
[UBSan] Move all runtime flags parsing to ubsan_flags.cc.

No functionality change.

llvm-svn: 214258

10 years agoAdd rfci instruction.
Joerg Sonnenberger [Tue, 29 Jul 2014 23:45:20 +0000 (23:45 +0000)]
Add rfci instruction.

llvm-svn: 214256

10 years ago[MCJIT] Add options to llvm-rtdyld to describe a phony target address space for
Lang Hames [Tue, 29 Jul 2014 23:43:13 +0000 (23:43 +0000)]
[MCJIT] Add options to llvm-rtdyld to describe a phony target address space for
use in -verify mode.

This patch adds three hidden command line options to llvm-rtdyld:

 -target-addr-start <start-addr> : Specify the start of the virtual address
                                   space on the phony target.

 -target-addr-end   <end-addr>   : Specify the end of the virtual address space
                                   on the phony target.

 -target-section-sep <sep>       : Specify the separation (in bytes) between the
                                   end of one section and the start of the next.

These options automatically default to sane values for the target platform. In
particular, they allow narrow (e.g. 32-bit, 16-bit) targets to be tested from
wider (e.g. 64-bit, 32-bit) hosts without overflowing pointers.

The section separation option defaults to zero, but can be set to a large number
(e.g. 1 << 32) to force large separations between sections in order to
stress-test large-code-model code.

llvm-svn: 214255

10 years agombar without argument is equivalent to mbar 0.
Joerg Sonnenberger [Tue, 29 Jul 2014 23:31:27 +0000 (23:31 +0000)]
mbar without argument is equivalent to mbar 0.

llvm-svn: 214250

10 years agoRevert "UseListOrder: Order GlobalValue uses after initializers"
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 23:31:11 +0000 (23:31 +0000)]
Revert "UseListOrder: Order GlobalValue uses after initializers"

This reverts commits r214242 and r214243 while I investigate buildbot
failures [1][2][3].  I can't reproduce these failures locally, so if
anyone can see what I've done wrong, I'd appreciate a note.

[1]: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/9840
[2]: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/14981
[3]: http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/15191

llvm-svn: 214249

10 years agoSilence a warning saying "typedef requires a name" from clang.
Greg Clayton [Tue, 29 Jul 2014 23:23:58 +0000 (23:23 +0000)]
Silence a warning saying "typedef requires a name" from clang.

llvm-svn: 214247

10 years ago[modules] Factor out ODR checking, to avoid unnecessary repeated work in
Richard Smith [Tue, 29 Jul 2014 23:23:27 +0000 (23:23 +0000)]
[modules] Factor out ODR checking, to avoid unnecessary repeated work in
finishPendingActions loop.

llvm-svn: 214246

10 years ago[UBSan] Get pc/bp for stack unwinding as early as possible.
Alexey Samsonov [Tue, 29 Jul 2014 23:22:41 +0000 (23:22 +0000)]
[UBSan] Get pc/bp for stack unwinding as early as possible.

This will ensure that stack frames in error reports will not
contain internal UBSan failures, and frame #0 will be the
actual place in the program where the error happens.

llvm-svn: 214245

10 years agoRecognize BookE's mbar instruction.
Joerg Sonnenberger [Tue, 29 Jul 2014 23:16:31 +0000 (23:16 +0000)]
Recognize BookE's mbar instruction.

llvm-svn: 214244

10 years agoUseListOrder: Additional test coverage for r214242
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 23:15:49 +0000 (23:15 +0000)]
UseListOrder: Additional test coverage for r214242

r214242 was subtle enough it really deserves a targeted test with
comments.  This adds some global variables that trigger the relevant
code path.  Sorry this wasn't committed with the fix.

llvm-svn: 214243

10 years agoUseListOrder: Order GlobalValue uses after initializers
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 23:06:14 +0000 (23:06 +0000)]
UseListOrder: Order GlobalValue uses after initializers

To avoid unnecessary forward references, the reader doesn't process
initializers of `GlobalValue`s until after the constant pool has been
processed, and then in reverse order.  Model this when predicting
use-list order.  This gets two more Bitcode tests passing with
`llvm-uselistorder`.

Part of PR5680.

llvm-svn: 214242

10 years agoUseListOrder: Create a struct around OrderMap, NFC
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 23:03:40 +0000 (23:03 +0000)]
UseListOrder: Create a struct around OrderMap, NFC

llvm-svn: 214241

10 years agoFeedback on r214189, no functionality change.
Manman Ren [Tue, 29 Jul 2014 22:58:13 +0000 (22:58 +0000)]
Feedback on r214189, no functionality change.

llvm-svn: 214240

10 years agoAdd missing test for r214210.
Eli Bendersky [Tue, 29 Jul 2014 22:57:59 +0000 (22:57 +0000)]
Add missing test for r214210.

Thanks dblaikie for reminding me.

llvm-svn: 214239

10 years agoFix typo in alias: DSIR -> DSISR
Joerg Sonnenberger [Tue, 29 Jul 2014 22:42:44 +0000 (22:42 +0000)]
Fix typo in alias: DSIR -> DSISR

llvm-svn: 214238

10 years agoclang-format vs plugin: include the license
Hans Wennborg [Tue, 29 Jul 2014 22:34:53 +0000 (22:34 +0000)]
clang-format vs plugin: include the license

The vsix installer will show the license when it starts, and it
would print an annoying message when there was none.

While we're here, add a MoreInfoUrl.

llvm-svn: 214237

10 years agoAdd $vAttach support to llgs.
Todd Fiala [Tue, 29 Jul 2014 22:30:01 +0000 (22:30 +0000)]
Add $vAttach support to llgs.

Also adds a new test case for vAttach;{pid} for llgs and debugserver.

llvm-svn: 214236

10 years agollvm-profdata: Clean up and reorganize some tests
Justin Bogner [Tue, 29 Jul 2014 22:29:23 +0000 (22:29 +0000)]
llvm-profdata: Clean up and reorganize some tests

This moves some tests around to make it clearer what's being tested,
and adds very rudimentary comment syntax to the text input format to
make specifying this kind of test a little bit simpler.

llvm-svn: 214235

10 years agoSupport move to/from segment register.
Joerg Sonnenberger [Tue, 29 Jul 2014 22:21:57 +0000 (22:21 +0000)]
Support move to/from segment register.

llvm-svn: 214234

10 years agoAttempt to fix the expression parser after r214119
Reid Kleckner [Tue, 29 Jul 2014 21:59:33 +0000 (21:59 +0000)]
Attempt to fix the expression parser after r214119

__INT?_TYPE__ is now explicitly, so adding an explicit 'signed'
specifier causes errors.

llvm-svn: 214233

10 years ago[UBSan] Build part of UBSan runtime that can be linked into C programs with -fno...
Alexey Samsonov [Tue, 29 Jul 2014 21:52:25 +0000 (21:52 +0000)]
[UBSan] Build part of UBSan runtime that can be linked into C programs with -fno-rtti flag.

llvm-svn: 214232

10 years ago[MCJIT] XFAIL some RuntimeDyld tests on MIPS - RuntimeDyldChecker isn't properly
Lang Hames [Tue, 29 Jul 2014 21:48:22 +0000 (21:48 +0000)]
[MCJIT] XFAIL some RuntimeDyld tests on MIPS - RuntimeDyldChecker isn't properly
endian-aware yet, and this is causing failures when cross-linking on MIPS.

llvm-svn: 214231

10 years agoRemove unused variable that was causing a warning.
Greg Clayton [Tue, 29 Jul 2014 21:47:02 +0000 (21:47 +0000)]
Remove unused variable that was causing a warning.

llvm-svn: 214230

10 years agoUse nullptr instead of NULL.
Rafael Espindola [Tue, 29 Jul 2014 21:46:05 +0000 (21:46 +0000)]
Use nullptr instead of NULL.

llvm-svn: 214229

10 years agoCoverage: improve efficiency of the counter propagation to the expansion regions.
Alex Lorenz [Tue, 29 Jul 2014 21:42:24 +0000 (21:42 +0000)]
Coverage: improve efficiency of the counter propagation to the expansion regions.

This patch reduces the complexity of the two inner loops in order to speed up
the loading of coverage data for very large functions.

llvm-svn: 214228

10 years ago[MCJIT] Make sure we print the full 64-bit result of exprs in RuntimeDyldChecker.
Lang Hames [Tue, 29 Jul 2014 21:38:20 +0000 (21:38 +0000)]
[MCJIT] Make sure we print the full 64-bit result of exprs in RuntimeDyldChecker.

llvm-svn: 214227

10 years agoRemove unused includes.
Rafael Espindola [Tue, 29 Jul 2014 21:38:05 +0000 (21:38 +0000)]
Remove unused includes.

llvm-svn: 214226

10 years agoR600/SI: Implement getLdStBaseRegImmOfs
Matt Arsenault [Tue, 29 Jul 2014 21:34:55 +0000 (21:34 +0000)]
R600/SI: Implement getLdStBaseRegImmOfs

llvm-svn: 214225

10 years agoUseListOrder: Try to resolve buildbot failure
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 21:30:21 +0000 (21:30 +0000)]
UseListOrder: Try to resolve buildbot failure

MSVC [1] thinks `UseListShuffleVector` needs a copy constructor, but I
don't.  Let's see if being explicit about `UseListOrder` is convincing.

[1]: http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/11664/steps/build_Lld/logs/stdio

Here's the failure:

C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(92): error C2248: 'llvm::UseListShuffleVector::operator =' : cannot access private member declared in class 'llvm::UseListShuffleVector' (C:\lld-x86_64_win7\lld-x86_64-win7\llvm.src\lib\Bitcode\Writer\ValueEnumerator.cpp) [C:\lld-x86_64_win7\lld-x86_64-win7\llvm.obj\lib\Bitcode\Writer\LLVMBitWriter.vcxproj]
          C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(56) : see declaration of 'llvm::UseListShuffleVector::operator ='
          C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(32) : see declaration of 'llvm::UseListShuffleVector'
          This diagnostic occurred in the compiler generated function 'llvm::UseListOrder &llvm::UseListOrder::operator =(const llvm::UseListOrder &)'

llvm-svn: 214224

10 years agoResolve the executable _before_ we try to get the module specifications.
Greg Clayton [Tue, 29 Jul 2014 21:27:21 +0000 (21:27 +0000)]
Resolve the executable _before_ we try to get the module specifications.

Also fixed the host 32 and 64 bit arch to return "x86_64-apple-macosx" again instead of "x86_64-apple-" (unspecified OS) after recent changes.

<rdar://problem/17845078>

llvm-svn: 214223

10 years agoPR20473: Don't "deduplicate" string literals with the same value but different
Richard Smith [Tue, 29 Jul 2014 21:20:12 +0000 (21:20 +0000)]
PR20473: Don't "deduplicate" string literals with the same value but different
lengths! In passing, simplify string literal deduplication by relying on LLVM
to deduplicate the underlying constant values.

llvm-svn: 214222

10 years agoDelete dead code.
Rafael Espindola [Tue, 29 Jul 2014 21:09:43 +0000 (21:09 +0000)]
Delete dead code.

The gold plugin doesn't call lseek or read directly any more.

llvm-svn: 214221

10 years ago[Refactor] Expose the IslExprBuilder (missing files)
Johannes Doerfert [Tue, 29 Jul 2014 21:06:08 +0000 (21:06 +0000)]
[Refactor] Expose the IslExprBuilder (missing files)

llvm-svn: 214220

10 years agostd::once_flag was forward declared with _LIBCPP_TYPE_VIS decoration, and the defined...
Marshall Clow [Tue, 29 Jul 2014 21:05:31 +0000 (21:05 +0000)]
std::once_flag was forward declared with _LIBCPP_TYPE_VIS decoration, and the defined with _LIBCPP_TYPE_VIS_ONLY decoration. Make them match

llvm-svn: 214219

10 years agoHave a single enum for "not a bitcode" error.
Rafael Espindola [Tue, 29 Jul 2014 21:01:24 +0000 (21:01 +0000)]
Have a single enum for "not a bitcode" error.

This is more convenient for callers. No functionality change, this will
be used in a next patch to the gold plugin.

llvm-svn: 214218

10 years agoR600/SI: Enable named operand table for DS instructions
Matt Arsenault [Tue, 29 Jul 2014 21:00:56 +0000 (21:00 +0000)]
R600/SI: Enable named operand table for DS instructions

llvm-svn: 214217

10 years agoRemove line with no effect
Matt Arsenault [Tue, 29 Jul 2014 21:00:53 +0000 (21:00 +0000)]
Remove line with no effect

llvm-svn: 214216

10 years ago[Refactor] Expose the IslExprBuilder
Johannes Doerfert [Tue, 29 Jul 2014 20:50:09 +0000 (20:50 +0000)]
[Refactor] Expose the IslExprBuilder

  This allows us to use to IslExprBuilder not only from within
  IslCodegeneration.

llvm-svn: 214215

10 years agogold plugin: Fix handling of corrupted bitcode files.
Rafael Espindola [Tue, 29 Jul 2014 20:46:19 +0000 (20:46 +0000)]
gold plugin: Fix handling of corrupted bitcode files.

We should still claim them and tell gold about the error.

llvm-svn: 214214

10 years agoUseListShuffleVector: Remove copy constructor
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 20:45:52 +0000 (20:45 +0000)]
UseListShuffleVector: Remove copy constructor

Remove the copy constructor added in r214178 to appease MSVC17 since it
shouldn't be called at all.  My guess is that explicitly deleting it
will make the compiler happy.  To round out the operations I've also
deleted copy assignment and added move assignment.  Otherwise no
functionality change.

llvm-svn: 214213

10 years agoUseListShuffleVector: Code reorganization, NFC
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 20:45:49 +0000 (20:45 +0000)]
UseListShuffleVector: Code reorganization, NFC

llvm-svn: 214212

10 years ago[MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather than
Lang Hames [Tue, 29 Jul 2014 20:40:37 +0000 (20:40 +0000)]
[MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather than
full paths for its first argument.

This allows us to remove the annoying sed lines in the test cases, and write
direct references to file names in stub_addr calls (rather than <filename>
placeholders).

llvm-svn: 214211

10 years agoFix FileCheck crash when empty prefix is passed.
Eli Bendersky [Tue, 29 Jul 2014 20:30:53 +0000 (20:30 +0000)]
Fix FileCheck crash when empty prefix is passed.

llvm-svn: 214210

10 years agoMove the bitcode error enum to the include directory.
Rafael Espindola [Tue, 29 Jul 2014 20:22:46 +0000 (20:22 +0000)]
Move the bitcode error enum to the include directory.

This will let users in other libraries know which error occurred. In particular,
it will be possible to check if the parsing failed or if the file is not
bitcode.

llvm-svn: 214209

10 years agoSupport LIBRARY_PATH on all Darwin targets.
Bob Wilson [Tue, 29 Jul 2014 20:17:52 +0000 (20:17 +0000)]
Support LIBRARY_PATH on all Darwin targets.

r197490 changed the behavior of LIBRARY_PATH to try to match GCC's behavior
for cross compilers and make clang work better on "bare metal" targets.
Unfortunately that change is breaking a number of MacPorts projects because
the LIBRARY_PATH environment variable is being ignored when compiling on a
64-bit host for a 32-bit target. Because the host and target architectures
differ, isCrossCompiling returns true. This does not make sense for Darwin,
where multiple architectures are supported natively via "fat" Mach-O slices
and where development is generally done against SDKs regardless. This patch
fixes the problem by overriding isCrossCompiling to return false for Darwin
toolchains.

llvm-svn: 214208

10 years agoUse the most up to date dsymutil on Darwin, not the one in /usr/bin/dsymutil.
Greg Clayton [Tue, 29 Jul 2014 20:10:59 +0000 (20:10 +0000)]
Use the most up to date dsymutil on Darwin, not the one in /usr/bin/dsymutil.

llvm-svn: 214207

10 years agoCoverage: fix the missing output stream in recursive call to CoverageMappingContext...
Alex Lorenz [Tue, 29 Jul 2014 19:58:16 +0000 (19:58 +0000)]
Coverage: fix the missing output stream in recursive call to CoverageMappingContext::dump

llvm-svn: 214206

10 years ago[RuntimeDyld][AArch64] Make encode/decodeAddend also work on big-endian hosts.
Juergen Ributzka [Tue, 29 Jul 2014 19:57:15 +0000 (19:57 +0000)]
[RuntimeDyld][AArch64] Make encode/decodeAddend also work on big-endian hosts.

llvm-svn: 214205

10 years ago[RuntimeDyld][AArch64] Make encode/decodeAddend more typesafe by using the relocation...
Juergen Ributzka [Tue, 29 Jul 2014 19:57:11 +0000 (19:57 +0000)]
[RuntimeDyld][AArch64] Make encode/decodeAddend more typesafe by using the relocation enum type. NFCI.

llvm-svn: 214204

10 years agoProvide warning name for property attribute warning
Fariborz Jahanian [Tue, 29 Jul 2014 19:45:49 +0000 (19:45 +0000)]
Provide warning name for property attribute warning
mismatch. //rdar://17845264

llvm-svn: 214203

10 years agoRevert "Fix test case in r214190. (It failed on my end.)"
Larisse Voufo [Tue, 29 Jul 2014 19:28:40 +0000 (19:28 +0000)]
Revert "Fix test case in r214190. (It failed on my end.)"

This was an accident.

llvm-svn: 214202

10 years agoBase regex code on char_class_type.
Dan Albert [Tue, 29 Jul 2014 19:23:39 +0000 (19:23 +0000)]
Base regex code on char_class_type.

__get_classname() and __bracket_expression were assuming that
char_class_type was ctype_base::mask rather than using
regex_traits<_CharT>::char_class_type.

This change allows char_class_type to be defined to something other than
ctype_base::mask so that the implementation will still work for
platforms with an 8-bit ctype mask (such as Android and OpenBSD).

llvm-svn: 214201

10 years agoIslAst: Enhance parallelism detection test
Tobias Grosser [Tue, 29 Jul 2014 19:22:46 +0000 (19:22 +0000)]
IslAst: Enhance parallelism detection test

Add more check lines to ensure we do not accidentally generate nested openmp
parallel annotations.

llvm-svn: 214200

10 years agoSmall gold plugin simplifications.
Rafael Espindola [Tue, 29 Jul 2014 19:17:44 +0000 (19:17 +0000)]
Small gold plugin simplifications.

* Use a range loop.
* Store the extra options as "const char *".

llvm-svn: 214199

10 years agoFix test case in r214190. (It failed on my end.)
Larisse Voufo [Tue, 29 Jul 2014 19:15:27 +0000 (19:15 +0000)]
Fix test case in r214190. (It failed on my end.)

llvm-svn: 214198

10 years ago[Windows] Delegate str[n]casecmp to the appropriate MSVCRT func.
Zachary Turner [Tue, 29 Jul 2014 19:08:55 +0000 (19:08 +0000)]
[Windows] Delegate str[n]casecmp to the appropriate MSVCRT func.

llvm-svn: 214197

10 years agoAdd a number of aliases for SPR access.
Joerg Sonnenberger [Tue, 29 Jul 2014 18:55:43 +0000 (18:55 +0000)]
Add a number of aliases for SPR access.

llvm-svn: 214196

10 years agoR600/SI: Add isMUBUF / isMTBUF
Matt Arsenault [Tue, 29 Jul 2014 18:51:56 +0000 (18:51 +0000)]
R600/SI: Add isMUBUF / isMTBUF

Also add missing comments about how the flags work.

llvm-svn: 214195

10 years agoR600/SI: Set bits on SMRD instructions
Matt Arsenault [Tue, 29 Jul 2014 18:51:54 +0000 (18:51 +0000)]
R600/SI: Set bits on SMRD instructions

Set mayStore = 0 and enable named operand table.

llvm-svn: 214194

10 years agoFix typo.
Larisse Voufo [Tue, 29 Jul 2014 18:45:54 +0000 (18:45 +0000)]
Fix typo.

llvm-svn: 214193

10 years agoFix PR10177 where non-type template arguments to alias templates are not marked as...
Larisse Voufo [Tue, 29 Jul 2014 18:44:19 +0000 (18:44 +0000)]
Fix PR10177 where non-type template arguments to alias templates are not marked as used in dependent contexts. The fix actually forces non-dependent names to be checked at template definition time as expected from the standard.

llvm-svn: 214192

10 years agoInstall the `obj2yaml` and `yaml2obj` utilities together with other LLVM tools.
Simon Atanasyan [Tue, 29 Jul 2014 18:28:16 +0000 (18:28 +0000)]
Install the `obj2yaml` and `yaml2obj` utilities together with other LLVM tools.

llvm-svn: 214191

10 years ago[Debug Info] update testing case due to change in DIBuilder.
Manman Ren [Tue, 29 Jul 2014 18:21:00 +0000 (18:21 +0000)]
[Debug Info] update testing case due to change in DIBuilder.

This is the paired commit with llvm r214189.

llvm-svn: 214190

10 years ago[Debug Info] remove DITrivialType and use null to represent unspecified param.
Manman Ren [Tue, 29 Jul 2014 18:20:39 +0000 (18:20 +0000)]
[Debug Info] remove DITrivialType and use null to represent unspecified param.

Per feedback on r214111, we are going to use null to represent unspecified
parameter. If the type array is {null}, it means a function that returns void;
If the type array is {null, null}, it means a variadic function that returns
void. In summary if we have more than one element in the type array and the last
element is null, it is a variadic function.

rdar://17628609

llvm-svn: 214189

10 years agoWhen constructing an ArchSpec from a MachO cpu type and subtype, don't set the OS...
Greg Clayton [Tue, 29 Jul 2014 18:04:57 +0000 (18:04 +0000)]
When constructing an ArchSpec from a MachO cpu type and subtype, don't set the OS for x86_64 and x86 in case the binary ends up being for macosx or ios.

<rdar://problem/17819272>

llvm-svn: 214188

10 years agollvm-uselistorder: Fix header comments from r214144
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 17:44:26 +0000 (17:44 +0000)]
llvm-uselistorder: Fix header comments from r214144

llvm-svn: 214187

10 years agoAdd a test for the mtriple plugin option.
Rafael Espindola [Tue, 29 Jul 2014 17:27:07 +0000 (17:27 +0000)]
Add a test for the mtriple plugin option.

llvm-svn: 214186

10 years agoModify how the loop hint attribute is printed as a lead-up to supporting constant...
Tyler Nowicki [Tue, 29 Jul 2014 17:21:32 +0000 (17:21 +0000)]
Modify how the loop hint attribute is printed as a lead-up to supporting constant expression values.

Reviewed by Aaron Ballman

llvm-svn: 214185

10 years agoIR: Create the use-list order shuffle vector in-place
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 16:58:18 +0000 (16:58 +0000)]
IR: Create the use-list order shuffle vector in-place

Per David Blaikie's review of r214135, this is a more natural way to
initialize.

llvm-svn: 214184

10 years agoDataflowWorklist.h - "We should have a description here of what this code does, not...
Artyom Skrobov [Tue, 29 Jul 2014 16:10:25 +0000 (16:10 +0000)]
DataflowWorklist.h - "We should have a description here of what this code does, not just where it's used."

llvm-svn: 214183

10 years agoProfileData: Don't redundantly default initialize a member
Justin Bogner [Tue, 29 Jul 2014 15:56:06 +0000 (15:56 +0000)]
ProfileData: Don't redundantly default initialize a member

We're default constructing RecordIterator anyway, so it needn't appear
in the mem-initializer-list.

llvm-svn: 214182

10 years agoAdd rfi instruction. Based on feedback by Ulrich Weigand.
Joerg Sonnenberger [Tue, 29 Jul 2014 15:49:09 +0000 (15:49 +0000)]
Add rfi instruction. Based on feedback by Ulrich Weigand.

llvm-svn: 214181

10 years ago[mips] Don't use odd-numbered single precision registers for fastcc calling
Sasa Stankovic [Tue, 29 Jul 2014 14:39:24 +0000 (14:39 +0000)]
[mips] Don't use odd-numbered single precision registers for fastcc calling
convention if -mno-odd-spreg is used.

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

llvm-svn: 214180

10 years ago[PowerPC] Fix ppc64-elf-abi.ll test case on Darwin
Ulrich Weigand [Tue, 29 Jul 2014 12:48:14 +0000 (12:48 +0000)]
[PowerPC] Fix ppc64-elf-abi.ll test case on Darwin

Use full -mtriple instead of just -march to ensure Linux ABI
(ELFv1 or ELFv2) is selected.

llvm-svn: 214179

10 years agoUseListShuffleVector: Add a copy constructor to appease msc17.
NAKAMURA Takumi [Tue, 29 Jul 2014 12:20:50 +0000 (12:20 +0000)]
UseListShuffleVector: Add a copy constructor to appease msc17.

llvm-svn: 214178

10 years agoCodeGenPrep: fall back to MVT::Other if instruction's type isn't an EVT.
Tim Northover [Tue, 29 Jul 2014 10:20:22 +0000 (10:20 +0000)]
CodeGenPrep: fall back to MVT::Other if instruction's type isn't an EVT.

The test being performed is just an approximation anyway, so it really
shouldn't crash when things don't go entirely as expected.

Should fix PR20474.

llvm-svn: 214177

10 years agoARM: add __aeabi_d2h for truncation on AEABI systems
Tim Northover [Tue, 29 Jul 2014 09:56:45 +0000 (09:56 +0000)]
ARM: add __aeabi_d2h for truncation on AEABI systems

ARM does actually define the name for this conversion, so we should use it on
"-eabi" platforms.

llvm-svn: 214176

10 years agoARM: fix @llvm.convert.from.fp16 on softfloat targets.
Tim Northover [Tue, 29 Jul 2014 09:56:38 +0000 (09:56 +0000)]
ARM: fix @llvm.convert.from.fp16 on softfloat targets.

We need to make sure we use the softened version of all appropriate operands in
the libcall, or things go horribly wrong. This may entail actually executing a
1-stage softening.

llvm-svn: 214175

10 years agoUseListShuffleVector::~UseListShuffleVector(): Fix inappropriate delete. It should...
NAKAMURA Takumi [Tue, 29 Jul 2014 09:54:35 +0000 (09:54 +0000)]
UseListShuffleVector::~UseListShuffleVector(): Fix inappropriate delete. It should be delete[].

llvm-svn: 214174

10 years agoAArch64: Resolve some FIXMEs in CGBuiltin left over from backend merge
Yi Kong [Tue, 29 Jul 2014 09:25:17 +0000 (09:25 +0000)]
AArch64: Resolve some FIXMEs in CGBuiltin left over from backend merge

Merge vrshr_n_v and vqshlu_n_v with ARM.

Remove FIXME comments for others as they can't actually be shared.

NFC.

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

llvm-svn: 214173

10 years ago[OPENMP] Additional comments for implicit 'flush' clause + removed unused parameter...
Alexey Bataev [Tue, 29 Jul 2014 09:17:39 +0000 (09:17 +0000)]
[OPENMP] Additional comments for implicit 'flush' clause + removed unused parameter from method classof().

llvm-svn: 214172