Simon Pilgrim [Sun, 20 Jan 2019 12:28:13 +0000 (12:28 +0000)]
[TTI][X86] Reordered getCmpSelInstrCost cost tables in descending ISA order. NFCI.
Minor tidyup to make it clearer whats going on before adding additional costs.
llvm-svn: 351683
Simon Pilgrim [Sun, 20 Jan 2019 12:10:42 +0000 (12:10 +0000)]
[CostModel][X86] Split icmp/fcmp costs tests and test all comparison codes
llvm-svn: 351682
Simon Pilgrim [Sun, 20 Jan 2019 11:23:01 +0000 (11:23 +0000)]
[CostModel][X86] Add masked load/store/gather/scatter tests for SSE2/SSE42/AVX1 targets
llvm-svn: 351681
Simon Pilgrim [Sun, 20 Jan 2019 11:19:35 +0000 (11:19 +0000)]
[CostModel][X86] Add non-constant vselect cost tests
Also add AVX512 costs at the same time
llvm-svn: 351680
Dylan McKay [Sun, 20 Jan 2019 11:16:58 +0000 (11:16 +0000)]
[AVR] Remove unneeded XFAILs from the Generic CodeGen tests
These have been in place for quite a while now.
Several bugs have since been fixed, and these tests now pass.
llvm-svn: 351679
Dylan McKay [Sun, 20 Jan 2019 11:12:39 +0000 (11:12 +0000)]
[AVR] Allow AVR to be explicitly set as the default target triple
This extends the CMake cross compilation logic so that AVR can be set as
the default target triple, and thus the generic codegen tests can be
run.
This used to be possible on AVR; the CMake configuration files have
since been changed.
With this patch, 'cmake -DLLVM_DEFAULT_TARGET_TRIPLE=avr-unknown-unknown' can
be passed on the command line, making the `-mcpu` argument redundant to
'llc' and friends.
llvm-svn: 351678
Dylan McKay [Sun, 20 Jan 2019 03:45:29 +0000 (03:45 +0000)]
[AVR] Replace two references to ARM's 't2_so_imm' type comments
These were originally introduced in a copy-paste committed in r351526.
The reference to 't2_so_imm' have been updated to 'imm_com8' so the
comment is now accurate.
Thanks to Eli Friedman for noticing this.
llvm-svn: 351674
Dylan McKay [Sun, 20 Jan 2019 03:41:08 +0000 (03:41 +0000)]
[AVR] Fix codegen bug in 16-bit loads
Prior to this patch, the AVR::LDWRdPtr instruction was always lowered to
instructions of this pattern:
ld $GPR8, [PTR:XYZ]+
ld $GPR8, [PTR]+1
This has a problem; the [PTR] is incremented in-place once, but never
decremented.
Future uses of the same pointer will use the now clobbered value,
leading to the pointer being incorrect by an offset of one.
This patch modifies the expansion code of the LDWRdPtr pseudo
instruction so that the pointer variable is not silently clobbered in
future uses in the same live range.
Bug first reported by Keshav Kini.
Patch by Kaushik Phatak.
llvm-svn: 351673
Dylan McKay [Sun, 20 Jan 2019 03:41:00 +0000 (03:41 +0000)]
Revert "[AVR] Fix codegen bug in 16-bit loads"
This reverts commit r351544.
In that commit, I had mistakenly misattributed the issue submitter as
the patch author, Kaushik Phatak.
The patch will be recommitted immediately with the correct attribution.
llvm-svn: 351672
Vedant Kumar [Sun, 20 Jan 2019 02:44:43 +0000 (02:44 +0000)]
[ConstantMerge] Factor out check for un-mergeable globals, NFC
llvm-svn: 351671
Eric Fiselier [Sun, 20 Jan 2019 01:21:35 +0000 (01:21 +0000)]
Fix aligned allocation availability XFAILs after D56445.
D56445 bumped the minimum Mac OS X version required for aligned
allocation from 10.13 to 10.14. This caused libc++ tests depending
on the old value to break.
This patch updates the XFAILs for those tests to include 10.13.
llvm-svn: 351670
Eric Fiselier [Sun, 20 Jan 2019 01:12:53 +0000 (01:12 +0000)]
Revert "Fix aligned allocation availability XFAILs after D56445."
This reverts commit r351625.
That fix was incomplete. I'm reverting so I can commit a complete fix
in a single revision.
llvm-svn: 351669
Eric Fiselier [Sun, 20 Jan 2019 00:51:02 +0000 (00:51 +0000)]
make XFAIL, REQUIRES, and UNSUPPORTED support multi-line expressions
llvm-svn: 351668
Eric Fiselier [Sat, 19 Jan 2019 23:36:06 +0000 (23:36 +0000)]
Improve docker images and configuration; create compiler-zoo image
llvm-svn: 351667
Craig Topper [Sat, 19 Jan 2019 21:26:20 +0000 (21:26 +0000)]
[X86] Add masked MCVTSI2P/MCVTUI2P ISD opcodes to model the cvtqq2ps cvtuqq2ps nodes that produce less than 128-bits of results.
These nodes zero the upper half of the result and can't be represented with vselect.
llvm-svn: 351666
Johannes Doerfert [Sat, 19 Jan 2019 20:46:10 +0000 (20:46 +0000)]
[FIX] Generalize the expected results for callback clang tests
llvm-svn: 351665
Nathan Lanza [Sat, 19 Jan 2019 20:08:41 +0000 (20:08 +0000)]
Fix order of arguments in an lldb type summary in examples
The format for the -w argument is:
-w name ( --category name )
Rearrange the flags correctly.
llvm-svn: 351664
Martin Storsjo [Sat, 19 Jan 2019 19:42:54 +0000 (19:42 +0000)]
[llvm-objcopy] [COFF] Implement --only-section
Differential Revision: https://reviews.llvm.org/D56873
llvm-svn: 351663
Martin Storsjo [Sat, 19 Jan 2019 19:42:48 +0000 (19:42 +0000)]
[llvm-objcopy] [COFF] Implement --only-keep-debug
Differential Revision: https://reviews.llvm.org/D56840
llvm-svn: 351662
Martin Storsjo [Sat, 19 Jan 2019 19:42:41 +0000 (19:42 +0000)]
[llvm-objcopy] [COFF] Implement --strip-debug
Also remove sections similarly for --strip-all, --discard-all,
--strip-unneeded.
Differential Revision: https://reviews.llvm.org/D56839
llvm-svn: 351661
Martin Storsjo [Sat, 19 Jan 2019 19:42:35 +0000 (19:42 +0000)]
[llvm-objcopy] [COFF] Add support for removing sections
Differential Revision: https://reviews.llvm.org/D56683
llvm-svn: 351660
Martin Storsjo [Sat, 19 Jan 2019 19:42:27 +0000 (19:42 +0000)]
[llvm-objcopy] [COFF] Add a testcase for patching the debug directory. NFC.
The debug directory contains the rwa file address of itself,
which is updated on write. Add a testcase for this existing
functionality.
Differential Revision: https://reviews.llvm.org/D56876
llvm-svn: 351659
Martin Storsjo [Sat, 19 Jan 2019 19:42:23 +0000 (19:42 +0000)]
[llvm-objcopy] [COFF] Remove a superfluous namespace qualification. NFC.
llvm-svn: 351658
Martin Storsjo [Sat, 19 Jan 2019 19:42:19 +0000 (19:42 +0000)]
[llvm-objcopy] [COFF] Rename a test from .yaml to .test. NFC.
Tests named .yaml aren't executed by default in this directory
(while they are within e.g. LLD).
llvm-svn: 351657
Chandler Carruth [Sat, 19 Jan 2019 11:54:04 +0000 (11:54 +0000)]
Update an example to use the new LLVM file header.
llvm-svn: 351653
Chandler Carruth [Sat, 19 Jan 2019 11:53:58 +0000 (11:53 +0000)]
Update the coding standards with the new file header.
llvm-svn: 351652
Chandler Carruth [Sat, 19 Jan 2019 11:48:15 +0000 (11:48 +0000)]
Update the license mentioned in this documentation.
llvm-svn: 351651
Chandler Carruth [Sat, 19 Jan 2019 11:38:40 +0000 (11:38 +0000)]
Update generator script to use the new license file header.
llvm-svn: 351650
Chandler Carruth [Sat, 19 Jan 2019 11:30:51 +0000 (11:30 +0000)]
Update structured references to the license to the new license.
Since these are intended to be short and succinct, I've used the SPDX
full name. It's human readable, but formally agreed upon and will be
part of the SPDX spec for licenses.
llvm-svn: 351649
Chandler Carruth [Sat, 19 Jan 2019 10:56:40 +0000 (10:56 +0000)]
Update more file headers across all of the LLVM projects in the monorepo
to reflect the new license. These used slightly different spellings that
defeated my regular expressions.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351648
Stephen Kelly [Sat, 19 Jan 2019 09:57:59 +0000 (09:57 +0000)]
[ASTDump] NFC: Convert iterative loops to cxx_range_for
This is coming up a lot in reviews. Better just to change them all at
once.
llvm-svn: 351647
Stephen Kelly [Sat, 19 Jan 2019 09:57:51 +0000 (09:57 +0000)]
[ASTDump] NFC: Use `const auto` in cxx_range_for loops
This is coming up a lot in reviews. Better just to do them all at once.
llvm-svn: 351646
Nikita Popov [Sat, 19 Jan 2019 09:56:01 +0000 (09:56 +0000)]
[InstCombine] Simplify cttz/ctlz + icmp ugt/ult
Followup to D55745, this time handling comparisons with ugt and ult
predicates (which are the canonical forms for non-equality predicates).
For ctlz we can convert into a simple icmp, for cttz we can convert
into a mask check.
Differential Revision: https://reviews.llvm.org/D56355
llvm-svn: 351645
Johannes Doerfert [Sat, 19 Jan 2019 09:40:14 +0000 (09:40 +0000)]
[NFX] Fix language reference title declaration
llvm-svn: 351644
Johannes Doerfert [Sat, 19 Jan 2019 09:40:10 +0000 (09:40 +0000)]
[FIX] Restrict callback pthreads_create test to linux only
llvm-svn: 351643
Johannes Doerfert [Sat, 19 Jan 2019 09:40:08 +0000 (09:40 +0000)]
[NFC] Generalize expected output for callback test
llvm-svn: 351642
Johannes Doerfert [Sat, 19 Jan 2019 09:39:57 +0000 (09:39 +0000)]
[NFC] Fix unused variable warnings in Release builds
llvm-svn: 351641
Chandler Carruth [Sat, 19 Jan 2019 09:24:38 +0000 (09:24 +0000)]
Update the license header in this man-page file.
It contains an `$Id$` expansion and so can only be updated from a true
Subversion client.
See the details of this update in r351636.
llvm-svn: 351640
Kristina Brooks [Sat, 19 Jan 2019 09:07:38 +0000 (09:07 +0000)]
Remove a period from CREDITS.TXT (testing email change). NFC
llvm-svn: 351639
Eric Fiselier [Sat, 19 Jan 2019 09:07:04 +0000 (09:07 +0000)]
Fix all the bots.
The buildbot start scripts hardcode the version string.
Bump it from 8 to 9.
llvm-svn: 351638
Stephen Kelly [Sat, 19 Jan 2019 09:05:55 +0000 (09:05 +0000)]
Move decl context dumping to TextNodeDumper
Summary: Only an obscure case is moved.
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D56829
llvm-svn: 351637
Chandler Carruth [Sat, 19 Jan 2019 08:50:56 +0000 (08:50 +0000)]
Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
Chandler Carruth [Sat, 19 Jan 2019 07:02:23 +0000 (07:02 +0000)]
Remove unnecesasry comment markers.
llvm-svn: 351635
Chandler Carruth [Sat, 19 Jan 2019 06:36:08 +0000 (06:36 +0000)]
Convert two more files that were using Windows line endings and remove
a stray single '\r' from one file. These are the last line ending issues
I can find in the files containing parts of LLVM's file headers.
llvm-svn: 351634
Chandler Carruth [Sat, 19 Jan 2019 06:36:00 +0000 (06:36 +0000)]
Remove random windows line endings that snuck into the middle of this
code.
llvm-svn: 351633
Chandler Carruth [Sat, 19 Jan 2019 06:29:07 +0000 (06:29 +0000)]
Update some code used in our visual studio plugins to use linux file
endings. We already used them in some cases, and this makes things
consistent. This will also simplify updating the licenses in these
files.
llvm-svn: 351632
Chandler Carruth [Sat, 19 Jan 2019 06:14:24 +0000 (06:14 +0000)]
Install new LLVM license structure and new developer policy.
This installs the new developer policy and moves all of the license
files across all LLVM projects in the monorepo to the new license
structure. The remaining projects will be moved independently.
Note that I've left odd formatting and other idiosyncracies of the
legacy license structure text alone to make the diff easier to read.
Critically, note that we do not in any case *remove* the old license
notice or terms, as that remains necessary until we finish the
relicensing process.
I've updated a few license files that refer to the LLVM license to
instead simply refer generically to whatever license the LLVM project is
under, basically trying to minimize confusion.
This is really the culmination of so many people. Chris led the
community discussions, drafted the policy update and organized the
multi-year string of meeting between lawyers across the community to
figure out the strategy. Numerous lawyers at companies in the community
spent their time figuring out initial answers, and then the Foundation's
lawyer Heather Meeker has done *so* much to help refine and get us ready
here. I could keep going on, but I just want to make sure everyone
realizes what a huge community effort this has been from the begining.
Differential Revision: https://reviews.llvm.org/D56897
llvm-svn: 351631
Chandler Carruth [Sat, 19 Jan 2019 06:02:27 +0000 (06:02 +0000)]
Cleanup non-UTF8 characters and some types I found in these files.
llvm-svn: 351630
Johannes Doerfert [Sat, 19 Jan 2019 05:36:54 +0000 (05:36 +0000)]
Emit !callback metadata and introduce the callback attribute
With commit r351627, LLVM gained the ability to apply (existing) IPO
optimizations on indirections through callbacks, or transitive calls.
The general idea is that we use an abstraction to hide the middle man
and represent the callback call in the context of the initial caller.
It is described in more detail in the commit message of the LLVM patch
r351627, the llvm::AbstractCallSite class description, and the
language reference section on callback-metadata.
This commit enables clang to emit !callback metadata that is
understood by LLVM. It does so in three different cases:
1) For known broker functions declarations that are directly
generated, e.g., __kmpc_fork_call for the OpenMP pragma parallel.
2) For known broker functions that are identified by their name and
source location through the builtin detection, e.g.,
pthread_create from the POSIX thread API.
3) For user annotated functions that carry the "callback(callee, ...)"
attribute. The attribute has to include the name, or index, of
the callback callee and how the passed arguments can be
identified (as many as the callback callee has). See the callback
attribute documentation for detailed information.
Differential Revision: https://reviews.llvm.org/D55483
llvm-svn: 351629
Johannes Doerfert [Sat, 19 Jan 2019 05:19:12 +0000 (05:19 +0000)]
Enable IPConstantPropagation to work with abstract call sites
This modification of the currently unused inter-procedural constant
propagation pass (IPConstantPropagation) shows how abstract call sites
enable optimization of callback calls alongside direct and indirect
calls. Through minimal changes, mostly dealing with the partial mapping
of callbacks, inter-procedural constant propagation was enabled for
callbacks, e.g., OpenMP runtime calls or pthreads_create.
Differential Revision: https://reviews.llvm.org/D56447
llvm-svn: 351628
Johannes Doerfert [Sat, 19 Jan 2019 05:19:06 +0000 (05:19 +0000)]
AbstractCallSite -- A unified interface for (in)direct and callback calls
An abstract call site is a wrapper that allows to treat direct,
indirect, and callback calls the same. If an abstract call site
represents a direct or indirect call site it behaves like a stripped
down version of a normal call site object. The abstract call site can
also represent a callback call, thus the fact that the initially
called function (=broker) may invoke a third one (=callback callee).
In this case, the abstract call side hides the middle man, hence the
broker function. The result is a representation of the callback call,
inside the broker, but in the context of the original instruction that
invoked the broker.
Again, there are up to three functions involved when we talk about
callback call sites. The caller (1), which invokes the broker
function. The broker function (2), that may or may not invoke the
callback callee. And finally the callback callee (3), which is the
target of the callback call.
The abstract call site will handle the mapping from parameters to
arguments depending on the semantic of the broker function. However,
it is important to note that the mapping is often partial. Thus, some
arguments of the call/invoke instruction are mapped to parameters of
the callee while others are not. At the same time, arguments of the
callback callee might be unknown, thus "null" if queried.
This patch introduces also !callback metadata which describe how a
callback broker maps from parameters to arguments. This metadata is
directly created by clang for known broker functions, provided through
source code attributes by the user, or later deduced by analyses.
For motivation and additional information please see the corresponding
talk (slides/video)
https://llvm.org/devmtg/2018-10/talk-abstracts.html#talk20
as well as the LCPC paper
http://compilers.cs.uni-saarland.de/people/doerfert/par_opt_lcpc18.pdf
Differential Revision: https://reviews.llvm.org/D54498
llvm-svn: 351627
Roman Tereshin [Sat, 19 Jan 2019 03:37:25 +0000 (03:37 +0000)]
Reapply "[CGP] Check for existing inttotpr before creating new one"
Original commit: r351582
llvm-svn: 351626
Eric Fiselier [Sat, 19 Jan 2019 03:27:05 +0000 (03:27 +0000)]
Fix aligned allocation availability XFAILs after D56445.
D56445 bumped the minimum Mac OS X version required for aligned
allocation from 10.13 to 10.14. This caused libc++ tests depending
on the old value to break.
This patch updates the XFAILs for those tests to include 10.13.
llvm-svn: 351625
Vedant Kumar [Sat, 19 Jan 2019 02:46:22 +0000 (02:46 +0000)]
[MergeFunc] Allow merging identical vararg functions using aliases
Thanks to Nikita Popov for pointing out this missed case.
This is a follow-up to r351411, which disabled function merging for
vararg functions outright due to a miscompile (see llvm.org/PR40345).
Differential Revision: https://reviews.llvm.org/D56865
llvm-svn: 351624
Vedant Kumar [Sat, 19 Jan 2019 02:38:47 +0000 (02:38 +0000)]
[HotColdSplit] Mark inherently cold functions as such
If an inherently cold function is found, mark it as cold. For now this
means applying the `cold` and `minsize` attributes.
As a drive-by, revisit and clean up the criteria for considering a
function for splitting. Add tests.
llvm-svn: 351623
Vedant Kumar [Sat, 19 Jan 2019 02:38:17 +0000 (02:38 +0000)]
[HotColdSplit] Remove a set which tracked split functions (NFC)
Use the begin/end iterator idiom to avoid visiting split functions,
instead of doing a set lookup.
llvm-svn: 351622
Vedant Kumar [Sat, 19 Jan 2019 02:37:59 +0000 (02:37 +0000)]
[CodeExtractor] Emit lifetime markers around reloads of outputs
CodeExtractor permits extracting a region of blocks from a function even
when values defined within the region are used outside of it.
This is typically done by creating an alloca in the original function
and reloading the alloca after a call to the extracted function.
Wrap the reload in lifetime start/end markers to promote stack coloring.
Suggested by Sergei Kachkov!
Differential Revision: https://reviews.llvm.org/D56045
llvm-svn: 351621
Evgeniy Stepanov [Sat, 19 Jan 2019 01:54:09 +0000 (01:54 +0000)]
[hwasan] Madvise away unused shadow.
Summary:
Whenever a large shadow region is tagged to zero, madvise(DONT_NEED)
as much of it as possible.
This reduces shadow RSS on Android by 45% or so, and total memory use
by 2-4%, probably even more on long running multithreaded programs.
CPU time seems to be in the noise.
Reviewers: kcc, pcc
Subscribers: srhines, kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D56757
llvm-svn: 351620
Roman Tereshin [Sat, 19 Jan 2019 01:53:26 +0000 (01:53 +0000)]
Revert "Reapply "[CGP] Check for existing inttotpr before creating new one""
This reverts commit r351618.
Compiler RT + ASAN tests are failing for PowerPC. Not sure
how would I reproduce these on macOS, so reverting (again)
until I do.
llvm-svn: 351619
Roman Tereshin [Sat, 19 Jan 2019 01:41:03 +0000 (01:41 +0000)]
Reapply "[CGP] Check for existing inttotpr before creating new one"
Original commit: r351582
llvm-svn: 351618
Amara Emerson [Sat, 19 Jan 2019 00:36:11 +0000 (00:36 +0000)]
Revert r351584: "GlobalISel: Verify g_zextload and g_sextload"
This new assertion triggered on the AArch64 GlobalISel bots. Reverting while it's being investigated.
llvm-svn: 351617
Reid Kleckner [Sat, 19 Jan 2019 00:33:02 +0000 (00:33 +0000)]
[X86] Deduplicate static calling convention helpers for code size, NFC
Summary:
Right now we include ${TGT}GenCallingConv.inc once per each instruction
selection method implemented by ${TGT}:
- ${TGT}ISelLowering.cpp
- ${TGT}CallLowering.cpp
- ${TGT}FastISel.cpp
Instead, add a mechanism to tablegen for marking a particular convention
as "External", which causes tablegen to emit into the ::llvm namespace,
instead of as a static helper. This allows us to provide a header to
forward declare it, so we can simply call the function from all the
places it is referenced. Typically the calling convention analyzer is
called indirectly, so it doesn't benefit from inlining.
This saves a bit of final binary size, but mostly just saves object file
size:
before after diff artifact
12852K 12492K -360K X86ISelLowering.cpp.obj
4640K 4280K -360K X86FastISel.cpp.obj
1704K 2092K +388K X86CallingConv.cpp.obj
52448K 52336K -112K llc.exe
I didn't collect before numbers for X86CallLowering.cpp.obj, which is
for GlobalISel, but we should save 360K there as well.
This patch applies the strategy to the X86 backend, but there is no
reason it couldn't be applied to the other backends that implement
multiple ISel strategies, like AArch64.
Reviewers: craig.topper, hfinkel, efriedma
Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D56883
llvm-svn: 351616
Nico Weber [Sat, 19 Jan 2019 00:10:54 +0000 (00:10 +0000)]
Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [llvm]
r291284 added a nice mechanism to consistently pass CMake on/off toggles to
lit. This change uses it for LLVM_LIBXML2_ENABLED too (which was added around
the same time and doesn't use the new system yet).
Also alphabetically sort the list passed to llvm_canonicalize_cmake_booleans()
in llvm/test/CMakeLists.txt.
No intended behavior change.
Differential Revision: https://reviews.llvm.org/D56912
llvm-svn: 351615
Nico Weber [Sat, 19 Jan 2019 00:09:43 +0000 (00:09 +0000)]
Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [lld]
r291284 added a nice mechanism to consistently pass CMake on/off toggles to
lit. This change uses it for LLVM_LIBXML2_ENABLED too (which was added around
the same time and doesn't use the new system yet).
No intended behavior change.
Differential Revision: https://reviews.llvm.org/D56912
llvm-svn: 351614
Rui Ueyama [Sat, 19 Jan 2019 00:07:57 +0000 (00:07 +0000)]
Remove F_modify flag from FileOutputBuffer.
This code is dead. There is no use of the feature in the entire LLVM codebase.
Differential Revision: https://reviews.llvm.org/D56939
llvm-svn: 351613
Mandeep Singh Grang [Fri, 18 Jan 2019 23:41:34 +0000 (23:41 +0000)]
[lld] Use range-based llvm::sort
llvm-svn: 351612
Jonas Devlieghere [Fri, 18 Jan 2019 23:05:19 +0000 (23:05 +0000)]
[dotest] Add logging to investigate CI issue.
We're seeing an odd issue on GreenDragon's lldb-cmake-matrix. Dotest is
unable to move a log file (OSError: [Errno 2] No such file or
directory). The os.rename call is guarded with a check that the source
file and destination directory exist.
This wraps the call in a try-except that prints the source and
destination path to see which component seemingly doesn't exist.
llvm-svn: 351611
Artem Dergachev [Fri, 18 Jan 2019 23:05:07 +0000 (23:05 +0000)]
[analyzer] pr37688: Fix a crash upon evaluating a deleted destructor of a union.
Add a defensive check against an invalid destructor in the CFG.
Unions with fields with destructors have their own destructor implicitly
deleted. Due to a bug in the CFG we're still trying to evaluate them
at the end of the object's lifetime and crash because we are unable
to find the destructor's declaration.
rdar://problem/
47362608
Differential Revision: https://reviews.llvm.org/D56899
llvm-svn: 351610
Artem Dergachev [Fri, 18 Jan 2019 22:52:13 +0000 (22:52 +0000)]
[analyzer] Do not try to body-farm Objective-C properties with custom accessors.
If a property is defined with a custom getter, we should not behave as if
the getter simply returns an instance variable. We don't support setters,
so they aren't affected.
On top of being the right thing to do, this also fixes a crash on
the newly added test - in which a property and its getter are defined
in two separate categories.
rdar://problem/
47051544
Differential Revision: https://reviews.llvm.org/D56823
llvm-svn: 351609
Vitaly Buka [Fri, 18 Jan 2019 22:32:29 +0000 (22:32 +0000)]
[safestack] Add ThreadId type as uint64_t
Reviewers: krytarowski, eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56937
llvm-svn: 351607
Stephen Kelly [Fri, 18 Jan 2019 22:15:13 +0000 (22:15 +0000)]
[ASTDump] Add test for current AST dump behavior
llvm-svn: 351606
Stephen Kelly [Fri, 18 Jan 2019 22:15:09 +0000 (22:15 +0000)]
[ASTDump] NFC: Move variable into if() statement
llvm-svn: 351605
Stephen Kelly [Fri, 18 Jan 2019 22:15:05 +0000 (22:15 +0000)]
[ASTDump] NFC: Remove redundant condition
These conditions are duplicated from the dumpDeclContext function called
within the if(). This is presumably an attempt to avoid calling the
function in the case it will do nothing.
That may have made sense in the past if the code was different, but it
doesn't make sense now.
llvm-svn: 351604
Stephen Kelly [Fri, 18 Jan 2019 22:14:59 +0000 (22:14 +0000)]
[ASTDump] NFC: Remove non-needed braces
llvm-svn: 351603
Stephen Kelly [Fri, 18 Jan 2019 22:00:16 +0000 (22:00 +0000)]
[ASTDump] Mark null params with a tag rather than a child node
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D56753
llvm-svn: 351601
Stephen Kelly [Fri, 18 Jan 2019 21:55:24 +0000 (21:55 +0000)]
[ASTDump] Mark BlockDecls which capture this with a tag
Summary:
Removal of the child node makes it easier to separate traversal from
output generation.
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D56752
llvm-svn: 351600
Matt Arsenault [Fri, 18 Jan 2019 21:42:55 +0000 (21:42 +0000)]
AMDGPU/GlobalISel: Legalize more types for select
llvm-svn: 351599
Roman Tereshin [Fri, 18 Jan 2019 21:38:44 +0000 (21:38 +0000)]
Revert "[CGP] Check for existing inttotpr before creating new one"
This reverts commit r351582.
Bots are failing. Reverting this to fix and re-commit later.
llvm-svn: 351598
Stephen Kelly [Fri, 18 Jan 2019 21:38:30 +0000 (21:38 +0000)]
[ASTDump] Mark variadic declarations with a tag instead of child node
Summary:
This makes it easier to separate traversal of the AST from output
generation.
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D56751
llvm-svn: 351597
Matt Arsenault [Fri, 18 Jan 2019 21:33:50 +0000 (21:33 +0000)]
AMDGPU/GlobalISel: Legalize illegal g_constant
llvm-svn: 351596
Erik Pilkington [Fri, 18 Jan 2019 21:33:23 +0000 (21:33 +0000)]
[Sema] Suppress a warning about a forward-declared fixed enum in C mode
As of r343360, we support fixed-enums in C. This lead to some
warnings in project headers where a fixed enum is forward declared
then later defined. In C++, this is fine, the forward declaration is
treated as a complete type even though the definition isn't present.
We use this rule in C too, but still warn about the forward
declaration anyways. This patch suppresses the warning.
rdar://problem/
47356469
Differential revision: https://reviews.llvm.org/D56879
llvm-svn: 351595
Matt Arsenault [Fri, 18 Jan 2019 21:04:59 +0000 (21:04 +0000)]
GlobalISel: Verify G_BITCAST
llvm-svn: 351594
Leonard Chan [Fri, 18 Jan 2019 21:04:25 +0000 (21:04 +0000)]
[Fixed Point Arithmetic] Fixed Point Addition Constant Expression Evaluation
This patch includes logic for constant expression evaluation of fixed point additions.
Differential Revision: https://reviews.llvm.org/D55868
llvm-svn: 351593
Armando Montanez [Fri, 18 Jan 2019 20:56:03 +0000 (20:56 +0000)]
[elfabi] Add support for reading DT_NEEDED from binaries
This patch gives elfabi the ability to read DT_NEEDED entries from ELF binaries
to populate NeededLibs in TextAPI's ELFStub.
Differential Revision: https://reviews.llvm.org/D55852
llvm-svn: 351592
Matt Arsenault [Fri, 18 Jan 2019 20:49:17 +0000 (20:49 +0000)]
GlobalISel: Verify G_ICMP/G_FCMP vector types
llvm-svn: 351591
Sanjay Patel [Fri, 18 Jan 2019 20:42:12 +0000 (20:42 +0000)]
[x86] add more movmsk tests; NFC
The existing tests already show a sub-optimal transform,
but this should make it clear that we can't just match
an 'and' op when creating movmsk instructions.
llvm-svn: 351590
Teresa Johnson [Fri, 18 Jan 2019 20:41:49 +0000 (20:41 +0000)]
Make ThinLTO test run single threaded to try to avoid flakiness
To see if this helps flaky bot failures in PR40351.
llvm-svn: 351589
Simon Pilgrim [Fri, 18 Jan 2019 20:40:35 +0000 (20:40 +0000)]
Fix MSVC "not all control paths return a value" warning. NFCI.
llvm-svn: 351588
Martin Storsjo [Fri, 18 Jan 2019 20:31:12 +0000 (20:31 +0000)]
[SjLj] Don't use __declspec(thread) in MinGW mode
GCC and Clang in MinGW mode don't support __declspec(thread), which
after expanding macros ends up as __attribute__((thread)). Use the
GCC specific attribute __thread instead (the next one in the chain
of alternatives).
Differential Revision: https://reviews.llvm.org/D56905
llvm-svn: 351587
Matt Arsenault [Fri, 18 Jan 2019 20:27:02 +0000 (20:27 +0000)]
AMDGPU: Remove llvm.SI.load.const
It's taken 3 years, but now all of the old AMDGPU and SI intrinsics
are finally gone
llvm-svn: 351586
Jim Ingham [Fri, 18 Jan 2019 20:20:40 +0000 (20:20 +0000)]
Add BreakpadRecords to the Xcode project.
llvm-svn: 351585
Matt Arsenault [Fri, 18 Jan 2019 20:17:37 +0000 (20:17 +0000)]
GlobalISel: Verify g_zextload and g_sextload
llvm-svn: 351584
Craig Topper [Fri, 18 Jan 2019 20:14:46 +0000 (20:14 +0000)]
[X86] Lower avx512f scatter intrinsics to X86MaskedScatterSDNode instead of going directly to MachineSDNode.
This sends these intrinsics through isel in a much more normal way. This should allow addressing mode matching in isel to make better use of the displacement field.
llvm-svn: 351583
Roman Tereshin [Fri, 18 Jan 2019 20:13:42 +0000 (20:13 +0000)]
[CGP] Check for existing inttotpr before creating new one
Make sure CodeGenPrepare doesn't emit multiple inttoptr instructions of
the same integer value while sinking address computations, but rather
CSEs them on the fly: excessive inttoptr's confuse SCEV into thinking
that related pointers have nothing to do with each other.
This problem blocks LoadStoreVectorizer from vectorizing some of the
loads / stores in a downstream target.
Reviewed By: hfinkel
Differential Revision: https://reviews.llvm.org/D56838
llvm-svn: 351582
Bjorn Pettersson [Fri, 18 Jan 2019 20:06:13 +0000 (20:06 +0000)]
[SelectionDAG] Updates for -dag-dump-verbose
Summary:
This patch makes some changes related to -dag-dump-verbose.
Main use case has been when debugging how SelectionDAG is
dealing with debug info (SDDbgValue nodes).
1) We now print the number of DbgValues that are mapped to each
SDNode.
2) Removed duplicated printing of DebugLoc (nowadays DebugLoc is
printed also when not using -dag-dump-verbose).
3) Renamed SDDbgValue::dump to SDDbgValue::print, and added a
new SDDbgValue::dump that will start a new line after calling
print.
4) SDDbgValue::print now prints "Order", and it also prints
some additional information when kind is CONST/FRAMEIX/VREG.
5) SelectionDAG::dump() now dumps all SDDbgValue nodes after
the list of SDNodes (both "regular" and "ByVal" SDDbgValue:s).
Invalidated nodes are not printed.
6) Prohibit inline printing of SDNode operands that has SDDbgValue
nodes associated to them.
Reviewers: jmorse, aprantl
Reviewed By: aprantl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56793
llvm-svn: 351581
Kelvin Li [Fri, 18 Jan 2019 19:57:37 +0000 (19:57 +0000)]
[OPENMP][DOCS] Release notes/OpenMP support updates, NFC.
Differential Revision: https://reviews.llvm.org/D56733
llvm-svn: 351580
Vladimir Stefanovic [Fri, 18 Jan 2019 19:54:51 +0000 (19:54 +0000)]
[mips] Add '-mrelax-pic-calls', '-mno-relax-pic-calls'
These two options enable/disable emission of R_{MICRO}MIPS_JALR fixups along
with PIC calls. The linker may then try to turn PIC calls into direct jumps.
By default, these fixups do get emitted by the backend, use
'-mno-relax-pic-calls' to omit them.
Differential revision: https://reviews.llvm.org/D56878
llvm-svn: 351579
Sanjin Sijaric [Fri, 18 Jan 2019 19:34:20 +0000 (19:34 +0000)]
Fix the buildbot issue introduced by r351421
The EXPENSIVE_CHECK x86_64 Windows buildbot is failing due to this change. Fix
the map access.
llvm-svn: 351577
Erich Keane [Fri, 18 Jan 2019 19:31:54 +0000 (19:31 +0000)]
[NFC] Fix wParentheses warning in ASTContext getFixedPointSemantics
Change-Id: I862f00a548236872fe24f7da8eb2bf7917e123ff
llvm-svn: 351576
George Karpenkov [Fri, 18 Jan 2019 19:24:55 +0000 (19:24 +0000)]
Revert "Fix failing MSan bots"
This reverts commit
2cedaaef383d8d6142046074ffebc2bb5a914778.
Revert with a fix.
llvm-svn: 351575