Simon Pilgrim [Sat, 2 Nov 2019 17:36:14 +0000 (17:36 +0000)]
X86AsmPrinter - fix uninitialized variable warnings. NFCI.
Simon Pilgrim [Sat, 2 Nov 2019 17:28:08 +0000 (17:28 +0000)]
DIEAbbrev - fix uninitialized variable warning. NFCI.
Simon Pilgrim [Sat, 2 Nov 2019 17:27:18 +0000 (17:27 +0000)]
Fix uninitialized variable warnings. NFCI.
Simon Pilgrim [Sat, 2 Nov 2019 16:45:06 +0000 (16:45 +0000)]
Fix uninitialized variable warning. NFCI.
Dávid Bolvanský [Sat, 2 Nov 2019 18:02:33 +0000 (19:02 +0100)]
Revert "[Codegen] Both sides of '&&' are same; fixed"
This reverts commit
edb42dccfafb2c0d25d19175c49d016a7c2e0b13. Buildbot timeouts.
Luboš Luňák [Sat, 2 Nov 2019 15:39:59 +0000 (16:39 +0100)]
make -ftime-trace also trace time spent creating debug info
Differential Revision: https://reviews.llvm.org/D69750
Stefan Stipanovic [Sat, 2 Nov 2019 16:31:02 +0000 (17:31 +0100)]
Revert "NoFree argument attribute."
This reverts commit
c12efa2ed0547f7f9f8fba0ad7a76a4cb08bf53a.
Simon Pilgrim [Sat, 2 Nov 2019 16:11:01 +0000 (16:11 +0000)]
TargetMachine - fix uninitialized variable warning. NFCI.
TargetPassConfig::addCoreISelPasses() always initializes O0WantsFastISel but it appeases static analyzers that complain that O0WantsFastISel isn't initialized in the constructor.
Simon Pilgrim [Sat, 2 Nov 2019 16:00:21 +0000 (16:00 +0000)]
CustomTypeNode/SpecialTableSymbolNode - fix uninitialized variable warnings. NFCI.
Dávid Bolvanský [Fri, 1 Nov 2019 23:38:09 +0000 (00:38 +0100)]
[Codegen] Both sides of '&&' are same; fixed
Summary:
Found by PVS Studio
Not familiar with this code; no testcase.
Reviewers: craig.topper, RKSimon
Reviewed By: RKSimon
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69741
Stefan Stipanovic [Sat, 2 Nov 2019 15:35:38 +0000 (16:35 +0100)]
NoFree argument attribute.
Summary: Deducing nofree atrribute for function arguments.
Reviewers: jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67886
Simon Pilgrim [Sat, 2 Nov 2019 14:42:38 +0000 (14:42 +0000)]
Fix uninitialized variable warning. NFCI.
Simon Pilgrim [Sat, 2 Nov 2019 13:38:35 +0000 (13:38 +0000)]
[X86] Move computeZeroableShuffleElements before getTargetShuffleAndZeroables. NFCI.
Prep work toward merging some of the functionality.
Roman Lebedev [Sat, 2 Nov 2019 09:39:02 +0000 (12:39 +0300)]
Revert BCmp Loop Idiom recognition transform (PR43870)
As discussed in https://bugs.llvm.org/show_bug.cgi?id=43870,
this transform is missing a crucial legality check:
the old (non-countable) loop would early-return upon first mismatch,
but there is no such guarantee for bcmp/memcmp.
We'd need to ensure that [PtrA, PtrA+NBytes) and [PtrB, PtrB+NBytes)
are fully dereferenceable memory regions. But that would limit
the transform to constant loop trip counts and would further
cripple it because dereferenceability analysis is *very* partial.
Furthermore, even if all that is done, every single test
would need to be rewritten from scratch.
So let's just give up.
Luboš Luňák [Tue, 15 Oct 2019 19:24:37 +0000 (21:24 +0200)]
python path should be platform-dependent
Because one of the installed files is the _lldb.so symlink.
Differential Revision: https://reviews.llvm.org/D68910
Craig Topper [Sat, 2 Nov 2019 07:11:48 +0000 (00:11 -0700)]
[IR] Avoid use of PointerType::getElementType() in one of the CallBrInst constructors.
We already have the FunctionType we can call getReturnType on.
I think this was due to a bad rebase of the CallBr patch while
it was in development when CallInst and InvokeInst were updated.
Pengfei Wang [Sat, 2 Nov 2019 08:18:24 +0000 (01:18 -0700)]
[X86][NFC] Fix buildbot failure on clang-x64-windows-msvc after commit
02728f49da7
Windows uses different VR numbers from Linux. So ignore the number
checking in the CHECK.
Johannes Doerfert [Sat, 2 Nov 2019 03:35:18 +0000 (22:35 -0500)]
[Attributor] Ignore BlockAddress users in call site traversal
BlockAddress users will not "call" the function so they do not qualify
as call sites in the first place. When we delete a function with
BlockAddress users we need to first remove the body so they are properly
discarded.
Johannes Doerfert [Sat, 2 Nov 2019 04:32:17 +0000 (23:32 -0500)]
[AbstractCallSite][FIX] Correct faulty assertion
When the Attributor run on the IPConstantProp test case for multiple
callbacks it triggered a faulty assertion in the AbstractCallSite
implementation. The callee can well be at argument position 0.
Craig Topper [Sat, 2 Nov 2019 06:17:23 +0000 (23:17 -0700)]
[X86] Remove FeatureSSE3 from the implies list of HasFastHorizontalOps.
HasFastHorizontalOps is a tuning flag. It shouldn't imply an ISA flag.
Johannes Doerfert [Sat, 2 Nov 2019 04:03:35 +0000 (23:03 -0500)]
[Attributor][FIX] Do not try to cast if a cast is not required
When we replace constant returns at the call site we did issue a cast in
the hopes it would be a no-op if the types are equal. Turns out that is
not the case and we have to check it ourselves first.
Reused an IPConstantProp test for coverage. No functional change to the
test wrt. IPConstantProp.
Johannes Doerfert [Sat, 2 Nov 2019 02:59:32 +0000 (21:59 -0500)]
[Attributor][FIX] Transform invoke of nounwind to call + br %normal_dest
Even if the invoked function may-return, we can replace it with a call
and branch if it is nounwind. We had almost everything in place to do
this but did not which actually caused a crash when we removed the
landingpad from the actually dead unwind block.
Exposed by the IPConstantProp tests.
Johannes Doerfert [Sat, 2 Nov 2019 02:04:54 +0000 (21:04 -0500)]
[Attributor][FIX] Make "known" and "assumed" liveness explicit
We did merge "known" and "assumed" liveness information into a single
set which caused various kinds of problems, especially because we did
not properly record when something was actually known. With this patch
we properly track the "known" bit and distinguish dead ends we know from
the ones we still need to explore in future updates.
Johannes Doerfert [Sat, 2 Nov 2019 01:17:48 +0000 (20:17 -0500)]
[Attributor] `willreturn` + `noreturn` = UB
We gave up on `noreturn` if `willreturn` was known for a while but we
now again try to always derive `noreturn`. This is useful because a
function that is `noreturn` + `willreturn` is basically dead as
executing it would lead to undefined behavior (UB).
This came up in the IPConstantProp cases where a function only contained
a unreachable but was not marked `noreturn` which caused missed
opportunities down the line.
Johannes Doerfert [Fri, 1 Nov 2019 23:45:25 +0000 (18:45 -0500)]
[Attributor][FIX] Make AAValueSimplifyArgument aware of thread-dependent constants
As in IPConstantProp, thread-dependent constants need not be propagated
over callbacks. Took the comment and test from there, see also D56447.
Johannes Doerfert [Fri, 1 Nov 2019 18:57:49 +0000 (13:57 -0500)]
[Attributor][FIX] Handle the default case of a switch
In D69605 only the "cases" of a switch were handled but if none matched
we did not make the default case life. This is fixed now and properly
tested (with code from IPConstantProp/user-with-multiple-uses.ll).
Johannes Doerfert [Fri, 1 Nov 2019 18:42:54 +0000 (13:42 -0500)]
[Attributor][FIX] Make value simplification aware of "complicated" attributes
We cannot simply replace arguments that carry attributes like `nest`,
`inalloca`, `sret`, and `byval`. Except for the last one, which we can
replace if it is not written, we bail for now.
Johannes Doerfert [Fri, 1 Nov 2019 01:15:02 +0000 (20:15 -0500)]
[Attributor][NFCI] Avoid unnecessary work except for testing
Trying to deduce information for declarations and calls sites of
declarations is not useful in practice but only for testing. Add a flag
that disables this by default but also enable it in the tests.
The misc.ll test will verify the flag "works" as expected.
Johannes Doerfert [Fri, 1 Nov 2019 01:03:13 +0000 (20:03 -0500)]
[Attributor][FIX] NoCapture is not a subsuming property
We cannot look at the subsuming positions and take their nocapture bit
as shown with the two tests for which we derived nocapture on the call
site argument and readonly on the argument of the second before.
Johannes Doerfert [Fri, 1 Nov 2019 00:45:06 +0000 (19:45 -0500)]
[Attributor][NFCI] Remove obsolete code
The code in question does not add anything as the class is a subclass of
AACallSiteReturnedFromReturnedAndMustBeExecutedContext already.
Pengfei Wang [Sat, 2 Nov 2019 04:18:09 +0000 (21:18 -0700)]
[X86] Model MXCSR for MMX FP instructions
Summary:
This patch models MXCSR and adds flag "mayRaiseFPException" for MMX FP
instructions.
Reviewers: craig.topper, andrew.w.kaylor, RKSimon, cameron.mcinally
Reviewed By: craig.topper
Subscribers: hiraditya, llvm-commits, LiuChen3
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69702
Pengfei Wang [Fri, 1 Nov 2019 06:17:07 +0000 (23:17 -0700)]
[X86] add mayRaiseFPException flag and FPCW registers for X87 instructions
Summary:
This patch adds flag "mayRaiseFPException" , FPCW and FPSW for X87 instructions which could raise
float exception.
Reviewers: pengfei, RKSimon, andrew.w.kaylor, uweigand, kpn, spatel, cameron.mcinally, craig.topper
Reviewed By: craig.topper
Subscribers: thakis, hiraditya, llvm-commits
Patch by LiuChen.
Differential Revision: https://reviews.llvm.org/D68854
Francis Visoiu Mistrih [Sat, 2 Nov 2019 04:07:40 +0000 (21:07 -0700)]
[dsymutil] Second attempt to fix dsymutil tests on non-darwin platforms
Jim Ingham [Sat, 2 Nov 2019 00:20:31 +0000 (17:20 -0700)]
Don't assume that __cxa_current_exception_type exists.
Normally you shouldn't be able to have a process with an ItaniumABI plugin
that doesn't have this symbol. But if the loader crashes before loading
libc++abi.dylib (on MacOS), then the symbol might not be present. So we
should check before accessing the pointer.
There isn't a good way to write a test for this, but the change is obvious.
Francis Visoiu Mistrih [Fri, 1 Nov 2019 23:15:07 +0000 (16:15 -0700)]
[dsymutil] Require darwin in fat binary test
dsymutil uses lipo(1) to build the fat binary, which it invokes as a
process. For that, we need to only run this test on darwin systems.
Should fix: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-ubuntu/builds/181/steps/test-check-all/logs/stdio
Francis Visoiu Mistrih [Mon, 30 Sep 2019 16:05:12 +0000 (09:05 -0700)]
[dsymutil] Add support for linking remarks
This adds support to dsymutil for linking remark files and placing them
in the final .dSYM bundle.
The result will be placed in:
* a.out.dSYM/Contents/Resources/Remarks/a.out
or
* a.out.dSYM/Contents/Resources/Remarks/a.out-<arch> for universal binaries
When multi-threaded, this runs a third thread which loops over all the
object files and parses remarks as it finds __remarks sections.
Testing this involves running dsymutil on pre-built binaries and object
files, then running llvm-bcanalyzer on the final result to check for
remarks.
Differential Revision: https://reviews.llvm.org/D69142
David Blaikie [Fri, 1 Nov 2019 22:36:15 +0000 (15:36 -0700)]
DebugInfo: Accept -gdwarf even in clang-cl
Fixes regression introduced by llvmorg-10-init-8908-g098d901bd1b
David Blaikie [Fri, 1 Nov 2019 22:17:04 +0000 (15:17 -0700)]
DebugInfo: Let -gdwarf use the toolchain default DWARF version, instead of hardcoded/aliased to -gdwarf-4
Guozhi Wei [Fri, 1 Nov 2019 21:59:08 +0000 (14:59 -0700)]
[NewPM] Add an SROA pass after loop unroll
If there is a small local array accessed in a loop, SROA can't handle memory
accesses with variant offset inside a loop, after the loop is fully unrolled,
all memory accesses to the array are with fixed offset, so now they can be
processed by SROA. But there is no more SROA passes after loop unroll. This
patch add an SROA pass after loop unroll to handle this pattern.
Differential Revision: https://reviews.llvm.org/D68593
David Blaikie [Fri, 1 Nov 2019 21:50:12 +0000 (14:50 -0700)]
DebugInfo: Streamline debug_ranges/rnglists/rnglists.dwo emission code
More code reuse, better basis for modelling
debug_loc/loclists/loclists.dwo emission support.
David Blaikie [Fri, 1 Nov 2019 21:22:29 +0000 (14:22 -0700)]
DebugInfo: (NFC) Refactor DWARF version calculation to make a future change (-fdebug-default-version) easier
Craig Topper [Fri, 1 Nov 2019 21:09:08 +0000 (14:09 -0700)]
[TargetLowering] Move the setBooleanContents check on (xor (setcc), (setcc)) == / != 1 -> (setcc) != / == (setcc) to the right place
We need to be checking the value types for the inner setccs not
the outer setcc. We need to ensure those setccs produce a 0/1
value or that the xor is on the i1 type. I think at the time
this code was originally written, getBooleanContents didn't
take any arguments so this was probably correct. But now we can
have a different boolean contents for integer and floating point.
Not sure why the other combines below the xor were also checking
the boolean contents. None of them involve any setccs other than
the outer one and they only produce a new setcc.
Differential Revision: https://reviews.llvm.org/D69480
Craig Topper [Fri, 1 Nov 2019 21:06:52 +0000 (14:06 -0700)]
[MachineBasicBlock] Skip over debug instructions in computeRegisterLiveness before checking for begin
If there are debug instructions before the stopping point,
we need to skip over them before checking for begin in order
to avoid having the debug instructions effect behavior.
Fixes PR43758.
Differential Revision: https://reviews.llvm.org/D69606
Nikita Popov [Fri, 1 Nov 2019 21:27:48 +0000 (22:27 +0100)]
[JT][CVP] Regenerate test checks, again
The changes to update_test_checks format have been disabled again,
so regenerate these tests. Also regenerate select.ll.
Michael Liao [Fri, 1 Nov 2019 19:49:41 +0000 (15:49 -0400)]
[amdgpu] Fix known bits compuation on `MUL_I24`/`MUL_U24`.
Reviewers: arsenm, rampitec
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, dstuttard, tpr, t-tye, hiraditya, llvm-commits, yaxunl
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69735
Teresa Johnson [Fri, 1 Nov 2019 17:31:02 +0000 (10:31 -0700)]
Recommit "[ThinLTO] Handle GUID collision in import global processing""
This recommits
cc0b9647b76178bc3869bbfff80535ad86366472 which was
reverted in
d39d1a2f87aca3cfabe58ecfa5146879baa70096.
I added a fix for an issue found when testing via distributed ThinLTO,
and added a test case for that failure.
Reid Kleckner [Wed, 30 Oct 2019 23:32:26 +0000 (16:32 -0700)]
[WinCFG] Handle constant casts carefully in .gfids emission
Summary:
The general Function::hasAddressTaken has two issues that make it
inappropriate for our purposes:
1. it is sensitive to dead constant users (PR43858 / crbug.com/1019970),
leading to different codegen when debu info is enabled
2. it considers direct calls via a function cast to be address escapes
The first is fixable, but the second is not, because IPO clients rely on
this behavior. They assume this function means that all call sites are
analyzable for IPO purposes.
So, implement our own analysis, which gets closer to finding functions
that may be indirect call targets.
Reviewers: ajpaverd, efriedma, hans
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69676
Sourabh Singh Tomar [Fri, 1 Nov 2019 19:58:40 +0000 (01:28 +0530)]
[NFC]: Removed an implicit capture argument from lambda.
Craig Topper [Fri, 1 Nov 2019 18:28:32 +0000 (11:28 -0700)]
[X86] Change the behavior of canWidenShuffleElements used by lowerV2X128Shuffle to match the behavior in lowerVectorShuffle with regards to zeroable elements.
Previously we marked zeroable elements in a way that prevented
the widening check from recognizing that it could widen. Now
we only mark them zeroable if V2 is an all zeros vector. This
matches what we do for widening elements in lowerVectorShuffle.
Fixes PR43866.
Reid Kleckner [Tue, 29 Oct 2019 22:57:40 +0000 (15:57 -0700)]
Warn when an output section name is longer than 8 characters
Recent versions of Microsoft's dumpbin tool cannot handle such PE files.
LLVM tools and GNU tools can, and use this to encode long section names
like ".debug_info", which is commonly used for DWARF. Don't do this in
mingw mode or when -debug:dwarf is passed, since the user probably wants
long section names for DWARF sections.
PR43754
Reviewers: ruiu, mstorsjo
Differential Revision: https://reviews.llvm.org/D69594
Vladimir Vereschaka [Fri, 1 Nov 2019 18:52:27 +0000 (11:52 -0700)]
[CMake] Add cross Windows to ARM Linux toolchain CMake cache file.
This cache file can be used to build a cross Windows to ARM Linux
toolchain.
Differential Revision: https://reviews.llvm.org/D69651
Martin Storsjö [Wed, 16 Oct 2019 12:11:50 +0000 (15:11 +0300)]
Reapply [LLDB] [test] Use %clang_cl instead of build.py in a few tests
This allows explicitly specifying the intended target architecture,
for tests that aren't supposed to be executed, and that don't
require MSVC headers or libraries to be available.
(These tests already implicitly assumed to be built for x86; one
didn't specify anything, assuming x86_64, while the other specified
--arch=32, which only picks the 32 bit variant of the default target
architecture).
Join two comment lines in disassembly.cpp, to keep row numbers
checked in the test unchanged.
This fixes running check-lldb on arm linux.
Previously when this was applied (in
95980409e6), it broke
macos buildbots, as they added "-isysroot <path>" to all %clang*
substitutions, and clang-cl didn't support that.
Reapplying it without further changes to this patch, after D69619
(
9c73925226), because now, such extra parameters are added to
%clang_host*, but not to plain %clang_cl.
Differential Revision: https://reviews.llvm.org/D69031
Reid Kleckner [Thu, 31 Oct 2019 21:00:22 +0000 (14:00 -0700)]
[debuginfo-tests] Don't look for Python 3 if we already have it
LLDB already requires Python 3 on Windows, so I already configure it
that way. For some reason CMake fails to find the one that Visual Studio
automatically installs at this standard location:
C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python37_64/python.exe
CMake prefers the python on path, which happens to be python 2.7.
Reviewers: aprantl, jmorse
Differential Revision: https://reviews.llvm.org/D69684
Joel E. Denny [Fri, 1 Nov 2019 14:14:22 +0000 (10:14 -0400)]
[lit] Fix internal env calling env
Without this patch, when using lit's internal shell, if `env` on a lit
RUN line calls `env`, lit accidentally searches for the latter as an
external executable. What's worse is that works fine when a developer
is testing on a platform where `env` is available and behaves as
expected, but it then breaks on other platforms.
`env` calling `env` can make sense if one such `env` is within a lit
substitution, as in D65156 and D65121. This patch ensures that lit
executes both as internal commands.
Reviewed By: probinson, mgorny, rnk
Differential Revision: https://reviews.llvm.org/D65697
Fangrui Song [Fri, 1 Nov 2019 18:07:21 +0000 (11:07 -0700)]
[MIPS GlobalISel] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after D69663
Siva Chandra Reddy [Tue, 15 Oct 2019 20:25:36 +0000 (13:25 -0700)]
Illustrate a redirector using the example of round function from math.h.
Setup demonstrated in this patch is only for ELF-ish platforms.
Also note:
1. Use of redirectors is a temporary scheme. They will be removed once
LLVM-libc has implementations for the redirected functions.
2. Redirectors are optional. One can choose to not include them in the
LLVM-libc build for their platform.
3. Even with redirectors used, we want to link to the system libc
dynamically.
Reviewers: dlj, hfinkel, jakehehrlich, phosek, stanshebs, theraven, alexshap
Subscribers: mgorny, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D69020
Simon Pilgrim [Fri, 1 Nov 2019 17:55:18 +0000 (17:55 +0000)]
[X86][AVX] Add support for and/or scalar bool reduction with AVX512 mask registers
combineBitcastvxi1 only handles bitcast->MOVMSK combines, with mask registers we use BITCAST directly.
Jonas Devlieghere [Fri, 1 Nov 2019 17:43:39 +0000 (10:43 -0700)]
[dsymutil] Add DW_TAG_common_block to dieNeedsChildrenToBeMeaningful
Ensure we walk the children of common blocks when deciding what DIEs to
keep. Otherwise we might incorrectly discard them leading to missing
variables in the linked debug info.
This also sorts the list of DW_TAGs alphabetically.
Evgenii Stepanov [Fri, 18 Oct 2019 19:32:21 +0000 (12:32 -0700)]
Add MemTagSanitizer documentation.
Summary: A lot of this is work in progress...
Reviewers: kcc, pcc
Subscribers: cryptoad, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69289
Thomas Lively [Fri, 1 Nov 2019 01:28:02 +0000 (18:28 -0700)]
[WebAssembly] Add experimental SIMD dot product instruction
Summary:
This instruction is not merged to the spec proposal, but we need it to
be implemented in the toolchain to experiment with it. It is available
only on an opt-in basis through a clang builtin.
Defined in https://github.com/WebAssembly/simd/pull/127.
Depends on D69696.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D69697
Craig Topper [Fri, 1 Nov 2019 17:18:54 +0000 (10:18 -0700)]
[LV] Move interleave_short_tc.ll into the X86 directory to hopefully make fix non-X86 bots.
Thomas Lively [Fri, 1 Nov 2019 17:21:00 +0000 (10:21 -0700)]
Reland "[WebAssembly] Expand setcc of v2i64"
This reverts commit
e5cae5692b5899631b5bfe5c23234deb5efda10c, which
reverted
11850a6305c5778b180243eb06aefe86762dd4ce. The original revert
was done because of breakage that was actually in a separate commit,
2ab1b8c1ec452fb743f6cc5051e75a01039cabfe, which was also reverted and
has since been fixed and relanded.
kristina [Fri, 1 Nov 2019 17:27:24 +0000 (17:27 +0000)]
[Support] Use /proc/self/exe for GNU Hurd
Use `/proc/self/exe` to get the current executable
path on GNU Hurd.
Patch by sthibaul (Samuel Thibault)
Differential Revision: https://reviews.llvm.org/D69683
Simon Pilgrim [Fri, 1 Nov 2019 17:08:39 +0000 (17:08 +0000)]
[X86] isFNEG - use switch() instead of if-else tree. NFCI.
In a future patch this will avoid some checks which don't need to be done for some opcodes.
Evgenii Stepanov [Fri, 1 Nov 2019 17:04:38 +0000 (10:04 -0700)]
Disable exceptions in libfuzzer's copy of libcxxabi.
External project configuration for libcxxabi now has exceptions on by
default, but this is not needed for libfuzzer.
Teresa Johnson [Fri, 1 Nov 2019 16:43:06 +0000 (09:43 -0700)]
Revert "[LLD][ThinLTO] Handle GUID collision in import global processing"
This reverts commit
cc0b9647b76178bc3869bbfff80535ad86366472.
The commit is causing a failure in internal testing. Will recommit with
a fix later.
Fangrui Song [Fri, 1 Nov 2019 16:45:27 +0000 (09:45 -0700)]
[X86] Fix -DBUILD_SHARED_LIBS=on builds after D69568/llvmorg-10-init-8877-g3a399c09878
In -DBUILD_SHARED_LIBS=on builds, a component must specify its direct dependencies to satisfy -Wl,-z,defs (added by llvm/modules/HandleLLVMOptions.cmake).
Core is a direct dependency via transitive header inclusion:
ld.lld: error: undefined symbol: llvm::LLVMContext::LLVMContext()
>>> referenced by MachineSizeOptsTest.cpp
>>> unittests/Target/X86/CMakeFiles/X86Tests.dir/MachineSizeOptsTest.cpp.o:(testing::internal::TestFactoryImpl<(anonymous namespace)::MachineSizeOptsTest_Test_Test>::CreateTest())
MC is a direct dependency via transitive header inclusion:
ld.lld: error: undefined symbol: llvm::MCTargetOptions::MCTargetOptions()
>>> referenced by MachineSizeOptsTest.cpp
>>> unittests/Target/X86/CMakeFiles/X86Tests.dir/MachineSizeOptsTest.cpp.o:((anonymous namespace)::MachineSizeOptsTest::SetUp())
Johannes Doerfert [Fri, 1 Nov 2019 16:17:27 +0000 (11:17 -0500)]
[Utils] Hide the default behavior change of D68819 under a flag
With D69701, the options used when running the script on a file will be
recorded and reused on a rerun. This allows us to hide new features
behind flags, starting with the "define" that was introduced in D68819.
Hiroshi Yamauchi [Tue, 29 Oct 2019 16:23:14 +0000 (09:23 -0700)]
Remove unnecessary unit test dependencies.
Summary: This is to address comment on D69409.
Reviewers: davidxl, thakis
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69568
Saleem Abdulrasool [Fri, 1 Nov 2019 16:12:03 +0000 (09:12 -0700)]
llvm-config: emit the C++ standard flag into CXXFLAGS
This recovers the now "missing" flag as this is controlled by CMake
rather than injected into the user defined flags list. This is
primarily needed by LDC and other out-of-tree users which do not
correctly setup the C++ flags.
Sanjay Patel [Fri, 1 Nov 2019 16:07:09 +0000 (12:07 -0400)]
[InstCombine] regenerate test checks; NFC
Avoid subsequent test noise from improved CHECK-LABEL matching.
Oliver Stannard [Fri, 1 Nov 2019 16:00:07 +0000 (16:00 +0000)]
Revert "[AArch64][MachineOutliner] Return address signing for outlined functions"
This is causing faults when an instruction which modifies SP is
outlined, causing the PAC and AUT instructions to not match.
This reverts commits
70caa1fc30c392974df3bccd9959765dae1779f6 and
55314d323738e4a8c1890b6a6e5064e7f4e0da1c.
Yitzhak Mandelbaum [Wed, 30 Oct 2019 18:57:52 +0000 (14:57 -0400)]
[libTooling] Add Stencil constructor.
Summary:
Adds a constructor that takes a vector with which to initialize the `Parts`
field and a corresponding free function that forwards to the constructor. These
definitions are needed to assist in transitioning away from `Stencil` as a class
to defining it as a type alias.
Reviewers: ilya-biryukov
Subscribers: cfe-commits, gribozavr
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69632
JonChesterfield [Fri, 1 Nov 2019 14:58:39 +0000 (14:58 +0000)]
[libomptarget] Implement target_impl for amdgcn
Summary:
[libomptarget] Implement target_impl for amdgcn
Smallest atomic addition for a new target. Implements enough of the amdgcn
specific code that some of the source files under nvptx/src could be compiled,
without modification, to run on amdgcn.
This foreshadows a work in progress patch to move said source out of nvptx/src.
Patch based on fork at https://github.com/ROCm-Developer-Tools/llvm-project
Reviewers: ABataev, jdoerfert, grokos, ronlieb
Subscribers: jvesely, jfb, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D69718
Bjorn Pettersson [Fri, 25 Oct 2019 17:03:18 +0000 (19:03 +0200)]
[LDV][RAGreedy] Inform LiveDebugVariables about new VRegs added by InlineSpiller
Summary:
Make sure RAGreedy informs LiveDebugVariables about new VRegs
that is introduced at spill by InlineSpiller.
Consider this example
LDV: !"var" [48r;128r):0 Loc0=%2
48B %2 = ...
...
128B %7 = ADD %2, ...
If %2 is spilled the InlineSpiller will insert spill/reload
instructions and introduces some new vregs. So we get
48B %4 = ...
56B spill %4
...
120B reload %5
128B %3 = ADD %5, ...
In the past we did not inform LDV about this, and when reintroducing
DBG_VALUE instruction LDV still got information that "var" had the
location of the spilled register %2 for the interval [48r;128r).
The result was bad, since we mapped "var" to the spill slot even
before the spill happened:
%4 = ...
DBG_VALUE %spill.0, !"var"
spill %4 to %spill.0
...
reload %5
%3 = ADD %5, ...
This patch will inform LDV about the interval split introduced
due to spilling. So the location map in LDV will become
!"var" [48r;56r):1 [56r;120r):0 [120r;128r):2 Loc0=%2 Loc1=%4 Loc2=%5
And when inserting DBG_VALUE instructions we get
%4 = ...
DBG_VALUE %4, !"var"
spill %4 to %spill.0
DBG_VALUE %spill.0, !"var"
...
reload %5
DBG_VALUE %5, !"var"
%3 = ADD %5, ...
Fixes: https://bugs.llvm.org/show_bug.cgi?id=38899
Reviewers: jmorse, vsk, aprantl
Reviewed By: jmorse
Subscribers: dstenb, wuzish, MatzeB, qcolombet, nemanjai, hiraditya, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69584
LLVM GN Syncbot [Fri, 1 Nov 2019 15:17:32 +0000 (15:17 +0000)]
gn build: Merge
d36a0333102
Anton Bikineev [Fri, 25 Oct 2019 11:03:53 +0000 (13:03 +0200)]
[clang-tidy] New checker performance-trivially-destructible-check
Checks for types which can be made trivially-destructible by removing
out-of-line defaulted destructor declarations.
The check is motivated by the work on C++ garbage collector in Blink
(rendering engine for Chrome), which strives to minimize destructors and
improve runtime of sweeping phase.
In the entire chromium codebase the check hits over 2000 times.
Differential Revision: https://reviews.llvm.org/D69435
Momchil Velikov [Fri, 1 Nov 2019 15:01:36 +0000 (15:01 +0000)]
[AArch64] Output the pseudo SPACE in asm and object files
Summary: It outputs nothing, but is useful for writing tests, checking asm output.
Reviewers: t.p.northover, ostannard, tellenbach
Reviewed By: tellenbach
Subscribers: tellenbach, kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69185
Change-Id: I6b58310e9e5632f0976d2000ce975ee28df90ebe
James Henderson [Fri, 1 Nov 2019 14:07:34 +0000 (14:07 +0000)]
[Object] Remove extra space in error message
Previously this message had a double space in it.
Jeremy Morse [Fri, 1 Nov 2019 13:56:31 +0000 (13:56 +0000)]
[Dexter] Continue sprinking no-location fixes
Example failure:
http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/3255/testReport/junit/debuginfo-tests/dexter-tests/asan_c/
The tests themselves seem to be working, it's just unexplored paths within
dexter that are flaking out.
Sven van Haastregt [Fri, 1 Nov 2019 13:56:43 +0000 (13:56 +0000)]
[OpenCL] Support -fdeclare-opencl-builtins in C++ mode
Support for C++ mode was accidentally lacking due to not checking the
OpenCLCPlusPlus LangOpts version.
Differential Revision: https://reviews.llvm.org/D69233
Alexey Bataev [Fri, 1 Nov 2019 13:42:46 +0000 (09:42 -0400)]
[LIBOMPTARGET]Call GetLaneId function, do not use its address in debug
log functions.
Jeremy Morse [Fri, 1 Nov 2019 13:41:56 +0000 (13:41 +0000)]
[Dexter] Account for another no-lineno scenario
This is another part of Dexter that had never seen a missing source
location before, now newly turning up on Darwin.
Jeremy Morse [Fri, 1 Nov 2019 13:20:26 +0000 (13:20 +0000)]
[Dexter] Cope better with empty source locations
When running a program, Dexter single steps if it's in one of the source
files under test, or free-runs if it isn't. Handle the circumstance where
the current source file simply isn't known.
Sanjay Patel [Fri, 1 Nov 2019 13:27:20 +0000 (09:27 -0400)]
[SLP] avoid 'tmp' value name conflict with auto-generated CHECK script; NFC
The script uses 'TMP#' as its substitute for nameless values,
so if a test already contains 'tmp#' *named* values, then
there could be trouble. We should probably just fix the
script to avoid this problem going forward, but it's easy
enough to change a test too (and explicitly naming variables
'tmp' is always a sad choice).
Sanjay Patel [Fri, 1 Nov 2019 13:25:08 +0000 (09:25 -0400)]
[SLP] avoid 'tmp' value name conflict with auto-generated CHECK script; NFC
The script uses 'TMP#' as its substitute for nameless values,
so if a test already contains 'tmp#' *named* values, then
there could be trouble. We should probably just fix the
script to avoid this problem going forward, but it's easy
enough to change a test too (and explicitly naming variables
'tmp' is always a sad choice).
Sanjay Patel [Fri, 1 Nov 2019 13:09:53 +0000 (09:09 -0400)]
[SLP] avoid 'tmp' value name conflict with auto-generated CHECK script; NFC
The script uses 'TMP#' as its substitute for nameless values,
so if a test already contains 'tmp#' *named* values, then
there could be trouble. We should probably just fix the
script to avoid this problem going forward, but it's easy
enough to change a test too (and explicitly naming variables
'tmp' is always a sad choice).
Jeremy Morse [Fri, 1 Nov 2019 13:09:37 +0000 (13:09 +0000)]
Unmask dexter debuginfo tests on Darwin
These tests almost certainly work on Darwin anyway, I just wanted to
keep things in a fixed, working configuration, while pushing Dexter
up.
I've left Windows unsupported as the dexter command line will need further
adjustment to run dbgeng. This can be abstracted through the %dexter
substitution, but is a task for another time.
Dávid Bolvanský [Fri, 1 Nov 2019 12:46:05 +0000 (13:46 +0100)]
[libcxx] Disable -Wconstant-evaluated for testsuite
Reviewers: EricWF
Subscribers: christof, ldionne, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D69708
Jeremy Morse [Fri, 1 Nov 2019 12:29:42 +0000 (12:29 +0000)]
Fix a brain-fail with debuginfo-tests/dexter internal tests
I baked the "test" subcommand into the %dexter substituion, as that's
what all of the dexter tests use. However I forgot about the internal
tests for whether dexters features are working. Install a %dexter_base
command to allow those tests to call dexter.py directly, and un-xfail
the tests on darwin.
Update too the list of paths the unittests shouldn't try and cover, as it
tries to load dbgeng on unix machines. Ideally we wouldn't be using this
method of test discovery in the future.
Petar Avramovic [Fri, 1 Nov 2019 12:24:07 +0000 (13:24 +0100)]
[MIPS GlobalISel] Improve reg bank handling in MipsInstructionSelector
Introduce helper methods and refactor pieces of code related to
register banks in MipsInstructionSelector.
Add a few detailed asserts in order to get a better overview
of LLT, register bank combinations that are supported at the moment
and reduce need to look at other files.
Differential Revision: https://reviews.llvm.org/D69663
evgeny [Fri, 1 Nov 2019 11:43:51 +0000 (14:43 +0300)]
[LegacyPM] Fix pass structure dumping
If module pass uses on-demand function analyses then structure is being
displayed incorrectly because FunctionPassManagerImpl can't dump contained
FPPassManager instances.
Differential revision: https://reviews.llvm.org/D69315
James Henderson [Fri, 1 Nov 2019 10:27:00 +0000 (10:27 +0000)]
[NFC][llvm-readobj] Split getSectionIndexName function into two
getSectionIndexName was trying to fetch two things at once, which led to
a somewhat tricky to understand interface involving passing output
parameters in, and also made it hard to return Errors further up the
stack.
This change is in preparation for changing the error handling.
Additionally, update a related test now that yaml2obj supports
SHT_SYMTAB_SHNDX properly (see
d3963051c490), and add missing LLVM-style
coverage for symbols with shndx SHN_XINDEX. This test (after fixing)
caught a mistake in my first attempt at this patch, hence I'm including
it as part of this patch.
Reviewed by: grimar, MaskRay
Differential Revision: https://reviews.llvm.org/D69670
James Henderson [Fri, 1 Nov 2019 10:16:40 +0000 (10:16 +0000)]
[NFC][llvm-readobj] Pull common code into a helper
This will make planned changes to this code easier to make.
Reviewed by: MaskRay, grimar
Differential Revision: https://reviews.llvm.org/D69669
Kerry McLaughlin [Fri, 1 Nov 2019 10:40:36 +0000 (10:40 +0000)]
[AArch64][SVE] Implement several floating-point arithmetic intrinsics
Summary:
Adds intrinsics for the following:
- fabd, fadd, fsub & fsubr
- fmul, fmulx, fdiv & fdivr
- fmax, fmaxnm, fmin & fminnm
- fscale & ftsmul
Reviewers: huntergr, sdesmalen, dancgr
Reviewed By: sdesmalen
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cameron.mcinally, cfe-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69657
Roman Tereshin [Thu, 31 Oct 2019 03:58:46 +0000 (20:58 -0700)]
[GlobalISel] Match table opt: fix a bug in matching num of operands
If there is a dag node with a variable number of operands that has at
least N operands (for some non-negative N), and multiple patterns with
that node with different number of operands, we would drop the number of
operands check in patterns with N operands, presumably because it's
guaranteed in such case that none of the per-operand checks will access
the operand list out-of-bounds.
Except semantically the check is about having exactly N operands, not at
least N operands, and a backend might rely on it to disambiguate
different patterns.
In this patch we change the condition on emitting the number of operands
check from "the instruction is not guaranteed to have at least as many
operands as are checked by the pattern being matched" to "the
instruction is not guaranteed to have a specific number of operands".
We're relying (still) on the rest of the CodeGenPatterns mechanics to
validate that the pattern itself doesn't try to access more operands
than there is in the instruction in cases when the instruction does have
fixed number of operands, and on the machine verifier to validate at
runtime that particular MIs like that satisfy the constraint as well.
Reviewers: dsanders, qcolombet
Reviewed By: qcolombet
Subscribers: arsenm, rovka, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69653
Martin Storsjö [Fri, 1 Nov 2019 07:20:51 +0000 (09:20 +0200)]
[compiler-rt] [profile] Fix building for MinGW after
d889d1efefe9f
This commit added use of a Windows API in InstrProfilingPort.h.
When _MSC_VER is defined (for MSVC), windows.h is already included
earlier in the same header (for atomics), but MinGW, the gcc
atomics builtins are used instead. Therefore explicitly include
windows.h here, where the API is used.
Matt Arsenault [Mon, 28 Oct 2019 06:38:52 +0000 (23:38 -0700)]
AMDGPU: Add default denormal mode to MachineFunctionInfo
The default FP mode should really be a property of a specific
function, and not a subtarget. Introduce the necessary fields to the
SIMachineFunctionInfo to help move towards this goal.
David Zarzycki [Thu, 31 Oct 2019 10:30:53 +0000 (12:30 +0200)]
[X86] Reland: Enable YMM memcmp with AVX1
Update TargetTransformInfo to allow AVX1 to use YMM registers for memcmp.
This is a follow up to D68632 which enabled XOR compares which made this possible.
This also updates the memcmp-optsize.ll test unlike the first patch.
https://reviews.llvm.org/D69658
Simon Atanasyan [Wed, 30 Oct 2019 16:52:16 +0000 (19:52 +0300)]
[utils] Reflow asm check generation to tolerate blank lines
This change introduces two fixes. The second fix allows to generate
a test to check the first fix.
- Output `CHECK-EMPTY` prefix for an empty line in ASM output. Before that
fix `update_llc_test_checks.py` incorrectly emits `CHECK-NEXT: <space>`
prefix.
- Fix the `ASM_FUNCTION_MIPS_RE` regex to stop on a real function
epilogue not on an inline assembler prologue and include inline
assembler code into a test.
Differential Revision: https://reviews.llvm.org/D47192