macho-dump: add code to print LC_ID_DYLIB load commands.

I want to check them in lld.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212043 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Convert mul x, -(pow2 +/- 1) to shift + add/sub.

The combine for mul x, pow2 +/- 1 is unchanged. Test cases for
both combines as well as mul x, pow2 have been added as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212044 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Unsized types don't specify an alignment.
PR20109

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212045 91177308-0d34-0410-b5e6-96231b3b80d8
[OCaml] Documentation improvements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212048 91177308-0d34-0410-b5e6-96231b3b80d8
[X86] Add support for builtin to read performance monitoring counters.

This patch adds support for a new builtin instruction called
__builtin_ia32_rdpmc.

Builtin '__builtin_ia32_rdpmc' is defined as a 'GCC builtin'; on X86, it can
be used to read performance monitoring counters. It takes as input the index
of the performance counter to read, and returns the value of the specified
performance counter as a 64-bit number.

Calls to this new builtin will map to instruction RDPMC.
The index in input to the builtin call is moved to register %ECX. The result
of the builtin call is the value of the specified performance counter (RDPMC
would return that quantity in registers RDX:RAX).

This patch:
 - Adds builtin int_x86_rdpmc as a GCCBuiltin;
 - Adds a new x86 DAG node called 'RDPMC_DAG';
 - Teaches how to lower this new builtin;
 - Adds an ISel pattern to select instruction RDPMC;
 - Fixes the definition of instruction RDPMC adding %RAX and %RDX as
   implicit definitions, and adding %ECX as implicit use;
 - Adds a LLVM test to verify that the new builtin is correctly selected.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212049 91177308-0d34-0410-b5e6-96231b3b80d8
Debug info: split out complex DIVariable address expressions into a
separate MDNode so they can be uniqued via folding set magic. To conserve
space, DIVariable nodes are still variable-length, with the last two
fields being optional.

No functional change.
http://reviews.llvm.org/D3526

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212050 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Remove unused declarations leftover from AMDIL

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212051 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Move mul combine to separate function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212052 91177308-0d34-0410-b5e6-96231b3b80d8
Add the -arch flag support to llvm-nm to select the slice out of a Mach-O
universal file.  This also includes support for -arch all, selecting the host
architecture by default from a universal file and checking if -arch is used
with a standard Mach-O it matches that architecture.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212054 91177308-0d34-0410-b5e6-96231b3b80d8
Build fix for systems without futimes/futimens

Some versions of Android don't have futimes/futimens and this code wasn't
updated during the recent errc refactoring.

Patch by Luqman Aden!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212055 91177308-0d34-0410-b5e6-96231b3b80d8
Fix 'platform-specific' hyphenations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212056 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor the code in clang to find a file in a PATH like environment variable into a helper function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212057 91177308-0d34-0410-b5e6-96231b3b80d8
objdump: Add test for ELF file with no section table

This is a test for the fix in r211904.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212059 91177308-0d34-0410-b5e6-96231b3b80d8
msan: Stop stripping the 'tail' modifier off of calls

This probably isn't necessary since msan started to unpoison the return
value shadow memory before all calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212061 91177308-0d34-0410-b5e6-96231b3b80d8
Speculatively fix some code handling Power64 MachO files

MSVC was warning on a switch containing only default labels.  In this
instance, it looks like it uncovered a real bug.  :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212062 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unnecessary datalayout string from a test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212063 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Preserve debug location information when transforming a call into an invoke during inlining.

This both improves basic debug info quality, but also fixes a larger
hole whenever we inline a call/invoke without a location (debug info for
the entire inlining is lost and other badness that the debug info
emission code is currently working around but shouldn't have to).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212065 91177308-0d34-0410-b5e6-96231b3b80d8
Convert some byval argpromotion grep tests to FileCheck

Surprisingly, the i32* byval parameter is not transformed by
argpromotion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212067 91177308-0d34-0410-b5e6-96231b3b80d8
AArch64: Actually do address type promotion

AArch64AddressTypePromotion was doing nothing because it was using the
old semantics of `Use` and `uses()`, when it really wanted to get at the
`users()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212073 91177308-0d34-0410-b5e6-96231b3b80d8
AArch64: Follow-up to r212073

In r212073 I missed a call of `use_begin()` that assumed the wrong
semantics.  It's not clear to me at all what this code does without the
fix, so I'm not sure how to write a testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212075 91177308-0d34-0410-b5e6-96231b3b80d8