aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp
AgeCommit message (Collapse)AuthorFilesLines
2019-11-13Move CodeGenFileType enum to Support/CodeGen.hReid Kleckner1-1/+1
Avoids the need to include TargetMachine.h from various places just for an enum. Various other enums live here, such as the optimization level, TLS model, etc. Data suggests that this change probably doesn't matter, but it seems nice to have anyway.
2019-08-15[llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere1-1/+1
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-4/+3
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-05-21CodeGen: Add a dwo output file argument to addPassesToEmitFile and hook it ↵Peter Collingbourne1-1/+1
up to dwo output. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47089 llvm-svn: 332881
2018-04-11Rename *CommandFlags.def to *CommandFlags.incDavid Blaikie1-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
2018-02-05[llvm-opt-fuzzer] Avoid adding incorrect inputs to the fuzzer corpusIgor Laevsky1-2/+2
Differential Revision: https://reviews.llvm.org/D42414 llvm-svn: 324225
2017-12-13Remove redundant includes from tools.Michael Zolotukhin1-2/+0
llvm-svn: 320631
2017-11-27Rename CommandFlags.h -> CommandFlags.defDavid Blaikie1-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
2017-11-16[FuzzMutate] NFC. Move parseModule and writeModule from llvm-isel-fuzzer ↵Igor Laevsky1-27/+0
into FuzzMutate. This is to be able to reuse them in the llvm-opt-fuzzer. llvm-svn: 318407
2017-10-16fix llvm-isel-fuzzer: LLVMFuzzerTestOneInput should never return non-zero ↵Kostya Serebryany1-1/+1
(according to the contract) llvm-svn: 315933
2017-10-12Re-commit "llvm-isel-fuzzer: Handle a subset of backend flags in the exec name"Justin Bogner1-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
2017-10-12Revert r315545 "llvm-isel-fuzzer: Handle a subset of backend flags in the ↵Hans Wennborg1-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
2017-10-12llvm-isel-fuzzer: Handle a subset of backend flags in the executable nameJustin Bogner1-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
2017-09-02Move some CLI utils out of llvm-isel-fuzzer and into the libraryJustin Bogner1-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
2017-09-01Specify the namespace in llvm::make_unique to fix the windows buildJustin Bogner1-1/+1
llvm-svn: 312341
2017-08-31llvm-isel-fuzzer: Stop including FuzzerInterface.hJustin Bogner1-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
2017-08-29Implement llvm-isel-fuzzer for fuzzing instruction selectionJustin Bogner1-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