OSDN Git Service
Kostya Serebryany [Fri, 31 Mar 2017 02:21:28 +0000 (02:21 +0000)]
[libFuzzer] make sure we don't execute libFuzzer's mem* and str* hooks while calling mem*/str* inside libFuzzer itself
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299167
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 31 Mar 2017 02:16:54 +0000 (02:16 +0000)]
Temporarily revert "[PPC] In PPCBoolRetToInt change the bool value to i64 if the target is ppc64" as it's causing test failures, I've given Carrot a testcase offline.
This reverts commit r298955.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299153
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Fri, 31 Mar 2017 01:56:45 +0000 (01:56 +0000)]
[XRay][tools] Remove some assertions in llvm-xray graph
Summary:
Assertions assuming that function calls may not have zero durations do
not seem to hold in the wild. There are valid cases where the conversion
of the tsc counters end up becoming zero-length durations. These
assertions don't really hold and the algorithms don't need those to be
true for them to work.
Reviewers: dblaikie, echristo
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31519
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299150
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 31 Mar 2017 01:46:30 +0000 (01:46 +0000)]
Fix typo, defind -> defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299149
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 31 Mar 2017 00:52:39 +0000 (00:52 +0000)]
[libFuzzer] try to fix value-profile-strncmp on the Mac bot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299145
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 31 Mar 2017 00:08:24 +0000 (00:08 +0000)]
ModuleSummaryAnalysis: Use a more precise #include. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299142
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 30 Mar 2017 23:58:19 +0000 (23:58 +0000)]
[WebAssembly] Initial linking metadata support
Add support for the new relocations and linking metadata section support in
https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md. In
particular, this allows LLVM to indicate which variable is the stack pointer,
so that it can be linked with other objects.
This also adds support for emitting type relocations for call_indirect
instructions.
Right now, this is mainly tested by using wabt and hexdump to examine the
output on selected testcases. We'll add more tests as the design stablizes
and more of the pieces are in place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299141
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 30 Mar 2017 23:58:04 +0000 (23:58 +0000)]
AMDGPU: Rename isKernel
What we really want to do is distinguish functions that may
be called by other functions, and graphics shaders are not
called kernels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299140
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Thu, 30 Mar 2017 23:46:36 +0000 (23:46 +0000)]
[XRay][docs] Examples for how to use XRay
Summary:
This document is an attempt at showing how XRay could be used to debug
latency issues with LLVM tools, and how to use the llvm-xray tool to
analyse XRay traces.
Reviewers: echristo, mehdi_amini, davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31493
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299133
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 30 Mar 2017 23:43:08 +0000 (23:43 +0000)]
ThinLTOBitcodeWriter: Use Module::global_values(). NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299132
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 30 Mar 2017 23:36:47 +0000 (23:36 +0000)]
LangRef: Don't refer to a 'generic' address space.
Consistently call this the default address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299131
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 30 Mar 2017 22:35:10 +0000 (22:35 +0000)]
Add testcase for r299124.
Patch by Tim Shen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299125
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 30 Mar 2017 22:34:20 +0000 (22:34 +0000)]
getPristineRegs is not accurately considering shrink wrapping puts
registers not saved in certain blocks. Use explicit getCalleeSavedInfo
and isLiveIn instead.
This fixes pr32292.
Patch by Tim Shen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299124
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 30 Mar 2017 22:28:55 +0000 (22:28 +0000)]
[InstCombine] Fix typo last->least. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299123
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 30 Mar 2017 22:21:40 +0000 (22:21 +0000)]
AMDGPU: Add all atomicrmw fields to atomic.inc/dec
Add scope, order, isVolatile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299122
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 30 Mar 2017 22:21:16 +0000 (22:21 +0000)]
[InstSimplify] Use m_SignBit instead of calling getSignBit and using m_Specific. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299121
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 30 Mar 2017 22:10:54 +0000 (22:10 +0000)]
[InstSimplify] Use APInt::isMaxSignedValue() instead of comparing with ~APInt::getSignBit. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299120
91177308-0d34-0410-b5e6-
96231b3b80d8
Hongbin Zheng [Thu, 30 Mar 2017 21:56:56 +0000 (21:56 +0000)]
[SimplifyIndvar] Replace the sdiv used by IV if we can prove both of its operands are non-negative
Since there is no sdiv in SCEV, an 'udiv' is a better canonical form than an 'sdiv' as the user of induction variable
Differential Revision: https://reviews.llvm.org/D31488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299118
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 30 Mar 2017 21:05:33 +0000 (21:05 +0000)]
[AVX-512] Fix bad comment from r299112. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299114
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 30 Mar 2017 21:05:31 +0000 (21:05 +0000)]
Use os.path.realpath when tracking the cwd.
This is needed by TestCases/Posix/coverage-direct.cc
The problem is that the test does:
mkdir <dir>
cd <dir>
cd ..
rm -rf <dir>
<more commands>
the current directory currently looks like "/.../<dir>/../" which
doesn't exist when dir is deleted.
at some point we should probably switch to using the os current
directory (specially if we want to add subshell), but this is a small
incremental improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299113
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 30 Mar 2017 21:02:52 +0000 (21:02 +0000)]
[AVX-512] Fix another case where fastisel was generating a GR8 to VK1 copy. This time after calls returning i1.
Fixes PR32472.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299112
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 30 Mar 2017 20:48:58 +0000 (20:48 +0000)]
lit: support redirect from globs
This adds support for commands like
FileCheck < foobar*
which is used by some asan tests because the file they want to read
has a pid in the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299111
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Thu, 30 Mar 2017 20:16:02 +0000 (20:16 +0000)]
[AMDGPU] Add GlobalOpt parameter to Always Inliner pass
If set to false it does not remove global aliases. With this parameter
set to false it should be safe to run the pass before link.
Differential Revision: https://reviews.llvm.org/D31489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299108
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 30 Mar 2017 20:10:56 +0000 (20:10 +0000)]
Teach stripNonLineTableDebugInfo() to remap DILocations in !llvm.loop nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299107
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 30 Mar 2017 19:56:50 +0000 (19:56 +0000)]
[Object] Remove check for BIND_OPCODE_DONE/REBASE_OPCODE_DONE.
BIND_OPCODE_DONE/REBASE_OPCODE_DONE may appear at the end of the opcode array,
but they are not required to. The linker only adds them as padding to align the
opcodes to pointer size.
This fixes rdar://problem/
31285560.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299104
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 30 Mar 2017 19:52:31 +0000 (19:52 +0000)]
[AArch64ISelLowering] Remove `else` after `return` in LowerGlobalTLSAddress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299103
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 30 Mar 2017 19:46:18 +0000 (19:46 +0000)]
[AArch64] Simplify isSingExtended()/isZeroExtended(). NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299102
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Thu, 30 Mar 2017 19:44:09 +0000 (19:44 +0000)]
[WebAssembly] Improve support for WebAssembly binary format
Mostly this change adds support converting to and from
YAML which will allow us to write more test cases for
the WebAssembly MC and lld ports.
Better support for objdump, readelf, and nm will be in
followup CLs.
I had to update the two wasm test binaries because they
used the old style 'name' section which is no longer
supported.
Differential Revision: https://reviews.llvm.org/D31099
Patch by Sam Clegg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299101
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Thu, 30 Mar 2017 19:30:51 +0000 (19:30 +0000)]
Following r297661, disable dup workaround to disable duplicate STDOUT fd closing and instead directly prevent closing of STD* file descriptors.
We do not want to close STDOUT as there may have been several uses of it
such as the case: llc %s -o=- -pass-remarks-output=- -filetype=asm
which cause multiple closes of STDOUT_FILENO and/or use-after-close of it.
Using dup() in getFD doesn't work as we end up with original STDOUT_FILENO
open anyhow.
reviewed by Rafael Espindola
Differential Revision: https://reviews.llvm.org/D31505
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299098
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 30 Mar 2017 18:53:04 +0000 (18:53 +0000)]
[DAGCombiner] Initial support for the fast-math flag contract
Now alternatively to the TargetOption.AllowFPOpFusion global flag, FMUL->FADD
can also use the per operation FMF to allow fusion.
The idea here is not to port everything to the new scheme (e.g. fused
multiply-and-sub will be ported later) but that this work all the way from
clang.
The transformation is conditionalized on *both* the FADD and the FMUL having
the FMF contract flag.
Differential Revision: https://reviews.llvm.org/D31169
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299096
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 30 Mar 2017 17:49:58 +0000 (17:49 +0000)]
[CodeGen] Pass SDAG an ORE, and replace FastISel stats with remarks.
In the long-term, we want to replace statistics with something
finer-grained that lets us gather per-function data.
Remarks are that replacement.
Create an ORE instance in SelectionDAGISel, and pass it to
SelectionDAG.
SelectionDAG was used so that we can emit remarks from all
SelectionDAG-related code, including TargetLowering and DAGCombiner.
This isn't used in the current patch but Adam tells me he's interested
for the fp-contract combines.
Use the ORE instance to emit FastISel failures as remarks (instead of
the mix of dbgs() dumps and statistics that we currently have).
Eventually, we want to have an API that tells us whether remarks are
enabled (http://llvm.org/PR32352) so that we don't emit expensive
remarks (in this case, dumping IR) when it's not needed. For now, use
'isEnabled' as a crude replacement.
This does mean that the replacement for '-fast-isel-verbose' is now
'-pass-remarks-missed=isel'. Additionally, clang users also need to
enable remark diagnostics, using '-Rpass-missed=isel'.
This also removes '-fast-isel-verbose2': there are no static statistics
that we want to only enable in asserts builds, so we can always use
the remarks regardless of the build type.
Differential Revision: https://reviews.llvm.org/D31405
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299093
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 30 Mar 2017 17:32:42 +0000 (17:32 +0000)]
[DAGCombiner] add helper function for visitORLike; NFCI
This combines all of the equivalent clean-ups for foldAndOfSetCCs:
https://reviews.llvm.org/rL298938
https://reviews.llvm.org/rL298940
https://reviews.llvm.org/rL298944
https://reviews.llvm.org/rL298949
https://reviews.llvm.org/rL298950
https://reviews.llvm.org/rL299002
https://reviews.llvm.org/rL299013
The sins of code duplication are on full display here:
each function is missing a fold that wasn't copied over from its logical sibling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299091
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 30 Mar 2017 16:35:02 +0000 (16:35 +0000)]
[yaml2obj] Enable and fix tests
Summary:
These tests were not being run because the yaml extension
wasn't be picked up by lit.
This change also fixes the tests which themselves were broken.
Patch By: Sam Clegg
Reviewers: beanz
Reviewed By: beanz
Subscribers: fhahn
Differential Revision: https://reviews.llvm.org/D31436
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299088
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Ng [Thu, 30 Mar 2017 13:17:25 +0000 (13:17 +0000)]
Test commit.
Correct assertion messages in MachineOperand for some of the setters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299075
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 30 Mar 2017 12:59:53 +0000 (12:59 +0000)]
Spelling mistakes in comments. NFCI.
Based on corrections mentioned in patch for clang for PR27635
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299072
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 30 Mar 2017 12:30:15 +0000 (12:30 +0000)]
Spelling mistakes in comments. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299069
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Thu, 30 Mar 2017 11:06:25 +0000 (11:06 +0000)]
Revert "Make naming in Host.h in line with coding standards."
This reverts r299062, which caused build failures on Windows.
It also reverts the attempts to fix the windows builds in r299064 and r299065.
The introduction of namespace llvm::sys::detail makes MSVC, and seemingly also
mingw, complain about ambiguity with the existing namespace llvm::detail.
E.g.:
C:\b\slave\sanitizer-windows\llvm\include\llvm/Support/MathExtras.h(184): error C2872: 'detail': ambiguous symbol
C:\b\slave\sanitizer-windows\llvm\include\llvm/Support/PointerLikeTypeTraits.h(31): note: could be 'llvm::detail'
C:\b\slave\sanitizer-windows\llvm\include\llvm/Support/Host.h(80): note: or 'llvm::sys::detail'
In r299064 and r299065 I tried to fix these ambiguities, based on the errors
reported in the log files. It seems however that the build stops early when
this kind of error is encountered, and many build-then-fix-iterations on
Windows may be needed to fix this. Therefore reverting r299062 for now to
get the build working again on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299066
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Thu, 30 Mar 2017 10:47:41 +0000 (10:47 +0000)]
Another attempt fix the Windows builds
By changing more detail::... to llvm::detail::...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299065
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Thu, 30 Mar 2017 10:14:40 +0000 (10:14 +0000)]
Attempt to fix the Windows builds by using llvm::detail::... instead of detail::...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299064
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 30 Mar 2017 09:36:33 +0000 (09:36 +0000)]
[globalisel][tablegen] Change Expected<bool> to Error and rename functions.
Functions that still return Expected<X> are now called createAndImport*()
Changing the return type was requested in the review comments for r299001
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299063
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Thu, 30 Mar 2017 09:31:59 +0000 (09:31 +0000)]
Make naming in Host.h in line with coding standards.
Based on post-commit review comments by Chandler Carruth on
https://reviews.llvm.org/D31236. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299062
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Thu, 30 Mar 2017 07:24:49 +0000 (07:24 +0000)]
Refactor getHostCPUName to allow testing on non-native hardware.
This refactors getHostCPUName so that for the architectures that get the
host cpu info on linux from /proc/cpuinfo, the /proc/cpuinfo parsing
logic is present in the build, even if it wasn't built on a linux system
for that architecture.
Since the code is present in the build, we can then test that code also
on other systems, i.e. we don't need to have buildbots setup for all
architectures on linux to be able to test this. Instead, developers will
test this as part of the regression test run.
As an example, a few unit tests are added to test getHostCPUName for ARM
running linux. A unit test is preferred over a lit-based test, since the
expectation is that in the future, the functionality here will grow over
what can be tested with "llc -mcpu=native".
This is a preparation step to enable implementing the range of
improvements discussed on PR30516, such as adding AArch64 support,
support for big.LITTLE systems, reducing code duplication.
Differential Revision: https://reviews.llvm.org/D31236
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299060
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 30 Mar 2017 05:49:03 +0000 (05:49 +0000)]
[APInt] Remove references to integerPartWidth outside of APFloat implentation.
Turns out integerPartWidth only explicitly defines the width of the tc functions in the APInt class. Functions that aren't used by APInt implementation itself. Many places in the code base already assume APInt is made up of 64-bit pieces. Explicitly assuming 64-bit here doesn't make that situation much worse. A full audit would need to be done if it ever changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299059
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 30 Mar 2017 04:22:20 +0000 (04:22 +0000)]
[libFuzzer] remove a stale flag from tests, run value-profile-strncmp.test longer (hopefully, will fix the OSX bot)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299051
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Thu, 30 Mar 2017 01:42:57 +0000 (01:42 +0000)]
[DAGCombine] A shuffle of a splat is always the splat itself
Summary:
Add a simplification:
shuffle (splat-shuffle), undef, M --> splat-shuffle
Fixes pr32449
Patch by Sanjay Patel
Reviewers: eli.friedman, RKSimon, spatel
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31426
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299047
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 30 Mar 2017 01:27:20 +0000 (01:27 +0000)]
[libFuzzer] best effort support for -fsanitize-coverage=trace-pc instrumentation. It is less efficient and precise than -fsanitize-coverage=trace-pc-guard, but still works
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299046
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 29 Mar 2017 23:34:27 +0000 (23:34 +0000)]
If the DIUnit has flags passed on it then have DW_AT_producer be a combination of DICompileUnit::Producer and Flags.
The darwin behavior is unchanged and will continue to use DW_AT_APPLE_flags.
Patch by Zhizhou Yang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299038
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 29 Mar 2017 22:51:22 +0000 (22:51 +0000)]
[codeview] Fix buggy BeginIndexMapSize assertion
This assert is just trying to test that processing each record adds
exactly one entry to the index map. The assert logic was wrong when the
first record in the type stream was a field list.
I've simplified the code by moving the LF_FIELDLIST-specific logic into
the callback for that record type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299035
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 29 Mar 2017 21:58:52 +0000 (21:58 +0000)]
[CodeGen] clean up and add tests for scalar and-of-setcc; NFC
https://bugs.llvm.org/show_bug.cgi?id=32401
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299034
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 29 Mar 2017 21:34:58 +0000 (21:34 +0000)]
[X86IselLowering] Remove extraneous semicolon. NFCI.
Unbreaks the build with GCC -Werror.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299030
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 29 Mar 2017 19:39:46 +0000 (19:39 +0000)]
[DAGCombiner] Remove else after return. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299022
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Wed, 29 Mar 2017 19:27:08 +0000 (19:27 +0000)]
Re-land: "Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]"
This should work on all platforms now that r299006 has landed. Tested locally
on Windows and Linux.
This moves exe symbol-specific method implementations out of NativeRawSymbol
into a concrete subclass. Also adds implementations for hasCTypes and
hasPrivateSymbols and a simple test to ensure the native reader can access the
summary information for the executable from the PDB.
Original Differential Revision: https://reviews.llvm.org/D31059
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299019
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 29 Mar 2017 19:26:26 +0000 (19:26 +0000)]
Add ifunc support to ModuleSymbolTable.
Do that by creating a global_values, which is similar to
global_objects, but also iterates over aliases and ifuncs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299018
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Wed, 29 Mar 2017 18:23:08 +0000 (18:23 +0000)]
[InstCombine] Correct the check for vector GEPs
Some of the GEP combines (e.g., descaling) can't handle vector GEPs. We have an
existing check that attempts to bail out if given a vector GEP. However, the
check only tests the GEP's pointer operand. A GEP results in a vector of
pointers if at least one of its operands is vector-typed (e.g., its pointer
operand could be a scalar, but its index could be a vector). We should just
check the type of the GEP itself. This should fix PR32414.
Reference: https://bugs.llvm.org/show_bug.cgi?id=32414
Differential Revision: https://reviews.llvm.org/D31470
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299017
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 29 Mar 2017 18:08:01 +0000 (18:08 +0000)]
[DAGCombiner] unify type checks and add asserts; NFCI
We had a mix of type checks and usage that wasn't very clear.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299013
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Wed, 29 Mar 2017 17:11:27 +0000 (17:11 +0000)]
llvm-pdbdump: If we don't change the color, don't reset the color.
The -output-color option was successful at suppressing color changes, but
was still allowing color resets.
Differential Revision: https://reviews.llvm.org/D31468
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299006
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 29 Mar 2017 15:41:58 +0000 (15:41 +0000)]
[X86] Tidied up comment - we don't custom lower add/sub i64 on i686 anymore. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299004
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 29 Mar 2017 15:37:33 +0000 (15:37 +0000)]
[DAGCombiner] reduce code duplication by rearranging checks; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299002
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 29 Mar 2017 15:37:18 +0000 (15:37 +0000)]
[tablegen][globalisel] Convert the SelectionDAG importer to a tree walking approach. NFC
Summary:
But don't actually inspect the tree any deeper than we already do. This
change is NFC but the next one will enable full traversal of the
source/destination patterns.
Depends on D30535
Reviewers: t.p.northover, qcolombet, aditya_nandakumar, rovka, ab
Subscribers: igorb, dberris, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D30536
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299001
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 29 Mar 2017 15:27:24 +0000 (15:27 +0000)]
Spelling mistakes in comments. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299000
91177308-0d34-0410-b5e6-
96231b3b80d8
Sven van Haastregt [Wed, 29 Mar 2017 15:25:06 +0000 (15:25 +0000)]
[MachineVerifier] Drop a spurious const
As of r298987 the argument is a value that we std::move, so it
shouldn't be const anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298999
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Wed, 29 Mar 2017 14:42:27 +0000 (14:42 +0000)]
Cleanup in preparation for D30703. NFCI
Make the enumerators follow the coding convention and start with OW_...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298996
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 29 Mar 2017 14:27:38 +0000 (14:27 +0000)]
Fix GettingStarted.rst statement.
Patch by Wei-Ren Chen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298995
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 29 Mar 2017 14:20:38 +0000 (14:20 +0000)]
Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298994
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 29 Mar 2017 13:00:00 +0000 (13:00 +0000)]
[X86][AVX2] Prevent unary interleaving patterns from calling lowerVectorShuffleAsSplitOrBlend (PR32453)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298993
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 29 Mar 2017 12:09:25 +0000 (12:09 +0000)]
[AMDGPU] Tidy up computeKnownBitsForTargetNode/ComputeNumSignBitsForTargetNode arguments. NFCI.
Based on comment in D31249.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298991
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 29 Mar 2017 10:47:18 +0000 (10:47 +0000)]
[X86][MMX] Added generic sitofp test to compare against existing cvtdq2ps test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298989
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 29 Mar 2017 10:44:51 +0000 (10:44 +0000)]
[X86] Removed old comment. NFCI.
No longer makes sense as the previous opcode mnemonic it was referring to is long gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298988
91177308-0d34-0410-b5e6-
96231b3b80d8
Sven van Haastregt [Wed, 29 Mar 2017 09:08:25 +0000 (09:08 +0000)]
[MachineVerifier] Avoid reference to nullptr
Instantiation of the MachineVerifierPass through
PassInfo::getNormalCtor would yield a segfault since the default
constructor of the MachineVerifierPass takes a reference to nullptr.
Patch by Simone Pellegrini.
Differential Revision: https://reviews.llvm.org/D31387
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298987
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 29 Mar 2017 07:40:44 +0000 (07:40 +0000)]
Move the x86 cpu feature rtm from Haswell to Skylake matching clang commit r298956.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298986
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 29 Mar 2017 07:31:56 +0000 (07:31 +0000)]
[AVX-512] Remove explicit KMOVWrk from isel patterns. COPY_TO_REGCLASS to GR32 is enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298985
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 29 Mar 2017 06:55:28 +0000 (06:55 +0000)]
[AVX-512] Remove explicit KMOVWrk/KMOVWKr instructions from patterns where we can just use COPY_TO_REGCLASS instead.
This will result in a KMOVW or KMOVD being emitted during register allocation. And in at least some cases this might allow the register coalescer to remove the copy all together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298984
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Wed, 29 Mar 2017 06:10:12 +0000 (06:10 +0000)]
[XRay] Update FDR log reader to be aware of buffer sizes per thread.
Summary:
It is problematic for this reader that it expects to read data from
several threads, but the header or message format does not define
framing. Since the buffers are reused, we can't rely on skipping
zeroed out data as a synchronization method either.
There is an argument that this is not version compatible with the format
the reader expected previously. I argue that since the writer wrote garbage
past the end of buffer record, there is no currently working reader to
compromise.
The corresponding writer change is posted to D31384.
Reviewers: dberris, pelikan
Reviewed By: dberris
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31385
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298983
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Wed, 29 Mar 2017 04:55:45 +0000 (04:55 +0000)]
[XRay][tools] Handle "no subcommand" case for llvm-xray
Summary:
Currently the llvm-xray commandline tool fails to handle the case for
when no subcommand is provided in a graceful manner. This fixes that to
print the help message explaining the subcommands and the available
options.
Reviewers: pcc, pelikan
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31409
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298975
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 28 Mar 2017 23:46:14 +0000 (23:46 +0000)]
[SDAG] Remove -enable-fmf-dag
This is no longer needed as spotted by Sanjay in
https://reviews.llvm.org/D31165.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298963
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 28 Mar 2017 23:46:12 +0000 (23:46 +0000)]
[SDAG] Handle VectorReduction in SDNodeFlags::intersectWith
Spotted by Sanjay in https://reviews.llvm.org/D31165
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298962
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 28 Mar 2017 23:46:08 +0000 (23:46 +0000)]
[SDAG] Add AllowContract to SNodeFlags
Properly propagate the FMF from the LLVM IR to this flag.
This is toward moving fp-contraction=fast from an LLVM TargetOption to a
FastMathFlag in order to fix PR25721.
Differential Revision: https://reviews.llvm.org/D31165
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298961
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 28 Mar 2017 23:35:34 +0000 (23:35 +0000)]
More accurate header inclusions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298960
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 28 Mar 2017 23:29:35 +0000 (23:29 +0000)]
[AVX-512] Add test case that was supposed to go with r298957.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298959
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 28 Mar 2017 23:20:37 +0000 (23:20 +0000)]
[AVX-512] Punt on fast-isel of truncates to i1 when AVX512 is enabled.
We should be masking the value and emitting a register copy like we do in non-fast isel. Instead we were just updating the value map and emitting nothing.
After r298928 we started seeing cases where we would create a copy from GR8 to GR32 because the source register in a VK1 to GR32 copy was replaced by the GR8 going into a truncate.
This fixes PR32451.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298957
91177308-0d34-0410-b5e6-
96231b3b80d8
Guozhi Wei [Tue, 28 Mar 2017 22:55:01 +0000 (22:55 +0000)]
[PPC] In PPCBoolRetToInt change the bool value to i64 if the target is ppc64
In PPCBoolRetToInt bool value is changed to i32 type. On ppc64 it may introduce an extra zero extension for the return value. This patch changes the integer type to i64 to avoid the zero extension on ppc64.
This patch fixed PR32442.
Differential Revision: https://reviews.llvm.org/D31407
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298955
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 28 Mar 2017 22:45:53 +0000 (22:45 +0000)]
[DAGCombiner] reduce code duplication with local variables; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298954
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 28 Mar 2017 22:37:43 +0000 (22:37 +0000)]
Add a similar test for tailcall optimization as in r270287 for aarch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298952
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 28 Mar 2017 22:31:35 +0000 (22:31 +0000)]
LTO: Replace InputFile::Symbol::getFlags() with predicate accessors. NFC.
This makes the predicates independent of the flag representation
and makes the code a little easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298951
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 28 Mar 2017 22:25:25 +0000 (22:25 +0000)]
[DAG] fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298950
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 28 Mar 2017 22:22:50 +0000 (22:22 +0000)]
[DAGCombiner] remove redundant conditions and duplicated code; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298949
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Tue, 28 Mar 2017 22:13:51 +0000 (22:13 +0000)]
[AMDGPU] Boost unroll threshold for loops reading local memory
This is less important than increase threshold for private memory,
but still brings performance improvements in a wide range of tests.
Unrolling more for local memory serves three purposes: it allows
to combine ds operations if offset becomes static, saves registers
used for offsets in case of static offsets, and allows better lds
latency hiding.
Differential Revision: https://reviews.llvm.org/D31412
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298948
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Tue, 28 Mar 2017 21:48:54 +0000 (21:48 +0000)]
[AMDGPU] Fix recorded region boundaries in max-occupancy scheduler
This is incorrect to record region boundaries before scheduling,
it may change after scheduling. As a result second pass may see less
instructions to schedule than it should.
Differential Revision: https://reviews.llvm.org/D31434
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298945
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 28 Mar 2017 21:40:41 +0000 (21:40 +0000)]
[DAGCombiner] rename variables in foldAndOfSetCCs for easier reading; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298944
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 28 Mar 2017 21:32:11 +0000 (21:32 +0000)]
[X86][MMX] Match MMX fp_to_sint conversions from XMM registers
We currently perform the various fp_to_sint XMM conversion and then transfer to the MMX register (on 32-bit via the stack).
This patch improves support for MOVDQ2Q XMM to MMX transfers and adds the XMM->MMX fp_to_sint direct conversion patterns. The SSE2 specifications are the same as for XMM->XMM and XMM->MMX rounding/exceptions/etc.
Differential Revision: https://reviews.llvm.org/D30868
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298943
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 28 Mar 2017 20:33:12 +0000 (20:33 +0000)]
Fix crashing on TargetCustom PseudoSourceValues
Default to something more reasonable if printCustom isn't implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298941
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 28 Mar 2017 20:28:16 +0000 (20:28 +0000)]
[DAGCombiner] clean up foldAndOfSetCCs; NFCI
1. Fix bogus comment.
2. Early exit to reduce indent.
3. Change node pointer param to what it really is: an SDLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298940
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 28 Mar 2017 20:11:52 +0000 (20:11 +0000)]
[IR] Add AllowContract to FastMathFlags
-ffp-contract=fast does not currently work with LTO because it's passed as a
TargetOption to the backend rather than in the IR. This adds it to
FastMathFlags.
This is toward fixing PR25721
Differential Revision: https://reviews.llvm.org/D31164
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298939
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 28 Mar 2017 19:58:46 +0000 (19:58 +0000)]
[DAGCombiner] add helper function for and-of-setcc folds; NFC
This is just a cut and paste followed by clang-format. Clean up to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298938
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 28 Mar 2017 18:55:44 +0000 (18:55 +0000)]
Add support for -fno-builtin to LTO and ThinLTO to libLTO
Reviewers: tejohnson, pcc
Subscribers: Prazek, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D30791
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298936
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Tue, 28 Mar 2017 18:23:24 +0000 (18:23 +0000)]
[AMDGPU] Split -amdgpu-early-inline-all option
Previously it was covered by the internalization. It turns out we cannot
run internalizer in FE, it break separate compilation tests. Thus early
inliner gets its own option.
Differential Revision: https://reviews.llvm.org/D31429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298935
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 28 Mar 2017 17:23:49 +0000 (17:23 +0000)]
[x86] use VPMOVMSK to replace memcmp libcalls for 32-byte equality
Follow-up to:
https://reviews.llvm.org/rL298775
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298933
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Tue, 28 Mar 2017 17:15:11 +0000 (17:15 +0000)]
Revert "Dont emit Mapping symbols for sections that contain only data."
It breaks some lld tests.
This reverts commit
3a50eea6d9732ab40e9a7aebe6be777b53a8b35c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298932
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Tue, 28 Mar 2017 17:09:49 +0000 (17:09 +0000)]
[SDAG] Deal with deleted node in PromoteIntShiftOp
Deal with case that initial node is deleted during dag-combine leading
to an assertional failure in promoteIntShiftOp.
Fixes PR32420.
Reviewers: spatel, RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31403
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298931
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Tue, 28 Mar 2017 16:45:23 +0000 (16:45 +0000)]
Add reproducer test for pr32449. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298930
91177308-0d34-0410-b5e6-
96231b3b80d8