16 Commits

Author SHA1 Message Date
Igor Laevsky
e35ff4e49b [FuzzMutate] Avoid using swifterror as a source operand
Differential Revision: https://reviews.llvm.org/D41107



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322280 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-11 14:43:05 +00:00
Igor Laevsky
a3d1ab8186 [FuzzMutate] Only generate loads and stores to the first class sized types
Differential Revision: https://reviews.llvm.org/D41109



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320573 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13 11:49:04 +00:00
Igor Laevsky
95edead4fe [FuzzMutate] Avoid zero sized aggregates
Differential Revision: https://reviews.llvm.org/D41110



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320572 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13 11:47:35 +00:00
Igor Laevsky
033683a63f [FuzzMutate] Correctly split landingpad blocks
Differential Revision: https://reviews.llvm.org/D41112



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320571 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13 11:45:53 +00:00
Igor Laevsky
2ccc42083e [FuzzMutate] Correctly insert sinks and sources around invoke instructions
Differential Revision: https://reviews.llvm.org/D40840



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320136 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-08 08:53:16 +00:00
Igor Laevsky
9fb4bebf8e [FuzzMutate] Allow only sized pointers for the GEP instruction
Differential Revision: https://reviews.llvm.org/D40837



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320032 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-07 11:10:11 +00:00
Igor Laevsky
afc2161e86 [FuzzMutate] Correctly handle vector types in the insertvalue operation
Differential Revision: https://reviews.llvm.org/D40397



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319442 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30 15:31:13 +00:00
Igor Laevsky
21b2a00254 [FuzzMutate] Don't use index operands as sinks
Differential Revision: https://reviews.llvm.org/D40396



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319441 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30 15:29:16 +00:00
Igor Laevsky
59e987ce53 [FuzzMutate] Pick correct index for the insertvalue instruction
Differential Revision: https://reviews.llvm.org/D40395



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319440 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30 15:26:48 +00:00
Igor Laevsky
703237d8da [FuzzMutate] Don't create load as a new source if it doesn't match with the descriptor
Differential Revision: https://reviews.llvm.org/D40394



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319439 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30 15:24:41 +00:00
Igor Laevsky
c4f19979c7 [FuzzMutate] Don't crash when we can't remove instruction from empty function
Differential Revision: https://reviews.llvm.org/D40393



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319438 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30 15:07:38 +00:00
Justin Bogner
0f87ccdc99 Re-apply "Introduce FuzzMutate library"
Same as r311392 with some fixes for library dependencies. Thanks to
Chapuni for helping work those out!

Original commit message:

This introduces the FuzzMutate library, which provides structured
fuzzing for LLVM IR, as described in my EuroLLVM 2017 talk. Most of
the basic mutators to inject and delete IR are provided, with support
for most basic operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311402 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-21 22:57:06 +00:00
Justin Bogner
cf9591e827 Revert "Re-apply "Introduce FuzzMutate library""
The dependencies for the new library seem to be misconfigured on some
linux configs:

  http://bb.pgr.jp/builders/llvm-i686-linux-RA/builds/5435/steps/build_all/logs/stdio

This reverts r311392.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311393 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-21 22:28:47 +00:00
Justin Bogner
6b52665a1c Re-apply "Introduce FuzzMutate library"
Redo r311356 with a fix to avoid std::uniform_int_distribution<bool>.
The bool specialization is undefined according to the standard, even
though libc++ seems to have it.

Original commit message:

This introduces the FuzzMutate library, which provides structured
fuzzing for LLVM IR, as described in my [EuroLLVM 2017 talk][1]. Most
of the basic mutators to inject and delete IR are provided, with
support for most basic operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311392 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-21 22:25:04 +00:00
Justin Bogner
7c45ace552 Revert "Introduce FuzzMutate library"
Looks like this fails to build with libstdc++.

This reverts r311356

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311358 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-21 17:57:12 +00:00
Justin Bogner
943140e61c Introduce FuzzMutate library
This introduces the FuzzMutate library, which provides structured
fuzzing for LLVM IR, as described in my [EuroLLVM 2017 talk][1]. Most
of the basic mutators to inject and delete IR are provided, with
support for most basic operations.

I will follow up with the instruction selection fuzzer, which is
implemented in terms of this library.

[1]: http://llvm.org/devmtg/2017-03//2017/02/20/accepted-sessions.html#2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311356 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-21 17:44:36 +00:00