| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is some more cleanup in preparation for some actual
functional changes. This splits getOutliningBenefit into
two cost functions: getOutliningCallOverhead and
getOutliningFrameOverhead. These functions return the
number of instructions that would be required to call
a specific function and the number of instructions
that would be required to construct a frame for a
specific funtion. The actual outlining benefit logic
is moved into the outliner, which calls these functions.
The goal of refactoring getOutliningBenefit is to:
- Get us closer to getting rid of the IsTailCall flag
- Further split up "target-specific" things and
"general algorithm" things
llvm-svn: 309356
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This can come up in ThinLTO & wastes space & makes degenerate IR.
As per the added FIXME, ultimately, local imported entities should hang
off the function and that way the imported entity list on the CU can be
tested for emptiness like all the other CU lists.
(function-attached local imported entities are probably also the best
path forward for fixing how imported entities are handled both in
cross-module use (currently, while ThinLTO preserves the imported
entities, they would not get used at the imported inlined location -
only in the abstract origin that appears in the partial CU created by
the import (which isn't emitted under Fission due to cross-CU
limitations there)) and to reduce the number of points where imported
entities are emitted (they're currently emitted into every inlined
instance, concrete instance, and abstract origin - they should only go
in teh abstract origin if there is one, otherwise in the concrete
instance - but this requires lots of delayed handling and wiring up,
same as abstract variables & subprograms))
llvm-svn: 309354
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doing some cleanup in preparation for some functional changes.
This commit moves findCandidates out of the suffix tree and into the
MachineOutliner class. This is much easier to follow, and removes
the burden of candidate choice from the suffix tree.
It also adds a couple FIXMEs and simplifies building outlined function
names.
llvm-svn: 309334
|
|
|
|
|
|
| |
Improve DAGTypeLegalizer::convertMask's isSETCCorConvertedSETCC assertion to properly check for any mixture of SETCC or BUILD_VECTOR of constants, or a logical mask op of them.
llvm-svn: 309302
|
|
|
|
| |
llvm-svn: 309293
|
|
|
|
| |
llvm-svn: 309283
|
|
|
|
| |
llvm-svn: 309280
|
|
|
|
|
|
| |
Assign all concat elements to UNDEF and then just replace the first element, instead of copying everything individually.
llvm-svn: 309277
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
don't cause degenerate concrete definitions
Local imported entities at the top level of a subprogram were being
handled differently from those in nested scopes - that different
handling would cause pseudo concrete out-of-line definitions to be
created (but without any of their attributes, nor an abstract_origin) in
the case where there was no real concrete definition.
These local imported entities also only appeared in the concrete
definition where those imported entities in nested scopes appear in all
cases (abstract, concrete, and inlined). This change at least makes top
level case handle the same as the others - though there's a FIXME to
improve this to /only/ emit them into the abstract origin (though this
requires more plumbing - like the abstract subprogram and variable
handling that must defer population until the end of the unit to
discover if there is an abstract origin, or only a standalone concrete
definition).
llvm-svn: 309237
|
|
|
|
|
|
|
|
| |
NFCI.
This was a use-after-free waiting to happen.
llvm-svn: 309159
|
|
|
|
|
|
|
|
| |
throughput can't be calculated.
Differential revision https://reviews.llvm.org/D35831
llvm-svn: 309156
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a better fix than r308708 for the problem introduced in
r304020. It restores the skeleton CU testcases modified by that commit
to their original form and most importantly ensures that
frontend-generated skeleton CUs (such as used to point to Clang
modules) come after the regular CUs. This broke for DICompileUnit
nodes that don't have any immediate children because they are now
constructed lazily instead of the order in which they are listed in
!llvm.dbg.cu. After this commit we still don't guarantee that order,
but we do guarantee that empty skeletons come last.
Shipping versions of LLDB are very sensitive to the ordering of
CUs. I'll track a fix for LLDB to be more permissive separately.
This fixes a test failure in the LLDB testsuite.
rdar://problem/33357252
llvm-svn: 309154
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Adding support for combining power2-strided build_vector's where the
first build_vectori's operand is extracted from a non-zero index.
Example:
v4i32 build_vector((extract_elt V, 1),
(extract_elt V, 3),
(extract_elt V, 5),
(extract_elt V, 7))
-->
v4i32 truncate (bitcast (shuffle<1,u,3,u,5,u,7,u> V, u) to v4i64)
Reviewers: delena, RKSimon, guyblank
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35700
llvm-svn: 309108
|
|
|
|
|
|
| |
This reapplies commit r309034 with a bugfix+test for inlined variables.
llvm-svn: 309057
|
|
|
|
|
|
| |
This reverts commit r309034 because of a sanitizer issue.
llvm-svn: 309035
|
|
|
|
|
|
| |
<rdar://problem/17816343>
llvm-svn: 309034
|
|
|
|
|
|
|
|
| |
This patch moves the DAGCombiner::GetDemandedBits function to SelectionDAG::GetDemandedBits as a first step towards making it easier for targets to get to the source of any demanded bits without the limitations of SimplifyDemandedBits.
Differential Revision: https://reviews.llvm.org/D35841
llvm-svn: 308983
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Do not assume little endian architecture in DAGCombiner::visitTRUNCATE and DAGCombiner::visitEXTRACT_VECTOR_ELT.
PR33682
Reviewers: hfinkel, sdardis, RKSimon
Reviewed By: sdardis, RKSimon
Subscribers: uabelho, RKSimon, sdardis, llvm-commits
Differential Revision: https://reviews.llvm.org/D34990
llvm-svn: 308960
|
|
|
|
|
|
|
|
|
| |
These don't exactly assert the same thing anymore, and
allow empty live intervals with non-empty uses.
Removed in r308808 and r308813.
llvm-svn: 308906
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids excessive compile time. The case I'm looking at is
Function.cpp from an old version of LLVM that still had the giant memcmp
string matcher in it. Before r308322 this compiled in about 2 minutes,
after it, clang takes infinite* time to compile it. With this patch
we're at 5 min, which is still bad but this is a pathological case.
The cut off at 20 uses was chosen by looking at other cut-offs in LLVM
for user scanning. It's probably too high, but does the job and is very
unlikely to regress anything.
Fixes PR33900.
* I'm impatient and aborted after 15 minutes, on the bug report it was
killed after 2h.
llvm-svn: 308891
|
|
|
|
|
|
|
|
|
| |
This matches DMD:
https://github.com/dlang/dmd/blob/522263965cf3a27ed16b31f3c3562db86cdeabec/src/ddmd/backend/cv8.c#L199
Fixes PR33899.
llvm-svn: 308890
|
|
|
|
| |
llvm-svn: 308889
|
|
|
|
|
|
|
|
|
|
| |
optimization
Patch by Roland McGrath
Differential Revision: https://reviews.llvm.org/D35748
llvm-svn: 308854
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check the actual memory type stored and not the extended value size
when considering if truncated store merge is worthwhile.
Reviewers: efriedma, RKSimon, spatel, jyknight
Reviewed By: efriedma
Subscribers: llvm-commits, nhaehnle
Differential Revision: https://reviews.llvm.org/D35623
llvm-svn: 308833
|
|
|
|
|
|
|
|
|
| |
This case is similar to the one fixed in r308808,
except when rematerializing.
Fixes bug 33884.
llvm-svn: 308813
|
|
|
|
|
|
|
|
|
| |
This is possible if there is an undef use when
splitting the vreg during spilling.
Fixes bug 33620.
llvm-svn: 308808
|
|
|
|
| |
llvm-svn: 308772
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes LSR generate better code for SystemZ in the cases of memory
intrinsics, Load->Store pairs or comparison of immediate with memory.
In order to achieve this, the following common code changes were made:
* New TTI hook: LSRWithInstrQueries(), which defaults to false. Controls if
LSR should do instruction-based addressing evaluations by calling
isLegalAddressingMode() with the Instruction pointers.
* In LoopStrengthReduce: handle address operands of memset, memmove and memcpy
as address uses, and call isFoldableMemAccessOffset() for any LSRUse::Address,
not just loads or stores.
SystemZ changes:
* isLSRCostLess() implemented with Insns first, and without ImmCost.
* New function supportedAddressingMode() that is a helper for TTI methods
looking at Instructions passed via pointers.
Review: Ulrich Weigand, Quentin Colombet
https://reviews.llvm.org/D35262
https://reviews.llvm.org/D35049
llvm-svn: 308729
|
|
|
|
| |
llvm-svn: 308712
|
|
|
|
|
|
|
|
| |
This corrects a (hopefully :-) accidental side-effect of r304020.
rdar://problem/33442618
llvm-svn: 308708
|
|
|
|
|
|
|
|
| |
If the localizer pass puts one of its constants before the label that tells the
unwinder "jump here to handle your exception" then control-flow will skip it,
leaving uninitialized registers at runtime. That's bad.
llvm-svn: 308687
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On AMDGPU SGPR spills are really spilled to another register.
The spiller creates the spills to new frame index objects,
which is used as a placeholder.
This will eventually be replaced with a reference to a position
in a VGPR to write to and the frame index deleted. It is
most likely not a real stack location that can be shared
with another stack object.
This is a problem when StackSlotColoring decides it should
combine a frame index used for a normal VGPR spill with
a real stack location and a frame index used for an SGPR.
Add an ID field so that StackSlotColoring has a way
of knowing the different frame index types are
incompatible.
llvm-svn: 308673
|
|
|
|
| |
llvm-svn: 308666
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: compnerd, ruiu, rnk, zturner
Reviewed By: rnk
Subscribers: majnemer, aemerson, aprantl, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D35518
llvm-svn: 308665
|
|
|
|
|
|
|
|
|
|
|
| |
Split insertCSRSpillsAndRestores into insertCSRSaves + insertCSRRestores.
This is mostly useful for future shrink-wrapping improvements where we
want to save / restore a specific part of the CSRs in a specific block.
Differential Revision: https://reviews.llvm.org/D35644
llvm-svn: 308664
|
|
|
|
|
|
|
| |
This should eliminate most uses of countPopulation and Log2_32 on
the lane mask values.
llvm-svn: 308658
|
|
|
|
| |
llvm-svn: 308655
|
|
|
|
| |
llvm-svn: 308645
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
When pushing an extension of a constant bitwise operator on a load
into the load, change other uses of the load value if they exist to
prevent the old load from persisting.
Reviewers: spatel, RKSimon, efriedma
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35030
llvm-svn: 308618
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add missing vector write of vector read reduction, i.e.:
(insert_vector_elt x (extract_vector_elt x idx) idx) to x
Reviewers: spatel, RKSimon, efriedma
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35563
llvm-svn: 308617
|
|
|
|
|
|
|
|
| |
predicates.
Use predicate matchers introduced in D35492 to match more ISD::SRL constant folds
llvm-svn: 308602
|
|
|
|
| |
llvm-svn: 308601
|
|
|
|
|
|
|
|
| |
predicates.
Use predicate matchers introduced in D35492 to match more ISD::SRA constant folds
llvm-svn: 308600
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most combines currently recognise scalar and splat-vector constants, but not non-uniform vector constants.
This patch introduces a matching mechanism that uses predicates to check against BUILD_VECTOR of ConstantSDNode, as well as scalar ConstantSDNode cases.
I've changed a couple of predicates to demonstrate - the combine-shl changes add currently unsupported cases, while the MatchRotate replaces an existing mechanism.
Differential Revision: https://reviews.llvm.org/D35492
llvm-svn: 308598
|
|
|
|
|
|
|
|
| |
This reverts commit ce30ab6e5598f3c24f59ad016dc9526bc9a1d450.
sanitizer-ppc64le-linux seems to segfault when testing the sanitizers.
llvm-svn: 308581
|
|
|
|
|
|
|
|
| |
This reverts commit 540f6a26ae932469804a379ce9a8cbe715d59c23.
sanitizer-ppc64le-linux seems to segfault when testing the sanitizers.
llvm-svn: 308580
|
|
|
|
|
|
|
|
|
|
|
| |
Split insertCSRSpillsAndRestores into insertCSRSaves + insertCSRRestores.
This is mostly useful for future shrink-wrapping improvements where we
want to save / restore a specific part of the CSRs in a specific block.
Differential Revision: https://reviews.llvm.org/D35644
llvm-svn: 308573
|
|
|
|
|
|
|
|
| |
The previous flag/default of printing everything is
not helpful when there are thousands of registers
in the mask.
llvm-svn: 308572
|
|
|
|
|
|
| |
This reverts commit a84d1fa6847e70ebf63594d41a00b473c941bd72.
llvm-svn: 308562
|
|
|
|
| |
llvm-svn: 308557
|