Commit Graph

313822 Commits

Author SHA1 Message Date
Martin Storsjo c90045bf10 [CMake] Fix statically linking in libcxxabi if built separately
In this case, CMake doesn't know about the c++abi target within the
same CMake run.

This reverts this aspect back to how it was before SVN r357811.

Differential Revision: https://reviews.llvm.org/D60448

llvm-svn: 358009
2019-04-09 14:31:09 +00:00
Sanjay Patel 7563b65ad4 [InstCombine] add tests for sdiv-by-int-min; NFC
llvm-svn: 358008
2019-04-09 14:27:07 +00:00
Sanjay Patel d469954d61 [InstCombine] auto-generate complete test checks; NFC
llvm-svn: 358007
2019-04-09 14:27:03 +00:00
Raphael Isemann fa26c20eba Fixed comment as pointed out by post-commit review of D59845
llvm-svn: 358006
2019-04-09 14:18:23 +00:00
Sanjay Patel f62dcea7ed [InstCombine] prevent possible miscompile with negate+sdiv of vector op
// 0 - (X sdiv C)  -> (X sdiv -C)  provided the negation doesn't overflow.

This fold has been around for many years and nobody noticed the potential
vector miscompile from overflow until recently...
So it seems unlikely that there's much demand for a vector sdiv optimization
on arbitrary vector constants, so just limit the matching to splat constants
to avoid the possible bug.

Differential Revision: https://reviews.llvm.org/D60426

llvm-svn: 358005
2019-04-09 14:09:06 +00:00
Nico Weber af5834596b gn build: Fix Windows builds after r357797
llvm-svn: 358004
2019-04-09 14:02:02 +00:00
Sanjay Patel a230bb5fc0 [InstCombine] add tests/comments for negate+sdiv; NFC
llvm-svn: 358003
2019-04-09 13:41:29 +00:00
Tom Stellard 32b65345c5 Add support for detection of devtoolset-8
Summary:
The current llvm/clang et al. project can be built with the latest developer toolset (devtoolset-8) on RHEL, which provides GCC 8.2.1.
However, the result compiler will not identify this toolset itself when compiling programs, which is of course not desirable.

After the patch - which simply adds the name of the developer toolset to the existing list - it gets identified and selected, as shown below:

[bamboo@bamboo llvm-project]$ clang -v
clang version 9.0.0 (https://github.com/llvm/llvm-project.git e5ac385fb1)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/bamboo/llvm/bin
Found candidate GCC installation: /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1
Found candidate GCC installation: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
Found candidate GCC installation: /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Selected GCC installation: /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

Patch By: Radu-Adrian Popescu

Reviewers: tstellar, fedor.sergeev

Reviewed By: tstellar

Subscribers: jdoerfert, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59987

llvm-svn: 358002
2019-04-09 13:26:10 +00:00
Nemanja Ivanovic 820b90318f NFC: Refactor library-specific mappings of scalar maths functions to their vector counterparts
This patch factors out mappings of scalar maths functions to their vector
counterparts from TargetLibraryInfo.cpp to a separate VecFuncs.def file. Such
mappings are currently available for Accelerate framework, and SVML library.

This is in support of the follow-up: https://reviews.llvm.org/D59881

Patch by pjeeva01

Differential revision: https://reviews.llvm.org/D60211

llvm-svn: 358001
2019-04-09 13:21:11 +00:00
Chen Zheng 11cf397292 [InstCombine] add more testcases for canonicalize (-X s/ Y) to -(X s/ Y).
llvm-svn: 358000
2019-04-09 12:47:29 +00:00
Simon Pilgrim 55f79ef9fe [TargetLowering] SimplifyDemandedBits - Remove GetDemandedSrcMask lambda. NFCI.
An older version of this could return false but now that this always succeeds we can just inline and simplify it.

llvm-svn: 357999
2019-04-09 12:29:26 +00:00
Anton Afanasyev 03c3e0d3bf Improve hashing for time profiler
Summary:
Use optimized hashing while writing time trace by join two hashes to one.
Used for -ftime-trace option.

Reviewers: rnk, takuto.ikuta

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60404

llvm-svn: 357998
2019-04-09 12:18:44 +00:00
Chih-Mao Chen 23e23836d5 Move tests in r357996 to correct location within monorepo
llvm-svn: 357997
2019-04-09 11:46:47 +00:00
Chih-Mao Chen 00100b5d0d [RISCV] Rewrite tests to use llvm-mc/llvm-objdump
Previously the tests in lld for RISC-V were given in yaml format as
LLVM's RISC-V assembler support was incomplete. Now that the
assembler/disassembler has matured we can rewrite all tests to use
LLVM's tools.

Differential Revision: https://reviews.llvm.org/D60415

llvm-svn: 357996
2019-04-09 11:39:50 +00:00
Chih-Mao Chen 949570ce39 [RISCV] Fix range check for HI20/LO12/RVC_LUI relocations
The code previously specified a 32-bit range for R_RISCV_HI20 and
R_RISCV_LO12_[IS], however this is incorrect as the maximum offset on
RV64 that can be formed from the immediate of lui and the displacement
of an I-type or S-type instruction is -0x80000800 to 0x7ffff7ff. There
is also the same issue with a c.lui and LO12 pair, whose actual
addressable range should be -0x20800 to 0x1f7ff.

The tests will be included in the next patch that converts all RISC-V
tests to use llvm-mc instead of yaml2obj, as assembler support has
matured enough to write tests in them.

Differential Revision: https://reviews.llvm.org/D60414

llvm-svn: 357995
2019-04-09 11:39:23 +00:00
Andi-Bogdan Postelnicu 965c5812f4 ClangTidy: Avoid mixing stdout with stderror when dealing with a large number of files.
Summary:
At Mozilla we are using this tool in order to perform review-time static-analysis, since some patches contain a large number of files we've discovered this issue, where `stderr` gets mixed with `stdout` thus obfuscating our possibility to parse the output.
The patch that we are currently use can be found [here](https://searchfox.org/mozilla-central/source/build/build-clang/clang-tidy-8.patch).

This is just an upstream of the original patch.

Reviewers: JonasToth

Reviewed By: JonasToth

Subscribers: cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D60453

llvm-svn: 357994
2019-04-09 11:17:02 +00:00
Alex Bradbury 91542e14c7 [RISCV] Unbreak test from r357989
There were some errors in the committed test checks, left in due to a git
stash apply mishap.

llvm-svn: 357993
2019-04-09 10:44:47 +00:00
Simon Pilgrim 345eacd555 [TargetLowering] SimplifyDemandedBits - call SimplifyDemandedBits in bitcast handling
When bitcasting from a source op to a larger bitwidth op, split the demanded bits and OR them on top of one another and demand those merged bits in the SimplifyDemandedBits call on the source op.

llvm-svn: 357992
2019-04-09 10:27:59 +00:00
Alex Bradbury fa3eb12010 [RISCV][NFC] Minor fixup for r357989
One of the tests in riscv64-lp64-lp64f-lp64d would have had a different
lowering for lp64f/lp64d as a float argument was missed.

llvm-svn: 357991
2019-04-09 10:25:05 +00:00
Simon Pilgrim 563f35ab2d [llvm-rtdyld] Fix missing include on MSVC builds.
llvm-svn: 357990
2019-04-09 10:15:10 +00:00
Alex Bradbury c0e8231cdd [RISCV][NFC] Refactor RISC-V ABI lowering tests in preparation for hard float patches
Split tests in to files representing the subset of RISC-V ABIs they should
have identical output for.

llvm-svn: 357989
2019-04-09 10:12:49 +00:00
David Stenberg 2028ae975c [DebugInfo] Pass all values in DebugLocEntry's constructor, NFC
Summary:
With MergeValues() removed, amend DebugLocEntry's constructor so that it
takes multiple values rather than a single, and keep non-fragment values
in OpenRanges, as this allows some cleanup of the code in
buildLocationList().

Reviewers: aprantl, dblaikie, loladiro

Reviewed By: aprantl

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

Differential Revision: https://reviews.llvm.org/D59303

llvm-svn: 357988
2019-04-09 10:08:26 +00:00
Simon Pilgrim a30ba452c6 Fix Wdocumentation warning. NFCI.
llvm-svn: 357987
2019-04-09 09:38:25 +00:00
Bjorn Pettersson 5cca2c25a7 [ASTImporter] Fix in ASTImporter::Import_New(const Decl *)
Make sure ASTImporter::Import_New(const Decl *) returns
a Expected<const Decl *> and not Expected<Decl *> to
make the clang/unittests/AST/ASTImporterTest.cpp compile
without the warning

 clang/unittests/AST/ASTImporterTest.cpp:117:12: error: no viable conversion from 'Expected<clang::Decl *>' to 'Expected<const clang::Decl *>'
    return Imported;

(I got the above when building with clang 3.6).

llvm-svn: 357985
2019-04-09 09:12:32 +00:00
Pavel Labath 26ca5a57bc Remove unneeded #ifdef SWIGs
Summary:
Some of these were present in files which should never be read by swig
(and we also had one in the interface file, which is only read by swig).
They are probably leftovers from the time when we were running swig over
lldb headers directly.

While writing this patch, I noticed that some of the #ifdefs were
guarding public functions that were operating on lldb_private data
types. While it wasn't strictly necessary for this patch, I made these
private, as nobody should really be accessing them. This can potentially
break existing code if it happened to use these methods, though it will
only break at build time -- if someone builds against an old header, he
should still be able to link to a new lldb library, since the functions
are still there.

We could keep these public for backward compatbility, but I would argue
that if anyone was actually using these functions for anything, his code
is already broken.

Reviewers: JDevlieghere, clayborg, jingham

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D60400

llvm-svn: 357984
2019-04-09 09:03:43 +00:00
Jonas Devlieghere 7e01ce2ed1 Fix doxygen warning about function argument
This fixes the following doxygen warning when building the lldb-cpp-doc
target.

This commit fixes:
  SBStructuredData.h:94 warning: Found unknown command `\dst'
  SBStructuredData.h:97 warning: Found unknown command `\dst'
  SBStructuredData.h:98 warning: Found unknown command `\dst'
  SBStructuredData.h:100 warning: Found unknown command `\dst'
  SBStructuredData.h:104 warning: Found unknown command `\dst'

Patch by: Konrad Kleine

Differential revision: https://reviews.llvm.org/D60443

llvm-svn: 357983
2019-04-09 09:03:30 +00:00
Rui Ueyama f432fa6eee De-template SymbolTable::addShared.
Because of r357925, this member function doesn't have to be a
template of ELFT.

llvm-svn: 357982
2019-04-09 08:52:00 +00:00
Hiroshi Inoue 30d3c58b81 [PowerPC] fix trivial typos in comment, NFC
llvm-svn: 357981
2019-04-09 08:40:02 +00:00
Jonas Devlieghere 721b8d1557 Add missing space between \btrue
There was a space missing in some the documentation for
lldb::BreakpointsWriteToFile.

This fixes the following doxygen error when building the lldb-cpp-doc
target:

  llvm-project/lldb/include/lldb/API/SBTarget.h:775 warning: Found
  unknown command `\btrue'

Patch by: Konrad Kleine

Differential revision: https://reviews.llvm.org/D60442

llvm-svn: 357980
2019-04-09 08:34:07 +00:00
Martin Storsjo e16434a049 [CMake] Fix accidentally swapped input/output parameters of string(REPLACE) for mingw
llvm-svn: 357979
2019-04-09 08:31:25 +00:00
Dan Liew 2316429d04 [asan_symbolize] Move argument parser epilog text into script doc comment.
Summary:
This will make it easier to expand on the documentation in the future
that avoids cluttering the code.

rdar://problem/49476995

Reviewers: kubamracek, yln, samsonov, dvyukov, vitalybuka

Subscribers: #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D60398

llvm-svn: 357978
2019-04-09 08:30:43 +00:00
Pavel Labath ff12913b63 Minidump: use string parsing functionality from llvm
llvm-svn: 357977
2019-04-09 08:28:27 +00:00
Justin Bogner c60d09597c [CMake] Move configuration of LLVM_CXX_STD to HandleLLVMOptions.cmake
Standalone builds of projects other than llvm itself (lldb, libcxx,
etc) include HandleLLVMOptions but not the top level llvm CMakeLists,
so we need to set this variable here to ensure that it always has a
value.

This should fix the build issues some folks have been seeing.

llvm-svn: 357976
2019-04-09 08:14:32 +00:00
Pavel Labath 9837f54843 Breakpad: Parse Stack CFI records
Summary:
This patch adds support for parsing STACK CFI records from breakpad
files. The expressions specifying the values of registers are not
parsed.The idea is that these will be handed off to the postfix
expression -> dwarf compiler, once it is extracted from the internals of
the NativePDB plugin.

Reviewers: clayborg, amccarth, markmentovai

Subscribers: aprantl, lldb-commits

Differential Revision: https://reviews.llvm.org/D60268

llvm-svn: 357975
2019-04-09 08:05:11 +00:00
David Stenberg 93b497a61d [DebugInfo] Remove redundant DebugLocEntry::MergeValues() function, NFC
Summary:
The MergeValues() function would try to merge two entries if they shared
the same beginning label. Having the same beginning label means that the
former entry's range would be empty; however, after D55919 we no longer
create entries for empty ranges, so we can no longer land in a situation
where that check in MergeValues would succeed. Instead, the "merging" is
done by keeping the live values from the preceding empty ranges in
OpenRanges, and adding them to the first non-empty range.

Reviewers: aprantl, dblaikie, loladiro

Reviewed By: aprantl

Subscribers: llvm-commits

Tags: #debug-info, #llvm

Differential Revision: https://reviews.llvm.org/D59301

llvm-svn: 357974
2019-04-09 07:46:09 +00:00
Craig Topper e043dadcad [X86] Remove check on isAsmParserOnly from EVEX2VEX tablegenerator. NFCI
There are no instructions VEX or EVEX instructions that set this field.

llvm-svn: 357973
2019-04-09 07:40:19 +00:00
Craig Topper 53ee783c6e [X86] Have EVEX2VEX tablegenerator use HasVEX_L and HasEVEX_L2 fields instead of the composite EVEX_LL field. Remove the EVEX_LL field. NFCI
The composite existed to simplify some other tablegen code and not really in an
important way. Remove the combined field and just calculate the vector size
using two ifs.

llvm-svn: 357972
2019-04-09 07:40:14 +00:00
Craig Topper f19f991b7f [X86] Use VEX_WIG for VPINSRB/W and VPEXTRB/W to match what is done for EVEX.
The instruction's document this as W0 for the VEX encoding. But there's a
footnote mentioning that VEX.W is ignored in 64-bit mode. And the main VEX
encoding description says the VEX.W bit is ignored for instructions that are
equivalent to a legacy SSE instruction that uses REX.W to select a GPR which
would apply here.

By making this match EVEX we can remove a special case of allowing EVEX2VEX to
turn an EVEX.WIG instruction into VEX.W0.

llvm-svn: 357971
2019-04-09 07:40:10 +00:00
Craig Topper 2f9c1732b8 [X86] Split the VEX_WPrefix in X86Inst tablegen class into 3 separate fields with clear meanings.
llvm-svn: 357970
2019-04-09 07:40:06 +00:00
Nikita Popov 6e9157d588 [ValueTracking] Use ConstantRange methods; NFC
Switch part of the computeOverflowForSignedAdd() implementation to
use Range.isAllNegative() rather than KnownBits.isNegative() and
similar. They do the same thing, but using the ConstantRange methods
allows dropping the KnownBits variables more easily in D60420.

llvm-svn: 357969
2019-04-09 07:13:09 +00:00
Nikita Popov 7bd7878d22 [ValueTracking] Explicitly specify intersection type; NFC
Preparation for D60420.

llvm-svn: 357968
2019-04-09 07:13:03 +00:00
Eric Christopher 88c70ec68e Include omitted word in comment.
llvm-svn: 357967
2019-04-09 06:35:47 +00:00
Sam Clegg 0cfaa2470f [WebAssembly] Ensure ArchiveName is set even in the presence of --whole-archive.
Differential Revision: https://reviews.llvm.org/D60431

llvm-svn: 357966
2019-04-09 05:41:52 +00:00
Fangrui Song 3f2096833a [llvm-objdump] Migrate some functions from std::error_code to Error
llvm-svn: 357965
2019-04-09 05:41:24 +00:00
Tom Stellard 206b9927f8 AMDGPU/GlobalISel: Implement call lowering for shaders returning values
Reviewers: arsenm, nhaehnle

Subscribers: kzhuravl, jvesely, wdng, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, volkan, llvm-commits

Differential Revision: https://reviews.llvm.org/D57166

llvm-svn: 357964
2019-04-09 02:26:03 +00:00
Jim Ingham b78094abcf Get the run locker before you ask if your thread is valid.
I have occasional crashes coming from SBThread::GetExtendedBacktraceThread.  The 
symptom is that we got true back from HasThreadScope - so we should have a valid
live thread, but then when we go to use the thread, it is not good anymore and we
crash.
I can't spot any obvious cause for this crash, but in looking for same I noticed
that in the current code we check that the thread is valid, THEN we take the stop 
locker.  We really should do that in the other order, and ensure that the process 
will stay stopped before we check our thread is still good.  That's what this patch does.

<rdar://problem/47478205>

llvm-svn: 357963
2019-04-09 01:33:23 +00:00
Chen Zheng 19ce6719bc [PowerPC] initialize SchedModel according to platform.
Differential Revision: https://reviews.llvm.org/D60177

llvm-svn: 357962
2019-04-09 01:25:25 +00:00
Eric Christopher 6f75a8f5d0 Add a reduced copy of the llvm .gitignore
as a start for the monorepo .gitignore.

llvm-svn: 357961
2019-04-09 00:52:49 +00:00
Peter Collingbourne df57979ba7 hwasan: Enable -hwasan-allow-ifunc by default.
It's been on in Android for a while without causing problems, so it's time
to make it the default and remove the flag.

Differential Revision: https://reviews.llvm.org/D60355

llvm-svn: 357960
2019-04-09 00:25:59 +00:00
Craig Topper 6c11a31bce [X86] Derive ssmem and sdmem from X86MemOperand. NFCI
This changes the operand type from v4f32/v2f64 to iPTR which seems more correct. But that doesn't seem to do anything other than change the comments in X86GenDAGISel.inc. Probably because we use a ComplexPattern to do the matching so there's no autogenerated code to change.

llvm-svn: 357959
2019-04-09 00:24:17 +00:00