OSDN Git Service

android-x86/external-llvm.git
8 years agoFix for case sensitive filename failure.
Zachary Turner [Thu, 21 Apr 2016 22:08:27 +0000 (22:08 +0000)]
Fix for case sensitive filename failure.

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

8 years agoFixed flag description
Mike Aizatsky [Thu, 21 Apr 2016 22:00:13 +0000 (22:00 +0000)]
Fixed flag description

Summary:
asan-use-after-return control feature we call use-after-return or
stack-use-after-return.

Reviewers: kcc, aizatsky, eugenis

Subscribers: llvm-commits

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

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

8 years agoRemove various warnings. NFC
Amaury Sechet [Thu, 21 Apr 2016 21:36:11 +0000 (21:36 +0000)]
Remove various warnings. NFC

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

8 years ago[esan] EfficiencySanitizer instrumentation pass
Derek Bruening [Thu, 21 Apr 2016 21:30:22 +0000 (21:30 +0000)]
[esan] EfficiencySanitizer instrumentation pass

Summary:
Adds an instrumentation pass for the new EfficiencySanitizer ("esan")
performance tuning family of tools.  Multiple tools will be supported
within the same framework.  Preliminary support for a cache fragmentation
tool is included here.

The shared instrumentation includes:
+ Turn mem{set,cpy,move} instrinsics into library calls.
+ Slowpath instrumentation of loads and stores via callouts to
  the runtime library.
+ Fastpath instrumentation will be per-tool.
+ Which memory accesses to ignore will be per-tool.

Reviewers: eugenis, vitalybuka, aizatsky, filcab

Subscribers: filcab, vkalintiris, pcc, silvas, llvm-commits, zhaoqin, kcc

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

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

8 years agoAdd utility function to manipulate attributes on CallSite. NFC
Amaury Sechet [Thu, 21 Apr 2016 21:29:10 +0000 (21:29 +0000)]
Add utility function to manipulate attributes on CallSite. NFC

Summary: As per title. This will help work on the C API.

Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael

Subscribers: joker.eph, llvm-commits

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

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

8 years agoFix a typo in an error message. Caught by Sean Silva!
Kevin Enderby [Thu, 21 Apr 2016 21:20:40 +0000 (21:20 +0000)]
Fix a typo in an error message.  Caught by Sean Silva!

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

8 years ago[ProfileData] Report errors from InstrProfSymtab::create
Vedant Kumar [Thu, 21 Apr 2016 21:07:25 +0000 (21:07 +0000)]
[ProfileData] Report errors from InstrProfSymtab::create

InstrProfSymtab::create can fail with instrprof_error::malformed, but
this error is silently dropped. Propagate the error up to the caller so
we fail early.

Eventually, I'd like to transition ProfileData over to the new Error
class so we can't ignore hard failures like this.

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

8 years agoadd tests for disguised fabs/fneg
Sanjay Patel [Thu, 21 Apr 2016 21:02:25 +0000 (21:02 +0000)]
add tests for disguised fabs/fneg

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

8 years ago[MachineBasicBlock] Make the pass argument truly mandatory when
Quentin Colombet [Thu, 21 Apr 2016 21:01:13 +0000 (21:01 +0000)]
[MachineBasicBlock] Make the pass argument truly mandatory when
splitting edges.

MachineBasicBlock::SplitCriticalEdges will crash if a nullptr would have
been passed for the Pass argument. Do not allow that by turning this
argument into a reference.
The alternative would have been to make the Pass a truly optional
argument, but although this is easy to do, I was afraid users using it
like this would not be aware the livness information, dominator tree and
such would silently be broken.

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

8 years agouse FileCheck; add test for disguised fabs
Sanjay Patel [Thu, 21 Apr 2016 20:58:58 +0000 (20:58 +0000)]
use FileCheck; add test for disguised fabs

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

8 years agoAdd natvis visualizers for endian types.
Zachary Turner [Thu, 21 Apr 2016 20:58:41 +0000 (20:58 +0000)]
Add natvis visualizers for endian types.

This allows ulittle* and ubig* types to be visualized properly
in VS.

Differential Revision: http://reviews.llvm.org/D19339
Reviewed By: Aaron Ballman

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

8 years agoRefactor raw pdb dumper into library
Zachary Turner [Thu, 21 Apr 2016 20:58:35 +0000 (20:58 +0000)]
Refactor raw pdb dumper into library

PDB parsing code was hand-rolled into llvm-pdbdump. This patch moves the
parsing of this code into DebugInfoPDB and makes the dumper use this.

This is achieved by implementing the skeleton of RawPdbSession, the
non-DIA counterpart to the existing PDB read interface. None of the type /
source file / etc information is accessible yet, so this implementation is
not yet close to achieving parity with the DIA counterpart, but the
RawSession class simply holds a reference to a PDBFile class which handles
parsing the file format. Additionally a PDBStream class is introduced
which allows accessing the bytes of a particular stream in a PDB file.

Differential Revision: http://reviews.llvm.org/D19343
Reviewed By: majnemer

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

8 years ago[MachineBasicBlock] Refactor SplitCriticalEdge to expose a query API.
Quentin Colombet [Thu, 21 Apr 2016 20:46:27 +0000 (20:46 +0000)]
[MachineBasicBlock] Refactor SplitCriticalEdge to expose a query API.

Introduce canSplitCriticalEdge, so that clients can now query whether or
not a critical edge can be split without actually needing to split it.
This may be useful when gathering information for cost models for
instance.

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

8 years agohange the variable name big_size to BigSize. Caught by Rafael Espíndola!
Kevin Enderby [Thu, 21 Apr 2016 20:29:49 +0000 (20:29 +0000)]
hange the variable name big_size to BigSize. Caught by Rafael Espíndola!

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

8 years agoZero-initialize members of the CpuHashInfoTy structure for AsmParser
Andrew Kaylor [Thu, 21 Apr 2016 20:09:35 +0000 (20:09 +0000)]
Zero-initialize members of the CpuHashInfoTy structure for AsmParser

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

8 years ago[RuntimeDyld] Fix conservative over-allocation of memory for common symbols.
Lang Hames [Thu, 21 Apr 2016 20:08:06 +0000 (20:08 +0000)]
[RuntimeDyld] Fix conservative over-allocation of memory for common symbols.

The previous allocation code was over-estimating the amount of memory required.

No test case: we don't currently have a good way to detect conervative
over-allocation.

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

8 years agoNFC: fix copy / paste comment
JF Bastien [Thu, 21 Apr 2016 19:53:39 +0000 (19:53 +0000)]
NFC: fix copy / paste comment

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

8 years ago[Hexagon] Properly recognize register alt names
Krzysztof Parzyszek [Thu, 21 Apr 2016 19:49:53 +0000 (19:49 +0000)]
[Hexagon] Properly recognize register alt names

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

8 years agoFix crash in llvm-objdump with -macho -objc-meta-data that was trying dump a non...
Kevin Enderby [Thu, 21 Apr 2016 19:49:29 +0000 (19:49 +0000)]
Fix crash in llvm-objdump with -macho -objc-meta-data that was trying dump a non-existent section.

Showed up in running on a large binary with the missing section.  I could create a fake
test case if anyone really wants but the fix is pretty obvious.

rdar://25837034

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

8 years agoNFC: fix nonsensical comment
JF Bastien [Thu, 21 Apr 2016 19:41:48 +0000 (19:41 +0000)]
NFC: fix nonsensical comment

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

8 years agoFolding compares with unescaped allocations
Sanjoy Das [Thu, 21 Apr 2016 19:26:45 +0000 (19:26 +0000)]
Folding compares with unescaped allocations

Summary:
If we know that the pointer allocated within a function does not escape,
we can fold away comparisons that are done with global pointers

Patch by Anna Thomas!

Reviewers: reames, majnemer, sanjoy

Subscribers: mgrang, mcrosier, majnemer, llvm-commits

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

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

8 years ago[Hexagon] Expand handling of the small-data/bss section
Krzysztof Parzyszek [Thu, 21 Apr 2016 18:56:45 +0000 (18:56 +0000)]
[Hexagon] Expand handling of the small-data/bss section

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

8 years ago[RegisterBankInfo] Change the API for the verify methods.
Quentin Colombet [Thu, 21 Apr 2016 18:34:43 +0000 (18:34 +0000)]
[RegisterBankInfo] Change the API for the verify methods.

Return bool instead of void so that it is natural to put the calls into
asserts.

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

8 years agoAMDGPU: Fix debug name of pass to better match
Matt Arsenault [Thu, 21 Apr 2016 18:21:54 +0000 (18:21 +0000)]
AMDGPU: Fix debug name of pass to better match

I get this wrong every time I try to debug this.

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

8 years agoLegalizeDAG: Move unaligned load/store expansion to TLI
Matt Arsenault [Thu, 21 Apr 2016 18:19:11 +0000 (18:19 +0000)]
LegalizeDAG: Move unaligned load/store expansion to TLI

When custom lowered, this is not called if the store is custom
lowered. Move it to be a utility function so targets can
easily expand unaligned accesses when custom lowering.

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

8 years ago[RegisterBankInfo] Change the representation of the partial mappings.
Quentin Colombet [Thu, 21 Apr 2016 18:09:34 +0000 (18:09 +0000)]
[RegisterBankInfo] Change the representation of the partial mappings.

Instead of holding a mask, hold two value: the start index and the
length of the mapping. This is a more compact representation, although
less powerful. That being said, arbitrary masks would not have worked
for the generic so do not allow them in the first place.

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

8 years agoDAGCombiner: Reduce 64-bit BFE pattern to pattern on 32-bit component
Matt Arsenault [Thu, 21 Apr 2016 18:03:06 +0000 (18:03 +0000)]
DAGCombiner: Reduce 64-bit BFE pattern to pattern on 32-bit component

If the extracted bits are restricted to the upper half or lower half,
this can be truncated.

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

8 years ago[instcombine][unordered] Extend load(select) transform to handle unordered loads
Philip Reames [Thu, 21 Apr 2016 17:59:40 +0000 (17:59 +0000)]
[instcombine][unordered] Extend load(select) transform to handle unordered loads

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

8 years agoInitial implementation of optimization bisect support.
Andrew Kaylor [Thu, 21 Apr 2016 17:58:54 +0000 (17:58 +0000)]
Initial implementation of optimization bisect support.

This patch implements a optimization bisect feature, which will allow optimizations to be selectively disabled at compile time in order to track down test failures that are caused by incorrect optimizations.

The bisection is enabled using a new command line option (-opt-bisect-limit).  Individual passes that may be skipped call the OptBisect object (via an LLVMContext) to see if they should be skipped based on the bisect limit.  A finer level of control (disabling individual transformations) can be managed through an addition OptBisect method, but this is not yet used.

The skip checking in this implementation is based on (and replaces) the skipOptnoneFunction check.  Where that check was being called, a new call has been inserted in its place which checks the bisect limit and the optnone attribute.  A new function call has been added for module and SCC passes that behaves in a similar way.

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

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

8 years agoSplit IntrReadArgMem into IntrReadMem and IntrArgMemOnly
Nicolai Haehnle [Thu, 21 Apr 2016 17:48:02 +0000 (17:48 +0000)]
Split IntrReadArgMem into IntrReadMem and IntrArgMemOnly

Summary:
IntrReadWriteArgMem simply becomes IntrArgMemOnly.

So there are fewer intrinsic properties that express their orthogonality
better, and correspond more closely to the corresponding IR attributes.

Suggested by: Philip Reames

Reviewers: joker.eph, reames, tstellarAMD

Subscribers: jholewinski, arsenm, llvm-commits

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

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

8 years ago[unordered] unordered loads from null are still unreachable
Philip Reames [Thu, 21 Apr 2016 17:45:05 +0000 (17:45 +0000)]
[unordered] unordered loads from null are still unreachable

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

8 years ago[PowerPC] [SSP] Fix stack guard load for 32-bit.
Marcin Koscielnicki [Thu, 21 Apr 2016 17:36:05 +0000 (17:36 +0000)]
[PowerPC] [SSP] Fix stack guard load for 32-bit.

r266809 incorrectly used LD to load the stack guard, it should be LWZ.

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

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

8 years ago[LoopUtils] Fix typo in comment
Adam Nemet [Thu, 21 Apr 2016 17:33:22 +0000 (17:33 +0000)]
[LoopUtils] Fix typo in comment

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

8 years ago[LoopUtils] Add asserts to findStringMetadataForLoop. NFC
Adam Nemet [Thu, 21 Apr 2016 17:33:20 +0000 (17:33 +0000)]
[LoopUtils] Add asserts to findStringMetadataForLoop. NFC

These ensure that operand array has at least one element and it is the
self-reference.

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

8 years ago[LoopUtils] Move def of findStringMetadataForLoop to LoopUtils.cpp. NFC
Adam Nemet [Thu, 21 Apr 2016 17:33:17 +0000 (17:33 +0000)]
[LoopUtils] Move def of findStringMetadataForLoop to LoopUtils.cpp. NFC

The decl is in LoopUtils.h.  I think that this was added to
LoopVersioningLICM.cpp by mistake.

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

8 years ago[LoopUtils] Rename {check->find}StringMetadata{Into->For}Loop. NFC
Adam Nemet [Thu, 21 Apr 2016 17:33:12 +0000 (17:33 +0000)]
[LoopUtils] Rename {check->find}StringMetadata{Into->For}Loop. NFC

"Into" was misleading.  I am also planning to use this helper to look
for loop metadata and return the argument, so find seems like a better
name.

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

8 years ago[instcombine][unordered] Implement *-load forwarding for unordered atomics
Philip Reames [Thu, 21 Apr 2016 17:03:33 +0000 (17:03 +0000)]
[instcombine][unordered] Implement *-load forwarding for unordered atomics

This builds on 266999 which made FindAvailableValue do the right thing.  Tests included show the newly enabled transforms and those which disabled either due to conservatism or correctness requirements.

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

8 years agoFixed Dwarf debug info emission to skip DILexicalBlockFile entries.
Amjad Aboud [Thu, 21 Apr 2016 16:58:49 +0000 (16:58 +0000)]
Fixed Dwarf debug info emission to skip DILexicalBlockFile entries.
Before this fix, DILexicalBlockFile entries were skipped only in some cases and were not in other cases.

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

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

8 years ago[unordered] Add tests and conservative handling in support of future changes [NFCI]
Philip Reames [Thu, 21 Apr 2016 16:51:08 +0000 (16:51 +0000)]
[unordered] Add tests and conservative handling in support of future changes [NFCI]

This change adds a couple of test cases to make sure FindAvailableLoadedValue does the right thing.  At the moment, the code added is dead, but separating it makes follow on changes far more obvious.

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

8 years agoAddress Philip's post-commit feedback for r266987. NFC.
Chad Rosier [Thu, 21 Apr 2016 16:18:02 +0000 (16:18 +0000)]
Address Philip's post-commit feedback for r266987. NFC.

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

8 years agoMinor comment cleanup [NFC]
Philip Reames [Thu, 21 Apr 2016 16:15:19 +0000 (16:15 +0000)]
Minor comment cleanup [NFC]

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

8 years agoFix recursive -only-needed.
Rafael Espindola [Thu, 21 Apr 2016 14:56:33 +0000 (14:56 +0000)]
Fix recursive -only-needed.

We were assuming that only linkonce_odr GVs were lazy linked.

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

8 years ago[mips][microMIPS] Implement ldpc instruction
Zoran Jovanovic [Thu, 21 Apr 2016 14:32:12 +0000 (14:32 +0000)]
[mips][microMIPS] Implement ldpc instruction

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

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

8 years ago[mips][microMIPS] Add R_MICROMIPS_PC19_S2 relocation
Zoran Jovanovic [Thu, 21 Apr 2016 14:09:35 +0000 (14:09 +0000)]
[mips][microMIPS] Add R_MICROMIPS_PC19_S2 relocation

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

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

8 years agoRefactor implied condition logic from ValueTracking directly into CmpInst. NFC.
Chad Rosier [Thu, 21 Apr 2016 14:04:54 +0000 (14:04 +0000)]
Refactor implied condition logic from ValueTracking directly into CmpInst. NFC.

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

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

8 years ago[mips][microMIPS] Add R_MICROMIPS_PC26_S1 relocation
Zoran Jovanovic [Thu, 21 Apr 2016 13:43:26 +0000 (13:43 +0000)]
[mips][microMIPS] Add R_MICROMIPS_PC26_S1 relocation

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

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

8 years ago[AMDGPU] Assembler: prevent parseDPPCtrlOps from eating invalid tokens
Sam Kolton [Thu, 21 Apr 2016 13:14:24 +0000 (13:14 +0000)]
[AMDGPU] Assembler: prevent parseDPPCtrlOps from eating invalid tokens

Reviewers: nhaustov, tstellarAMD

Subscribers: arsenm

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

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

8 years agoAdd a CachedHash structure.
Rafael Espindola [Thu, 21 Apr 2016 12:16:21 +0000 (12:16 +0000)]
Add a CachedHash structure.

A DenseMap doesn't store the hashes, so it needs to recompute them when
the table is resized.

In some applications the hashing cost is noticeable. That is the case
for example in lld for symbol names (StringRef).

This patch adds a templated structure that can wraps any value that can
go in a DenseMap and caches the hash.

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

8 years ago[mips][microMIPS] Implement TLBP, TLBR, TLBWI and TLBWR instructions
Zlatko Buljan [Thu, 21 Apr 2016 11:32:40 +0000 (11:32 +0000)]
[mips][microMIPS] Implement TLBP, TLBR, TLBWI and TLBWR instructions
Differential Revision: http://reviews.llvm.org/D18855

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

8 years ago[mips][microMIPS] Implement LL, SC, MOVEP, ROTR, ROTRV and SYSCALL instructions and...
Zlatko Buljan [Thu, 21 Apr 2016 11:01:51 +0000 (11:01 +0000)]
[mips][microMIPS] Implement LL, SC, MOVEP, ROTR, ROTRV and SYSCALL instructions and add tests for LWM32 and SWM32
Differential Revision: http://reviews.llvm.org/D19150

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

8 years agoUpdated a test not to produce an empty s-file.
Evgeny Astigeevich [Thu, 21 Apr 2016 09:36:49 +0000 (09:36 +0000)]
Updated a test not to produce an empty s-file.

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

8 years ago[AArch64][CodeGen] Fix of PR27158: incorrect peephole optimization in AArch64InstrInf...
Evgeny Astigeevich [Thu, 21 Apr 2016 08:54:08 +0000 (08:54 +0000)]
[AArch64][CodeGen] Fix of PR27158: incorrect peephole optimization in AArch64InstrInfo::optimizeCompareInstr

AArch64InstrInfo::optimizeCompareInstr has bug PR27158 which causes generation of incorrect code.
A compare instruction is substituted with another instruction which does not
produce the same flags as the original compare instruction.
This patch contains:
1. Fix of the bug.
2. A regression test in MIR.
3. A new test to check that SUBS is replaced by SUB.

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

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

8 years ago[AVX512] Add CTTZ support for v8i64 and v16i32 vectors.
Craig Topper [Thu, 21 Apr 2016 07:30:06 +0000 (07:30 +0000)]
[AVX512] Add CTTZ support for v8i64 and v16i32 vectors.

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

8 years ago[X86] Fix vector-tzcnt-512 test to disable CDI while enabling BWI for one of the...
Craig Topper [Thu, 21 Apr 2016 07:30:03 +0000 (07:30 +0000)]
[X86] Fix vector-tzcnt-512 test to disable CDI while enabling BWI for one of the runs. Update check patterns accordingly.

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

8 years agoFix test command line to explicitly disable CDI instructions for one test.
Craig Topper [Thu, 21 Apr 2016 07:29:59 +0000 (07:29 +0000)]
Fix test command line to explicitly disable CDI instructions for one test.

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

8 years agoCachePruning: early exit if no path supplied
Mehdi Amini [Thu, 21 Apr 2016 06:43:45 +0000 (06:43 +0000)]
CachePruning: early exit if no path supplied

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

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

8 years agoThinLTO: initialize variables
Mehdi Amini [Thu, 21 Apr 2016 06:43:41 +0000 (06:43 +0000)]
ThinLTO: initialize variables

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

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

8 years ago[AVX512] Add support for lowering CTTZ v64i8 and v32i16 with BWI instructions.
Craig Topper [Thu, 21 Apr 2016 06:39:34 +0000 (06:39 +0000)]
[AVX512] Add support for lowering CTTZ v64i8 and v32i16 with BWI instructions.

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

8 years ago[X86] Remove redundant calls to setOperationAction for EXTRACT_VECTOR_ELT/INSERT_VECT...
Craig Topper [Thu, 21 Apr 2016 06:39:32 +0000 (06:39 +0000)]
[X86] Remove redundant calls to setOperationAction for EXTRACT_VECTOR_ELT/INSERT_VECTOR_ELT from SSE41 block. They were already done in an earlier block. NFC

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

8 years ago[X86] Remove some operations from the default Expand all vector ops loop. Instead...
Craig Topper [Thu, 21 Apr 2016 06:39:29 +0000 (06:39 +0000)]
[X86] Remove some operations from the default Expand all vector ops loop. Instead let them stay Legal and mark them Expand for specific types where needed. Reduces overall number of calls to setOperationAction. NFC

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

8 years ago[X86] Remove old leftover MMX code that sets various 64-bit vector operations to...
Craig Topper [Thu, 21 Apr 2016 06:39:26 +0000 (06:39 +0000)]
[X86] Remove old leftover MMX code that sets various 64-bit vector operations to Expand. These vector types aren't legal so these operations would never make it far enough to need to expand. NFC

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

8 years agoThinLTO: add module caching handling.
Mehdi Amini [Thu, 21 Apr 2016 05:54:23 +0000 (05:54 +0000)]
ThinLTO: add module caching handling.

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

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

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

8 years agoThinLTO: Resolve linkonce_odr aliases just like functions
Mehdi Amini [Thu, 21 Apr 2016 05:47:17 +0000 (05:47 +0000)]
ThinLTO: Resolve linkonce_odr aliases just like functions

This help to streamline the process of handling importing since
we don't need to special case alias everywhere: just like
linkonce_odr function, make sure at least one alias is emitted
by turning it weak.

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

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

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

8 years ago[SimplifyCFG] Fold `llvm.guard(false)` to unreachable
Sanjoy Das [Thu, 21 Apr 2016 05:09:12 +0000 (05:09 +0000)]
[SimplifyCFG] Fold `llvm.guard(false)` to unreachable

Summary:
`llvm.guard(false)` always bails out of the current compilation unit, so
we can prune any control flow following it.

Reviewers: hfinkel, pcc, reames

Subscribers: majnemer, reames, mcrosier, llvm-commits

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

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

8 years ago[X86] Remove unnecessary setting of CTTZ_ZERO_UNDEF to Custom for vector types where...
Craig Topper [Thu, 21 Apr 2016 04:44:00 +0000 (04:44 +0000)]
[X86] Remove unnecessary setting of CTTZ_ZERO_UNDEF to Custom for vector types where we can't do any better than the Custom lowering of CTTZ. LegalizeVectorOps will expand to CTTZ since its marked Custom.

CTTZ_ZERO_UNDEF can be custom lowered specially if CTLZ is supported. Otherwise CTTZ and CTTZ_ZERO_UNDEF are handled the same way by using CTPOP and bitmath.

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

8 years ago[SelectionDAG] Teach LegalizeVectorOps to directly Expand CTTZ_ZERO_UNDEF/CTLZ_ZERO_U...
Craig Topper [Thu, 21 Apr 2016 04:43:57 +0000 (04:43 +0000)]
[SelectionDAG] Teach LegalizeVectorOps to directly Expand CTTZ_ZERO_UNDEF/CTLZ_ZERO_UNDEF to CTTZ/CTLZ directly if those ops are Legal/Custom instead of deferring it to LegalizeOps.

This is needed to support CTTZ/CTLZ Custom correctly since LegalizeOps would be too late to do the custom lowering.

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

8 years ago[AVX512] Add support for popcount of v8i64 and v16i32 with and without BWI instructions.
Craig Topper [Thu, 21 Apr 2016 03:57:24 +0000 (03:57 +0000)]
[AVX512] Add support for popcount of v8i64 and v16i32 with and without BWI instructions.

Without BWI we have to split the vectors into 256-bit vectors so we can use AVX2 pshufb and then concatenate the results.

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

8 years agoValueMapper: Map uniqued nodes in post-order
Duncan P. N. Exon Smith [Thu, 21 Apr 2016 02:34:36 +0000 (02:34 +0000)]
ValueMapper: Map uniqued nodes in post-order

The iteratitive algorithm from r265456 claimed but failed to create a
post-order traversal.  It had the same error that was fixed in the
ValueEnumerator in r266947: now, instead of pushing all operands on the
worklist at once, we pause whenever an operand gets pushed in order to
go depth-first (I know, it sounds obvious).

Sadly, I have no idea how to observe this from outside the algorithm and
so I haven't written a test.  The output should be the same; it should
just use fewer temporary nodes now.  I've added some comments that I
hope make the current logic clear enough it's unlikely to regress.

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

8 years agoThinLTO/ModuleLinker: add a flag to not always pull-in linkonce when performing importing
Mehdi Amini [Thu, 21 Apr 2016 01:59:39 +0000 (01:59 +0000)]
ThinLTO/ModuleLinker: add a flag to not always pull-in linkonce when performing importing

Summary:
The function importer already decided what symbols need to be pulled
in. Also these magically added ones will not be in the export list
for the source module, which can confuse the internalizer for
instance.

Reviewers: tejohnson, rafael

Subscribers: joker.eph, llvm-commits

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

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

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

8 years agoBitcodeWriter: Emit metadata in post-order (again)
Duncan P. N. Exon Smith [Thu, 21 Apr 2016 01:55:12 +0000 (01:55 +0000)]
BitcodeWriter: Emit metadata in post-order (again)

Emit metadata nodes in post-order.  The iterative algorithm from r266709
failed to maintain this property.  After understanding my mistake, it
wasn't too hard to write a test with llvm-bcanalyzer (and I've actually
made this change once before: see r220340).

This also reverts the "noisy" testcase change from r266709.  That should
have been more of a red flag :/.

Note: The same bug crept into the ValueMapper in r265456.  I'm still
working on the fix.

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

8 years agoMachineSched: Cleanup; NFC
Matthias Braun [Thu, 21 Apr 2016 01:54:13 +0000 (01:54 +0000)]
MachineSched: Cleanup; NFC

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

8 years agoAdd optimization for 'icmp slt (or A, B), A' and some related idioms based on knowled...
Nick Lewycky [Thu, 21 Apr 2016 00:53:14 +0000 (00:53 +0000)]
Add optimization for 'icmp slt (or A, B), A' and some related idioms based on knowledge of the sign bit for A and B.

No matter what value you OR in to A, the result of (or A, B) is going to be UGE A. When A and B are positive, it's SGE too. If A is negative, OR'ing a value into it can't make it positive, but can increase its value closer to -1, therefore (or A, B) is SGE A. Working through all possible combinations produces this truth table:

```
A is
+, -, +/-
F  F   F   +    B is
T  F   ?   -
?  F   ?   +/-
```

The related optimizations are flipping the 'slt' for 'sge' which always NOTs the result (if the result is known), and swapping the LHS and RHS while swapping the comparison predicate.

There are more idioms left to implement (aren't there always!) but I've stopped here because any more would risk becoming unreasonable for reviewers.

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

8 years agoRefine instruction weight annotation algorithm for sample profiler.
Dehao Chen [Wed, 20 Apr 2016 23:36:23 +0000 (23:36 +0000)]
Refine instruction weight annotation algorithm for sample profiler.

Summary:
This patch refined the instruction weight anootation algorithm:
1. Do not use dbg_value intrinsics for annotation.
2. Annotate cold calls if the call is inlined in profile, but not inlined before preparation. This indicates that the annotation preparation step found no sample for the inlined callsite, thus the call should be very cold.

Reviewers: dnovillo, davidxl

Subscribers: mgrang, llvm-commits

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

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

8 years agoFix another compilation error from r266919 for clang-atom-d525-fedora-rel which
Kevin Enderby [Wed, 20 Apr 2016 23:10:14 +0000 (23:10 +0000)]
Fix another compilation error from r266919 for clang-atom-d525-fedora-rel which
is another place that libObject’s getName() for symbols returns Expected<...>
that needed to be updated.

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

8 years agoFix compilation error in r266919.
Evgeniy Stepanov [Wed, 20 Apr 2016 22:44:40 +0000 (22:44 +0000)]
Fix compilation error in r266919.

lib/Object/MachOObjectFile.cpp:53:44: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
  return malformedError(Obj.getFileName(), std::move(Msg.str()), ECOverride);

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

8 years ago[test/PGOProfile] Make tests independent of the raw profile version (NFC)
Vedant Kumar [Wed, 20 Apr 2016 22:24:01 +0000 (22:24 +0000)]
[test/PGOProfile] Make tests independent of the raw profile version (NFC)

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

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

8 years agoThread Expected<...> up from libObject’s getName() for symbols to allow llvm-objdump...
Kevin Enderby [Wed, 20 Apr 2016 21:24:34 +0000 (21:24 +0000)]
Thread Expected<...> up from libObject’s getName() for symbols to allow llvm-objdump to produce a good error message.

Produce another specific error message for a malformed Mach-O file when a symbol’s
string index is past the end of the string table.  The existing test case in test/Object/macho-invalid.test
for macho-invalid-symbol-name-past-eof now reports the error with the message indicating
that a symbol at a specific index has a bad sting index and that bad string index value.

Again converting interfaces to Expected<> from ErrorOr<> does involve
touching a number of places. Where the existing code reported the error with a
string message or an error code it was converted to do the same.  There is some
code for this that could be factored into a routine but I would like to leave that for
the code owners post-commit to do as they want for handling an llvm::Error.  An
example of how this could be done is shown in the diff in
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h which had a Check() routine
already for std::error_code so I added one like it for llvm::Error .

Also there some were bugs in the existing code that did not deal with the
old ErrorOr<> return values.  So now with Expected<> since they must be
checked and the error handled, I added a TODO and a comment:
“// TODO: Actually report errors helpfully” and a call something like
consumeError(NameOrErr.takeError()) so the buggy code will not crash
since needed to deal with the Error.

Note there fixes needed to lld that goes along with this that I will commit right after this.
So expect lld not to built after this commit and before the next one.

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

8 years ago[Hexagon] Add -mv.. options to override CPU selection
Krzysztof Parzyszek [Wed, 20 Apr 2016 21:17:40 +0000 (21:17 +0000)]
[Hexagon] Add -mv.. options to override CPU selection

This is for compatibility with scripts that use -mv5, etc. with the
assembler.

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

8 years agoIR: Use SmallVector instead of std::vector of TrackingMDRef
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 20:14:09 +0000 (20:14 +0000)]
IR: Use SmallVector instead of std::vector of TrackingMDRef

Don't use std::vector<TrackingMDRef>, since (at least in some versions
of libc++) std::vector apparently copies values on grow operations
instead of moving them.  Found this when I was temporarily deleting the
copy constructor for TrackingMDRef to investigate a performance
bottleneck.

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

8 years agoIR: Stop copying vectors of TrackingMDRef in DIBuilder
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 20:03:59 +0000 (20:03 +0000)]
IR: Stop copying vectors of TrackingMDRef in DIBuilder

No real functionality change here, just avoiding an unnecessary copy of
std::vector<TrackingMDRef> for every subprogram with variables.

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

8 years agoRename asan-check-lifetime into asan-stack-use-after-scope
Kostya Serebryany [Wed, 20 Apr 2016 20:02:58 +0000 (20:02 +0000)]
Rename asan-check-lifetime into asan-stack-use-after-scope

Summary:
This is done for consistency with asan-use-after-return.
I see no other users than tests.

Reviewers: aizatsky, kcc

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

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

8 years agoTypo.
Chad Rosier [Wed, 20 Apr 2016 19:16:23 +0000 (19:16 +0000)]
Typo.

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

8 years ago[ValueTracking] Make isImpliedCondition return an Optional<bool>. NFC.
Chad Rosier [Wed, 20 Apr 2016 19:15:26 +0000 (19:15 +0000)]
[ValueTracking] Make isImpliedCondition return an Optional<bool>. NFC.

Phabricator Revision: http://reviews.llvm.org/D19277

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

8 years agoReplace a loop with a for-each loop. No behavior change.
Nico Weber [Wed, 20 Apr 2016 19:09:26 +0000 (19:09 +0000)]
Replace a loop with a for-each loop. No behavior change.

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

8 years agoIR: Avoid mallocs in constructor of ModuleSlotTracker
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 19:05:59 +0000 (19:05 +0000)]
IR: Avoid mallocs in constructor of ModuleSlotTracker

A ModuleSlotTracker can be created without actually being used (e.g.,
r266889 added one to the Verifier).  Create the SlotTracker within it
lazily on the first call to ModuleSlotTracker::getMachine.

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

8 years ago[MC] Silence warning due to unused variable in !Debug builds.
Davide Italiano [Wed, 20 Apr 2016 18:45:31 +0000 (18:45 +0000)]
[MC] Silence warning due to unused variable in !Debug builds.

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

8 years agoVerifier: Add ModuleSlotTracker to printAsOperand call
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 18:42:51 +0000 (18:42 +0000)]
Verifier: Add ModuleSlotTracker to printAsOperand call

I missed this site in r266889.

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

8 years ago[lanai] Add subword scheduling itineraries.
Jacques Pienaar [Wed, 20 Apr 2016 18:28:55 +0000 (18:28 +0000)]
[lanai] Add subword scheduling itineraries.

Differentiate between word and subword memory operations as they take different
amount of cycles to complete. This just adds a basic model of the subword
latency to the scheduler.

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

8 years agoVerifier: Prefer early continue over if-nesting, NFC
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 18:27:18 +0000 (18:27 +0000)]
Verifier: Prefer early continue over if-nesting, NFC

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

8 years ago[MC] EmitNop: Make an assertion more useful.
Davide Italiano [Wed, 20 Apr 2016 17:53:21 +0000 (17:53 +0000)]
[MC] EmitNop: Make an assertion more useful.

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

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

8 years agoLTO: Verify the input even if optimize() isn't called
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 17:48:22 +0000 (17:48 +0000)]
LTO: Verify the input even if optimize() isn't called

Clients may call writeMergedModules before calling optimize, or call
compileOptimized without calling optimize.  Make sure they don't sneak
past the verifier.  This adds LTOCodeGenerator::verifyMergedModuleOnce,
and calls it from writeMergedModule, optimize, and codegenOptimized.

I couldn't find a good way to test this.  I tried writing broken IR to
send into llvm-lto, but LTOCodeGenerator doesn't understand textual IR,
and assembler runs the verifier itself anyway.  Checking in
valid-but-doesn't-verify bitcode here doesn't seem valuable.

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

8 years agoModuleLinker: only import what is in GlobalsToImport, regarless if it is a function...
Mehdi Amini [Wed, 20 Apr 2016 17:47:42 +0000 (17:47 +0000)]
ModuleLinker: only import what is in GlobalsToImport, regarless if it is a function or not.

The alias handling was specific to the old iterative inlining
mechanism, so that is dead now. The variable handling could make a
difference, since we were previously falling through to the normal
selection logic, but we don't observe changes in the validation
because no client seems to rely on it.

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

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

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

8 years agoIR: Use a single ModuleSlotTracker in the Verifier
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 17:27:44 +0000 (17:27 +0000)]
IR: Use a single ModuleSlotTracker in the Verifier

Speed up Verifier output by sharing a single ModuleSlotTracker for the
duration.  There should be no functionality change here except for much
faster output when there's more than one statement.

Now the Verifier won't be traversing the full Metadata graph every time
it prints an error.  The TypePrinter is still not shared, but that would
take some extra plumbing.

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

8 years agoIR: Don't use raw_null_ostream in Verifier
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 16:17:37 +0000 (16:17 +0000)]
IR: Don't use raw_null_ostream in Verifier

While using a raw_null_ostream meant that the Verifier didn't have to
think about whether to print, it's actually quite expensive to print out
IR.  Only print if the output is going somewhere.

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

8 years agoIR: Use default member initialization in Verifier, NFC
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 15:55:24 +0000 (15:55 +0000)]
IR: Use default member initialization in Verifier, NFC

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

8 years ago[Hexagon] Fix handling of lcomm directive
Krzysztof Parzyszek [Wed, 20 Apr 2016 15:54:13 +0000 (15:54 +0000)]
[Hexagon] Fix handling of lcomm directive

Patch by Colin LeMahieu.

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

8 years agoRe-enable "[gold-plugin] Disable name for values other than GlobalValue"
Teresa Johnson [Wed, 20 Apr 2016 15:16:57 +0000 (15:16 +0000)]
Re-enable "[gold-plugin] Disable name for values other than GlobalValue"

This restores r266871 with a fix for gold tests relying on the value
names, when using a release compiler, by adding a way to disable the
default discarding. Update affected tests to use the new mechanism so
that value names are preserved as expected, regardless of how the
compiler was built.

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

8 years ago[ThinLTO] Prevent importing of "llvm.used" values
Teresa Johnson [Wed, 20 Apr 2016 14:39:45 +0000 (14:39 +0000)]
[ThinLTO] Prevent importing of "llvm.used" values

Summary:
This patch prevents importing from (and therefore exporting from) any
module with a "llvm.used" local value. Local values need to be promoted
and renamed when importing, and their presense on the llvm.used variable
indicates that there are opaque uses that won't see the rename. One such
example is a use in inline assembly.

See also the discussion at:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098047.html

As part of this, move collectUsedGlobalVariables out of Transforms/Utils
and into IR/Module so that it can be used more widely. There are several
other places in LLVM that used copies of this code that can be cleaned
up as a follow on NFC patch.

Reviewers: joker.eph

Subscribers: pcc, llvm-commits, joker.eph

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

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

8 years ago[RDF] Consider register as live if any alias is live
Krzysztof Parzyszek [Wed, 20 Apr 2016 14:33:23 +0000 (14:33 +0000)]
[RDF] Consider register as live if any alias is live

This only affects the recomputation of kill flags.

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

8 years ago[mips][microMIPS] Implement BGEC, BGEUC, BLTC, BLTUC, BEQC and BNEC instructions
Zoran Jovanovic [Wed, 20 Apr 2016 14:07:46 +0000 (14:07 +0000)]
[mips][microMIPS] Implement BGEC, BGEUC, BLTC, BLTUC, BEQC and BNEC instructions

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

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