With the introduction of the typed byval attribute change there was no
way that the LLVM-C API could create the correct class Attribute. If a
program that uses the C API creates a ByVal attribute and annotates a
function with that attribute LLVM will crash when it assembles or write
that module containing the function out as bitcode.
This change is a minimal fix to at least allow code to work, this is
because the byval change is on the 9.0 and I don't want to introduce new
LLVM-C API this late in the release cycle.
By Jakob Bornecrantz!
Differential revision: https://reviews.llvm.org/D66144
llvm-svn: 370176
It was added in r370129 with a .gitattributes file that means the file
always shows up as having a local diff in Git checkouts (at least on
Linux). Deleting it until we can figure out the right way to do this.
llvm-svn: 370175
Allow vectorizing loops that have reductions when tail is folded by masking.
A select is introduced in VPlan, choosing between the last value carried by the
loop-exit/live-out instruction of the reduction, and the penultimate value
carried by the reduction phi, according to the "i < n" mask of fold-tail.
This select replaces the last value as the live-out value of the loop.
Differential Revision: https://reviews.llvm.org/D66720
llvm-svn: 370173
This essentially reverts the code change of D63132 and switches to a simpler approach.
In an executable/shared object, st_shndx of a symbol can be:
1) SHN_UNDEF: undefined symbol (or canonical PLT)
2) SHN_ABS: absolute symbol
3) any other value (usually a regular section index) represents a relative symbol.
The actual value does not matter.
Many ld.so (musl, all archs except MIPS of FreeBSD rtld-elf) even treat 2) and 3)
the same. If .sdata does not exist, it does not matter what value/section
__global_pointer$ has, as long as it is relative (otherwise there will be a pedantic
lld error. See D63132). Just set the st_shndx arbitrarily to 1.
Dummy st_shndx=1 may be used by __rela_iplt_start, linker-script-defined symbols outside a section, __dso_handle, etc.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D66798
llvm-svn: 370172
rL369567 reverted a couple of recent changes made to ARMParallelDSP
because of a miscompilation error: PR43073.
The issue stemmed from an underlying bug that was caused by adding
muls into a reduction before it was proved that they could be executed
in parallel with another mul.
Most of the changes here are from the previously reverted commits.
The additional changes have been made area:
1) The Search function now doesn't insert any muls into the Reduction
object. That now happens once the search has successfully finished.
2) For any muls added into the reduction but that weren't paired, we
accumulate their values as an input into the smlad.
Differential Revision: https://reviews.llvm.org/D66660
llvm-svn: 370171
"Bad block found.\n" -> "bad block found"
The lower cased form with no full stop or newline is more common in LLVM
tools.
Reviewed By: juliehockett
Differential Revision: https://reviews.llvm.org/D66783
llvm-svn: 370155
This fixes sanitizer-x86_64-linux-fuzzer which switched to new layout and not it
can't link as libcxx is always there.
We should support and tests libcxx but still it was unexpected that libfuzzer
ignored LLVM_ENABLE_PROJECTS_USED.
llvm-svn: 370153
A new SPI was added to the objc runtime to get class names without
any demangling; AppleObjCRuntimeV2::ParseClassInfoArray was using
the original prototype name but had not been updated for the final
name yet, so lldb was falling back to the old function and doing
extra work for classes that were demangled. This commit fixes that.
llvm-svn: 370152
Summary:
[libomptarget] Refactor syncwarp macro to inline function
See also abandoned D66846, split into this diff and others.
Reviewers: jdoerfert, ABataev, grokos, ronlieb, gregrodgers
Subscribers: openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D66857
llvm-svn: 370149
Summary:
[libomptarget] Refactor shfl_down_sync macro to inline function
See also abandoned D66846, split into this diff and others.
Reviewers: jdoerfert, ABataev, grokos, ronlieb, gregrodgers
Subscribers: openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D66853
llvm-svn: 370146
Summary:
[libomptarget] Refactor shfl_sync macro to inline function
See also abandoned D66846, split into this diff and others.
Reviewers: jdoerfert, ABataev, grokos, ronlieb, gregrodgers
Subscribers: openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D66852
llvm-svn: 370144
Bundler currently requires host triple to be provided no matter if you are performing bundling or unbundling, but for unbundling operation such requirement is too restrictive. You may for example want to examine device part of the object for a particular offload target, but you have to extract host part as well even though you do not need it. Host triple isn't really needed for unbundling, so this patch removes that requirement.
Differential Revision: https://reviews.llvm.org/D66601
llvm-svn: 370143
Setting DYLD_INSERT_LIBRARIES to the Asan runtime and DYLD_LIBRARY_PATH
to the LLVM shared library dir causes the test suite to crash with a
segfault. We see this on the LLDB sanitized bot [1] on GreenDragon. I've
spent some time investigating, but I'm not sure what's going on (yet).
Originally I thought this was because we were building compiler-rt and
were loading an incompatible, just-built Asan library. However, the
issue persists even without compiler-rt. It doesn't look like the Asan
runtime is opening any other libraries that might be found in LLVM's
shared library dir and talking to the team confirms that. Another
possible explanation is that we're loading lldb form a place we don't
expect, but that doesn't make sense either, because DYLD_LIBRARY_PATH is
always set without the crash. I tried different Python versions and
interpreters but the issue persist.
As a (temporary?) workaround I propose not setting DYLD_LIBRARY_PATH
when DYLD_INSERT_LIBRARIES is set so we can turn the Asan bot on again
and get useful results.
[1] http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-sanitized/
Differential revision: https://reviews.llvm.org/D66845
llvm-svn: 370135
When checking if block types are compatible, we are checking for
compatibility their return types and parameters' types. As these types
have different variance, we need to check them in different order.
rdar://problem/52788423
Reviewers: erik.pilkington, arphaman
Reviewed By: arphaman
Subscribers: jkorous, dexonsmith, ributzka, cfe-commits
Differential Revision: https://reviews.llvm.org/D66831
llvm-svn: 370130
Previously, an #error directive with quoted, multi-line content, along with CR+LF line endings wasn't handled correctly.
Differential Revision: https://reviews.llvm.org/D66556
llvm-svn: 370129
Adds --growable-table flag to handle building wasm modules with tables
that can grow.
Wasm tables that we use to store function pointers. In order to add functions
to that table at runtime, we need to either preallocate space, or grow the table.
In order to specify a table with no maximum size, we need some flag to handle
that case, separately from a potential --max-table-size= flag.
Note that the number of elements in the table isn't knowable until link-time,
so it's unclear if we will want a --max-table-size= flag in the future.
llvm-svn: 370127
This reverts commit r367842 since it wasn't quite as NFC as advertised
and broke Swift support. See https://reviews.llvm.org/D46083 for the
rationale behind the original functionality.
rdar://problem/54619322
llvm-svn: 370126
Use attribute flag `POSIX_SPAWN_CLOEXEC_DEFAULT` in the call to
`posix_spawn`.
If this flag is set, then only file descriptors explicitly described by
the file_actions argument are available in the spawned process; all of
the other file descriptors are automatically closed in the spawned
process.
POSIX_SPAWN_CLOEXEC_DEFAULT is an Apple-specific extension.
llvm-svn: 370121
clang-offload-bundler tool may hang under certain conditions when it extracts a subset of all available device bundles from the fat binary that is handled by the BinaryFileHandler. This patch fixes this problem.
Differential Revision: https://reviews.llvm.org/D66598
llvm-svn: 370115
I accidentally made the CHECK line stricter when committing D65322.
While it happens to work for Linux and FreeBSD, it broke on Darwin.
This commit restores the previous behaviour.
llvm-svn: 370110
This was reported as part of a bug report that ended up being a
duplicate for r340609, but I'm adding the test case since it's
ever so slightly different from what we had before.
llvm-svn: 370109
This implements the DWARF 5 feature described in:
http://dwarfstd.org/ShowIssue.php?issue=141212.1
To support recognizing anonymous structs:
struct A {
struct { // Anonymous struct
int y;
};
} a;
This patch adds support in CGDebugInfo::CreateLimitedType(...) for this new flag and an accompanying test to verify this feature.
Differential Revision: https://reviews.llvm.org/D66667
llvm-svn: 370107
Summary:
The environment variable ANDROID_ADB_SERVER_PORT can be defined to have
adbd litsen on a different port. Teach lldb how to understand this via
simply checking the env var.
Reviewers: xiaobai, clayborg
Subscribers: srhines
Differential Revision: https://reviews.llvm.org/D66689
llvm-svn: 370106
This change moves the actual stack pointer manipulation into the legalizer,
available to targets via lower(). The codegen is slightly different because
we're using explicit masks instead of G_PTRMASK, and using G_SUB rather than
adding a negative amount via G_GEP.
Differential Revision: https://reviews.llvm.org/D66678
llvm-svn: 370104