OSDN Git Service
Simon Pilgrim [Wed, 11 Jan 2017 16:38:20 +0000 (16:38 +0000)]
Remove trailing whitespace. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291680
91177308-0d34-0410-b5e6-
96231b3b80d8
Piotr Padlewski [Wed, 11 Jan 2017 16:23:54 +0000 (16:23 +0000)]
[MemDep] NFC variable name change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291679
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeny Astigeevich [Wed, 11 Jan 2017 16:23:28 +0000 (16:23 +0000)]
[ARM] Fix test CodeGen/ARM/fpcmp_ueq.ll broken by rL290616
Commit rL290616 (https://reviews.llvm.org/rL290616) changed a checking command
for the triple arm-apple-darwin in LLVM::CodeGen/ARM/fpcmp_ueq.ll. As a result
of the changes the test could fail for the valid generated code.
These changes fixes the test to check only instructions we would expect.
Differential Revision: https://reviews.llvm.org/D28159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291678
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 11 Jan 2017 15:26:41 +0000 (15:26 +0000)]
[lib/Object] - Introduce Decompressor class.
Decompressor intention is to reduce duplication of code.
Currently LLD has own implementation of decompressor
for compressed debug sections.
This class helps to avoid it and share the code.
LLD patch for reusing it is D28106
Differential revision: https://reviews.llvm.org/D28105
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291675
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Wed, 11 Jan 2017 14:40:39 +0000 (14:40 +0000)]
[SystemZ] Improve isFoldableMemAccessOffset().
A store of an extracted element or a load which gets inserted into a vector,
will be combined into a vector load/store element instruction.
Therefore, isFoldableMemAccessOffset(), which is called by LSR, should
return false in these cases.
Reviewer: Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291673
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 11 Jan 2017 13:24:24 +0000 (13:24 +0000)]
Make processing @llvm.assume more efficient - Add affected values to the assumption cache
Here's my second try at making @llvm.assume processing more efficient. My
previous attempt, which leveraged operand bundles, r289755, didn't end up
working: it did make assume processing more efficient but eliminating the
assumption cache made ephemeral value computation too expensive. This is a
more-targeted change. We'll keep the assumption cache, but extend it to keep a
map of affected values (i.e. values about which an assumption might provide
some information) to the corresponding assumption intrinsics. This allows
ValueTracking and LVI to find assumptions relevant to the value being queried
without scanning all assumptions in the function. The fact that ValueTracking
started doing O(number of assumptions in the function) work, for every
known-bits query, has become prohibitively expensive in some cases.
As discussed during the review, this is a pragmatic fix that, longer term, will
likely be replaced by a more-principled solution (perhaps based on an extended
SSA form).
Differential Revision: https://reviews.llvm.org/D28459
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291671
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 11 Jan 2017 12:59:32 +0000 (12:59 +0000)]
X86 CodeGen: Optimized pattern for truncate with unsigned saturation.
DAG patterns optimization: truncate + unsigned saturation supported by VPMOVUS* instructions in AVX-512.
And VPACKUS* instructions on SEE* targets.
Differential Revision: https://reviews.llvm.org/D28216
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291670
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Kolton [Wed, 11 Jan 2017 11:46:30 +0000 (11:46 +0000)]
[AMDGPU] Assembler: SDWA/DPP should not accept scalar registers and immediate operands
Reviewers: artem.tamazov, nhaustov, vpykhtin, tstellarAMD
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye
Differential Revision: https://reviews.llvm.org/D28157
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291668
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 11 Jan 2017 10:40:33 +0000 (10:40 +0000)]
Fix unused variable warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291666
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 11 Jan 2017 10:36:51 +0000 (10:36 +0000)]
[X86][AVX512BW] Vectorize v64i8 vector shifts
Differential Revision: https://reviews.llvm.org/D28447
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291665
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 11 Jan 2017 10:25:31 +0000 (10:25 +0000)]
Fix line endings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291663
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 11 Jan 2017 09:43:56 +0000 (09:43 +0000)]
[PM] Separate the LoopAnalysisManager from the LoopPassManager and move
the latter to the Transforms library.
While the loop PM uses an analysis to form the IR units, the current
plan is to have the PM itself establish and enforce both loop simplified
form and LCSSA. This would be a layering violation in the analysis
library.
Fundamentally, the idea behind the loop PM is to *transform* loops in
addition to running passes over them, so it really seemed like the most
natural place to sink this was into the transforms library.
We can't just move *everything* because we also have loop analyses that
rely on a subset of the invariants. So this patch splits the the loop
infrastructure into the analysis management that has to be part of the
analysis library, and the transform-aware pass manager.
This also required splitting the loop analyses' printer passes out to
the transforms library, which makes sense to me as running these will
transform the code into LCSSA in theory.
I haven't split the unittest though because testing one component
without the other seems nearly intractable.
Differential Revision: https://reviews.llvm.org/D28452
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291662
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 11 Jan 2017 09:20:24 +0000 (09:20 +0000)]
[PM] Take more drastic measures to work around MSVC's failure on this
code. If this doesn't work and I can't find someone to help who has MSVC
installed, I'll back everything out I guess. =[
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291661
91177308-0d34-0410-b5e6-
96231b3b80d8
Elad Cohen [Wed, 11 Jan 2017 09:11:48 +0000 (09:11 +0000)]
[X86] Fix PR30926 - Add patterns for (v)cvtsi2s{s,d} and (v)cvtsd2s{s,d}
The code emiited by Clang's intrinsics for (v)cvtsi2ss, (v)cvtsi2sd,
(v)cvtsd2ss and (v)cvtss2sd is lowered to a code sequence that includes
redundant (v)movss/(v)movsd instructions. This patch adds patterns for
optimizing these sequences.
Differential revision: https://reviews.llvm.org/D28455
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291660
91177308-0d34-0410-b5e6-
96231b3b80d8
Mohammed Agabaria [Wed, 11 Jan 2017 09:03:11 +0000 (09:03 +0000)]
[X86] fixing failed test in commit: r291657
Missing Requires asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291659
91177308-0d34-0410-b5e6-
96231b3b80d8
Mohammed Agabaria [Wed, 11 Jan 2017 08:23:37 +0000 (08:23 +0000)]
[X86] updating TTI costs for arithmetic instructions on X86\SLM arch.
updated instructions:
pmulld, pmullw, pmulhw, mulsd, mulps, mulpd, divss, divps, divsd, divpd, addpd and subpd.
special optimization case which replaces pmulld with pmullw\pmulhw\pshuf seq.
In case if the real operands bitwidth <= 16.
Differential Revision: https://reviews.llvm.org/D28104
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291657
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 11 Jan 2017 08:23:29 +0000 (08:23 +0000)]
[PM] Pull a lambda out of an argument into a named variable to try and
get a little more clarity about the nature of the issue MSVC is having
with this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291656
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 11 Jan 2017 07:53:12 +0000 (07:53 +0000)]
[PM] Another attempt to satisfy MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291655
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 11 Jan 2017 07:37:50 +0000 (07:37 +0000)]
[PM] Try to appease MSVC by explicitly disambiguating a member name as
a template.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291654
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Wed, 11 Jan 2017 06:39:09 +0000 (06:39 +0000)]
[XRay] Define the library for XRay trace logs
Summary:
In this change we move the definition of the log reading routines from
the tools directory in LLVM to {include/llvm,lib}/XRay. We improve the
documentation a little bit for the publicly accessible headers, and
adjust the top-matter. This also leads to some refactoring and cleanup
in the tooling code.
In particular, we do the following:
- Rename the class from LogReader to Trace, as it better represents
the logical set of records as opposed to a log.
- Use file type detection instead of asking the user to say what
format the input file is. This allows us to keep the interface
simple and encapsulate the logic of loading the data appropriately.
In future changes we increase the API surface and write dedicated unit
tests for the XRay library.
Depends on D24376.
Reviewers: dblaikie, echristo
Subscribers: mehdi_amini, mgorny, llvm-commits, varno
Differential Revision: https://reviews.llvm.org/D28345
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291652
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 11 Jan 2017 06:23:21 +0000 (06:23 +0000)]
[PM] Rewrite the loop pass manager to use a worklist and augmented run
arguments much like the CGSCC pass manager.
This is a major redesign following the pattern establish for the CGSCC layer to
support updates to the set of loops during the traversal of the loop nest and
to support invalidation of analyses.
An additional significant burden in the loop PM is that so many passes require
access to a large number of function analyses. Manually ensuring these are
cached, available, and preserved has been a long-standing burden in LLVM even
with the help of the automatic scheduling in the old pass manager. And it made
the new pass manager extremely unweildy. With this design, we can package the
common analyses up while in a function pass and make them immediately available
to all the loop passes. While in some cases this is unnecessary, I think the
simplicity afforded is worth it.
This does not (yet) address loop simplified form or LCSSA form, but those are
the next things on my radar and I have a clear plan for them.
While the patch is very large, most of it is either mechanically updating loop
passes to the new API or the new testing for the loop PM. The code for it is
reasonably compact.
I have not yet updated all of the loop passes to correctly leverage the update
mechanisms demonstrated in the unittests. I'll do that in follow-up patches
along with improved FileCheck tests for those passes that ensure things work in
more realistic scenarios. In many cases, there isn't much we can do with these
until the loop simplified form and LCSSA form are in place.
Differential Revision: https://reviews.llvm.org/D28292
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291651
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 11 Jan 2017 04:59:25 +0000 (04:59 +0000)]
Revert r291645 "[DAGCombiner] Teach DAG combiner to fold (vselect (N0 xor AllOnes), N1, N2) -> (vselect N0, N2, N1). Only do this if the target indicates its vector boolean type is ZeroOrNegativeOneBooleanContent."
Some test appears to be hanging on the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291650
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 11 Jan 2017 04:39:49 +0000 (04:39 +0000)]
[LICM] Report failing to hoist conditionally-executed loads
These are interesting again because the user may not be aware that this
is a common reason preventing LICM.
A const is removed from an instruction pointer declaration in order to
pass it to ORE.
Differential Revision: https://reviews.llvm.org/D27940
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291649
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 11 Jan 2017 04:39:45 +0000 (04:39 +0000)]
[LICM] Report failing to hoist a load with an invariant address
These are interesting because lack of precision in alias information
could be standing in the way of this optimization.
An example is the case in the test suite that I showed in the DevMeeting
talk:
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/MultiSource/Benchmarks/FreeBench/distray/CMakeFiles/distray.dir/html/_org_test-suite_MultiSource_Benchmarks_FreeBench_distray_distray.c.html#L236
canSinkOrHoistInst is also used from LoopSink, which does not use
opt-remarks so we need to take ORE as an optional argument.
Differential Revision: https://reviews.llvm.org/D27939
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291648
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 11 Jan 2017 04:39:41 +0000 (04:39 +0000)]
Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291647
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 11 Jan 2017 04:39:35 +0000 (04:39 +0000)]
[LICM] Report successful hoist/sink/promotion
Differential Revision: https://reviews.llvm.org/D27938
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291646
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 11 Jan 2017 04:02:23 +0000 (04:02 +0000)]
[DAGCombiner] Teach DAG combiner to fold (vselect (N0 xor AllOnes), N1, N2) -> (vselect N0, N2, N1). Only do this if the target indicates its vector boolean type is ZeroOrNegativeOneBooleanContent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291645
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 11 Jan 2017 02:02:12 +0000 (02:02 +0000)]
DAGCombiner: Add hasOneUse checks to fadd/fma combine
Even with aggressive fusion enabled, this requires duplicating
the fmul, or increases an fadd to another fma which is not an
improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291642
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Wed, 11 Jan 2017 01:45:03 +0000 (01:45 +0000)]
[Target] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291641
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 11 Jan 2017 01:36:57 +0000 (01:36 +0000)]
Re-commit r289955: [X86] Fold (setcc (cmp (atomic_load_add x, -C) C), COND) to (setcc (LADD x, -C), COND) (PR31367)
This was reverted because it would miscompile code where the cmp had
multiple uses. That was due to a deficiency in the existing code, which
was fixed in r291630 (see the PR for details).
This re-commit includes an extra test for the kind of code that got
miscompiled: @test_sub_1_setcc_jcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291640
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 11 Jan 2017 01:06:57 +0000 (01:06 +0000)]
tools/llvm-xray: Avoid std::errc::protocol_* to appease mingw, like r285261.
They are oriented from winsock and mingw doesn't import them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291636
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 11 Jan 2017 00:57:54 +0000 (00:57 +0000)]
InstSimplify: Refactor function to use more switches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291634
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 11 Jan 2017 00:56:53 +0000 (00:56 +0000)]
Remove unused field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291633
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 11 Jan 2017 00:49:54 +0000 (00:49 +0000)]
[X86] Dont run combineSetCCAtomicArith() when the cmp has multiple uses
We would miscompile the following:
void g(int);
int f(volatile long long *p) {
bool b = __atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST) < 0;
g(b ? 12 : 34);
return b ? 56 : 78;
}
into
pushq %rax
lock incq (%rdi)
movl $12, %eax
movl $34, %edi
cmovlel %eax, %edi
callq g(int)
testq %rax, %rax <---- Bad.
movl $56, %ecx
movl $78, %eax
cmovsl %ecx, %eax
popq %rcx
retq
because the code failed to take into account that the cmp has multiple
uses, replaced one of them, and left the other one comparing garbage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291630
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 11 Jan 2017 00:48:41 +0000 (00:48 +0000)]
[RegBankSelect] Improve the output of the debug messages.
Add more information about mapping cost and chosen solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291629
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 11 Jan 2017 00:35:43 +0000 (00:35 +0000)]
[CodeView/PDB] Rename a bunch of files.
We were starting to get some name clashes between llvm-pdbdump
and the common CodeView framework, so I took this opportunity
to rename a bunch of files to more accurately describe their
usage. This also helps in llvm-pdbdump to distinguish
between different files and whether they are used for pretty
dump mode or raw dump mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291627
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 11 Jan 2017 00:35:08 +0000 (00:35 +0000)]
[CodeView] Add TypeDatabase class.
This creates a centralized class in which to store type records.
It stores types as an array of entries, which matches the
notion of a type stream being a topologically sorted DAG.
Logic to build up such a database was already being used in
CVTypeDumper, so CVTypeDumper is now updated to to read from
a TypeDatabase which is filled out by an earlier visitor in
the pipeline.
Differential Revision: https://reviews.llvm.org/D28486
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291626
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 11 Jan 2017 00:34:41 +0000 (00:34 +0000)]
Add better documentation for iterator facade subclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291625
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 11 Jan 2017 00:33:24 +0000 (00:33 +0000)]
InstSimplify: Eliminate fabs on known positive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291624
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 11 Jan 2017 00:16:03 +0000 (00:16 +0000)]
[gmock] Teach gmock ElementsAre and BeginEndDistanceIs matchers to
handle generic ranges by using std::begin and std::end rather than
requiring things to look exactly like an STL container.
Much of the credit for this goes to Dave Blaikie who helped me figure
out the right incantations.
This will probably be re-designed when I send this to the maintainers of
gmock, so I've instead structured it to change is little as possible
while it is a local patch. That makes it somewhat ugly, but I think a focused
change is better for getting this to work for LLVM today and letting the
upstream maintainers figure out the correct long-term pattern.
Differential Revision: https://reviews.llvm.org/D28288
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291623
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Vesely [Wed, 11 Jan 2017 00:12:39 +0000 (00:12 +0000)]
AMDGPU/EG,CM: Add fp16 conversion instructions
Differential Revision: https://reviews.llvm.org/D28164
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291622
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 10 Jan 2017 23:54:31 +0000 (23:54 +0000)]
Revert "[PGO] Turn off comdat renaming in IR PGO by default"
This patch reverts r291588: [PGO] Turn off comdat renaming in IR PGO by default,
as we are seeing some hash mismatches in our internal tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291621
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 10 Jan 2017 23:49:07 +0000 (23:49 +0000)]
[InstCombine] add a wrapper for a common pair of transforms; NFCI
Some of the callers are artificially limiting this transform to integer types;
this should make it easier to incrementally remove that restriction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291620
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 10 Jan 2017 23:43:35 +0000 (23:43 +0000)]
[loop-unroll] Properly populate LoopInfo for loops cloned in LoopUnrollRuntime.
Summary:
This fixes Transforms/LoopUnroll/runtime-loop3.ll which failed with
EXTENSIVE_DEBUG, because the cloned basic blocks were not added to the
correct sub-loops in LoopUnrollRuntime.cpp.
Reviewers: dexonsmith, mzolotukhin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28482
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291619
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 10 Jan 2017 23:43:04 +0000 (23:43 +0000)]
[TM] Restore default TargetOptions in TargetMachine::resetTargetOptions.
Summary:
Previously if you had
* a function with the fast-math-enabled attr, followed by
* a function without the fast-math attr,
the second function would inherit the first function's fast-math-ness.
This means that mixing fast-math and non-fast-math functions in a module
was completely broken unless you explicitly annotated every
non-fast-math function with "unsafe-fp-math"="false". This appears to
have been broken since r176986 (March 2013), when the resetTargetOptions
function was introduced.
This patch tests the correct behavior as best we can. I don't think I
can test FPDenormalMode and NoTrappingFPMath, because they aren't used
in any backends during function lowering. Surprisingly, I also can't
find any uses at all of LessPreciseFPMAD affecting generated code.
The NVPTX/fast-math.ll test changes are an expected result of fixing
this bug. When FMA is disabled, we emit add as "add.rn.f32", which
prevents fma combining. Before this patch, fast-math was enabled in all
functions following the one which explicitly enabled it on itself, so we
were emitting plain "add.f32" where we should have generated
"add.rn.f32".
Reviewers: mkuper
Subscribers: hfinkel, majnemer, jholewinski, nemanjai, llvm-commits
Differential Revision: https://reviews.llvm.org/D28507
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291618
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 10 Jan 2017 23:42:46 +0000 (23:42 +0000)]
[NVPTX] Add CHECK-LABEL where appropriate to fast-math.ll test.
Also fix up whitespace.
Test-only change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291617
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 10 Jan 2017 23:42:21 +0000 (23:42 +0000)]
[AArch64] Consider all vector types for FeatureSlowMisaligned128Store
The original code considered only v2i64 as slow for this feature. This patch
consider all 128-bit long vector types as slow candidates.
In internal tests, extending this feature to all 128-bit vector types
resulted in an overall improvement of 1% on Exynos M1.
Differential revision: https://reviews.llvm.org/D27998
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291616
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 23:32:04 +0000 (23:32 +0000)]
AMDGPU: Constant fold when immediate is materialized
In future commits these patterns will appear after moveToVALU changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291615
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 10 Jan 2017 23:24:54 +0000 (23:24 +0000)]
[loop-unroll] Factor out code to update LoopInfo (NFC).
Move the code to update LoopInfo for cloned basic blocks to
addClonedBlockToLoopInfo, as suggested in
https://reviews.llvm.org/D28482.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291614
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 10 Jan 2017 23:23:58 +0000 (23:23 +0000)]
Move the section name from GlobalObject to the LLVMContext
Summary:
Convention wisdom says that bytes in Function are precious, and the
vast, vast majority of globals do not live in special sections. Even
when they do, they tend to live in the same section. Store the section
name on the LLVMContext in a StringSet, and maintain a map from
GlobalObject* to section name like we do for metadata, prefix data, etc.
The fact that we've survived this long wasting at least three pointers
of space in Function suggests that Function bytes are perhaps not as
precious as we once thought. Given that most functions have metadata
attachments when debug info is enabled, we might consider adding a
pointer here to make that access more efficient.
Reviewers: jlebar, dexonsmith, mehdi_amini
Subscribers: mehdi_amini, aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D28150
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291613
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 23:17:52 +0000 (23:17 +0000)]
InstCombine: Set operands instead of creating new call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291612
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 23:08:54 +0000 (23:08 +0000)]
InstCombine: fdiv -x, -y -> fdiv x, y
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291611
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Tue, 10 Jan 2017 23:04:30 +0000 (23:04 +0000)]
CodeGen: Allow small copyable blocks to "break" the CFG.
When choosing the best successor for a block, ordinarily we would have preferred
a block that preserves the CFG unless there is a strong probability the other
direction. For small blocks that can be duplicated we now skip that requirement
as well.
Differential revision: https://reviews.llvm.org/D27742
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291609
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 22:38:02 +0000 (22:38 +0000)]
Remove unused CONVERT_RNDSAT intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291607
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 10 Jan 2017 22:32:26 +0000 (22:32 +0000)]
Add the 'googlemock' component of Google Test to LLVM's unittest libraries.
I have two immediate motivations for adding this:
1) It makes writing expectations in tests *dramatically* easier. A
quick example that is a taste of what is possible:
std::vector<int> v = ...;
EXPECT_THAT(v, UnorderedElementsAre(1, 2, 3));
This checks that v contains '1', '2', and '3' in some order. There
are a wealth of other helpful matchers like this. They tend to be
highly generic and STL-friendly so they will in almost all cases work
out of the box even on custom LLVM data structures.
I actually find the matcher syntax substantially easier to read even
for simple assertions:
EXPECT_THAT(a, Eq(b));
EXPECT_THAT(b, Ne(c));
Both of these make it clear what is being *tested* and what is being
*expected*. With `EXPECT_EQ` this is implicit (the LHS is expected,
the RHS is tested) and often confusing. With `EXPECT_NE` it is just
not clear. Even the failure error messages are superior with the
matcher based expectations.
2) When testing any kind of generic code, you are continually defining
dummy types with interfaces and then trying to check that the
interfaces are manipulated in a particular way. This is actually what
mocks are *good* for -- testing *interface interactions*. With
generic code, there is often no "fake" or other object that can be
used.
For a concrete example of where this is currently causing significant
pain, look at the pass manager unittests which are riddled with
counters incremented when methods are called. All of these could be
replaced with mocks. The result would be more effective at testing
the code by having tighter constraints. It would be substantially
more readable and maintainable when updating the code. And the error
messages on failure would have substantially more information as
mocks automatically record stack traces and other information *when
the API is misused* instead of trying to diagnose it after the fact.
I expect that #1 will be the overwhelming majority of the uses of gmock,
but I think that is sufficient to justify having it. I would actually
like to update the coding standards to encourage the use of matchers
rather than any other form of `EXPECT_...` macros as they are IMO
a strict superset in terms of functionality and readability.
I think that #2 is relatively rarely useful, but there *are* cases where
it is useful. Historically, I think misuse of actual mocking as
described in #2 has led to resistance towards this framework. I am
actually sympathetic to this -- mocking can easily be overused. However
I think this is not a significant concern in LLVM. First and foremost,
LLVM has very careful and rare exposure of abstract interfaces or
dependency injection, which are the most prone to abuse with mocks. So
there are few opportunities to abuse them. Second, a large fraction of
LLVM's unittests are testing *generic code* where mocks actually make
tremendous sense. And gmock is well suited to building interfaces that
exercise generic libraries. Finally, I still think we should be willing
to have testing utilities in tree even if they should be used rarely. We
can use code review to help guide the usage here.
For a longer and more complete discussion of this, see the llvm-dev
thread here:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/108672.html
The general consensus seems that this is a reasonable direction to start
down, but that doesn't mean we should race ahead and use this
everywhere. I have one test that is blocked on this to land and that was
specifically used as an example. Before widespread adoption, I'm going
to work up some (brief) guidelines as some of these facilities should be
used sparingly and carefully.
Differential Revision: https://reviews.llvm.org/D28156
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291606
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Yung [Tue, 10 Jan 2017 22:10:22 +0000 (22:10 +0000)]
Make the test accept different OpCode values since it doesn't really care about the value.
Differential Revision: https://reviews.llvm.org/D28487
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291605
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 22:02:30 +0000 (22:02 +0000)]
DAG: Avoid OOB when legalizing vector indexing
If a vector index is out of bounds, the result is supposed to be
undefined but is not undefined behavior. Change the legalization
for indexing the vector on the stack so that an out of bounds
index does not create an out of bounds memory access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291604
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Tue, 10 Jan 2017 21:59:53 +0000 (21:59 +0000)]
[WebAssembly] Only RAUW a constant once in FixFunctionBitcasts
When we collect 2 uses of a function in FindUses and then RAUW when we
visit the first, we end up visiting the wrapper (because the second was
RAUW'd). We still want to use RAUW instead of just Use->set() because
it has special handling for Constants, so this patch just ensures that
only one use of each constant is added to the work list.
Differential Revision: https://reviews.llvm.org/D28504
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291603
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Leschuk [Tue, 10 Jan 2017 21:30:42 +0000 (21:30 +0000)]
Correct object file for implicit const test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291601
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Leschuk [Tue, 10 Jan 2017 21:18:26 +0000 (21:18 +0000)]
DebugInfo: support for DW_FORM_implicit_const
Support for DW_FORM_implicit_const DWARFv5 feature.
When this form is used attribute value goes to .debug_abbrev section (as SLEB).
As this form would break any debug tool which doesn't support DWARFv5
it is guarded by dwarf version check. Attempt to use this form with
dwarf version <= 4 is considered a fatal error.
Differential Revision: https://reviews.llvm.org/D28456
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291599
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 10 Jan 2017 20:07:58 +0000 (20:07 +0000)]
Fix memory leak in a unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291595
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Tue, 10 Jan 2017 19:55:51 +0000 (19:55 +0000)]
[llvm-config] Canonicalize CMake booleans to 0/1
Following the similar change to lit configuration, ensure that all CMake
booleans are canonicalized to 0/1 when being passed to llvm-config. This
fixes the incorrect interpretation of values when user passes another
value than the ON/OFF, and simplifies the code by removing unnecessary
string matching.
Furthermore, the code for --has-rtti and --has-global-isel has been
modified to print consistent values indepdently of the boolean used by
passed by the user to CMake. Sadly, the code already implicitly used
different values for the two (YES/NO for --has-rtti, ON/OFF for
--has-global-isel).
Include tests for all booleans and multi-value options in llvm-config.
Differential Revision: https://reviews.llvm.org/D28366
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291593
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Tue, 10 Jan 2017 19:47:05 +0000 (19:47 +0000)]
[CMake] Handle common options for runtimes build
All the existing runtimes relies on flags which are set by AddLLVM
and HandleLLVMOptions. In the standalone case, they would include
these themselves, but when being built using LLVM runtimes we should
include these in the top-level runtimes CMake files.
Differential Revision: https://reviews.llvm.org/D28389
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291590
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 10 Jan 2017 19:32:30 +0000 (19:32 +0000)]
[LV] Don't panic when encountering the IV of an outer loop.
Bail out instead of asserting when we encounter this situation,
which can actually happen.
The reason the test uses the new PM is that the "bad" phi, incidentally, gets
cleaned up by LoopSimplify. But LICM can create this kind of phi and preserve
loop simplify form, so the cleanup has no chance to run.
This fixes PR31190.
We may want to solve this in a less conservative manner, since this phi is
actually uniform within the inner loop (or we may want LICM to output a cleaner
promotion to begin with).
Differential Revision: https://reviews.llvm.org/D28490
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291589
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 10 Jan 2017 19:30:20 +0000 (19:30 +0000)]
[PGO] Turn off comdat renaming in IR PGO by default
Summary:
In IR PGO we append the function hash to comdat functions to avoid the
potential hash mismatch. This turns out not legal in some cases: if the comdat
function is address-taken and used in comparison. Renaming changes the semantic.
This patch turns off comdat renaming by default.
To alleviate the hash mismatch issue, we now rename the profile variable
for comdat functions. Profile allows co-existing multiple versions of profiles
with different hash value. The inlined copy will always has the correct profile
counter. The out-of-line copy might not have the correct count. But we will
not have the bogus mismatch warning.
Reviewers: davidxl
Subscribers: llvm-commits, xur
Differential Revision: https://reviews.llvm.org/D28416
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291588
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 10 Jan 2017 19:23:51 +0000 (19:23 +0000)]
[ARM] Remove rbit intrinsics and autoupgrade to generic bitreverse.
Testing already covered by CodeGen/ARM/rbit.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291587
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 19:08:15 +0000 (19:08 +0000)]
AMDGPU: Add tests for HasMultipleConditionRegisters
This was enabled without many specific tests or the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291586
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 10 Jan 2017 19:04:12 +0000 (19:04 +0000)]
[CostModel][X86] Add AVX512VL vector shift cost tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291585
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Tue, 10 Jan 2017 18:57:17 +0000 (18:57 +0000)]
[X86][AVX512]Improving shuffle lowering by using AVX-512 EXPAND* instructions
This patch fix PR31351: https://llvm.org/bugs/show_bug.cgi?id=31351
1. This patch adds new type of shuffle lowering
2. We can use the expand instruction, When the shuffle pattern is as following:
{ 0*a[0]0*a[1]...0*a[n] , n >=0 where a[] elements in a ascending order}.
Reviewers: 1. igorb
2. guyblank
3. craig.topper
4. RKSimon
Differential Revision: https://reviews.llvm.org/D28352
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291584
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Jan 2017 18:06:38 +0000 (18:06 +0000)]
LangRef: Note that calls also support fast math flags
This is already documented on the call instruction, but
not in the list of supported instructions in the fast math
flag section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291578
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 10 Jan 2017 18:02:05 +0000 (18:02 +0000)]
[SimplifyLibCalls] Propagate fast math flags while optimizing pow().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291577
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 10 Jan 2017 17:20:33 +0000 (17:20 +0000)]
[AArch64] Add support for lowering bitreverse to the rbit instruction.
Differential Revision: https://reviews.llvm.org/D28379
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291575
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 10 Jan 2017 16:40:57 +0000 (16:40 +0000)]
[mips] Fix Mips MSA instrinsics
The usage of some MIPS MSA instrinsics that took immediates could crash LLVM
during lowering. This patch addresses that behaviour. Crucially this patch
also makes the use of intrinsics with out of range immediates as producing an
internal error.
The ld,st instrinsics would trigger an assertion failure for MIPS64 as their
lowering would attempt to add an i32 offset to a i64 pointer.
Reviewers: vkalintiris, slthakur
Differential Revision: https://reviews.llvm.org/D25438
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291571
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 10 Jan 2017 15:53:10 +0000 (15:53 +0000)]
[mips] Honour -mno-odd-spreg for vector splat (again)
Previous the lowering of FILL_FW would use the MSA128W register class when
performing a vector splat. Instead it should be honouring -mno-odd-spreg and
only use the even registers when performing a splat from word to vector
register.
Logical follow-on from r230235.
This fixes PR/31369.
A previous commit was missing the test case and had another differential
in it.
Reviewers: slthakur
Differential Revision: https://reviews.llvm.org/D28373
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291566
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 10 Jan 2017 13:57:44 +0000 (13:57 +0000)]
Revert "[mips] Honour -mno-odd-spreg for vector splat"
This reverts commit r291556. It was a mixture of two differentials and
was missing a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291562
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Tue, 10 Jan 2017 11:05:30 +0000 (11:05 +0000)]
RuntimeDyldELF: implement R_AARCH64_PREL64 reloc
Differential revision: https://reviews.llvm.org/D28122
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291558
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 10 Jan 2017 10:28:37 +0000 (10:28 +0000)]
[mips] Honour -mno-odd-spreg for vector splat
Previous the lowering of FILL_FW would use the MSA128W register class when
performing a vector splat. Instead it should be honouring -mno-odd-spreg and
only use the even registers when performing a splat from word to vector
register.
Logical follow-on from r230235.
This fixes PR/31369.
Reviewers: slthakur
Differential Revision: https://reviews.llvm.org/D28373
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291556
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2017 07:42:57 +0000 (07:42 +0000)]
[DAGCombiner] Merge together duplicate checks for folding fold (select C, 1, X) -> (or C, X) and folding (select C, X, 0) -> (and C, X). Also be consistent about checking that both the condition and the result type are i1. NFC
I guess previously we just assumed if the result type was i1, then the condition type must also be i1?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291548
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 10 Jan 2017 06:24:24 +0000 (06:24 +0000)]
[ObjectYAML] Missed one mixup in the debug_line test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291547
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 10 Jan 2017 06:22:49 +0000 (06:22 +0000)]
[ObjectYAML] Support for DWARF line tables
One more try... relanding r291541 with a fix to properly gate MaxOpsPerInst on DWARF version.
Description from r291541:
This patch re-lands r291470, which failed on Linux bots. The issue (I believe) was undefined behavior because the size of llvm::dwarf::LineNumberOps was not explcitly specified or consistently respected. The updated patch adds an explcit underlying type to the enum and preserves the size more correctly.
Original description:
This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291546
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2017 06:01:16 +0000 (06:01 +0000)]
AMD family 17h (znver1) enablement
Summary:
This patch enables the following
1. AMD family 17h architecture using "znver1" tune flag (-march, -mcpu).
2. ISAs that are enabled for "znver1" architecture.
3. Checks ADX isa from cpuid to identify "znver1" flag when -march=native is used.
4. ISAs FMA4, XOP are disabled as they are dropped from amdfam17.
5. For the time being, it uses the btver2 scheduler model.
6. Test file is updated to check this flag.
This item is linked to clang review item https://reviews.llvm.org/D28018
Patch by Ganesh Gopalasubramanian
Reviewers: RKSimon, craig.topper
Subscribers: vprasad, RKSimon, ashutosh.nema, llvm-commits
Differential Revision: https://reviews.llvm.org/D28017
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291543
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 10 Jan 2017 05:31:23 +0000 (05:31 +0000)]
Revert "[ObjectYAML] Support for DWARF line tables"
This reverts commit r291541.
Still failing on a bot:
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/47224/steps/test_llvm/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291542
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 10 Jan 2017 05:25:24 +0000 (05:25 +0000)]
[ObjectYAML] Support for DWARF line tables
This patch re-lands r291470, which failed on Linux bots. The issue (I believe) was undefined behavior because the size of llvm::dwarf::LineNumberOps was not explcitly specified or consistently respected. The updated patch adds an explcit underlying type to the enum and preserves the size more correctly.
Original description:
This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291541
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Tue, 10 Jan 2017 04:32:34 +0000 (04:32 +0000)]
[XRay] Use regular expression for finding symbols
Un-break the test in Windows.
Follow-up on D24376.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291538
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2017 04:12:24 +0000 (04:12 +0000)]
[X86] When lowering uniform shifts, use X86ISD::VZEXT instead of using a ZERO_EXTEND_VECTOR_INREG. If we emit the ZERO_EXTEND_VECTOR_INREG too late it doesn't get lowered properly and makes it through to isel and fails.
Fixes PR31593.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291535
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2017 04:12:19 +0000 (04:12 +0000)]
[DAGCombiner] Remove code for optimizing select (xor Cond, 0), X, Y -> select Cond, X, Y. Just let combine on the xor itself take care of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291534
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Tue, 10 Jan 2017 03:21:54 +0000 (03:21 +0000)]
[XRay] Fixup includes for modules build
Remove unnecessary system header include.
Follow-up to D24376.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291533
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Tue, 10 Jan 2017 03:13:52 +0000 (03:13 +0000)]
Fix a typo and also test a new machine for commit. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291532
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Tue, 10 Jan 2017 02:51:13 +0000 (02:51 +0000)]
[XRay] Don't include <unistd.h> unnecessarily
Follow-up to D24376.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291531
91177308-0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Tue, 10 Jan 2017 02:50:47 +0000 (02:50 +0000)]
[StructurizeCfg] Update dominator info.
In some cases StructurizeCfg updates root node, but dominator info
remains unchanges, it causes crash when expensive checks are enabled.
To cope with this problem a new method was added to DominatorTreeBase
that allows adding new root nodes, it is called in StructurizeCfg to
put dominator tree in sync.
This change fixes PR27488.
Differential Revision: https://reviews.llvm.org/D28114
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291530
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Tue, 10 Jan 2017 02:38:11 +0000 (02:38 +0000)]
[XRay] Implement `llvm-xray convert` -- trace file conversion
This is the second part of a multi-part change to define additional
subcommands to the `llvm-xray` tool.
This change defines a conversion subcommand to take XRay log files, and
turns them from one format to another (binary or YAML). This currently
only supports the first version of the log file format, defined in the
compiler-rt runtime.
Depends on D21987.
Reviewers: dblaikie, echristo
Subscribers: mehdi_amini, dberris, beanz, llvm-commits
Differential Revision: https://reviews.llvm.org/D24376
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291529
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 10 Jan 2017 01:08:01 +0000 (01:08 +0000)]
[CodeGen] Implement the SUnit::print() method
This method seems to have had a troubled life. This patch proposes that it
replaces the recently added helper function dumpSUIdentifier. This way, the
method can be used in other files using the SUnit class.
Differential revision: https://reviews.llvm.org/D28488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291520
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 10 Jan 2017 01:05:33 +0000 (01:05 +0000)]
Try once again to fix the MSVC build of AlignedCharArrayUnion
It was complaining about ambiguity between llvm::detail and
llvm::support::detail:
error C2872: 'detail': ambiguous symbol
note: could be 'llvm::detail'
note: or 'llvm::support::detail'
Standardize on llvm::support::detail to hide these symbols further.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291519
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 10 Jan 2017 00:55:47 +0000 (00:55 +0000)]
[ThinLTO] Hash more part of the config to build cache entries
This has been fixed in the "new" LTO API used by Gold/LLD, this is
fixing the same issue in the libLTO API used by ld64 (amongst other)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291518
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Tue, 10 Jan 2017 00:39:49 +0000 (00:39 +0000)]
Add an assert for hasLoopInvariantOperands
Summary: Add an assert for hasLoopInvariantOperands
Reviewers: danielcdh, sanjoy
Subscribers: mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D28501
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291516
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 10 Jan 2017 00:29:05 +0000 (00:29 +0000)]
Revert the attempt to optimize the constexpr functions. MSVC does not handle this yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291515
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 10 Jan 2017 00:26:56 +0000 (00:26 +0000)]
Fix MSVC build of AlignedCharArrayUnion
Use constexpr recursion for alignof like we do for sizeof. Seems to work
with Clang and MSVC. Also, don't recurse twice to avoid slowdowns in
compilers that don't memoize constexpr results (Clang).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291514
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 9 Jan 2017 23:23:25 +0000 (23:23 +0000)]
Lift the 10-type limit for AlignedCharArrayUnion
This patch uses C++11 parameter packs and constexpr functions
to allow AlignedCharArrayUnion to hold an arbitrary number of
types.
Differential Revision: https://reviews.llvm.org/D28429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291503
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Mon, 9 Jan 2017 23:11:25 +0000 (23:11 +0000)]
Commit a test for match-full-lines.
I unfortunately neglected to add it in r260540, but it has been
sitting in my working dir ever since. D'oh.
Modified to work with r290069, which made the CHECK patterns
themselves whitespace-sensitive as well, and remove the test added
then, as this tests both strict and non-strict modes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291499
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Jan 2017 23:09:38 +0000 (23:09 +0000)]
[WebAssembly] Add return type annotations in fast isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291498
91177308-0d34-0410-b5e6-
96231b3b80d8