1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

125653 Commits

Author SHA1 Message Date
Chen Li
98023a7f09 [SplitLandingPadPredecessors] Create a PHINode for the original landingpad only if it has some uses
Summary: This patch adds a check in SplitLandingPadPredecessors to see if the original landingpad instruction has any uses. If not, we don't need to create a PHINode for it in the joint block since it's gonna be a dead code anyway. The motivation for this patch is that we found a bug that SplitLandingPadPredecessors created a PHINode of token type landingpad, which failed the verifier since PHINode can not be token type. However, the created PHINode will never be used in our code pattern. This patch will workaround this bug, and we might add supports in SplitLandingPadPredecessors to handle token type landingpad with uses in the future.

Reviewers: reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15835

llvm-svn: 256972
2016-01-06 20:32:05 +00:00
Amaury Sechet
b940cf08ab Promote aggregate store to memset when possible
Summary: As per title. This will allow the optimizer to pick up on it.

Reviewers: craig.topper, spatel, dexonsmith, Prazek, chandlerc, joker.eph, majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15923

llvm-svn: 256969
2016-01-06 19:47:24 +00:00
Amaury Sechet
56d77f8e3d Remove useless DEBUG
llvm-svn: 256968
2016-01-06 19:45:09 +00:00
Philip Reames
5b74fcf971 Consolidate MemRefs handling from BranchFolding and correct latent bug
Move the logic from BranchFolding to use the shared infrastructure for merging MMOs introduced in 256909. This has the effect of making BranchFolding more capable.

In the process, fix a latent bug. The existing handling for merging didn't handle the case where one of the instructions being merged had overflowed and dropped MemRefs. This was a latent bug in the places the code was commoned from, but potentially reachable in BranchFolding.

Once this is in, we're left with a single place to consider implementing MMO unique-ing as proposed in http://reviews.llvm.org/D15230.

Differential Revision: http://reviews.llvm.org/D15913

llvm-svn: 256966
2016-01-06 19:33:12 +00:00
David Majnemer
db8a5be1ee [WinEH] Remove calculateCatchReturnSuccessorColors
The functionality that calculateCatchReturnSuccessorColors provides was
once non-trivial: it was a computation layered on top of funclet
coloring.

These days, LLVM IR directly encodes what
calculateCatchReturnSuccessorColors computed, obsoleting the need for
it.

No functionality change is intended.

llvm-svn: 256965
2016-01-06 19:26:30 +00:00
Sanjay Patel
20d1d5e75f [LibCallSimplifier] use instruction-level fast-math-flags for tan/atan transform
llvm-svn: 256964
2016-01-06 19:23:35 +00:00
Quentin Colombet
1b2176f1f4 [X86] Correctly model TLS calls w.r.t. frame requirements.
TLS calls need the stack frame to be properly set up and this
implies that such calls need ADJUSTSTACK_xxx markers.

Fixes PR25820.

llvm-svn: 256959
2016-01-06 19:09:26 +00:00
Nico Weber
f2a28338f0 Make WinCOFFObjectWriter.cpp's timestamp writing not use ENABLE_TIMESTAMPS
LLVM_ENABLE_TIMESTAMPS controls if timestamps are embedded into llvm's
binaries. Turning it off is useful for deterministic builds.

r246905 made it so that the define suddenly also controls if the binaries that
the llvm binaries _create_ embed timestamps or not – but this shouldn't be a
configure-time option. r256203/r256204 added a driver option to toggle this on
and off, so this patch now passes this driver option in LLVM_ENABLE_TIMESTAMPS
builds so that if LLVM_ENABLE_TIMESTAMPS is set, the build of LLVM is
deterministic – but the built clang can still write timestamps into other
executables when requested.

This also allows removing some of the test machinery added in r292012 to work
around this problem.

See PR24740 for background.
http://reviews.llvm.org/D15783

llvm-svn: 256958
2016-01-06 19:05:19 +00:00
Sanjay Patel
df9b659110 refactor divrem8 lowering; NFCI
The code duplication contributed to PR25754:
https://llvm.org/bugs/show_bug.cgi?id=25754

llvm-svn: 256957
2016-01-06 18:47:09 +00:00
Michael Kuperstein
a1e9b95eab [ShrinkWrap] Fix FindIDom to only have one kind of failure.
FindIDom() can fail in two different ways - it can either return nullptr or the
block itself, depending on the circumstances. Some users of FindIDom() check
one error condition, while others check the other.

Change it to always return nullptr on failure.
This fixes PR26004.

Differential Revision: http://reviews.llvm.org/D15847

llvm-svn: 256955
2016-01-06 18:40:11 +00:00
Weiming Zhao
525343c267 Revert r256952 due to lit test fails.
llvm-svn: 256954
2016-01-06 18:31:44 +00:00
Dan Gohman
f58a82f98e [WebAssembly] Don't use range-based loop for a list that's being modified
The first instruction in a block is what the rend() iterator points to, so
if it moves, we need to re-evaluate rend() so that we continue to iterate
through the rest of the instructions.

llvm-svn: 256953
2016-01-06 18:29:35 +00:00
Weiming Zhao
b7a49247d4 Filtering IR printing for print-after-all/print-before-all
Summary:
This patch implements "-print-funcs" option to support function filtering for IR printing like -print-after-all, -print-before etc.
Examples:
  -print-after-all -print-funcs=foo,bar

Reviewers: mcrosier, joker.eph

Subscribers: tejohnson, joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D15776

llvm-svn: 256952
2016-01-06 18:20:25 +00:00
Weiming Zhao
d8aec406ad Fix option desc in FunctionAttrs; NFC
Summary: The example in desc should match with actual option name

Reviewers: jmolloy

Differential Revision: http://reviews.llvm.org/D15800

llvm-svn: 256951
2016-01-06 18:18:16 +00:00
Geoff Berry
e1c655b885 ScheduleDAGInstrs: Bug fix for missed memory dependency.
Summary:
In buildSchedGraph(), when adding memory dependencies for loads, move
the call to adjustChainDeps() after the call to
addChainDependency(AliasChain) to handle the case where
addChainDependency(AliasChain) ends up not adding a dependency and
instead putting the SU on the RejectMemNodes list.  The call to
adjustChainDeps() must be done after the call to addChainDependency() in
order to process the SU added to the RejectMemNodes list to create
memory dependencies for it.

Reviewers: hfinkel, atrick, jonpa, resistor

Subscribers: mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D15927

llvm-svn: 256950
2016-01-06 18:14:26 +00:00
Philip Reames
94e41bde2a [BasicAA] Extract WriteOnly predicate on parameters [NFC]
Since writeonly is the only missing attribute and special case left for the memset/memcpy family of intrinsics, rearrange the code to make that much more clear.

llvm-svn: 256949
2016-01-06 18:10:35 +00:00
JF Bastien
61a8beaafa WebAssembly: add missing expected failures exposed by r256890
llvm-svn: 256948
2016-01-06 17:08:56 +00:00
Dan Gohman
ca174f1e6a [WebAssembly] Add -asm-verbose=false to llc tests.
In general, disabling comments in the output reduces the chances of a
CHECK line accidentally matching a comment instead of its intended text.

llvm-svn: 256946
2016-01-06 16:45:05 +00:00
JF Bastien
15f0f3953b WebAssembly: add new expected failures exposed by r256890
llvm-svn: 256945
2016-01-06 16:15:51 +00:00
Teresa Johnson
ae16c1fff2 Add unittest for new CanReplace flag on MDNodes
This adds a unittest for the support added in r256648 to add
a flag that can be used to prevent RAUW on temporary metadata
used as a map key.

llvm-svn: 256938
2016-01-06 15:02:40 +00:00
Krzysztof Parzyszek
787f659237 [Hexagon] Add system instructions for cache manipulation
llvm-svn: 256936
2016-01-06 14:22:22 +00:00
Amaury Sechet
2856f73ed4 Revert "GlobalsAA: Take advantage of ArgMemOnly, InaccessibleMemOnly and InaccessibleMemOrArgMemOnly attributes"
Summary:
This reverts commit 5a9e526f29cf8510ab5c3d566fbdcf47ac24e1e9.

As per discussion in D15665

This also add a test case so that regression introduced by that diff are not reintroduced.

Reviewers: vaivaswatha, jmolloy, hfinkel, reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15919

llvm-svn: 256932
2016-01-06 13:23:52 +00:00
Matthew Simpson
18b4a9537b [LV] Avoid creating empty reduction entries (NFC)
This patch prevents us from unintentionally creating entries in the reductions
map for PHIs that are not actually reductions. This is currently not an issue
since we bail out if we encounter PHIs other than inductions or reductions.
However the behavior could become problematic as we add support for additional
recurrence types.

llvm-svn: 256930
2016-01-06 12:50:29 +00:00
Artyom Skrobov
402764f41e PR25754: avoid generating UDIVREM8_ZEXT_HREG nodes with i64 result
Reviewers: spatel, srking

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15331

llvm-svn: 256924
2016-01-06 09:41:10 +00:00
Amaury Sechet
cafefe3116 Improve load/store to memcpy for aggregate
Summary: It turns out that if we don't try to do it at the store location, we can do it before any operation that alias the load, as long as no operation alias the store.

Reviewers: craig.topper, spatel, dexonsmith, Prazek, chandlerc, joker.eph

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15903

llvm-svn: 256923
2016-01-06 09:30:39 +00:00
Simon Pilgrim
e7308ddcf1 [X86][SSE] There is no zmm addsubpd/addsubps instruction.
Replace the assert in combineShuffleToAddSub with an early out.

llvm-svn: 256922
2016-01-06 09:08:49 +00:00
Simon Pilgrim
3c38fe0257 [X86][SSE] An empty target shuffle mask is always a failure.
As discussed on D15378, move the mask.empty() tests to after the switch statement and consider any shuffle decode where the extracted target shuffle mask is empty as a failure.

llvm-svn: 256921
2016-01-06 08:59:32 +00:00
Craig Topper
f0f0ca85b5 [X86] Use PS instead of TB for instructions that have PD/XS/XD variations. Use OpSize32 on an instruction that has an OpSize16 variant.
llvm-svn: 256918
2016-01-06 06:18:41 +00:00
Craig Topper
b5a33aa69f [X86] Fix an incorrect usage of In32BitMode that should have been Not64BitMode.
llvm-svn: 256917
2016-01-06 06:18:37 +00:00
Philip Reames
575fa2e0d3 Fix a warning [NFC]
llvm-svn: 256916
2016-01-06 05:53:09 +00:00
Jordan Rose
cfdd350538 Add != to YAMLParser's basic_collection_iterator.
...and mark it as merely an input_iterator rather than a forward_iterator,
since it is destructive. And then rewrite == to take advantage of that.

Patch by Alex Denisov!

llvm-svn: 256913
2016-01-06 05:17:12 +00:00
David Majnemer
6385f16575 [SimplifyLibCalls] Teach SimplifyLibCalls about operand bundles
If we replace one call-site with another, be sure to move over any
operand bundles that lingered on the old call-site.

This fixes PR26036.

llvm-svn: 256912
2016-01-06 05:01:34 +00:00
Philip Reames
780b59a41c [BasicAA] Remove special casing of memset_pattern16 in favor of generic attribute inference
Most of the properties of memset_pattern16 can be now covered by the generic attributes and inferred by InferFunctionAttrs.  The only exceptions are:
- We don't yet have a writeonly attribute for the first argument.
- We don't have an attribute for modeling the access size facts encoded in MemoryLocation.cpp.  

Differential Revision: http://reviews.llvm.org/D15879

llvm-svn: 256911
2016-01-06 04:53:16 +00:00
Philip Reames
23e3fb6f4a [BasicAA] Delete dead code related to memset/memcpy/memmove intrinsics [NFCI]
We only need to describe the writeonly property of one of the arguments. All of the rest of the semantics are nicely described by existing attributes in Intrinsics.td.

Differential Revision: http://reviews.llvm.org/D15880

llvm-svn: 256910
2016-01-06 04:43:03 +00:00
Philip Reames
f7e04fbc3d Extract helper function to merge MemoryOperand lists [NFC]
In the discussion on http://reviews.llvm.org/D15730, Andy pointed out we had a utility function for merging MMO lists. Since it turned we actually had two copies and there's another review in progress (http://reviews.llvm.org/D15230) which needs the same, extract it into a utility function and clean up the interfaces to make it easier to use with a MachineInstBuilder.

I introduced a pair here to track size and allocation together. I think we should probably move in the direction of the MachineOperandsRef helper class, but I'm leaving that for further work. I want to get the poison state introduced before I make major changes to the interface.

Differential Revision: http://reviews.llvm.org/D15757

llvm-svn: 256909
2016-01-06 04:39:03 +00:00
Junmo Park
fff17a4cfa Delete trailing whitespace; NFC
llvm-svn: 256908
2016-01-06 03:53:36 +00:00
Junmo Park
18c511ac11 Delete trailing whitespace; NFC
llvm-svn: 256906
2016-01-06 03:41:30 +00:00
Yunzhong Gao
31fbef05ac Do not define NOGDI. Mingw defines LOGFONTW type in wingdi.h and the mingw
version of shlobj.h includes shobjidl.h and the latter uses the LOGFONTW type.

llvm-svn: 256904
2016-01-06 03:01:10 +00:00
Yunzhong Gao
829fdd9d2d Another attempt at fixing the i686-mingw32-RA-on-linux buildbot. I am getting
confused with what version of mingw is actually installed on the buildbot, and
for now I will just assume this is an unknown version which does not ship with
VersionHelpers.h.

llvm-svn: 256902
2016-01-06 02:48:42 +00:00
Yunzhong Gao
8436c5e604 Another attempt at fixing the i686-mingw32-RA-on-linux buildbot.
llvm-svn: 256901
2016-01-06 02:32:31 +00:00
Kostya Serebryany
2c6246a7e6 [libFuzzer] extend the dictionary mutator to optionally overwrite data with the dict entry
llvm-svn: 256900
2016-01-06 02:13:04 +00:00
Yunzhong Gao
366fb8b985 Hopefully fix a mingw32 buildbot (i686-mingw32-RA-on-linux) which does not have
the VersionHelpers.h header.

llvm-svn: 256896
2016-01-06 01:36:45 +00:00
Xinliang David Li
88f1bad0de More fix to coverage documentation
llvm-svn: 256895
2016-01-06 01:23:41 +00:00
Yunzhong Gao
0526fb6aaa Fixing PR25717: fatal IO error writing large outputs to console on Windows.
This patch is similar to the Python issue#11395. We need to cap the output
size to 32767 on Windows to work around the size limit of WriteConsole().
Reference: https://bugs.python.org/issue11395

Writing a test for this bug turns out to be harder than I thought. I am
still working on it (see phabricator review D15705).

Differential Revision: http://reviews.llvm.org/D15553

llvm-svn: 256892
2016-01-06 00:50:06 +00:00
Sanjay Patel
6c5badba14 rangify; NFCI
llvm-svn: 256891
2016-01-06 00:45:42 +00:00
Dan Gohman
da9aecd4b5 [SelectionDAGBuilder] Set NoUnsignedWrap for inbounds gep and load/store offsets.
In an inbounds getelementptr, when an index produces a constant non-negative
offset to add to the base, the add can be assumed to not have unsigned overflow.

This relies on the assumption that addresses can't occupy more than half the
address space, which isn't possible in C because it wouldn't be possible to
represent the difference between the start of the object and one-past-the-end
in a ptrdiff_t.

Setting the NoUnsignedWrap flag is theoretically useful in general, and is
specifically useful to the WebAssembly backend, since it permits stronger
constant offset folding.

Differential Revision: http://reviews.llvm.org/D15544

llvm-svn: 256890
2016-01-06 00:43:06 +00:00
Sanjay Patel
4d1db6266a use std::max ; NFCI
llvm-svn: 256889
2016-01-06 00:36:59 +00:00
Sanjay Patel
58be7e2c7d A (B + C) = A B + A C ; NFCI
llvm-svn: 256884
2016-01-06 00:32:15 +00:00
Sanjay Patel
b7b8b14e32 fix typo; NFC
llvm-svn: 256883
2016-01-06 00:23:12 +00:00
Mike Aizatsky
b1bf6550e4 [libfuzzer] print_new_cov_pcs experimental option.
Differential Revision: http://reviews.llvm.org/D15901

llvm-svn: 256882
2016-01-06 00:21:22 +00:00