oota-llvm.git
6 years ago[WebAssembly] Convert a regular for loop to a range-based for loop.
Dan Gohman [Mon, 21 Dec 2015 17:22:02 +0000 (17:22 +0000)]
[WebAssembly] Convert a regular for loop to a range-based for loop.

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

6 years ago[WebAssembly] Clean up comments and fix a missing #include dependency.
Dan Gohman [Mon, 21 Dec 2015 17:19:31 +0000 (17:19 +0000)]
[WebAssembly] Clean up comments and fix a missing #include dependency.

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

6 years ago[WebAssembly] Remove an unneeded empty destructor.
Dan Gohman [Mon, 21 Dec 2015 17:12:40 +0000 (17:12 +0000)]
[WebAssembly] Remove an unneeded empty destructor.

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

6 years ago[WebAssembly] Enclose the operand variables for load and store instructions in braces.
Dan Gohman [Mon, 21 Dec 2015 16:58:49 +0000 (16:58 +0000)]
[WebAssembly] Enclose the operand variables for load and store instructions in braces.

This allows the AsmMatcherEmitter to properly tokenize the AsmStrings for
load and store instructions. This is a step towards asm parsing.

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

6 years ago[WebAssembly] Mark the ARGUMENT pseudo-instructions as CodeGenOnly.
Dan Gohman [Mon, 21 Dec 2015 16:53:29 +0000 (16:53 +0000)]
[WebAssembly] Mark the ARGUMENT pseudo-instructions as CodeGenOnly.

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

6 years ago[WebAssembly] Add some comments and make some minor source cleanups.
Dan Gohman [Mon, 21 Dec 2015 16:50:41 +0000 (16:50 +0000)]
[WebAssembly] Add some comments and make some minor source cleanups.

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

6 years agoTeach MCOperand::print how to print FPImm operands.
Dan Gohman [Mon, 21 Dec 2015 16:47:10 +0000 (16:47 +0000)]
Teach MCOperand::print how to print FPImm operands.

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

6 years agoRemove unused functions from ModuleLinker (NFC)
Teresa Johnson [Mon, 21 Dec 2015 15:49:59 +0000 (15:49 +0000)]
Remove unused functions from ModuleLinker (NFC)

Remove a couple ModuleLinker methods and a related static function that
are no longer used after the linker split.

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

6 years agoRemove overly strict new assert in BitcodeReader.
Teresa Johnson [Mon, 21 Dec 2015 15:38:13 +0000 (15:38 +0000)]
Remove overly strict new assert in BitcodeReader.

This fixes a bug introduced by the ThinLTO metadata linking patch
r255909. The assert is overly-strict and while useful in development of
the patch, doesn't seem interesting to keep.

Fixes PR25907.

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

6 years agoRevert "[AArch64] Promote loads from stores"
Jun Bum Lim [Mon, 21 Dec 2015 15:36:49 +0000 (15:36 +0000)]
Revert "[AArch64] Promote loads from stores"

This reverts commit r256004 due to a failure in cortex-a53.

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

6 years ago[LIR] Refactor code to enable future patch. NFC.
Chad Rosier [Mon, 21 Dec 2015 14:49:32 +0000 (14:49 +0000)]
[LIR] Refactor code to enable future patch. NFC.

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

6 years ago[AArch64] Enable PostRAScheduler for AArch64 generic build.
Chad Rosier [Mon, 21 Dec 2015 14:43:45 +0000 (14:43 +0000)]
[AArch64] Enable PostRAScheduler for AArch64 generic build.

Disable post-ra scheduler for perturbed tests to appease the bots and to
preserve the history of the tests.

http://reviews.llvm.org/D15652

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

6 years agoAVX512BW: Enable AND/OR/XOR vector byte/word paked operation by promoting to qword...
Igor Breger [Mon, 21 Dec 2015 14:40:36 +0000 (14:40 +0000)]
AVX512BW: Enable AND/OR/XOR vector byte/word paked operation by promoting to qword that natively suppored.

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

6 years ago[llvm-objdump] Use appropriate helper. NFC.
Davide Italiano [Mon, 21 Dec 2015 14:10:54 +0000 (14:10 +0000)]
[llvm-objdump] Use appropriate helper. NFC.

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

6 years agoImplemented Support of IA interrupt and exception handlers:
Amjad Aboud [Mon, 21 Dec 2015 14:07:14 +0000 (14:07 +0000)]
Implemented Support of IA interrupt and exception handlers:
http://lists.llvm.org/pipermail/cfe-dev/2015-September/045171.html

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

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

6 years ago[mips][microMIPS] Implement DERET and DI instructions and check size operand for...
Zlatko Buljan [Mon, 21 Dec 2015 13:08:58 +0000 (13:08 +0000)]
[mips][microMIPS] Implement DERET and DI instructions and check size operand for EXT and DEXT* instructions
Differential Revision: http://reviews.llvm.org/D15570

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

6 years agocheck-llvm: Tweak the feature "timestamps" for autoconf.
NAKAMURA Takumi [Mon, 21 Dec 2015 08:46:12 +0000 (08:46 +0000)]
check-llvm: Tweak the feature "timestamps" for autoconf.

Note, ENABLE_TIMESTAMPS is either 1 or 0 in Makefile.config.

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

6 years ago[MC, COFF] Unbreak support for COFF timestamps
David Majnemer [Mon, 21 Dec 2015 08:03:07 +0000 (08:03 +0000)]
[MC, COFF] Unbreak support for COFF timestamps

Support for COFF timestamps was unintentionally broken in r246905 when
it was conditionally available depending on whether or not LLVM was
configured with LLVM_ENABLE_TIMESTAMPS.  However, Config/config.h was
never included which essentially broke the feature.  Due to lax testing,
the breakage was never identified until we observed strange failures
during incremental links of Chromium.

This issue is resolved by simply including Config/config.h in
WinCOFFObjectWriter and teaching lit that the MC/COFF/timestamp.s test
is conditionally supported depending on LLVM_ENABLE_TIMESTAMPS.  With
this in place, we can strengthen the test to ensure that it will not
accidentally get broken in the future.

This fixes PR25891.

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

6 years ago[Cygwin] Enable TLS as emutls.
NAKAMURA Takumi [Mon, 21 Dec 2015 02:37:23 +0000 (02:37 +0000)]
[Cygwin] Enable TLS as emutls.

It resolves clang selfhosting with std::once() for Cygwin.

FIXME: It may be EmulatedTLS-generic also for X86-Android.
FIXME: Pass EmulatedTLS to LLVM CodeGen from Clang with -femulated-tls.

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

6 years ago[RS4GC] Add an assert which fails if there is a (yet unsupported) addrspacecast.
Manuel Jacob [Mon, 21 Dec 2015 01:26:46 +0000 (01:26 +0000)]
[RS4GC] Add an assert which fails if there is a (yet unsupported) addrspacecast.

The slightly strange indentation comes from clang-format.

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

6 years ago[InstCombine] Fix indentation. NFC.
Craig Topper [Mon, 21 Dec 2015 01:02:28 +0000 (01:02 +0000)]
[InstCombine] Fix indentation. NFC.

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

6 years ago[AVR] Added AVRCallingConv.td
Dylan McKay [Sun, 20 Dec 2015 23:17:44 +0000 (23:17 +0000)]
[AVR] Added AVRCallingConv.td

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

6 years ago[X86] Use range-based for loop. NFC
Craig Topper [Sun, 20 Dec 2015 18:41:57 +0000 (18:41 +0000)]
[X86] Use range-based for loop. NFC

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

6 years ago[X86] Prevent constant hoisting for a couple compare immediates that the selection...
Craig Topper [Sun, 20 Dec 2015 18:41:54 +0000 (18:41 +0000)]
[X86] Prevent constant hoisting for a couple compare immediates that the selection DAG knows how to optimize into a shift.

This allows "icmp ugt %a, 4294967295" and "icmp uge %a, 4294967296" to be optimized into right shifts by 32 which can fold the immediate into the shift instruction. These patterns show up with some regularity in real code.

Unfortunately, since getImmCost can't see the icmp predicate we can't be tell if we're only catching these specific cases.

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

6 years agoAdd AVR.td and AVRRegisterInfo.td
Dylan McKay [Sun, 20 Dec 2015 12:16:20 +0000 (12:16 +0000)]
Add AVR.td and AVRRegisterInfo.td

Summary:
This adds the core AVR TableGen file, along with the register descriptions.

Lines in AVR.td which require other TableGen files which haven't been committed
yet are commented out.

This is a fairly trivial patch, and should only require a quick review.

I kept the line width smaller than 80 columns, but there are a few exceptions
because I'm not sure how to split a string over several lines.

Reviewers: stoklund

Subscribers: dylanmckay, agnat

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

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

6 years ago[llvm-objdump] Move COFF function to where it belongs.
Davide Italiano [Sun, 20 Dec 2015 09:54:34 +0000 (09:54 +0000)]
[llvm-objdump] Move COFF function to where it belongs.

Ideally much more stuff should be moved out of llvm-objdump.cpp, but that
will happen later.

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

6 years agoFix a bug in test case -- duplicate entries
Xinliang David Li [Sun, 20 Dec 2015 08:49:31 +0000 (08:49 +0000)]
Fix a bug in test case -- duplicate entries

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

6 years agoFix a latent UAF bug in profwriter
Xinliang David Li [Sun, 20 Dec 2015 08:46:18 +0000 (08:46 +0000)]
Fix a latent UAF bug in profwriter

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

6 years agoFix mapping of @llvm.arm.ssat/usat intrinsics to ssat/usat instructions for Thumb2
Weiming Zhao [Sun, 20 Dec 2015 06:41:44 +0000 (06:41 +0000)]
Fix mapping of @llvm.arm.ssat/usat intrinsics to ssat/usat instructions for Thumb2

Summary:
r250697 fixed the mapping for ARM mode. We have to do the same for Thumb2 otherwise the same llvm.arm.ssat() will generate different saturating amount for ARM and Thumb.

r250697: http://reviews.llvm.org/rL250697

Reviewers: rmaprath

Subscribers: aemerson, llvm-commits, rengolin

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

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

6 years ago[PGO] Improve Indexed Profile Reader efficiency
Xinliang David Li [Sun, 20 Dec 2015 06:22:13 +0000 (06:22 +0000)]
[PGO] Improve Indexed Profile Reader efficiency

With the support of value profiling added, the Indexed prof
reader gets less efficient. The prof reader initialization
used to be just reading the file header, but with VP support
added, initialization needs to walk through all profile keys
of ondisk hash table resulting in very poor locality and large
memory increase (keys are stored together with the profile data
in the mapped profile buffer). Even worse, when the reader is
used by the compiler (not llvm-profdata too), the penalty becomes
very high as compilation of each single module requires touching
profile data buffer for the whole program.

In this patch, the icall target values (MD5hash) are no longer eargerly
converted back to name strings when the data is read into memory. New
interface is added to to profile reader so that InstrProfSymtab can be
lazily created for Indexed profile reader on-demand. Creating of the
symtab is intended to be used by llvm-profdata tool for symbolic dumping
of  VP data. It can be used with compiler (for legacy out of tree uses)
too but not recommended due to compile time and memory reasons
mentioned above.

Some other cleanups are also included: Function Addr to md5 map is now
consolated into InstrProfSymtab. InstrProfStringtab is no longer used and
eliminated.

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

6 years agoMinor clean up -- move large single use method out of header(NFC)
Xinliang David Li [Sun, 20 Dec 2015 05:15:45 +0000 (05:15 +0000)]
Minor clean up -- move large single use method out of header(NFC)

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

6 years agoRevert r219171, "llvm/test/lit.cfg: Suppress dwarf stuff for targeting x86_64-mingw32...
NAKAMURA Takumi [Sun, 20 Dec 2015 03:48:23 +0000 (03:48 +0000)]
Revert r219171, "llvm/test/lit.cfg: Suppress dwarf stuff for targeting x86_64-mingw32 while investigating since r219108."

It has been fixed since r219280 by David Majnemer.

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

6 years agoThreadPool unittests: do not hold mutex when calling condition_variable:notify()
Mehdi Amini [Sat, 19 Dec 2015 22:56:24 +0000 (22:56 +0000)]
ThreadPool unittests: do not hold mutex when calling condition_variable:notify()

From: Mehdi Amini <mehdi.amini@apple.com>

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

6 years agoNonnull elements in OperandBundleCallSites are not all Instructions
Sanjoy Das [Sat, 19 Dec 2015 22:40:28 +0000 (22:40 +0000)]
Nonnull elements in OperandBundleCallSites are not all Instructions

`CloneAndPruneIntoFromInst` sometimes RAUW's dead instructions with
`undef` before erasing them (to avoid deleting instructions that still
have uses).  This changes the `WeakVH` in `OperandBundleCallSites` to
hold an `undef`, and we need to guard for this situation in eventuality
in `llvm::InlineFunction`.

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

6 years ago[Deopt bundles] Fix a test case
Sanjoy Das [Sat, 19 Dec 2015 22:40:22 +0000 (22:40 +0000)]
[Deopt bundles] Fix a test case

The `CHECK-NOT` line was incorrect, and would not have caught a
breakage.

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

6 years ago[llvm-objdump] Fail early if we can't parse the object header.
Davide Italiano [Sat, 19 Dec 2015 22:09:40 +0000 (22:09 +0000)]
[llvm-objdump] Fail early if we can't parse the object header.

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

6 years agoDelete APIs that have been deprecated since 2010.
Rafael Espindola [Sat, 19 Dec 2015 21:42:07 +0000 (21:42 +0000)]
Delete APIs that have been deprecated since 2010.

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

6 years agoThe PS4 baton passes.
Paul Robinson [Sat, 19 Dec 2015 20:04:03 +0000 (20:04 +0000)]
The PS4 baton passes.

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

6 years agoAssert that we have all use/users in the getters.
Rafael Espindola [Sat, 19 Dec 2015 20:03:23 +0000 (20:03 +0000)]
Assert that we have all use/users in the getters.

An error that is pretty easy to make is to use the lazy bitcode reader
and then do something like

if (V.use_empty())

The problem is that uses in unmaterialized functions are not accounted
for.

This patch adds asserts that all uses are known.

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

6 years agoWebAssembly: add vtable test
JF Bastien [Sat, 19 Dec 2015 18:55:18 +0000 (18:55 +0000)]
WebAssembly: add vtable test

The test will mainly be useful to check that the .s file assembles and relocates properly because vtables reference functions in their data section.

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

6 years agoRemove unnecessary casts. NFC.
Manuel Jacob [Sat, 19 Dec 2015 18:38:42 +0000 (18:38 +0000)]
Remove unnecessary casts.  NFC.

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

6 years agoRemove double blanks. NFC.
Manuel Jacob [Sat, 19 Dec 2015 18:26:53 +0000 (18:26 +0000)]
Remove double blanks.  NFC.

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

6 years agoImprove InstrProfSymtab test coverage
Xinliang David Li [Sat, 19 Dec 2015 18:20:09 +0000 (18:20 +0000)]
Improve InstrProfSymtab test coverage

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

6 years agoSelectionDAG: Cleanup integer bin op promotion functions.
Matt Arsenault [Sat, 19 Dec 2015 17:18:43 +0000 (17:18 +0000)]
SelectionDAG: Cleanup integer bin op promotion functions.

SDIV and UDIV had special handling, but this is the same handling
that min/max need.

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

6 years ago[unittests] ThreadPool: Remove redundant loop, NFC
Vedant Kumar [Sat, 19 Dec 2015 09:54:27 +0000 (09:54 +0000)]
[unittests] ThreadPool: Remove redundant loop, NFC

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

6 years ago[unittests] ThreadPool: Guard updates to MainThreadReady
Vedant Kumar [Sat, 19 Dec 2015 09:49:09 +0000 (09:49 +0000)]
[unittests] ThreadPool: Guard updates to MainThreadReady

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

6 years agoRe-reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"
Vedant Kumar [Sat, 19 Dec 2015 08:52:49 +0000 (08:52 +0000)]
Re-reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"

Make personality functions, prefix data, and prologue data hungoff
operands of Function.

This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.

Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!

Includes a fix to scrub value subclass data in dropAllReferences. Does not
use binary literals.

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

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

6 years agoRevert "Reapply "[IR] Move optional data in llvm::Function into a hungoff uselist""
Vedant Kumar [Sat, 19 Dec 2015 08:48:43 +0000 (08:48 +0000)]
Revert "Reapply "[IR] Move optional data in llvm::Function into a hungoff uselist""

This reverts commit r256093.

This broke lld-x86_64-win7 because of -Werror,-Wc++1y-extensions.

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

6 years agoReapply "[IR] Move optional data in llvm::Function into a hungoff uselist"
Vedant Kumar [Sat, 19 Dec 2015 08:29:51 +0000 (08:29 +0000)]
Reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"

Make personality functions, prefix data, and prologue data hungoff
operands of Function.

This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.

Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!

Includes a fix to scrub value subclass data in dropAllReferences.

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

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

6 years ago[PGO] Add hash to name mapping in InstrProfSymtab
Xinliang David Li [Sat, 19 Dec 2015 07:44:57 +0000 (07:44 +0000)]
[PGO] Add hash to name mapping in InstrProfSymtab

Creator and lookup interfaces are added to this symtab class.
The new interfaces will be used by InstrProf Readers and writer.

A unit test is also added for the new APIs.

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

6 years agoRevert "[IR] Move optional data in llvm::Function into a hungoff uselist"
Vedant Kumar [Sat, 19 Dec 2015 07:30:44 +0000 (07:30 +0000)]
Revert "[IR] Move optional data in llvm::Function into a hungoff uselist"

This reverts commit r256090.

This broke llvm-clang-lld-x86_64-debian-fast.

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

6 years ago[IR] Move optional data in llvm::Function into a hungoff uselist
Vedant Kumar [Sat, 19 Dec 2015 07:08:56 +0000 (07:08 +0000)]
[IR] Move optional data in llvm::Function into a hungoff uselist

Make personality functions, prefix data, and prologue data hungoff
operands of Function.

This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.

Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!

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

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

6 years agoThreadPool unittest: reimplement concurrency test, deterministically this time.
Mehdi Amini [Sat, 19 Dec 2015 05:12:07 +0000 (05:12 +0000)]
ThreadPool unittest: reimplement concurrency test, deterministically this time.

Follow-up to r256056.

From: Mehdi Amini <mehdi.amini@apple.com>

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

6 years ago[libFuzzer] deprecate -save_minimized_corpus, -merge can be used instead
Kostya Serebryany [Sat, 19 Dec 2015 03:42:16 +0000 (03:42 +0000)]
[libFuzzer] deprecate -save_minimized_corpus, -merge can be used instead

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

6 years ago[libFuzzer] split the tests to run them in parallel, remove one redundant test
Kostya Serebryany [Sat, 19 Dec 2015 03:35:30 +0000 (03:35 +0000)]
[libFuzzer] split the tests to run them in parallel, remove one redundant test

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

6 years agoHopefully fix debug-info-blocks.ll test on win32 bot
Keno Fischer [Sat, 19 Dec 2015 03:32:23 +0000 (03:32 +0000)]
Hopefully fix debug-info-blocks.ll test on win32 bot

llc_dwarf adds an mtriple, which forces this to use COFF, causing
the test to fail. Hopefully using regular llc without the triple
will work fine everywhere

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

6 years agoAMDGPU/SI: Fix implemenation of isSourceOfDivergence() for graphics shaders
Tom Stellard [Sat, 19 Dec 2015 02:54:15 +0000 (02:54 +0000)]
AMDGPU/SI: Fix implemenation of isSourceOfDivergence() for graphics shaders

Summary:
The analysis of shader inputs was completely wrong.  We were passing the
wrong index to AttributeSet::hasAttribute() and the logic for which
inputs where in SGPRs was wrong too.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

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

6 years ago[libFuzzer] make CrossOver just one of the other mutations
Kostya Serebryany [Sat, 19 Dec 2015 02:49:09 +0000 (02:49 +0000)]
[libFuzzer] make CrossOver just one of the other mutations

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

6 years ago[RS4GC] Remove an overly strong assertion
Philip Reames [Sat, 19 Dec 2015 02:38:22 +0000 (02:38 +0000)]
[RS4GC] Remove an overly strong assertion

As shown by the included test case, it's reasonable to end up with constant references during base pointer calculation.  The code actually handled this case just fine, we only had the assert to help isolate problems under the belief that constant references shouldn't be present in IR generated by managed frontends. This turned out to be wrong on two fronts: 1) Manual Jacobs is working on a language with constant references, and b) we found a case where the optimizer does create them in practice.

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

6 years agoClean up the processing of dbg.value in various places
Keno Fischer [Sat, 19 Dec 2015 02:02:44 +0000 (02:02 +0000)]
Clean up the processing of dbg.value in various places

Summary:
First up is instcombine, where in the dbg.declare -> dbg.value conversion,
the llvm.dbg.value needs to be called on the actual loaded value, rather
than the address (since the whole point of this transformation is to be
able to get rid of the alloca). Further, now that that's cleaned up, we
can remove a hack in the backend, that would add an implicit OP_deref if
the argument to dbg.value was an alloca. This stems from before the
existence of DIExpression and is no longer necessary since the deref can
be expressed explicitly.

Now, in order to make sure that the tests pass with this change, we need to
correct the printing of DEBUG_VALUE comments to take into account the
expression, which wasn't taken into account before.

Unfortunately, for both these changes, there were a number of incorrect
test cases (mostly the wrong number of DW_OP_derefs, but also a couple
where the test itself was broken more badly). aprantl and I have gone
through and adjusted these test case in order to make them pass with
these fixes and in some cases to make sure they're actually testing
what they are meant to test.

Reviewers: aprantl

Subscribers: dsanders

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

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

6 years agoAMDGPU: Switch barrier intrinsics to using convergent
Matt Arsenault [Sat, 19 Dec 2015 01:46:41 +0000 (01:46 +0000)]
AMDGPU: Switch barrier intrinsics to using convergent

noduplicate prevents unrolling of small loops that happen to have
barriers in them. If a loop has a barrier in it, it is OK to duplicate
it for the unroll.

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

6 years agoFix broken type legalization of min/max
Matt Arsenault [Sat, 19 Dec 2015 01:39:48 +0000 (01:39 +0000)]
Fix broken type legalization of min/max

This was using an anyext when promoting the type
when zext/sext is required.

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

6 years agoAMDGPU/SI: use S_MOV_B64 for larger copies in copyPhysReg
Nicolai Haehnle [Sat, 19 Dec 2015 01:36:26 +0000 (01:36 +0000)]
AMDGPU/SI: use S_MOV_B64 for larger copies in copyPhysReg

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

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

6 years agoAMDGPU: fix overlapping copies in copyPhysReg
Nicolai Haehnle [Sat, 19 Dec 2015 01:16:06 +0000 (01:16 +0000)]
AMDGPU: fix overlapping copies in copyPhysReg

Summary:
When copying aggregate registers within the same register class, there may
be an overlap between source and destination that forces us to do the copy
backwards.

Do the simplest possible thing that guarantees the correct order of moves
when there are overlaps, and does whatever when there is no overlap. (The
last part forces some trivial adjustments to test cases.)

Together with r255906, this fixes a VM fault in Unreal Elemental Demo.

While at it, change the generation of kill and def flags to something that
looks more reasonable. This method is used very late during compilation, so
it probably doesn't matter in practice, and to be honest, I don't know if
this change is actually correct because the semantics in connection with
aggregate registers vs. sub-registers are not clear to me.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93264

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

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

6 years ago[libFuzzer] print successfull mutations sequences
Kostya Serebryany [Sat, 19 Dec 2015 01:09:49 +0000 (01:09 +0000)]
[libFuzzer] print successfull mutations sequences

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

6 years agoPossibly fix MSVC compilation after r256054.
James Y Knight [Sat, 19 Dec 2015 00:53:22 +0000 (00:53 +0000)]
Possibly fix MSVC compilation after r256054.

I don't have any way to test MSVC compilation, but maybe this will fix
the error:

llvm/Support/TrailingObjects.h(286) : error C3210: 'TrailingObjectsBase' : access declaration can only be applied to a base class member
llvm/Support/TrailingObjects.h(337) : see reference to class template instantiation 'llvm::TrailingObjects<BaseTy,TrailingTys...>' being compiled
llvm/Support/TrailingObjects.h(286) : error C2602: 'llvm::trailing_objects_internal::TrailingObjectsBase::OverloadToken' is not a member of a base class of 'llvm::TrailingObjects<BaseTy,TrailingTys...>'
llvm/Support/TrailingObjects.h(91) : see declaration of 'llvm::trailing_objects_internal::TrailingObjectsBase::OverloadToken'

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

6 years agoDeprecate a few C APIs.
Rafael Espindola [Fri, 18 Dec 2015 23:46:42 +0000 (23:46 +0000)]
Deprecate a few C APIs.

This deprecates:
* LLVMParseBitcode
* LLVMParseBitcodeInContext
* LLVMGetBitcodeModuleInContext
* LLVMGetBitcodeModule

They are replaced with the functions with a 2 suffix which do not record
a diagnostic.

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

6 years ago[PGO] Cleanup: Move large member functions out of line (NFC)
Xinliang David Li [Fri, 18 Dec 2015 23:06:37 +0000 (23:06 +0000)]
[PGO] Cleanup: Move large member functions out of line (NFC)

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

6 years agoRemove possibility of failures to due race in ThreadPool unittest
Teresa Johnson [Fri, 18 Dec 2015 22:59:35 +0000 (22:59 +0000)]
Remove possibility of failures to due race in ThreadPool unittest

Remove all checks that required main thread to run faster than tasks in
ThreadPool, and yields which are now unnecessary. This should fix some
bot failures.

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

6 years agoRewrite the TrailingObjects template to provide two new features:
James Y Knight [Fri, 18 Dec 2015 22:54:37 +0000 (22:54 +0000)]
Rewrite the TrailingObjects template to provide two new features:

 - Automatic alignment of the base type for the alignment requirements
   of the trailing types.

 - Support for an arbitrary numbers of trailing types, instead of only
   1 or 2, by using a variadic template implementation.

Upcoming commits to clang will take advantage of both of these features.

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

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

6 years agoDelete dead code: only functions are materializable.
Rafael Espindola [Fri, 18 Dec 2015 22:44:07 +0000 (22:44 +0000)]
Delete dead code: only functions are materializable.

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

6 years agoUse a lambda to reduce code duplication.
Rafael Espindola [Fri, 18 Dec 2015 22:40:27 +0000 (22:40 +0000)]
Use a lambda to reduce code duplication.

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

6 years agogit-clang-format a region I am about to change.
Rafael Espindola [Fri, 18 Dec 2015 22:23:16 +0000 (22:23 +0000)]
git-clang-format a region I am about to change.

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

6 years ago[PGO] Simplify computehash interface (NFC)
Xinliang David Li [Fri, 18 Dec 2015 22:22:12 +0000 (22:22 +0000)]
[PGO] Simplify computehash interface (NFC)

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

6 years ago[Symbolize] Improve the ownership of parsed objects.
Alexey Samsonov [Fri, 18 Dec 2015 22:02:14 +0000 (22:02 +0000)]
[Symbolize] Improve the ownership of parsed objects.

This code changes the way Symbolize handles parsed binaries: now
parsed OwningBinary<Binary> is not broken into (binary, memory buffer)
pair, and is just stored as-is in a cache. ObjectFile components
of Mach-O universal binaries are also stored explicitly in a
separate cache.

Additionally, this change:
* simplifies the code that parses/caches binaries: it's now done
  in a single place, not three different functions.
* makes flush() method behave as expected, and actually clear
  the cached parsed binaries and objects.
* fixes a dangling pointer issue described in
  http://reviews.llvm.org/D15638

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

6 years ago[sancov] IWYU fix: add proper header inclusion.
Alexey Samsonov [Fri, 18 Dec 2015 22:02:08 +0000 (22:02 +0000)]
[sancov] IWYU fix: add proper header inclusion.

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

6 years agoUse getEdgeProbability() instead of getEdgeWeight() in BFI and remove getEdgeWeight...
Cong Hou [Fri, 18 Dec 2015 21:53:24 +0000 (21:53 +0000)]
Use getEdgeProbability() instead of getEdgeWeight() in BFI and remove getEdgeWeight() interfaces from MBPI.

This patch removes all getEdgeWeight() interfaces from CodeGen directory. As
getEdgeProbability() is a little more expensive than getEdgeWeight(), I will
compose a patch soon in which BPI only stores probabilities instead of edge
weights so that getEdgeProbability() will have O(1) time.

Differential revision: http://reviews.llvm.org/D15489

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

6 years ago[DivergenceAnalysis] fix a bug in computing influence regions
Jingyue Wu [Fri, 18 Dec 2015 21:44:26 +0000 (21:44 +0000)]
[DivergenceAnalysis] fix a bug in computing influence regions

Fixes PR25864

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

6 years ago[NaryReassociate] allow candidate to have a different type
Jingyue Wu [Fri, 18 Dec 2015 21:36:30 +0000 (21:36 +0000)]
[NaryReassociate] allow candidate to have a different type

Summary:
If Candiadte may have a different type from GEP, we should bitcast or
pointer cast it to GEP's type so that the later RAUW doesn't complain.

Added a test in nary-gep.ll

Reviewers: tra, meheff

Subscribers: mcrosier, llvm-commits, jholewinski

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

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

6 years agoRevert "Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst"
Rafael Espindola [Fri, 18 Dec 2015 21:23:32 +0000 (21:23 +0000)]
Revert "Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst"

This reverts commit r256028.

It broke:

    LLVM :: CodeGen/Mips/eh.ll
    LLVM :: CodeGen/Mips/insn-zero-size-bb.ll

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

6 years agoRemove redundant argument. NFC.
Rafael Espindola [Fri, 18 Dec 2015 21:18:57 +0000 (21:18 +0000)]
Remove redundant argument. NFC.

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

6 years agoEnhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst
Jun Bum Lim [Fri, 18 Dec 2015 20:53:47 +0000 (20:53 +0000)]
Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst

When identifying blocks post-dominated by an unreachable-terminated block
in BranchProbabilityInfo, consider only the edge to the normal destination
block if the terminator is InvokeInst and let calcInvokeHeuristics() decide
edge weights for the InvokeInst.

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

6 years ago[Hexagon] Add PIC support
Krzysztof Parzyszek [Fri, 18 Dec 2015 20:19:30 +0000 (20:19 +0000)]
[Hexagon] Add PIC support

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

6 years agoDrop materializeAllPermanently.
Rafael Espindola [Fri, 18 Dec 2015 20:13:39 +0000 (20:13 +0000)]
Drop materializeAllPermanently.

This inlines materializeAll into the only caller
(materializeAllPermanently) and renames materializeAllPermanently to
just materializeAll.

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

6 years agoAMDGPU/SI: Test commit
Changpeng Fang [Fri, 18 Dec 2015 20:04:28 +0000 (20:04 +0000)]
AMDGPU/SI: Test commit
    Summary: This is just my first commit. Test!

    Reviewers: none

    Subscribers: none

    Differential Revision: none

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

6 years agoRevert "AMDGPU/SI: Test commit"
Changpeng Fang [Fri, 18 Dec 2015 20:04:26 +0000 (20:04 +0000)]
Revert "AMDGPU/SI: Test commit"

This reverts commit a493cb636e0152ad28210934a47c6c44b1437193.

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

6 years agoAMDGPU/SI: Test commit
Changpeng Fang [Fri, 18 Dec 2015 19:57:41 +0000 (19:57 +0000)]
AMDGPU/SI: Test commit
Summary: This is just my first commit. Test!

Reviewers: none

Subscribers: none

Differential Revision: none

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

6 years agoDrop support for dematerializing.
Rafael Espindola [Fri, 18 Dec 2015 19:57:26 +0000 (19:57 +0000)]
Drop support for dematerializing.

It was only used on lib/Linker and the use was "dead" since it was used on a
function the IRMover had just moved.

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

6 years agoRevert "Improve DWARFDebugFrame::parse to also handle __eh_frame."
Pete Cooper [Fri, 18 Dec 2015 19:45:38 +0000 (19:45 +0000)]
Revert "Improve DWARFDebugFrame::parse to also handle __eh_frame."

This reverts commit r256008.

Its breaking multiple buildbots, although works for me locally.

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

6 years agoRename variables to reflect linker split (NFC)
Teresa Johnson [Fri, 18 Dec 2015 19:28:59 +0000 (19:28 +0000)]
Rename variables to reflect linker split (NFC)

Renamed variables to be more reflective of whether they are
an instance of Linker, IRLinker or ModuleLinker. Also fix a stale
comment.

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

6 years agoConvert Arg, ArgList, and Option to dump() to dbgs() rather than errs().
Eric Christopher [Fri, 18 Dec 2015 18:55:26 +0000 (18:55 +0000)]
Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs().

Also add print() functions.

Patch by Justin Lebar!

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

6 years agoAdd a dump method for ArgList.
Eric Christopher [Fri, 18 Dec 2015 18:55:22 +0000 (18:55 +0000)]
Add a dump method for ArgList.

Patch by Justin Lebar!

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

6 years agoImprove DWARFDebugFrame::parse to also handle __eh_frame.
Pete Cooper [Fri, 18 Dec 2015 18:51:08 +0000 (18:51 +0000)]
Improve DWARFDebugFrame::parse to also handle __eh_frame.

LLVM MC has single methods which can handle the output of EH frame and DWARF CIE's and FDE's.

This code improves DWARFDebugFrame::parse to do the same for parsing.

This also allows llvm-objdump to support the --dwarf=frames option which objdump supports.  This
option dumps the .eh_frame section using the new code in DWARFDebugFrame::parse.

http://reviews.llvm.org/D15535

Reviewed by Rafael Espindola.

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

6 years agoRecognize strings for Hexagon-specific variant kinds
Krzysztof Parzyszek [Fri, 18 Dec 2015 18:47:27 +0000 (18:47 +0000)]
Recognize strings for Hexagon-specific variant kinds

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

6 years ago[WinEH] Update LCSSA to handle catchswitch with handlers inside and outside a loop
Andrew Kaylor [Fri, 18 Dec 2015 18:12:35 +0000 (18:12 +0000)]
[WinEH] Update LCSSA to handle catchswitch with handlers inside and outside a loop

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

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

6 years ago[AArch64] Promote loads from stores
Jun Bum Lim [Fri, 18 Dec 2015 18:08:30 +0000 (18:08 +0000)]
[AArch64] Promote loads from stores

This change promotes load instructions which directly read from stores by
replacing them with mov instructions. If the store is wider than the load,
the load will be replaced with a bitfield extract.
For example :
  STRWui %W1, %X0, 1
  %W0 = LDRHHui %X0, 3
becomes
  STRWui %W1, %X0, 1
  %W0 = UBFMWri %W1, 16, 31

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

6 years ago[ThinLTO/LTO] Don't link in unneeded metadata
Teresa Johnson [Fri, 18 Dec 2015 17:51:37 +0000 (17:51 +0000)]
[ThinLTO/LTO] Don't link in unneeded metadata

Summary:
Third patch split out from http://reviews.llvm.org/D14752.

Only map in needed DISubroutine metadata (imported or otherwise linked
in functions and other DISubroutine referenced by inlined instructions).
This is supported for ThinLTO, LTO and llvm-link --only-needed, with
associated tests for each one.

Depends on D14838.

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

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

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

6 years agoHandle archives with paths in the names.
Rafael Espindola [Fri, 18 Dec 2015 16:07:17 +0000 (16:07 +0000)]
Handle archives with paths in the names.

We always create archives with just he filename as the member name, but
other archives can put a more complicated path in there.

This patches handles it by computing just the filename as we do when
adding a new member.

If storing the path is important for some reason, we should probably
have an orthogonal option for doing that and do it for both old and new
members.

Fixes pr25877.

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

6 years agoclang-format to reduce diff in another patch.
Rafael Espindola [Fri, 18 Dec 2015 14:06:34 +0000 (14:06 +0000)]
clang-format to reduce diff in another patch.

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

6 years agoFix error handling in LLVMGetBitcodeModuleInContext.
Rafael Espindola [Fri, 18 Dec 2015 13:58:05 +0000 (13:58 +0000)]
Fix error handling in LLVMGetBitcodeModuleInContext.

It was not setting OutMessage.

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