The CodeGenCoverage.h header is installed, but it references
the build-only header "llvm/Config/config.h". This breaks use
of the CodeGenCoverage.h header once it is installed, because config.h isn't
available.
This patch fixes the error by moving the config.h include from
the CodeGenCoverage.h header (where it's not needed), to the
CodeGenCoverage.cpp source file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318602 91177308-0d34-0410-b5e6-96231b3b80d8
PR34553 has gone, adding tests to ensure it doesn't come back.
vselect_packss_v16i64 still has some awful codegen on AVX512 targets....
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318599 91177308-0d34-0410-b5e6-96231b3b80d8
We don't need a dyn_cast, the predicate already specified the base node. We only need to check the type of the index, the base ptr is guaranteed to be scalar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318596 91177308-0d34-0410-b5e6-96231b3b80d8
As discussed on PR35295, but it causes regressions in combineSubToSubus which need to be addressed first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318594 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
With this patch I tried to reduce the complexity of the code sightly, by
removing some indirection. Please let me know what you think.
Reviewers: junbuml, mcrosier, davidxl
Reviewed By: junbuml
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40037
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318593 91177308-0d34-0410-b5e6-96231b3b80d8
We used to detect loads feeding fp instructions, but we were
failing to take into account cases where this happens through copies.
For instance, loads can fed copies coming from the ABI lowering
of floating point arguments/results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318589 91177308-0d34-0410-b5e6-96231b3b80d8
We used to detect that stores were fed by fp instructions, but we were
failing to take into account cases where this happens through copies.
For instance, stores can be fed by copies coming from the ABI lowering
of floating point arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318588 91177308-0d34-0410-b5e6-96231b3b80d8
Instead of asserting that the type sizes are exactly equal, we check
that the new size is big enough to contain the original type.
We have to relax this constrain because, right now, we sometimes
specify that things that are smaller than a storage type are legal
instead of widening everything to the size of a storage type.
E.g., we say that G_AND s16 is legal and we map that on GPR32.
This is something we may revisit in the future (either by changing
the legalization process or keeping track separately of the storage
size and the size of the type), but let us reflect the reality of
the situation for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318587 91177308-0d34-0410-b5e6-96231b3b80d8
Revert the following commits:
r318369 [asan] Fallback to non-ifunc dynamic shadow on android<22.
r318235 [asan] Prevent rematerialization of &__asan_shadow.
r317948 [sanitizer] Remove unnecessary attribute hidden.
r317943 [asan] Use dynamic shadow on 32-bit Android.
MemoryRangeIsAvailable() reads /proc/$PID/maps into an mmap-ed buffer
that may overlap with the address range that we plan to use for the
dynamic shadow mapping. This is causing random startup crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318575 91177308-0d34-0410-b5e6-96231b3b80d8
ptypeN is functionally the same as typeN except that it informs the
SelectionDAG importer that an operand should be treated as a pointer even
if it was written as iN. This is important for patterns that use iN instead
of iPTR to represent pointers. E.g.:
(set GPR64:$dst, (load GPR64:$addr))
Previously, this was handled as a hardcoded special case for the appropriate
operands to G_LOAD and G_STORE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318574 91177308-0d34-0410-b5e6-96231b3b80d8
The passthrough is useful for setting up the options for the default
build, but we already have a different mechanism to pass CMake flags
to builds for builtins and runtimes targets so this is not really
needed there. Furthermore, when the flags are set for the default
build, with the prefix passthrough set we have to explicitly override
all options in other targets which can be cumbersome.
Differential Revision: https://reviews.llvm.org/D39988
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318571 91177308-0d34-0410-b5e6-96231b3b80d8
When using an installed clang with an in-tree llvm, we were not
searching in the right paths for the tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318564 91177308-0d34-0410-b5e6-96231b3b80d8
This is mostly moving VMEM clause breaking into
the hazard recognizer. Also move another hazard
currently handled in the waitcnt pass.
Also stops breaking clauses unless xnack is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318557 91177308-0d34-0410-b5e6-96231b3b80d8
The refactoring in r318407 transiently includes abi-breaking.h
which defines EnableABIBreakingChecks. This breaks my Debug
build because this fuzzer did not link in Support with the symbol.
Differential Revision: https://reviews.llvm.org/D40190
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318553 91177308-0d34-0410-b5e6-96231b3b80d8
Summary: This change fix PR35342 by replacing only the current use with undef in unreachable blocks.
Reviewers: efriedma, mcrosier, igor-laevsky
Reviewed By: efriedma
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318551 91177308-0d34-0410-b5e6-96231b3b80d8
This move some of the complexity over to the lower level TempFile.
It also makes it a bit more explicit where errors are ignored since we
now have a call to consumeError.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318550 91177308-0d34-0410-b5e6-96231b3b80d8
making it no longer even remotely simple.
The pass will now be more of a "full loop unswitching" pass rather than
anything substantively simpler than any other approach. I plan to rename
it accordingly once the dust settles.
The key ideas of the new loop unswitcher are carried over for
non-trivial unswitching:
1) Fully unswitch a branch or switch instruction from inside of a loop to
outside of it.
2) Update the CFG and IR. This avoids needing to "remember" the
unswitched branches as well as avoiding excessively cloning and
reliance on complex parts of simplify-cfg to cleanup the cfg.
3) Update the analyses (where we can) rather than just blowing them away
or relying on something else updating them.
Sadly, #3 is somewhat compromised here as the dominator tree updates
were too complex for me to want to reason about. I will need to make
another attempt to do this now that we have a nice dynamic update API
for dominators. However, we do adhere to #3 w.r.t. LoopInfo.
This approach also adds an important principls specific to non-trivial
unswitching: not *all* of the loop will be duplicated when unswitching.
This fact allows us to compute the cost in terms of how much *duplicate*
code is inserted rather than just on raw size. Unswitching conditions
which essentialy partition loops will work regardless of the total loop
size.
Some remaining issues that I will be addressing in subsequent commits:
- Handling unstructured control flow.
- Unswitching 'switch' cases instead of just branches.
- Moving to the dynamic update API for dominators.
Some high-level, interesting limitationsV that folks might want to push
on as follow-ups but that I don't have any immediate plans around:
- We could be much more clever about not cloning things that will be
deleted. In fact, we should be able to delete *nothing* and do
a minimal number of clones.
- There are many more interesting selection criteria for which branch to
unswitch that we might want to look at. One that I'm interested in
particularly are a set of conditions which all exit the loop and which
can be merged into a single unswitched test of them.
Differential revision: https://reviews.llvm.org/D34200
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318549 91177308-0d34-0410-b5e6-96231b3b80d8
If a vreg's bank is specified in the registers block and one of its
defs or uses also specifies the bank, we end up checking that the
RegBank is equal to diagnose conflicting banks. The problem comes up
for generic vregs, where we weren't fully initializing the VRegInfo
when parsing the registers block, so we'd end up comparing a null
pointer to uninitialized memory.
This fixes a non-deterministic failure when round tripping through MIR
with generic vregs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318543 91177308-0d34-0410-b5e6-96231b3b80d8
The assertion was introduced in r317853 but there are cases when a call
isn't handled either as direct or indirect. In this case we add a
reference graph edge but not a call graph edge.
Reviewers: tejohnson
Reviewed By: tejohnson
Subscribers: mehdi_amini, inglorion, eraman, hiraditya, efriedma, llvm-commits
Differential Revision: https://reviews.llvm.org/D40056
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318540 91177308-0d34-0410-b5e6-96231b3b80d8
In recent versions of Solaris 11.4 (previously 12), ld -V output went to
stdout instead of stderr. Since AddLLVM.cmake only expects it on stderr,
Solaris ld wasn't properly detected and options not understood by it are
passed during the build.
The following patch fixes this, allowing for both variants.
Tested on i386-pc-solaris2.11.4 (on top of D35755 which is needed for
proper Solaris support).
Patch by Rainer Orth.
Differential Revision: https://reviews.llvm.org/D39601
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318532 91177308-0d34-0410-b5e6-96231b3b80d8
Fix test as it is assuming that the cache pruning is always being
performed by default. Explicitly set prune interval to 0s to ensure
pruning is always performed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318520 91177308-0d34-0410-b5e6-96231b3b80d8
Enabling and using dwarf exceptions seems like an easier path
to take, than to make the COFF/ARM backend output EHABI directives.
Previously, no EH model was enabled at all on this target.
There's no point in setting UseIntegratedAssembler to false since
GNU binutils doesn't support Windows on ARM, and since we don't
need to support external assembler, we don't need to use register
numbers in cfi directives.
Differential Revision: https://reviews.llvm.org/D39532
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318510 91177308-0d34-0410-b5e6-96231b3b80d8
Previously we were assuming all results were vectors and calling SetWidenedVector, but if its a chain result we should just replace uses instead.
This fixes an error found by expensive checks after r318368.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318509 91177308-0d34-0410-b5e6-96231b3b80d8
The logic of replacing of a couple `RANGE_CHECK_LOWER + RANGE_CHECK_UPPER`
into `RANGE_CHECK_BOTH` in fact duplicates the logic of range intersection which
happens when we calculate safe iteration space. Effectively, the result of intersection of
these ranges doesn't differ from the range of merged range check.
We chose to remove duplicating logic in favor of code simplicity.
Differential Revision: https://reviews.llvm.org/D39589
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318508 91177308-0d34-0410-b5e6-96231b3b80d8
This was completely ignoring subregisters,
so was not very useful. Also only break them
if xnack is actually enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318505 91177308-0d34-0410-b5e6-96231b3b80d8
We might have instructions such as ext(copy(trunc)), and while cleaning
up legalization artifacts, we can also dce the copies that are in
between legalization artifacts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318501 91177308-0d34-0410-b5e6-96231b3b80d8