summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-isel-fuzzer
Commit message (Collapse)AuthorAgeFilesLines
* Move CodeGenFileType enum to Support/CodeGen.hReid Kleckner2019-11-131-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.
* [llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-151-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
* Break a couple more false dependencies on target librariesDaniel Sanders2019-06-101-1/+4
| | | | | | | | | | | | | | | | Summary: Repeat r361567 for a few more tools. Reviewers: bogner Reviewed By: bogner Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62438 llvm-svn: 363011
* Fix file header issues in fuzzers. NFCFangrui Song2019-02-211-1/+1
| | | | llvm-svn: 354551
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | 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
* 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
* make add_llvm_fuzzer calls slightly more consisten with other cmakeNico Weber2018-05-111-2/+4
| | | | llvm-svn: 332112
* 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-022-51/+5
| | | | | | | | 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
* llvm-isel-fuzzer: Weak function invoke the ire of PE/COFFJustin Bogner2017-09-011-4/+1
| | | | | | | | | | | | | | | It's non-trivial to use weak symbols in a cross platform way (See sanitizer_win_defs.h in compiler-rt), and doing it naively like we have here causes some build failures: http://lab.llvm.org:8011/builders/clang-with-thin-lto-windows/builds/1260 Instead of going down the rabbit hole of emulating weak symbols for this very trivial dummy fuzzer driver, we can just rely on the fact that we know which hooks any given fuzz target implements and forward declare a normal symbol. llvm-svn: 312354
* llvm-isel-fuzzer: Add link-time dependency on BitWriterJustin Bogner2017-09-011-0/+1
| | | | | | | | | | This should fix the undefined reference to WriteBitcodeToFile here: http://bb.pgr.jp/builders/i686-mingw32-RA-on-linux/builds/31682 (Why does every different bot seem to have a different level of finickiness about LLVM_LINK_COMPONENTS?) llvm-svn: 312345
* llvm-isel-fuzzer: Add link-time dependency on BitReaderJustin Bogner2017-09-011-0/+1
| | | | | | | This should fix the undefined reference to parseBitcodeFile here: http://bb.pgr.jp/builders/llvm-i686-linux-RA/builds/5785 llvm-svn: 312343
* Specify the namespace in llvm::make_unique to fix the windows buildJustin Bogner2017-09-011-1/+1
| | | | llvm-svn: 312341
* llvm-isel-fuzzer: Make buildable and testable without libFuzzerJustin Bogner2017-09-012-1/+58
| | | | | | | | | | | | | | This adds a dummy main so we can build and run the llvm-isel-fuzzer functionality when we aren't building LLVM with coverage. The approach here should serve as a template to stop in-tree fuzzers from bitrotting (See llvm.org/pr34314). Note that I'll probably move most of the logic in DummyISelFuzzer's `main` to a library so it's easy to reuse it in other fuzz targets, but I'm planning on doing that in a follow up that also consolidates argument handling in our LLVMFuzzerInitialize implementations. llvm-svn: 312338
* cmake: Invent add_llvm_fuzzer to set up fuzzer targetsJustin Bogner2017-08-311-20/+15
| | | | | | | | | | | | | | | | This moves the cmake configuration for fuzzers in LLVM to a new macro, add_llvm_fuzzer. This will make it easier to keep things consistent while implementing llvm.org/pr34314. I've also made a couple of minor functional changes here: - the fuzzers now use add_llvm_executable rather than add_llvm_tool. This means they won't create install targets and stuff like that, because those made little sense for these fuzzers. - I've grouped these under "Fuzzers" rather than in with "Tools" for people who build with IDEs. llvm-svn: 312200
* llvm-isel-fuzzer: Stop including FuzzerInterface.hJustin Bogner2017-08-312-3/+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-292-0/+235
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