summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CodeGen: Add a dwo output file argument to addPassesToEmitFile and hook it ↵Peter Collingbourne2018-05-211-1/+1
| | | | | | | | | | up to dwo output. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47089 llvm-svn: 332881
* Rename *CommandFlags.def to *CommandFlags.incDavid Blaikie2018-04-111-1/+1
| | | | | | | | These aren't the .def style files used in LLVM that require a macro defined before their inclusion - they're just basic non-modular includes to stamp out command line flag variables. llvm-svn: 329840
* [llvm-opt-fuzzer] Avoid adding incorrect inputs to the fuzzer corpusIgor Laevsky2018-02-051-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D42414 llvm-svn: 324225
* Remove redundant includes from tools.Michael Zolotukhin2017-12-131-2/+0
| | | | llvm-svn: 320631
* Rename CommandFlags.h -> CommandFlags.defDavid Blaikie2017-11-271-1/+1
| | | | | | | | | Since this isn't a real header - it includes static functions and had external linkage variables (though this change makes them static, since that's what they should be) so can't be included more than once in a program. llvm-svn: 319082
* [FuzzMutate] NFC. Move parseModule and writeModule from llvm-isel-fuzzer ↵Igor Laevsky2017-11-161-27/+0
| | | | | | | | into FuzzMutate. This is to be able to reuse them in the llvm-opt-fuzzer. llvm-svn: 318407
* fix llvm-isel-fuzzer: LLVMFuzzerTestOneInput should never return non-zero ↵Kostya Serebryany2017-10-161-1/+1
| | | | | | (according to the contract) llvm-svn: 315933
* Re-commit "llvm-isel-fuzzer: Handle a subset of backend flags in the exec name"Justin Bogner2017-10-121-1/+2
| | | | | | | | | | | | | | | | | | Here we add a secondary option parser to llvm-isel-fuzzer (and provide it for use with other fuzzers). With this, you can copy the fuzzer to a name like llvm-isel-fuzzer=aarch64-gisel for a fuzzer that fuzzer AArch64 with GlobalISel enabled, or fuzzer=x86_64 to fuzz x86, with no flags required. This should be useful for running these in OSS-Fuzz. Note that this handrolls a subset of cl::opts to recognize, rather than embedding a complete command parser for argv[0]. If we find we really need the flexibility of handling arbitrary options at some point we can rethink this. This re-applies 315545 using "=" instead of ":" as a separator for arguments. llvm-svn: 315557
* Revert r315545 "llvm-isel-fuzzer: Handle a subset of backend flags in the ↵Hans Wennborg2017-10-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | executable name" It broke some tests on Windows: Failing Tests (4): LLVM :: tools/llvm-isel-fuzzer/execname-options.ll LLVM :: tools/llvm-isel-fuzzer/missing-triple.ll LLVM :: tools/llvm-isel-fuzzer/x86-empty-bc.ll LLVM :: tools/llvm-isel-fuzzer/x86-empty.ll > llvm-isel-fuzzer: Handle a subset of backend flags in the executable name > > Here we add a secondary option parser to llvm-isel-fuzzer (and provide > it for use with other fuzzers). With this, you can copy the fuzzer to > a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer > AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no > flags required. This should be useful for running these in OSS-Fuzz. > > Note that this handrolls a subset of cl::opts to recognize, rather > than embedding a complete command parser for argv[0]. If we find we > really need the flexibility of handling arbitrary options at some > point we can rethink this. llvm-svn: 315554
* llvm-isel-fuzzer: Handle a subset of backend flags in the executable nameJustin Bogner2017-10-121-0/+1
| | | | | | | | | | | | | | | Here we add a secondary option parser to llvm-isel-fuzzer (and provide it for use with other fuzzers). With this, you can copy the fuzzer to a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no flags required. This should be useful for running these in OSS-Fuzz. Note that this handrolls a subset of cl::opts to recognize, rather than embedding a complete command parser for argv[0]. If we find we really need the flexibility of handling arbitrary options at some point we can rethink this. llvm-svn: 315545
* Move some CLI utils out of llvm-isel-fuzzer and into the libraryJustin Bogner2017-09-021-16/+2
| | | | | | | | FuzzMutate might not be the best place for these, but it makes more sense than an entirely new library for now. This will make setting up fuzz targets with consistent CLI handling easier. llvm-svn: 312425
* Specify the namespace in llvm::make_unique to fix the windows buildJustin Bogner2017-09-011-1/+1
| | | | llvm-svn: 312341
* llvm-isel-fuzzer: Stop including FuzzerInterface.hJustin Bogner2017-08-311-1/+0
| | | | | | | | | All this does is forward declare the interface functions (and make sure that they're `extern "C"`), but since we're using libFuzzer from the toolchain it doesn't make sense to include the local copy of the interface. llvm-svn: 312195
* Implement llvm-isel-fuzzer for fuzzing instruction selectionJustin Bogner2017-08-291-0/+213
This implements a fuzzer tool for instruction selection, as described in my [EuroLLVM 2017 talk][1]. The fuzzer must be given both libFuzzer args and llc-like args to configure the backend. For example, to fuzz AArch64 GlobalISel at -O0, you could invoke like so: llvm-isel-fuzzer <corpus dirs> -ignore_remaining_args=1 \ -mtriple arm64-apple-ios -global-isel -O0 If you would like to seed the fuzzer with an initial corpus, simply provide a directory of valid LLVM bitcode (not textual IR) as one of the corpus dirs. [1]: http://llvm.org/devmtg/2017-03//2017/02/20/accepted-sessions.html#2 llvm-svn: 311964
OpenPOWER on IntegriCloud