OSDN Git Service

android-x86/external-llvm.git
8 years agoAMDGPU/SI: Don't use reserved VGPRs for SGPR spilling
Tom Stellard [Thu, 28 Jul 2016 14:30:43 +0000 (14:30 +0000)]
AMDGPU/SI: Don't use reserved VGPRs for SGPR spilling

Summary:
We were using reserved VGPRs for SGPR spilling and this was causing
some programs with a workgroup size of 1024 to use more than 64
registers, which is illegal.

Reviewers: arsenm, mareko, nhaehnle

Subscribers: nhaehnle, arsenm, llvm-commits, kzhuravl

Differential Revision: https://reviews.llvm.org/D22032

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

8 years agoRemoved unused variables
Simon Pilgrim [Thu, 28 Jul 2016 13:42:57 +0000 (13:42 +0000)]
Removed unused variables

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

8 years agoFix signed/unsigned warning.
Simon Pilgrim [Thu, 28 Jul 2016 13:29:56 +0000 (13:29 +0000)]
Fix signed/unsigned warning.

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

8 years agoReapply r276856 "Adjust Registry interface to not require plugins to export a registry"
John Brawn [Thu, 28 Jul 2016 12:48:17 +0000 (12:48 +0000)]
Reapply r276856 "Adjust Registry interface to not require plugins to export a registry"

This version has two fixes compared to the original:
 * In Registry.h the template static members are instantiated before they are
   used, as clang gives an error if you do it the other way around.
 * The use of the Registry template in clang-tidy is updated in the same way as
   has been done everywhere else.

Original commit message:

Currently the Registry class contains the vestiges of a previous attempt to
allow plugins to be used on Windows without using BUILD_SHARED_LIBS, where a
plugin would have its own copy of a registry and export it to be imported by
the tool that's loading the plugin. This only works if the plugin is entirely
self-contained with the only interface between the plugin and tool being the
registry, and in particular this conflicts with how IR pass plugins work.

This patch changes things so that instead the add_node function of the registry
is exported by the tool and then imported by the plugin, which solves this
problem and also means that instead of every plugin having to export every
registry they use instead LLVM only has to export the add_node functions. This
allows plugins that use a registry to work on Windows if
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is used.

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

8 years agoAMDGPU: add execfix flag to SI_ELSE
Nicolai Haehnle [Thu, 28 Jul 2016 11:39:24 +0000 (11:39 +0000)]
AMDGPU: add execfix flag to SI_ELSE

Summary:
SI_ELSE is lowered into two parts:

s_or_saveexec_b64 dst, src (at the start of the basic block)

s_xor_b64 exec, exec, dst (at the end of the basic block)

The idea is that dst contains the exec mask of the preceding IF block. It can
happen that SIWholeQuadMode decides to switch from WQM to Exact mode inside
the basic block that contains SI_ELSE, in which case it introduces an instruction

s_and_b64 exec, exec, s[...]

which masks out bits that can correspond to both the IF and the ELSE paths.
So the resulting sequence must be:

s_or_savexec_b64 dst, src

s_and_b64 exec, exec, s[...] <-- added by SIWholeQuadMode
s_and_b64 dst, dst, exec <-- added by SILowerControlFlow

s_xor_b64 exec, exec, dst

Whether to add the additional s_and_b64 dst, dst, exec is currently determined
via the ExecModified tracking. With this change, it is instead determined by
an additional flag on SI_ELSE which is set by SIWholeQuadMode.

Finally: It also occured to me that an alternative approach for the long run
is for SILowerControlFlow to unconditionally emit

s_or_saveexec_b64 dst, src

...

s_and_b64 dst, dst, exec
s_xor_b64 exec, exec, dst

and have a pass that detects and cleans up the "redundant AND with exec"
pattern where possible. This could be useful anyway, because we also add
instructions

s_and_b64 vcc, exec, vcc

before s_cbranch_scc (in moveToALU), and those are often redundant. I have
some pending changes to how KILL is lowered that could also benefit from
such a cleanup pass.

In any case, this current patch could help in the short term with the whole
ExecModified business.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, llvm-commits, kzhuravl

Differential Revision: https://reviews.llvm.org/D22846

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

8 years ago[modules] Add missing includes.
Vassil Vassilev [Thu, 28 Jul 2016 10:26:33 +0000 (10:26 +0000)]
[modules] Add missing includes.

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

8 years agoRemove two tests added in r276957.
Daniel Jasper [Thu, 28 Jul 2016 09:54:35 +0000 (09:54 +0000)]
Remove two tests added in r276957.

These loop from 0 to AEK_XSCALE, which is currently defined as 0x80000000, and
thus the tests loop over the entire int range, which is unreasonable
and also too slow in debug builds.

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

8 years agofix some typos in the doc
Sylvestre Ledru [Thu, 28 Jul 2016 09:28:58 +0000 (09:28 +0000)]
fix some typos in the doc

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

8 years agoR276957 broke bot clang-ppc64be-linux-multistage,try to fix it.
Zijiao Ma [Thu, 28 Jul 2016 07:29:45 +0000 (07:29 +0000)]
R276957 broke bot clang-ppc64be-linux-multistage,try to fix it.

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

8 years ago[ConstantFolding] Don't bail on folding if ConstantFoldConstantExpression fails
David Majnemer [Thu, 28 Jul 2016 06:39:48 +0000 (06:39 +0000)]
[ConstantFolding] Don't bail on folding if ConstantFoldConstantExpression fails

When folding an expression, we run ConstantFoldConstantExpression on
each operand of that expression.
However, ConstantFoldConstantExpression can fail and retur nullptr.

Previously, we would bail on further refining the expression.
Instead, use the original operand and see if we can refine a later
operand.

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

8 years agoAdd unittests to {ARM | AArch64}TargetParser.
Zijiao Ma [Thu, 28 Jul 2016 06:11:18 +0000 (06:11 +0000)]
Add unittests to {ARM | AArch64}TargetParser.

Add unittest to {ARM | AArch64}TargetParser,and by the way correct problems as below:
1.Correct a incorrect indexing problem in AArch64TargetParser. The architecture enumeration
 is shared across ARM and AArch64 in original implementation.But In the code,I just used the
 index which was offset by the ARM, and this would index into the array incorrectly. To make
 AArch64 has its own arch enum,or we will do a lot of slowly iterating.
2.Correct a spelling error. The parameter of llvm::AArch64::getArchExtName.
3.Correct a writing mistake, in llvm::ARM::parseArchISA.

Differential Revision: https://reviews.llvm.org/D21785

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

8 years ago[CodeView] Don't crash on functions without subprograms
David Majnemer [Thu, 28 Jul 2016 05:03:22 +0000 (05:03 +0000)]
[CodeView] Don't crash on functions without subprograms

A function may have instructions annotated with debug info without
having a subprogram.

This fixes PR28747.

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

8 years agoAdd EP_CGSCCOptimizerLate extension point to PassManagerBuilder
David Majnemer [Thu, 28 Jul 2016 03:28:43 +0000 (03:28 +0000)]
Add EP_CGSCCOptimizerLate extension point to PassManagerBuilder

The EP_CGSCCOptimizerLate extension point allows adding CallGraphSCC
passes at the end of the main CallGraphSCC passes and before any
function simplification passes run by CGPassManager.

Patch by Gor Nishanov!

Differential Revision: https://reviews.llvm.org/D22897

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

8 years ago[InstCombine] Handle failures from ConstantFoldConstantExpression
David Majnemer [Thu, 28 Jul 2016 02:29:06 +0000 (02:29 +0000)]
[InstCombine] Handle failures from ConstantFoldConstantExpression

ConstantFoldConstantExpression returns null when folding fails.

This fixes PR28745.

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

8 years agoAMDGPU: Turn dead checks into asserts
Matt Arsenault [Thu, 28 Jul 2016 00:32:05 +0000 (00:32 +0000)]
AMDGPU: Turn dead checks into asserts

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

8 years agoAMDGPU: Remove analyzeImmediate
Matt Arsenault [Thu, 28 Jul 2016 00:32:02 +0000 (00:32 +0000)]
AMDGPU: Remove analyzeImmediate

This no longer uses the more complicated classification
of constants.

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

8 years agoFix the assertion error in collectLoopUniforms caused by empty Worklist before expanding.
Wei Mi [Wed, 27 Jul 2016 23:53:58 +0000 (23:53 +0000)]
Fix the assertion error in collectLoopUniforms caused by empty Worklist before expanding.

Contributed-by: David Callahan
Differential Revision: https://reviews.llvm.org/D22886

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

8 years agoDon't invoke getName() from Function::isIntrinsic().
Justin Lebar [Wed, 27 Jul 2016 23:46:57 +0000 (23:46 +0000)]
Don't invoke getName() from Function::isIntrinsic().

Summary:
getName() involves a hashtable lookup, so is expensive given how
frequently isIntrinsic() is called.  (In particular, many users cast to
IntrinsicInstr or one of its subclasses before calling
getIntrinsicID().)

This has an incidental functional change: Before, isIntrinsic() would
return true for any function whose name started with "llvm.", even if it
wasn't properly an intrinsic.  The new behavior seems more correct to
me, because it's strange to say that isIntrinsic() is true, but
getIntrinsicId() returns "not an intrinsic".

Some callers want the old behavior -- they want to know whether the
caller is a recognized intrinsic, or might be one in some other version
of LLVM.  For them, we added Function::hasLLVMReservedName(), which
checks whether the name starts with "llvm.".

This change is good for a 1.5% e2e speedup compiling a large Eigen
benchmark.

Reviewers: bogner

Subscribers: llvm-commits

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

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

8 years agoAdd verifyAnalysis for LCSSA.
Michael Zolotukhin [Wed, 27 Jul 2016 23:35:53 +0000 (23:35 +0000)]
Add verifyAnalysis for LCSSA.

Summary:
LCSSAWrapperPass currently doesn't override verifyAnalysis method, so pass
manager doesn't verify LCSSA. This patch adds the method so that we start
verifying LCSSA between loop passes.

Reviewers: chandlerc, sanjoy, hfinkel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22888

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

8 years ago[CFLAA] Add getModRefBehavior to CFLAnders.
George Burgess IV [Wed, 27 Jul 2016 23:07:07 +0000 (23:07 +0000)]
[CFLAA] Add getModRefBehavior to CFLAnders.

This patch lets CFLAnders respond to mod-ref queries. It also includes
a small bugfix to CFLSteens.

Patch by Jia Chen.

Differential Revision: https://reviews.llvm.org/D22823

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

8 years ago[LSV] Use Instruction*s rather than Value*s where possible.
Justin Lebar [Wed, 27 Jul 2016 23:06:00 +0000 (23:06 +0000)]
[LSV] Use Instruction*s rather than Value*s where possible.

Summary:
Given the crash in D22878, this patch converts the load/store vectorizer
to use explicit Instruction*s wherever possible.  This is an overall
simplification and should be an improvement in safety, as we have fewer
naked cast<>s, and now where we use Value*, we really mean something
different from Instruction*.

This patch also gets rid of some cast<>s around Value*s returned by
Builder.  Given that Builder constant-folds everything, we can't assume
much about what we get out of it.

One downside of this patch is that we have to copy our chain before
calling propagateMetadata.  But I don't think this is a big deal, as our
chains are very small (usually 2 or 4 elems).

Reviewers: asbirlea

Subscribers: mzolotukhin, llvm-commits, arsenm

Differential Revision: https://reviews.llvm.org/D22887

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

8 years ago[LVI] Use DenseMap::find_as in LazyValueInfo.
Justin Lebar [Wed, 27 Jul 2016 22:33:36 +0000 (22:33 +0000)]
[LVI] Use DenseMap::find_as in LazyValueInfo.

Summary:
This lets us avoid creating and destroying a CallbackVH every time we
check the cache.

This is good for a 2% e2e speedup when compiling one of the large Eigen
tests at -O3.

FTR, I tried making the ValueCache hashtable one-level -- i.e., mapping
a pair (Value*, BasicBlock*) to a lattice value, and that didn't seem to
provide any additional improvement.  Saving a word in LVILatticeVal by
merging the Tag and Val fields also didn't yield a speedup.

Reviewers: reames

Subscribers: llvm-commits

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

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

8 years ago[llvm-cov] Add a debug mode for source range highlighting (in html)
Vedant Kumar [Wed, 27 Jul 2016 21:57:15 +0000 (21:57 +0000)]
[llvm-cov] Add a debug mode for source range highlighting (in html)

llvm-cov's `-dump' option now emits information which helps debug source
range highlighting in html mode.

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

8 years ago[LSV] Don't assume that bitcast ops are Instructions.
Justin Lebar [Wed, 27 Jul 2016 21:45:48 +0000 (21:45 +0000)]
[LSV] Don't assume that bitcast ops are Instructions.

Summary:
When we ask the builder to create a bitcast on a constant, we get back a
constant, not an instruction.

Reviewers: asbirlea

Subscribers: jholewinski, mzolotukhin, llvm-commits, arsenm

Differential Revision: https://reviews.llvm.org/D22878

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

8 years ago[Hexagon] Find speculative loop preheader in hardware loop generation
Krzysztof Parzyszek [Wed, 27 Jul 2016 21:20:54 +0000 (21:20 +0000)]
[Hexagon] Find speculative loop preheader in hardware loop generation

Before adding a new preheader block, check if there is a candidate block
where the loop setup could be placed speculatively. This will be off by
default.

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

8 years ago[X86] Factor out another piece of the SAD combine. NFCI.
Michael Kuperstein [Wed, 27 Jul 2016 20:59:51 +0000 (20:59 +0000)]
[X86] Factor out another piece of the SAD combine. NFCI.

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

8 years ago[Hexagon] Add option to bisect spill slot optimization
Krzysztof Parzyszek [Wed, 27 Jul 2016 20:58:43 +0000 (20:58 +0000)]
[Hexagon] Add option to bisect spill slot optimization

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

8 years ago[Hexagon] Do not optimize volatile stack spill slots
Krzysztof Parzyszek [Wed, 27 Jul 2016 20:50:42 +0000 (20:50 +0000)]
[Hexagon] Do not optimize volatile stack spill slots

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

8 years agobuild_llvm_package.bat: try tests three times
Hans Wennborg [Wed, 27 Jul 2016 20:38:01 +0000 (20:38 +0000)]
build_llvm_package.bat: try tests three times

Sometimes they're flaky on Windows, and starting the whole thing
over is painful.

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

8 years agotest commit
Matt Masten [Wed, 27 Jul 2016 20:22:21 +0000 (20:22 +0000)]
test commit

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

8 years agoCodegen: IfConversion: Factor out a function to count dup instrs.
Kyle Butt [Wed, 27 Jul 2016 20:19:33 +0000 (20:19 +0000)]
Codegen: IfConversion: Factor out a function to count dup instrs.

Factor out countDuplicatedInstructions to Count duplicated instructions at the
beginning and end of a diamond pattern. This is in prep for adding support for
diamonds that need to be tail-merged.

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

8 years agoCodegen: IfConversion: add const qualifier. NFC
Kyle Butt [Wed, 27 Jul 2016 20:19:31 +0000 (20:19 +0000)]
Codegen: IfConversion: add const qualifier. NFC

Add a const qualifier to ReverseBranchCondition.

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

8 years agoRevert "[llvm-cov] Minor aesthetic improvements for html reports"
Vedant Kumar [Wed, 27 Jul 2016 19:59:44 +0000 (19:59 +0000)]
Revert "[llvm-cov] Minor aesthetic improvements for html reports"

This reverts commit r276906. It breaks tests.

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

8 years ago[llvm-cov] Minor aesthetic improvements for html reports
Vedant Kumar [Wed, 27 Jul 2016 19:51:17 +0000 (19:51 +0000)]
[llvm-cov] Minor aesthetic improvements for html reports

This fixes the highlighting for lines without any coverage segments. I
don't have a neat way of testing this yet, but am working on it.

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

8 years agoInitialize PreserveAsmComments in MCTargetOptions
Nirav Dave [Wed, 27 Jul 2016 19:19:13 +0000 (19:19 +0000)]
Initialize PreserveAsmComments in MCTargetOptions

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

8 years ago[Hexagon] Handle extended versions of restore routines
Krzysztof Parzyszek [Wed, 27 Jul 2016 18:47:25 +0000 (18:47 +0000)]
[Hexagon] Handle extended versions of restore routines

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

8 years agoCodeGen: Make iterator-to-pointer conversion explicit, NFC
Duncan P. N. Exon Smith [Wed, 27 Jul 2016 18:45:18 +0000 (18:45 +0000)]
CodeGen: Make iterator-to-pointer conversion explicit, NFC

Remove the implicit conversion from MachineInstrBundleIterator to
MachineInstr*, leaving behind an explicit conversion.

I *think* this is the last ilist_iterator-related implicit conversion to
ilist_node subclass.  If I'm right, I can finally dig in and fix the UB
in ilist that these conversions were relying on.

Note that the implicit users of this conversion have already been
removed.  If you have out-of-tree code that doesn't update, you might be
able to buy some time by temporarily reverting this commit.

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

8 years agoFix the build for libstdc++ 4.7
David Majnemer [Wed, 27 Jul 2016 18:25:12 +0000 (18:25 +0000)]
Fix the build for libstdc++ 4.7

libstdc++ 4.7 doesn't have emplace.  Use std::map::insert instead.

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

8 years agoXCore: Avoid implicit iterator conversions, NFC
Duncan P. N. Exon Smith [Wed, 27 Jul 2016 18:14:38 +0000 (18:14 +0000)]
XCore: Avoid implicit iterator conversions, NFC

Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr*, mainly by preferring MachineInstr& over MachineInstr*.

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

8 years agoRevert EH-specific checks in BranchFolding that were causing blow ups in compile...
Andrew Kaylor [Wed, 27 Jul 2016 17:55:33 +0000 (17:55 +0000)]
Revert EH-specific checks in BranchFolding that were causing blow ups in compile time.

Differential Revision: https://reviews.llvm.org/D22839

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

8 years agoGlobalISel: support zero-sized allocas
Tim Northover [Wed, 27 Jul 2016 17:47:54 +0000 (17:47 +0000)]
GlobalISel: support zero-sized allocas

All allocas must be at least 1 byte at the MachineIR level so we allocate just
one byte.

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

8 years ago[MC][X86] Fix Intel Operand assembly parsing for .set ids
Nirav Dave [Wed, 27 Jul 2016 17:39:41 +0000 (17:39 +0000)]
[MC][X86] Fix Intel Operand assembly parsing for .set ids

Fix intel syntax special case identifier operands that refer to a constant
(e.g. .set <ID> n) to be interpreted as immediate not memory in parsing.

Reviewers: rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22585

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

8 years ago[DSE] Fix bug in updating MadeChange flag
Jun Bum Lim [Wed, 27 Jul 2016 17:25:20 +0000 (17:25 +0000)]
[DSE] Fix bug in updating MadeChange flag

Summary: The MadeChange flag should be ORed to keep the previous result.

Reviewers: mcrosier

Subscribers: mcrosier, llvm-commits

Differential Revision: https://reviews.llvm.org/D22873

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

8 years ago[Hexagon] Add saved callee-saved registers as live-in in non-wrapped blocks
Krzysztof Parzyszek [Wed, 27 Jul 2016 16:26:39 +0000 (16:26 +0000)]
[Hexagon] Add saved callee-saved registers as live-in in non-wrapped blocks

The callee-saved registers that are saved in a function are not pristine,
and so they can be defined and used. In case of shrink-wrapping though,
there are blocks that are outside of the save/restore range, and in those
blocks the saved registers must be treated as pristine. To avoid any uses
of these registers, add them as live-in in all those blocks.
This was already done for blocks reaching function exits after restore,
add code that does the same for blocks reached from the function entry
before save.

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

8 years agoMake bugpoint transform conditional jumps into unconditional jumps.
Daniel Berlin [Wed, 27 Jul 2016 16:13:25 +0000 (16:13 +0000)]
Make bugpoint transform conditional jumps into unconditional jumps.

Summary:
Add a pass to bugpoint to make it transform conditional jumps into unconditional jumps.

Often, bugpoint generates output that has large numbers of br undef jumps, where
one side is dead.

What is happening is two fold:
1. It never tries to just pick a direction for the jump, and just see what happens
<<<< this patch

2. SimplifyCFG no longer is a good match for bugpoint's usecase. It
does too much.
Even things in SimplifyCFG, like removeUnreachableBlocks, go to great
lengths to transform undefined behavior into  blocks and kill large
parts of the CFG.  This is great for regular code, not so much for
bugpoint, which often generates UB on purpose (store undef is a great
example).
<<<< a followup patch that is coming, to move simplifycfg into a
separate reduction pass, and move the existing reduceCrashingBlocks
pass to use simpleSimplifyCFG.

Both of these patches significantly reduce the size and complexity of bugpoint
generated testcases.

Reviewers: chandlerc, majnemer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22841

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

8 years agoRemove MCAsmInfo.h include from TargetOptions.h
Reid Kleckner [Wed, 27 Jul 2016 16:03:57 +0000 (16:03 +0000)]
Remove MCAsmInfo.h include from TargetOptions.h

TargetOptions wants the ExceptionHandling enum. Move that to
MCTargetOptions.h to avoid transitively including Dwarf.h everywhere in
clang. Now you can add a DWARF tag without a full rebuild of clang
semantic analysis.

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

8 years ago[X86][SSE] Updated test so that both are applying the post-multiply
Simon Pilgrim [Wed, 27 Jul 2016 15:30:20 +0000 (15:30 +0000)]
[X86][SSE] Updated test so that both are applying the post-multiply

This is to ensure that there are no diffs other than due to buildvector/legalization

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

8 years agoTypo fix. NFC
Diana Picus [Wed, 27 Jul 2016 15:13:25 +0000 (15:13 +0000)]
Typo fix. NFC

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

8 years ago[ARM] Check that the thumb COFF segment flag gets set on thumb windows
Renato Golin [Wed, 27 Jul 2016 14:37:18 +0000 (14:37 +0000)]
[ARM] Check that the thumb COFF segment flag gets set on thumb windows

Patch by Martin Storsjö.

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

8 years ago[GlobalISel] Introduce an instruction selector.
Ahmed Bougacha [Wed, 27 Jul 2016 14:31:55 +0000 (14:31 +0000)]
[GlobalISel] Introduce an instruction selector.

And implement it for AArch64, supporting x/w ADD/OR.

Differential Revision: https://reviews.llvm.org/D22373

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

8 years ago[AArch64] Mark various *Info classes as 'final'. NFC.
Ahmed Bougacha [Wed, 27 Jul 2016 14:31:46 +0000 (14:31 +0000)]
[AArch64] Mark various *Info classes as 'final'. NFC.

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

8 years ago[AArch64] Define AArch64RegisterInfo as a class, not a struct. NFC.
Ahmed Bougacha [Wed, 27 Jul 2016 14:31:40 +0000 (14:31 +0000)]
[AArch64] Define AArch64RegisterInfo as a class, not a struct. NFC.

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

8 years agoGlobalISel: remove variable_ops from output list.
Tim Northover [Wed, 27 Jul 2016 14:30:49 +0000 (14:30 +0000)]
GlobalISel: remove variable_ops from output list.

The instance in the input operand list allows both inputs and outputs,
but the one in (outs) is not treated specially which leads to the
MachineVerifier invoking UB (looking at an invalid MCInstrDesc field).

No functional change except in UBSan builds (maybe, who knows!), where
it fixes the legalize-add.mir test.

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

8 years ago[mips][ias] Check '$rs = $rd' constraints when both registers are in AsmText.
Daniel Sanders [Wed, 27 Jul 2016 13:49:44 +0000 (13:49 +0000)]
[mips][ias] Check '$rs = $rd' constraints when both registers are in AsmText.

Summary:
This is one possible solution to the problem of ignoring constraints that Simon
raised in D21473 but it's a bit of a hack.

The integrated assembler currently ignores violations of the tied register
constraints when the operands involved in a tie are both present in the AsmText.
For example, 'dati $rs, $rt, $imm' with the '$rs = $rt' will silently replace
$rt with $rs. So 'dati $2, $3, 1' is processed as if the user provided
'dati $2, $2, 1' without any diagnostic being emitted.

This is difficult to solve properly because there are multiple parts of the
matcher that are silently forcing these constraints to be met. Tied operands are
rendered to instructions by cloning previously rendered operands but this is
unnecessary because the matcher was already instructed to render the operand it
would have cloned. This is also unnecessary because earlier code has already
replaced the MCParsedOperand with the one it was tied to (so the parsed input
is matched as if it were 'dati <RegIdx 2>, <RegIdx 2>, <Imm 1>'). As a result,
it looks like fixing this properly amounts to a rewrite of the tied operand
handling which affects all targets.

This patch however, merely inserts a checking hook just before the
substitution of MCParsedOperands and the Mips target overrides it. It's not
possible to accurately check the registers are the same this early (because
numeric registers haven't been bound to a register class yet) so it cheats a
bit and checks that the tokens that produced the operand are lexically
identical. This works because tied registers need to have the same register
class but it does have a flaw. It will reject 'dati $4, $a0, 1' for violating
the constraint even though $a0 ends up as the same register as $4.

Reviewers: sdardis

Subscribers: dsanders, llvm-commits, sdardis

Differential Revision: https://reviews.llvm.org/D21994

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

8 years ago[PowerPC] Fix typo in PPCHazardRecognizers.cpp
Nemanja Ivanovic [Wed, 27 Jul 2016 13:24:54 +0000 (13:24 +0000)]
[PowerPC] Fix typo in PPCHazardRecognizers.cpp

Fixes PR28731.

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

8 years agoPowerPC: Avoid implicit iterator conversions, NFC
Duncan P. N. Exon Smith [Wed, 27 Jul 2016 13:24:16 +0000 (13:24 +0000)]
PowerPC: Avoid implicit iterator conversions, NFC

Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the PowerPC backend, mainly by preferring MachineInstr&
over MachineInstr* when a pointer isn't nullable and using range-based
for loops.

There was one piece of questionable code in PPCInstrInfo::AnalyzeBranch,
where a condition checked a pointer converted from an iterator for
nullptr.  Since this case is impossible (moreover, the code above
guarantees that the iterator is valid), I removed the check when I
changed the pointer to a reference.

Despite that case, there should be no functionality change here.

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

8 years ago[test/gold] Add gold test subdirectory tests needing v1.12 (or higher)
Teresa Johnson [Wed, 27 Jul 2016 12:59:51 +0000 (12:59 +0000)]
[test/gold] Add gold test subdirectory tests needing v1.12 (or higher)

Summary:
As discussed in the review for D22677, added a subdirectory to
enable tests that require at least version 1.12 of gold.

Add an initial test requiring this version.

Reviewers: davidxl, mehdi_amini

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D22827

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

8 years ago[ARM] Set a non-conflicting comment character for assembly in MSVC mode
Renato Golin [Wed, 27 Jul 2016 12:31:58 +0000 (12:31 +0000)]
[ARM] Set a non-conflicting comment character for assembly in MSVC mode

Currently, for ARMCOFFMCAsmInfoMicrosoft, no comment character is set, thus the
idefault, '#', is used.

The hash character doesn't work as comment character in ARM assembly, since '#'
is used for immediate values.

The comment character is set to ';', which is the comment character used by MS
armasm.exe. (The microsoft armasm.exe uses a different directive syntax than
what LLVM currently supports though, similar to ARM's armasm.)

This allows inline assembly with immediate constants to be built (and brings the
assembly output from clang -S closer to being possible to assemble).

A test is added that verifies that ';' is correctly interpreted as comments in
this mode, and verifies that assembling code that includes literal constants
with a '#' works.

Patch by Martin Storsjö.

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

8 years ago[ARM] Adds test for immediate encoding
Renato Golin [Wed, 27 Jul 2016 12:15:26 +0000 (12:15 +0000)]
[ARM] Adds test for immediate encoding

The encoding of expressions as immediates wasn't correct, and was reported in
PR23000. However, we have done some refactoring on how immediates are handled
and now it seems the problem is fixed. This is a test just to make sure it
won't regress again.

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

8 years agoRevert r276856 "Adjust Registry interface to not require plugins to export a registry"
John Brawn [Wed, 27 Jul 2016 11:41:18 +0000 (11:41 +0000)]
Revert r276856 "Adjust Registry interface to not require plugins to export a registry"

This is causing a huge pile of buildbot failures.

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

8 years agoAdjust Registry interface to not require plugins to export a registry
John Brawn [Wed, 27 Jul 2016 11:18:38 +0000 (11:18 +0000)]
Adjust Registry interface to not require plugins to export a registry

Currently the Registry class contains the vestiges of a previous attempt to
allow plugins to be used on Windows without using BUILD_SHARED_LIBS, where a
plugin would have its own copy of a registry and export it to be imported by
the tool that's loading the plugin. This only works if the plugin is entirely
self-contained with the only interface between the plugin and tool being the
registry, and in particular this conflicts with how IR pass plugins work.

This patch changes things so that instead the add_node function of the registry
is exported by the tool and then imported by the plugin, which solves this
problem and also means that instead of every plugin having to export every
registry they use instead LLVM only has to export the add_node functions. This
allows plugins that use a registry to work on Windows if
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is used.

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

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

8 years ago[DAGCombiner] Use APInt directly to detect out of range shift constants
Simon Pilgrim [Wed, 27 Jul 2016 10:30:55 +0000 (10:30 +0000)]
[DAGCombiner] Use APInt directly to detect out of range shift constants

Using getZExtValue() will assert if the value doesn't fit into uint64_t - SHL was already doing this, I've just updated ASHR/LSHR to match

As mentioned on D22726

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

8 years agoRemoved unusued template function declaration that has no definition - fixes MSVC...
Simon Pilgrim [Wed, 27 Jul 2016 10:11:05 +0000 (10:11 +0000)]
Removed unusued template function declaration that has no definition - fixes MSVC warning.

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

8 years ago[mips] Update the link to the MIPS documentation in CompilerWriterInfo.rst.
Daniel Sanders [Wed, 27 Jul 2016 08:52:15 +0000 (08:52 +0000)]
[mips] Update the link to the MIPS documentation in CompilerWriterInfo.rst.

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

8 years ago[MBP] Added some more debug messages and some clean ups /NFC
Sjoerd Meijer [Wed, 27 Jul 2016 08:49:23 +0000 (08:49 +0000)]
[MBP] Added some more debug messages and some clean ups /NFC

Differential Revision: https://reviews.llvm.org/D22669

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

8 years agoRefactor - CodeExtractor : Move check for valid block to static utility
Sean Silva [Wed, 27 Jul 2016 08:02:46 +0000 (08:02 +0000)]
Refactor - CodeExtractor : Move check for valid block to static utility

This lets you actually check to see if a block is valid before trying to
extract.

Patch by River Riddle!

Differential Revision: https://reviews.llvm.org/D22699

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

8 years ago[GVNHoist] Fix typo in assert.
George Burgess IV [Wed, 27 Jul 2016 06:34:53 +0000 (06:34 +0000)]
[GVNHoist] Fix typo in assert.

This fixes PR28730.

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

8 years agoFix Coroutines doc example
Mehdi Amini [Wed, 27 Jul 2016 06:03:47 +0000 (06:03 +0000)]
Fix Coroutines doc example

SSA was broken.

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

8 years ago[MC] Add command-line option to choose the max nest level in asm macros.
Davide Italiano [Wed, 27 Jul 2016 05:51:56 +0000 (05:51 +0000)]
[MC] Add command-line option to choose the max nest level in asm macros.

Submitted by: t83wCSLq
Differential Revision:  https://reviews.llvm.org/D22313

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

8 years agoGVN-hoist: improve code generation for recursive GEPs
Sebastian Pop [Wed, 27 Jul 2016 05:48:12 +0000 (05:48 +0000)]
GVN-hoist: improve code generation for recursive GEPs

When loading or storing in a field of a struct like "a.b.c", GVN is able to
detect the equivalent expressions, and GVN-hoist would fail in the code
generation.  This is because the GEPs are not hoisted as scalar operations to
avoid moving the GEPs too far from their ld/st instruction when the ld/st is not
movable.  So we end up having to generate code for the GEP of a ld/st when we
move the ld/st.  In the case of a GEP referring to another GEP as in "a.b.c" we
need to code generate all the GEPs necessary to make all the operands available
at the new location for the ld/st.  With this patch we recursively walk through
the GEP operands checking whether all operands are available, and in the case of
a GEP operand, it recursively makes all its operands available. Code generation
happens from the inner GEPs out until reaching the GEP that appears as an
operand of the ld/st.

Differential Revision: https://reviews.llvm.org/D22599

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

8 years agoGVN-hoist: use DFS numbers instead of walking the instruction stream
Sebastian Pop [Wed, 27 Jul 2016 05:13:52 +0000 (05:13 +0000)]
GVN-hoist: use DFS numbers instead of walking the instruction stream

The patch replaces a function that walks the IR with a call to firstInBB() that
uses the DFS numbering.  NFC.

Differential Revision: https://reviews.llvm.org/D22809

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

8 years ago[coroutines] Part 2 of N: Adding Coroutine Intrinsics
David Majnemer [Wed, 27 Jul 2016 05:12:35 +0000 (05:12 +0000)]
[coroutines] Part 2 of N: Adding Coroutine Intrinsics

This is the second patch in the coroutine series. It adds coroutine
intrinsics and updates intrinsic cost in TargetTransformInfoImpl.h.

Patch by Gor Nishanov!

Differential Revision: https://reviews.llvm.org/D22659

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

8 years agoadd a verbose mode to Loop->print() to print all the basic blocks of a loop
Sebastian Pop [Wed, 27 Jul 2016 05:02:17 +0000 (05:02 +0000)]
add a verbose mode to Loop->print() to print all the basic blocks of a loop

Differential Revision: https://reviews.llvm.org/D22817

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

8 years agoadd function isLoopLatch
Sebastian Pop [Wed, 27 Jul 2016 05:02:15 +0000 (05:02 +0000)]
add function isLoopLatch

Differential Revision: https://reviews.llvm.org/D22817

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

8 years agorefactor code in verifyLoop: NFC.
Sebastian Pop [Wed, 27 Jul 2016 04:36:06 +0000 (04:36 +0000)]
refactor code in verifyLoop: NFC.

Use std::any_of as requested in https://reviews.llvm.org/D22816

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

8 years ago[llvm-cov] Escape '\' in strings when emitting JSON
Vedant Kumar [Wed, 27 Jul 2016 04:08:32 +0000 (04:08 +0000)]
[llvm-cov] Escape '\' in strings when emitting JSON

Test that Windows path separators are escaped properly. Add a round-trip
test to verify the JSON produced by the exporter.

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

8 years agoMove assert as early as possible
Sebastian Pop [Wed, 27 Jul 2016 03:30:11 +0000 (03:30 +0000)]
Move assert as early as possible

Patch written by Aditya Kumar.

Differential Revision: https://reviews.llvm.org/D22816

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

8 years ago[llvm-go] parameterize $GOPATH construction
Andrew Wilkins [Wed, 27 Jul 2016 03:21:51 +0000 (03:21 +0000)]
[llvm-go] parameterize $GOPATH construction

Summary:
To build llgo, you must currently ensure that llgo
is in the tools/llgo directory, due to a hard-coded
path in llvm-go.

To support the use of LLVM_EXTERNAL_LLGO_SOURCE_DIR,
we introduce a flag to llvm-go that enables the
caller to specify the paths to symlink in the
temporary $GOPATH.

Reviewers: pcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D21634

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

8 years ago[ConstantFolding] Correctly handle failures in ConstantFoldConstantExpressionImpl
David Majnemer [Wed, 27 Jul 2016 02:39:16 +0000 (02:39 +0000)]
[ConstantFolding] Correctly handle failures in ConstantFoldConstantExpressionImpl

Failures in ConstantFoldConstantExpressionImpl were ignored causing
crashes down the line.

This fixes PR28725.

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

8 years agoReverting r276771 due to MSan failures.
Andrew Kaylor [Wed, 27 Jul 2016 01:19:24 +0000 (01:19 +0000)]
Reverting r276771 due to MSan failures.

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

8 years agoAMDGPU: Use rcp for fdiv 1, x with fpmath metadata
Matt Arsenault [Tue, 26 Jul 2016 23:25:44 +0000 (23:25 +0000)]
AMDGPU: Use rcp for fdiv 1, x with fpmath metadata

Using rcp should be OK for safe math usually, so this
should not be replacing the original fdiv.

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

8 years agoRevert r276136 "Use ValueOffsetPair to enhance value reuse during SCEV expansion."
Hans Wennborg [Tue, 26 Jul 2016 23:25:13 +0000 (23:25 +0000)]
Revert r276136 "Use ValueOffsetPair to enhance value reuse during SCEV expansion."

It causes Clang tests to fail after Windows self-host (PR28705).

(Also reverts follow-up r276139.)

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

8 years agoAMDGPU: Add more tests for LDS size with occupancy
Matt Arsenault [Tue, 26 Jul 2016 23:15:59 +0000 (23:15 +0000)]
AMDGPU: Add more tests for LDS size with occupancy

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

8 years ago[docs] Fix a sphinx error in llvm-cov.rst
Vedant Kumar [Tue, 26 Jul 2016 23:09:57 +0000 (23:09 +0000)]
[docs] Fix a sphinx error in llvm-cov.rst

Failing bot:

  http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/12025

Fix tested with `ninja docs-llvm-html`.

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

8 years agoAMDGPU: Use implicit_def for selecting anyext
Matt Arsenault [Tue, 26 Jul 2016 23:06:33 +0000 (23:06 +0000)]
AMDGPU: Use implicit_def for selecting anyext

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

8 years agoRetry: [llvm-cov] Add support for exporting coverage data to JSON
Vedant Kumar [Tue, 26 Jul 2016 22:50:58 +0000 (22:50 +0000)]
Retry: [llvm-cov] Add support for exporting coverage data to JSON

This enables users to export coverage information as portable JSON for use by
analysis tools and storage in document based databases.

The export sub-command is invoked just like the others:

  llvm-cov export -instr-profile path/to/foo.profdata path/to/foo.binary

The resulting JSON contains a list of files and functions. Every file object
contains a list of segments, expansions, and a summary of the file's region,
function, and line coverage. Every function object contains the function's name
and regions. There is also a total summary for the entire object file.

Changes since the initial commit (r276813):

  - Fixed the regexes in the tests to handle Windows filepaths.

Patch by Eddie Hurtig!

Differential Revision: https://reviews.llvm.org/D22651

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

8 years agodocs: Add reference to type metadata to langref.
Peter Collingbourne [Tue, 26 Jul 2016 22:31:30 +0000 (22:31 +0000)]
docs: Add reference to type metadata to langref.

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

8 years agoRevert "[llvm-cov] Add support for exporting coverage data to JSON"
Vedant Kumar [Tue, 26 Jul 2016 21:55:39 +0000 (21:55 +0000)]
Revert "[llvm-cov] Add support for exporting coverage data to JSON"

This reverts commit r276813. The Windows bots are complaining about some
of the filename regexes in the tests:

  http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/5299

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

8 years agoMIRParser: Use dot instead of colon to mark subregisters
Matthias Braun [Tue, 26 Jul 2016 21:49:34 +0000 (21:49 +0000)]
MIRParser: Use dot instead of colon to mark subregisters

Change the syntax to use `%0.sub8` to denote a subregister.

This seems like a more natural fit to denote subregisters; I also plan
to introduce a new ":classname" syntax in upcoming patches to denote the
register class of a vreg.

Note that this commit disallows plain identifiers to start with a '.'
character.  This shouldn't affect anything as external names/IR
references are all prefixed with '$'/'%', plain identifiers are only
used for instruction names, register mask names and subreg indexes.

Differential Revision: https://reviews.llvm.org/D22390

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

8 years ago[llvm-cov] Add support for exporting coverage data to JSON
Vedant Kumar [Tue, 26 Jul 2016 21:35:43 +0000 (21:35 +0000)]
[llvm-cov] Add support for exporting coverage data to JSON

This enables users to export coverage information as portable JSON for use by
analysis tools and storage in document based databases.

The export sub-command is invoked just like the others:

  llvm-cov export -instr-profile path/to/foo.profdata path/to/foo.binary

The resulting JSON contains a list of files and functions. Every file object
contains a list of segments, expansions, and a summary of the file's region,
function, and line coverage. Every function object contains the function's name
and regions. There is also a total summary for the entire object file.

Patch by Eddie Hurtig!

Differential Revision: https://reviews.llvm.org/D22651

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

8 years agoFix docs/Coroutines.rst syntax highlighting on Linux
Sanjoy Das [Tue, 26 Jul 2016 21:03:41 +0000 (21:03 +0000)]
Fix docs/Coroutines.rst syntax highlighting on Linux

Summary:
s/code-block:: C++/code-block:: c++ in docs/Coroutines.rst .

Patch by Gor Nishanov!  Edited by Sanjoy to fix a missing s/C/c/.

Reviewers: sanjoy, rengolin

Differential Revision: https://reviews.llvm.org/D22832

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

8 years agoAMDGPU/R600: Remove dead custom inserters
Matt Arsenault [Tue, 26 Jul 2016 21:03:38 +0000 (21:03 +0000)]
AMDGPU/R600: Remove dead custom inserters

The intrinsics for these were removed, so this is dead.

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

8 years agoAMDGPU: Minor AsmPrinter cleanups
Matt Arsenault [Tue, 26 Jul 2016 21:03:36 +0000 (21:03 +0000)]
AMDGPU: Minor AsmPrinter cleanups

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

8 years ago[Hexagon] Post-increment loads/stores enhancements
Krzysztof Parzyszek [Tue, 26 Jul 2016 20:30:30 +0000 (20:30 +0000)]
[Hexagon] Post-increment loads/stores enhancements

- Generate vector post-increment stores more aggressively.
- Predicate post-increment and vector stores in early if-conversion.

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

8 years agoGlobalISel: add generic load and store instructions.
Tim Northover [Tue, 26 Jul 2016 20:23:26 +0000 (20:23 +0000)]
GlobalISel: add generic load and store instructions.

Pretty straightforward, the only oddity is the MachineMemOperand (which it's
surprisingly difficult to share code for).

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

8 years ago[X86] Split out absdiff detection from SAD combine. NFC.
Michael Kuperstein [Tue, 26 Jul 2016 20:01:29 +0000 (20:01 +0000)]
[X86] Split out absdiff detection from SAD combine. NFC.

Preparation for supporting PSADBW emission for straight-line code.

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

8 years ago[Hexagon] Gracefully handle reg class mismatch in HexagonLoopReschedule
Krzysztof Parzyszek [Tue, 26 Jul 2016 19:17:13 +0000 (19:17 +0000)]
[Hexagon] Gracefully handle reg class mismatch in HexagonLoopReschedule

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

8 years ago[Hexagon] Rerun bit tracker on new instructions in RIE
Krzysztof Parzyszek [Tue, 26 Jul 2016 19:08:45 +0000 (19:08 +0000)]
[Hexagon] Rerun bit tracker on new instructions in RIE

Consider this case:
  vreg1 = A2_zxth vreg0   (1)
  ...
  vreg2 = A2_zxth vreg1   (2)

Redundant instruction elimination could delete the instruction (1)
because the user (2) only cares about the low 16 bits. Then it could
delete (2) because the input is already zero-extended. The problem
is that the properties allowing each individual instruction to be
deleted depend on the existence of the other instruction, so either
one can be deleted, but not both.
The existing check for this situation in RIE was insufficient. The
fix is to update all dependent cells when an instruction is removed
(replaced via COPY) in RIE.

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

8 years agoAdd link to the Hexagon documentation
Krzysztof Parzyszek [Tue, 26 Jul 2016 18:40:25 +0000 (18:40 +0000)]
Add link to the Hexagon documentation

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

8 years ago[Hexagon] Bitwise operations for insert/extract word not simplified
Krzysztof Parzyszek [Tue, 26 Jul 2016 18:30:11 +0000 (18:30 +0000)]
[Hexagon] Bitwise operations for insert/extract word not simplified

Change the bit simplifier to generate REG_SEQUENCE instructions in
addition to COPY, which will handle cases of word insert/extract.

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