platform/upstream/llvm.git
10 years agoAdd BookE's wrtee and wrteei instructions.
Joerg Sonnenberger [Wed, 30 Jul 2014 10:32:51 +0000 (10:32 +0000)]
Add BookE's wrtee and wrteei instructions.

llvm-svn: 214297

10 years ago[asan] add a feature to detect new-delete-size-mismatch (when used with -Xclang ...
Kostya Serebryany [Wed, 30 Jul 2014 09:48:23 +0000 (09:48 +0000)]
[asan] add a feature to detect new-delete-size-mismatch (when used with -Xclang -fsized-deallocation). Not yet on Mac. Also, remove some unused code.

llvm-svn: 214296

10 years agoSPRG 0 to 3 are valid outside BookE, so move them to the normal test
Joerg Sonnenberger [Wed, 30 Jul 2014 09:24:37 +0000 (09:24 +0000)]
SPRG 0 to 3 are valid outside BookE, so move them to the normal test
file. Add support for accessing SPRG 4 to 7 on BookE.

llvm-svn: 214295

10 years ago[Driver][Mips] Add function-wrapper so simplify creation of `Multilib` objects.
Simon Atanasyan [Wed, 30 Jul 2014 09:15:10 +0000 (09:15 +0000)]
[Driver][Mips] Add function-wrapper so simplify creation of `Multilib` objects.

No functional changes.

llvm-svn: 214294

10 years agoAST: Simplify some code
David Majnemer [Wed, 30 Jul 2014 08:42:33 +0000 (08:42 +0000)]
AST: Simplify some code

Iterator invalidation issues already force us to do one lookup and one
insert.
Don't use the particular bit-pattern of the 'Align' field to determine
whether or not we have already inserted into the TypeInfo DenseMap;
instead ask for an iterator to the TypeInfo entry.

llvm-svn: 214293

10 years agoFix some cases of incorrect handling of lifetime extended temporaries.
Manuel Klimek [Wed, 30 Jul 2014 08:34:42 +0000 (08:34 +0000)]
Fix some cases of incorrect handling of lifetime extended temporaries.

MaterializeTemporaryExpr already contains information about the lifetime
of the temporary; if the lifetime is not the full statement, we do not
want to emit a destructor at the end of the full statement for it.

llvm-svn: 214292

10 years agoUse __linux__ macro throughout, instead of ocasional __linux.
Sylvestre Ledru [Wed, 30 Jul 2014 08:33:21 +0000 (08:33 +0000)]
Use __linux__ macro throughout, instead of ocasional __linux.

__linux is not universally defined across all standards versions, compilers and architectures. Specifically at C99 and up, it's not defined in GCC on powerpc platform.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28314

Bugzilla: http://llvm.org/bugs/show_bug.cgi?id=20380

Patch by Dimitri John Ledkov <dimitri.ledkov@canonical.com>

llvm-svn: 214291

10 years agoMS ABI: Mangle alias templates used as template-template arguments
David Majnemer [Wed, 30 Jul 2014 08:20:03 +0000 (08:20 +0000)]
MS ABI: Mangle alias templates used as template-template arguments

A templated using declaration may be used as a template-template
argument.

Unfortunately, the VS "14" chooses '?' as the sole marker for the
argument.  This is problematic because it presupposes the possibility of
using more than one template-aliases as arguments to the same template.

This fixes PR20047.

llvm-svn: 214290

10 years ago[msan] Use SIGHUP instead of SIGUSR1 in test.
Evgeniy Stepanov [Wed, 30 Jul 2014 08:17:58 +0000 (08:17 +0000)]
[msan] Use SIGHUP instead of SIGUSR1 in test.

Apparently, SIGUSR1 does not work on x86_64+ArchLinux for some reason.

For more details, see:
https://groups.google.com/forum/#!topic/llvm-dev/4Ag1FF4M2Dw

llvm-svn: 214289

10 years agoDon't manually (and forcibly) run the verifier on the entire module from
Chandler Carruth [Wed, 30 Jul 2014 05:44:04 +0000 (05:44 +0000)]
Don't manually (and forcibly) run the verifier on the entire module from
the jump instruction table pass. First, the verifier is already built
into all the tools. The test case is adapted to just run llvm-as
demonstrating that we still catch the broken module. Second, the
verifier is *extremely* slow. This was responsible for very significant
compile time regressions.

If you have deployed a Clang binary anywhere from r210280 to this
commit, you really want to re-deploy.

llvm-svn: 214287

10 years agoSimplify the code.
Rafael Espindola [Wed, 30 Jul 2014 04:40:23 +0000 (04:40 +0000)]
Simplify the code.

Thanks to David Balkie for the suggestion.

llvm-svn: 214286

10 years ago[MCJIT] Fix the ARM BR24 relocation in RuntimeDyldMachO.
Lang Hames [Wed, 30 Jul 2014 03:35:05 +0000 (03:35 +0000)]
[MCJIT] Fix the ARM BR24 relocation in RuntimeDyldMachO.

We now (1) correctly decode the branch immediate, (2) modify the immediate to
corretly treat it as PC-rel, and (3) properly populate the stub entry.
Previously we had been doing each of these wrong.

<rdar://problem/17750739>

llvm-svn: 214285

10 years ago[PowerPC] Add JMP_SLOT relocation definitions
Hal Finkel [Wed, 30 Jul 2014 03:20:45 +0000 (03:20 +0000)]
[PowerPC] Add JMP_SLOT relocation definitions

This will be required by upcoming patches for LLDB support.

Patch by Justin Hibbits!

llvm-svn: 214284

10 years agoR600/SI: Remove redundant setting of bits on instructions.
Matt Arsenault [Wed, 30 Jul 2014 03:18:57 +0000 (03:18 +0000)]
R600/SI: Remove redundant setting of bits on instructions.

neverHasSideEffects is deprecated, and hasSideEffects = 0 is already
set on the base classes of the basic ALU instruction classes. The
base classes also already set mayLoad = 0 and mayStore = 0

llvm-svn: 214283

10 years ago[MCJIT] Actually remap sections based llvm-rtdyld options added in r214255.
Lang Hames [Wed, 30 Jul 2014 03:12:41 +0000 (03:12 +0000)]
[MCJIT] Actually remap sections based llvm-rtdyld options added in r214255.

This line was accidentally left out of that patch.

llvm-svn: 214282

10 years agoFix a use after free bug.
Rafael Espindola [Wed, 30 Jul 2014 02:37:26 +0000 (02:37 +0000)]
Fix a use after free bug.

llvm-svn: 214281

10 years agoUse range loops.
Rafael Espindola [Wed, 30 Jul 2014 01:52:40 +0000 (01:52 +0000)]
Use range loops.

llvm-svn: 214280

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