1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
Roman Lebedev
f9cbb7144f [Reduce] Try turning function definitions into declarations first, NFCI-ish
ReduceFunctions could do it, but it also replaces *all* calls with undef,
so if any of undef replacements makes reduction uninteresting,
it won't work.

ReduceBasicBlocks also could do it, but well, it may take many guesses
for all the blocks of a function to happen to be out-of-chunk,
which is not a very efficient way to go about it.

So let's just do this first.
2020-07-25 21:43:36 +03:00
Roman Lebedev
892d28a558 [llvm-reduce] Reducing attributes
Summary:
This handles all three places where attributes could currently be - `GlobalVariable`, `Function` and `CallBase`.
For last two, it correctly handles all three possible attribute locations (return value, arguments and function itself)

There was a previous attempt at it D73853,
which was committed in rGfc62b36a000681c01e993242b583c5ec4ab48a3c,
but then reverted all the way back in rGb12176d2aafa0ccb2585aa218fc3b454ba84f2a9
due to some (osx?) test failures.

Reviewers: nickdesaulniers, dblaikie, diegotf, george.burgess.iv, jdoerfert, Tyker, arsenm

Reviewed By: nickdesaulniers

Subscribers: wdng, MaskRay, arsenm, llvm-commits, mgorny

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83351
2020-07-09 23:10:43 +03:00
Roman Lebedev
40f6d0064d [llvm-reduce] Reducing call operand bundles
Summary:
This would have been marginally useful to me during/for rG7ea46aee3670981827c04df89b2c3a1cbdc7561b.

With ongoing migration to representing assumes via operand bundles on the assume, this will be gradually more useful.

Reviewers: nickdesaulniers, diegotf, dblaikie, george.burgess.iv, jdoerfert, Tyker

Reviewed By: nickdesaulniers

Subscribers: hiraditya, mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83177
2020-07-07 01:16:37 +03:00
Nico Weber
878db5393d Revert "[llvm-reduce] add ReduceAttribute delta pass"
This reverts commit fc62b36a000681c01e993242b583c5ec4ab48a3c.
Breaks tests on mac: http://45.33.8.238/mac/7301/step_11.txt
2020-02-05 14:15:11 -05:00
Nick Desaulniers
686a91a786 [llvm-reduce] add ReduceAttribute delta pass
Summary:
The output from llvm-reduce still has significantly more attributes than
bugpoint does.  Teach llvm-reduce to remove attributes.

Reviewers: diegotf, dblaikie, george.burgess.iv

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73853
2020-02-05 10:05:25 -08:00
David Blaikie
d5d1d93e4d llvm-reduce: Add pass to reduce instructions
Patch by Diego Treviño!

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

llvm-svn: 372282
2019-09-19 00:59:27 +00:00
David Blaikie
c11946eb06 llvm-reduce: Add pass to reduce basic blocks
Patch by Diego Treviño!

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

llvm-svn: 372264
2019-09-18 21:45:05 +00:00
David Blaikie
70d10faac3 llvm-reduce: Remove unused plugin support/requirements
llvm-svn: 371755
2019-09-12 18:52:31 +00:00
David Blaikie
11d923a343 Reapply llvm-reduce: Add pass to reduce parameters""
Fixing a couple of asan-identified bugs
* use of an invalid "Use" iterator after the element was removed
* use of StringRef to Function name after the Function was erased

This reapplies r371567, which was reverted in r371580.

llvm-svn: 371700
2019-09-12 01:20:48 +00:00
David Blaikie
782e774b4d Revert "llvm-reduce: Add pass to reduce parameters"
Looks to be failing on asan buildbots

This reverts commit r371567.

llvm-svn: 371580
2019-09-11 00:44:17 +00:00
David Blaikie
5d92ad29cd llvm-reduce: Add pass to reduce parameters
Patch by Diego Treviño!

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

llvm-svn: 371567
2019-09-10 23:10:10 +00:00
David Blaikie
4e25fb2d4f llvm-reduce: Add pass to reduce Metadata
Patch by Diego Treviño!

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

llvm-svn: 371562
2019-09-10 22:09:58 +00:00
Diego Trevino Ferrer
fab54799c5 [Bugpoint redesign] Added Pass to Remove Global Variables
Summary:
This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively.

I'm still uncertain if this pass should remove derived uses, I'm open to suggestions.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

> llvm-svn: 368918

llvm-svn: 369061
2019-08-15 22:54:09 +00:00
Diego Trevino Ferrer
f97adebbab Revert [Bugpoint redesign] Added Pass to Remove Global Variables
This reverts r368918 because it was unstable!

It broke these builds:
 * http://lab.llvm.org:8011/builders/lld-x86_64-ubuntu-fast/builds/4649
 * http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29966
 * http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29964

But surprisingly this passed:
 * http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29965

llvm-svn: 369039
2019-08-15 19:08:15 +00:00
Diego Trevino Ferrer
1b3c98cfd0 [Bugpoint redesign] Added Pass to Remove Global Variables
Summary:
This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively.

I'm still uncertain if this pass should remove derived uses, I'm open to suggestions.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368918
2019-08-14 21:01:19 +00:00
Sam Clegg
2e67a4781b Fix -DBUILD_SHARED_LIBS=ON build after rL368358
Differential Revision: https://reviews.llvm.org/D65982

llvm-svn: 368363
2019-08-08 23:00:28 +00:00
Diego Trevino Ferrer
c4a583a0ae Added Delta IR Reduction Tool
Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

> llvm-svn: 368071

llvm-svn: 368358
2019-08-08 22:16:33 +00:00
Diego Trevino Ferrer
44a8f767f6 Revert Added Delta IR Reduction Tool
This reverts r368071 (git commit a2584978f5bb41973d65a145b0d9459b81e3ac6d)

llvm-svn: 368217
2019-08-07 21:51:54 +00:00
Diego Trevino Ferrer
2143dc29d5 Added Delta IR Reduction Tool
Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

> llvm-svn: 368071

llvm-svn: 368214
2019-08-07 21:37:11 +00:00
Petr Hosek
fac9592e7e Reverts commit r368117, r368115 and r368112
This reverts commits:

  "Added Delta IR Reduction Tool"
  "[Bugpoint redesign] Added Pass to Remove Global Variables"
  "Added Tool as Dependency to tests & fixed warnings"

Reduce/remove-funcs.ll is failing on bots.

llvm-svn: 368122
2019-08-07 05:15:34 +00:00
Diego Trevino Ferrer
79a3c73c1c [Bugpoint redesign] Added Pass to Remove Global Variables
Summary:
This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively.

I'm still uncertain if this pass should remove derived uses, I'm open to suggestions.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368115
2019-08-07 00:42:50 +00:00
Diego Trevino Ferrer
72f0bd49ad Added Delta IR Reduction Tool
Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

> llvm-svn: 368071

llvm-svn: 368112
2019-08-07 00:00:52 +00:00
Dmitri Gribenko
66e203026e Revert "Added Delta IR Reduction Tool"
This reverts commit r368071, it broke buildbots.

llvm-svn: 368073
2019-08-06 19:40:37 +00:00
Diego Trevino Ferrer
3fc8dbf0ee Added Delta IR Reduction Tool
Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368071
2019-08-06 18:59:11 +00:00