Commit Graph

22 Commits

Author SHA1 Message Date
Gwynne Raskind
09b4159cb2 Global replace of "assertEquals" with "assertEqual" in compliance with deprecation of assertEquals name in Python 2.7 2019-01-16 04:06:38 -06:00
Graydon Hoare
71da5ec519 Fix flake8 warning W605 invalid escape sequence. 2018-11-06 11:38:39 -08:00
Erik Eckstein
39bb14b094 change mangling prefix from $S to $s
This is the final ABI mangling prefix

rdar://problem/38471478
2018-09-19 13:55:11 -07:00
Michael Gottesman
b77a47ed83 [bug_reducer] Update/fix for mangling/bitrot.
rdar://31044019
2018-06-03 18:50:35 -07:00
Hugh Bellamy
fa3543d3c5 Fix some pylint errors for double whitespace after class/function 2017-02-17 15:37:19 +07:00
practicalswift
92ccc44b3a [gardening] Fix recently introduced PEP-8 deviations 2017-01-22 22:02:33 +01:00
Michael Gottesman
5d3f47f118 [bug-reducer] Rename bug_reducer_utils.py => swift_tools.py 2017-01-10 22:38:25 -08:00
Michael Gottesman
7c7b405141 [bug-reducer] Remove print of output from test. This was debugging code that was by mistake committed. 2017-01-10 22:38:25 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Michael Gottesman
0403feba82 [bug-reducer-tester] Add support for causing a miscompile instead of just asserting.
Previously, bug reducer tester would just assert when it saw a direct apply to
its target function. Now we add support for also causing a miscompile by just
deleting the apply. This is tested by eliminating an apply to putchar to ensure
we are not dependent on any stdlib details.
2017-01-04 15:21:30 -08:00
Michael Gottesman
4ce78fd082 [bug-reducer] When invoking, emit a command line that outputs sib. When printing a commandline for reproduction purposes by the user, drop -emit-sib so sil-opt emits textual sil.
Just a cleanup while I am using this.
2017-01-04 13:18:27 -08:00
practicalswift
1ff3b76b75 [gardening] PEP-8 fixes. 2016-12-20 10:10:29 +01:00
practicalswift
31676caa20 [gardening] PEP-8 cleanups. 2016-12-18 09:48:30 +01:00
practicalswift
ddedf240ec [gardening] Use correct Swift URLs. 2016-12-17 22:33:09 +01:00
practicalswift
f60da8ecac [gardening] PEP-8: Stay within 79 chars. 2016-12-16 21:42:08 +01:00
practicalswift
77a07467bf [gardening] Fix invalid Swift URLs in headers. 2016-12-16 21:42:08 +01:00
Michael Gottesman
7072a146a1 [sil-bug-reducer] Add --reduce-sil flag to ./bug-reduce opt.
This will cause the tool to first bisect on passes, and then try to reduce the
SIL by deleting functions.
2016-12-15 01:16:26 -08:00
Michael Gottesman
59746ecfa5 [sil-bug-reducer] Add function reducing functionality.
Now once you have a pass list using:

  ./bug-reducer opt ...

You can take the pass list and give it and the output file to bug-reducer func:

  ./bug-reducer func ...

which will reduce the function list for you given a pass list. This is kept
separate to allow for testing and orthogonality. In a future commit, I am going
to add an option to ./bug-reducer opt that will invoke the function reducer
automagically.
2016-12-15 00:40:28 -08:00
Michael Gottesman
895e287fd6 [sil-bug-reducer] Pass in a config object to SILToolInvoker instead of the full args.
This enables us to specify variables like module_name, sdk without having the
SILToolInvoker rely on the argument for the input_file. This is a nice
separation and will let me implement easily a func_bug_reducer tool that can be
enabled after reducing  the number of functions using opt_bug_reducer.py.
2016-12-15 00:39:29 -08:00
Michael Gottesman
88884e44a4 [sil-bug-reducer] Test suffix pass pipeline in need of prefix pipeline case. 2016-12-13 11:57:01 -08:00
Michael Gottesman
45daa56c71 [sil-bug-reducer] Make the output more explicit about the final file, passes, and given a full command line to reproduce. 2016-12-13 10:07:14 -08:00
Michael Gottesman
b7a79756db [sil-bug-reducer] Initial version of bug_reducer.
Currently it supports random bug finding and opt pipeline reduction. At some
point in the future it will support:

1. Reducing of optimizer crasher test cases.
2. Reducing optimizer miscompile test cases.

But those are for another time, this is just a first step. Patches welcome = ).
Check out llvm's bugpoint for inspiration.

It also has a basic test of pass pipeline reduction that is triggered via the
validation testing in lit. One thing to note here is that the tool right now
assumes darwin. This can be fixed in the future.
2016-12-12 23:30:51 -08:00