[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: morehouse, kcc. Herald added a subscriber: cfe-commits. Changed the structure of the generated IR to make it easier to vectorize Repository: rC Clang https://reviews.llvm.org/D50342 Files: clang/tools/clang-fuzzer/proto-to-l

[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:125 std::ostream &operator<<(std::ostream &os, const LoopFunction &x) { - return os << "define void @foo(i32* %a, i32* %b, i32* noalias %c, i64 %s) {\n" -<

[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159373. emmettneyman added a comment. Changed pc to unknown Repository: rC Clang https://reviews.llvm.org/D50342 Files: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp Index: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llv

[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159389. emmettneyman added a comment. Added back more descriptive variable and loop names Repository: rC Clang https://reviews.llvm.org/D50342 Files: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp Index: clang/tools/clang-fuzzer/p

[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:127 +<< "define void @foo(i32* %a, i32* %b, i32* %c, i64 %s) {\n" +<< "%1 = icmp sgt i64 %s, 0\n" +<< "br i1 %1, label %start, label %

[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159421. emmettneyman added a comment. Some small fixes to improve simplicity of generated IR Repository: rC Clang https://reviews.llvm.org/D50342 Files: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp Index: clang/tools/clang-fuzze

[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159425. emmettneyman added a comment. Rebased and ready to land Repository: rC Clang https://reviews.llvm.org/D50342 Files: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp Index: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_

[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Emmett Neyman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339080: Changed how LLVM IR was generated to increase vectorization (authored by emmettneyman, committed by ). Changed prior to commit: https://reviews.llvm.org/D50342?vs=159425&id=159427#toc Repositor

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: morehouse, kcc. Herald added a subscriber: cfe-commits. I noticed that my code wasn't going deep into the loop vectorizer code so added another pass that makes it go further. Repository: rC Clang https://reviews.llvm.org/D5048

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159831. emmettneyman added a comment. - minor style fix Repository: rC Clang https://reviews.llvm.org/D50482 Files: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp Index: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:126 + + auto Is TM guaranteed to be an LLVMTargetMachine? Yes, since the t

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159834. emmettneyman added a comment. - Inlined function Repository: rC Clang https://reviews.llvm.org/D50482 Files: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp Index: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp ===

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:103 + Triple ModuleTriple(M->getTargetTriple()); + const TargetOptions Options = InitTargetOptionsFromCodeGenFlags(); morehouse wrote: > I think you can avoid

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159838. emmettneyman added a comment. Rebase Repository: rC Clang https://reviews.llvm.org/D50482 Files: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp Index: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp =

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339305: Added another optimization pass to make vectorizing possible (authored by emmettneyman, committed by ). Changed prior to commit: https://reviews.llvm.org/D50482?vs=159838&id=159839#toc Reposito

[PATCH] D50530: Added LLVM metadata to generated IR to increase vectorization width

2018-08-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: morehouse, kcc. Herald added a subscriber: cfe-commits. Edited `loop_proto_to_llvm` to emit metadata at the end of the generated IR. This metadata will increase the vector width when the IR is optimized. Repository: rC Clang h

[PATCH] D50530: Added LLVM metadata to generated IR to increase vectorization width

2018-08-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:141 +<< "!1 = !{!\"llvm.loop.vectorize.enable\", i1 true}\n" +<< "!2 = !{!\"llvm.loop.vectorize.width\", i32 " << kArraySize +<< "}\n"

[PATCH] D50530: Added LLVM metadata to generated IR to increase vectorization width

2018-08-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159993. emmettneyman added a comment. Switched the include statement to the cpp file Repository: rC Clang https://reviews.llvm.org/D50530 Files: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp Index: clang/tools/clang-fuzzer/proto-

[PATCH] D50530: Added LLVM metadata to generated IR to increase vectorization width

2018-08-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 160016. emmettneyman added a comment. Rebased and ready to land Repository: rC Clang https://reviews.llvm.org/D50530 Files: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp Index: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to

[PATCH] D50530: Added LLVM metadata to generated IR to increase vectorization width

2018-08-09 Thread Emmett Neyman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339392: Added LLVM metadata to generated IR to increase vectorization width (authored by emmettneyman, committed by ). Changed prior to commit: https://reviews.llvm.org/D50530?vs=160016&id=160017#toc R

[PATCH] D50670: Implementation of multiple loops in cxx_loop_proto

2018-08-13 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: morehouse, kcc. Herald added a subscriber: cfe-commits. Extended `cxx_loop_proto` to have multiple for loops. Modified `loop_proto_to_llvm` and `loop_proto_to_cxx` to handle the new protos. In `loop_proto_to_llvm`, I only translat

[PATCH] D50670: Implementation of multiple loops in cxx_loop_proto

2018-08-14 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. No, it doesn't actually. I thought it would try to combine the separate loops into one block of vectorized instructions but after looking at the coverage of multiple loops vs single loop, they cover exactly the same parts of the Loop Vectorizer. Should I switch my

[PATCH] D50670: Implementation of multiple loops in cxx_loop_proto

2018-08-14 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 160740. emmettneyman added a comment. Changed the multiloop protos to nested loop protos. All the protos have an inner loop and an outer loop. Repository: rC Clang https://reviews.llvm.org/D50670 Files: clang/tools/clang-fuzzer/cxx_loop_proto.pro

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. In https://reviews.llvm.org/D50670#1200784, @morehouse wrote: > Does this hit new coverage in the vectorizer? Yes, this does hit new coverage in the loop vectorizer code. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 160866. emmettneyman edited the summary of this revision. emmettneyman added a comment. Small changes to generated IR Repository: rC Clang https://reviews.llvm.org/D50670 Files: clang/tools/clang-fuzzer/cxx_loop_proto.proto clang/tools/clang-fuz

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 160870. emmettneyman added a comment. Small changes to generated IR, my last change hadn't saved Repository: rC Clang https://reviews.llvm.org/D50670 Files: clang/tools/clang-fuzzer/cxx_loop_proto.proto clang/tools/clang-fuzzer/proto-to-cxx/loop

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:132 + os << "target triple = \"x86_64-pc-linux-gnu\"\n" + << "define void @foo(i32* %a, i32* %b, i32* noalias %c, i64 %s) {\n" + << "%cmp = icmp sgt i64 %s, 0\n"

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 160920. emmettneyman added a comment. Made the inner loop optional Repository: rC Clang https://reviews.llvm.org/D50670 Files: clang/tools/clang-fuzzer/cxx_loop_proto.proto clang/tools/clang-fuzzer/proto-to-cxx/loop_proto_to_cxx.cpp clang/tool

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 160932. emmettneyman added a comment. Changed modifying global var to scoped class Repository: rC Clang https://reviews.llvm.org/D50670 Files: clang/tools/clang-fuzzer/cxx_loop_proto.proto clang/tools/clang-fuzzer/proto-to-cxx/loop_proto_to_cxx.

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 160936. emmettneyman added a comment. Updated comments, rebased, and ready to land Repository: rC Clang https://reviews.llvm.org/D50670 Files: clang/tools/clang-fuzzer/cxx_loop_proto.proto clang/tools/clang-fuzzer/proto-to-cxx/loop_proto_to_cxx.

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC339832: Implementation of nested loops in cxx_loop_proto (authored by emmettneyman, committed by ). Changed prior to commit: https://reviews.llvm.org/D50670?vs=160936&id=160937#toc Repository: rC Cla

[PATCH] D50829: Update README and Dockerfile to include llvm-proto-fuzzer

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: morehouse, kcc. Herald added a subscriber: cfe-commits. Added commands to Dockerfile to build llvm-proto-fuzzer and the other related tools. Also added a section to the bottom of the README describing what llvm-proto-fuzzer does a

[PATCH] D50829: Update README and Dockerfile to include llvm-proto-fuzzer

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. Is there anything I should add to the documentation? Anything I should remove? Repository: rC Clang https://reviews.llvm.org/D50829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D50829: Update README and Dockerfile to include llvm-proto-fuzzer

2018-08-16 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 161080. emmettneyman added a comment. Added to README Repository: rC Clang https://reviews.llvm.org/D50829 Files: clang/tools/clang-fuzzer/Dockerfile clang/tools/clang-fuzzer/README.txt Index: clang/tools/clang-fuzzer/README.txt ==

[PATCH] D50829: Update README and Dockerfile to include llvm-proto-fuzzer

2018-08-16 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 161093. emmettneyman added a comment. Rebased and ready to land Repository: rC Clang https://reviews.llvm.org/D50829 Files: clang/tools/clang-fuzzer/Dockerfile clang/tools/clang-fuzzer/README.txt Index: clang/tools/clang-fuzzer/README.txt

[PATCH] D50829: Update README and Dockerfile to include llvm-proto-fuzzer

2018-08-16 Thread Emmett Neyman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339933: Update README and Dockerfile to include llvm-proto-fuzzer (authored by emmettneyman, committed by ). Changed prior to commit: https://reviews.llvm.org/D50829?vs=161093&id=161095#toc Repository:

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 156362. emmettneyman added a comment. - Switched to JIT for compilation and execution Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 156364. emmettneyman added a comment. - Cleaned up leftover code from mmap memcpy Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp clan

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 156370. emmettneyman added a comment. - Fixed typo that broke build Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp clang/tools/clang-

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-23 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 156862. emmettneyman added a comment. Made fixes to patch, rebased CMake file Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp I

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-24 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 157138. emmettneyman added a comment. Cleaned up code Tried to get rid of ParseCommandLineOptions() call but could not figure out how to initialize a PassInfo object without it. Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/to

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-24 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:190 + builder.setMCJITMemoryManager( + std::unique_ptr(RTDyldMM)); + builder.setOptLevel(OLvl); morehouse wrote: > These 3 lines can be combined to `builde

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-25 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:190 + builder.setMCJITMemoryManager( + std::unique_ptr(RTDyldMM)); + builder.setOptLevel(OLvl); morehouse wrote: > emmettneyman wrote: > > morehouse wrote:

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-25 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:190 + builder.setMCJITMemoryManager( + std::unique_ptr(RTDyldMM)); + builder.setOptLevel(OLvl); morehouse wrote: > emmettneyman wrote: > > morehouse wrote:

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-25 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:208 + + static_cast(RTDyldMM)->invalidateInstructionCache(); + morehouse wrote: > This cast shouldn't be necessary. Turns out this line is redundant anyways. `EE

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-25 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 157335. emmettneyman added a comment. - cleaned up code and moved initialization code - removed fake command line parsing Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/fuzzer-initialize/fuzzer_initialize.cpp

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-25 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:89 + Builder.Inliner = createFunctionInliningPass(OptLevel, SizeLevel, false); + Builder.LoopVectorize = true; + Builder.populateFunctionPassManager(FPM); more

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-25 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 157388. emmettneyman added a comment. Fixed some things, made code cleaner Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/fuzzer-initialize/fuzzer_initialize.cpp clang/tools/clang-fuzzer/handle-llvm/CMakeLis

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-25 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:159 + std::unique_ptr(RTDyldMM)); + builder.setOptLevel(OLvl); + builder.setTargetOptions(InitTargetOptionsFromCodeGenFlags()); emmettneyman wrote: > moreh

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:144 + Context); + Module *M = Owner.get(); + if (!M) morehouse wrote: > Why not just rename `Owner` to `M` and remove

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 157544. emmettneyman added a comment. - Code style fixes - Removed `FPasses` - Allowed CL Args to specify opt level for `OptLLVM()` Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/fuzzer-initialize/fuzzer_initi

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 157545. emmettneyman added a comment. Small change to fix line length Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/fuzzer-initialize/fuzzer_initialize.cpp clang/tools/clang-fuzzer/handle-llvm/CMakeLists.tx

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. In https://reviews.llvm.org/D49526#1177208, @morehouse wrote: > Do we need to parse the arguments for opt-level, or can we just hardcode > `-O2` and remove the argument parsing code? I have the argument parsing code since the original `clang-proto-fuzzer` code ha

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 157553. emmettneyman added a comment. Changed int to CodeGenOpt::Level and fixed unique_ptr issue Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/fuzzer-initialize/fuzzer_initialize.cpp clang/tools/clang-fuzz

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 157577. emmettneyman added a comment. Made some minor fixes Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/fuzzer-initialize/fuzzer_initialize.cpp clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt clang/

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338077: Updated llvm-proto-fuzzer to execute the compiled code (authored by emmettneyman, committed by ). Changed prior to commit: https://reviews.llvm.org/D49526?vs=157577&id=157591#toc Repository:

[PATCH] D49892: Added shared library to fix build bot

2018-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added a reviewer: morehouse. Herald added subscribers: cfe-commits, mgorny. Repository: rC Clang https://reviews.llvm.org/D49892 Files: clang/tools/clang-fuzzer/fuzzer-initialize/fuzzer_initialize.cpp clang/tools/clang-fuzzer/handle-llvm/CMa

[PATCH] D49895: added shared library to fix buildbot

2018-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. Herald added subscribers: cfe-commits, mgorny. added shared library to fix buildbot Repository: rC Clang https://reviews.llvm.org/D49895 Files: clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt Index: clang/tools/clang-fuzzer/handle-llvm/CMakeLists.t

[PATCH] D49895: added shared library to fix buildbot

2018-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC338091: added shared library to fix buildbot (authored by emmettneyman, committed by ). Changed prior to commit: https:

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-02 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: kcc, morehouse. Herald added subscribers: cfe-commits, mgorny. Added corpus of arrays to use as inputs for the functions. Check that the two functions modify the inputted arrays in the same way. Repository: rC Clang https://rev

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-02 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:173 + int s = getSize((char *) func_ptr); + memcpy(mem, func_ptr, s); +} morehouse wrote: > Why do we need to copy the function somewhere else? Looks very erro

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-02 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 158800. emmettneyman added a comment. Replaced hardcoded numbers with variables Repository: rC Clang https://reviews.llvm.org/D50194 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp clang/

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:173 + int s = getSize((char *) func_ptr); + memcpy(mem, func_ptr, s); +} morehouse wrote: > emmettneyman wrote: > > morehouse wrote: > > > Why do we need to cop

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. An unrelated question: Right now I have a mix of `static` and non-`static` functions in `handle_llvm.cpp`. Should they all be `static`? Repository: rC Clang https://reviews.llvm.org/D50194 ___ cfe-commits mailing li

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159083. emmettneyman added a comment. Refactored code to avoid memcpy-ing function Repository: rC Clang https://reviews.llvm.org/D50194 Files: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp clang/tools/clang-fuzzer/handle-llvm/handle_llvm.

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/input_arrays.h:36 + {1, 1, 2, 3, 2, 3, 0, 11, 10, 0, 7, 5, 3, 1, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159100. emmettneyman added a comment. Added static to some functions, made small fixes Repository: rC Clang https://reviews.llvm.org/D50194 Files: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp clang/tools/clang-fuzzer/handle-llvm/handle_l

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159146. emmettneyman added a comment. New input arrays and minor fixes Repository: rC Clang https://reviews.llvm.org/D50194 Files: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp clang/tools/clang-fuzzer/handle-llvm/handle_llvm.h clang/to

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159151. emmettneyman added a comment. ready to land Repository: rC Clang https://reviews.llvm.org/D50194 Files: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp clang/tools/clang-fuzzer/handle-llvm/handle_llvm.h clang/tools/clang-fuzzer/ha

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Emmett Neyman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338943: LLVM Proto Fuzzer - Run Functions on Suite of Inputs (authored by emmettneyman, committed by ). Changed prior to commit: https://reviews.llvm.org/D50194?vs=159151&id=159152#toc Repository: rC

[PATCH] D47665: Refactored clang-fuzzer in preparation for adding new loop-proto-fuzzer

2018-06-01 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: vitalybuka, kcc, morehouse. Herald added subscribers: cfe-commits, mgorny. Refactored LLVMFuzzerInitialize function into its own file. Copied and renamed files in preparation for new loop-proto-fuzzer. Repository: rC Clang h

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-01 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: vitalybuka, kcc, morehouse. Herald added subscribers: cfe-commits, mgorny. Refactored LLVMFuzzerInitialize function into its own file. Copied and renamed some files in preparation for new loop-proto-fuzzer. Repository: rC Clang

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-01 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 149585. emmettneyman added a comment. - Took out a debug print statement Repository: rC Clang https://reviews.llvm.org/D47666 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp tools/clang-fuzzer/FuzzerInit

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 149807. emmettneyman added a comment. - Changed CLArgs into getter and deleted commented code 1. Updating https://reviews.llvm.org/D47666: Refactored clang-fuzzer and added new (copy) files # 2. Enter a brief description of the changes included in this

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 149850. emmettneyman added a comment. - Updated and added header comments to two new files. Deleted loop fuzzer files. Repository: rC Clang https://reviews.llvm.org/D47666 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangP

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 149851. emmettneyman added a comment. - Fixed file header comment Repository: rC Clang https://reviews.llvm.org/D47666 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp tools/clang-fuzzer/FuzzerInitialize.

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 149854. emmettneyman added a comment. - Another edit to the file header comments. Repository: rC Clang https://reviews.llvm.org/D47666 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp tools/clang-fuzzer/F

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. In https://reviews.llvm.org/D47666#1121608, @emmettneyman wrote: > - Updated and added header comments to two new files. Deleted loop fuzzer > files. I will commit the loop fuzzer files in a future patch. Repository: rC Clang https://reviews.llvm.org/D47666

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 149867. emmettneyman added a comment. - Refactored FuzzerInitialize into library Repository: rC Clang https://reviews.llvm.org/D47666 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp tools/clang-fuzzer/fu

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 149872. emmettneyman added a comment. - Removed unecessary includes and renamed library. Repository: rC Clang https://reviews.llvm.org/D47666 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp tools/clang-f

[PATCH] D47843: Introducing single for loop into clang_proto_fuzzer

2018-06-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: kcc, vitalybuka, morehouse. Herald added subscribers: cfe-commits, mgorny. Created a new protobuf and protobuf-to-C++ "converter" that wraps the entire C++ code in a single for loop. - Slightly changed cxx_proto.proto -> cxx_loop_

[PATCH] D47843: Introducing single for loop into clang_proto_fuzzer

2018-06-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 150192. emmettneyman added a comment. Took out typo'd comment Repository: rC Clang https://reviews.llvm.org/D47843 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLoopProtoFuzzer.cpp tools/clang-fuzzer/ExampleClangProto

[PATCH] D47843: Introducing single for loop into clang_proto_fuzzer

2018-06-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 150200. emmettneyman added a comment. Hopefully rebased correctly. Repository: rC Clang https://reviews.llvm.org/D47843 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLoopProtoFuzzer.cpp tools/clang-fuzzer/cxx_loop_pro

[PATCH] D47843: Introducing single for loop into clang_proto_fuzzer

2018-06-06 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 150213. emmettneyman added a comment. - Combined two header files into one Repository: rC Clang https://reviews.llvm.org/D47843 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLoopProtoFuzzer.cpp tools/clang-fuzzer/cxx_

[PATCH] D47843: Introducing single for loop into clang_proto_fuzzer

2018-06-07 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 150365. emmettneyman added a comment. - refactored cmake and deleted header file Repository: rC Clang https://reviews.llvm.org/D47843 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLoopProtoFuzzer.cpp tools/clang-fuzze

[PATCH] D47920: Made loop_proto more "vectorizable"

2018-06-07 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: kcc, vitalybuka, morehouse. Herald added a subscriber: cfe-commits. Edited loop_proto and its converter to make more "vectorizable" code - Removed all while loops - Can only index into array with induction variable Repository:

[PATCH] D47964: Modified protobuf and converter to add new signature, remove conditionals.

2018-06-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: kcc, morehouse, vitalybuka. Herald added a subscriber: cfe-commits. Cahnged the function signature and removed conditionals from loop body. Repository: rC Clang https://reviews.llvm.org/D47964 Files: tools/clang-fuzzer/cxx_l

[PATCH] D47964: Modified protobuf and converter to add new signature, remove conditionals.

2018-06-11 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. @kcc suggested removing conditionals for now and adding them back later. include statement was for testing; I'll remove it and resubmit. Repository: rC Clang https://reviews.llvm.org/D47964 ___ cfe-commits mailing l

[PATCH] D47964: Modified protobuf and converter to add new signature, remove conditionals.

2018-06-11 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 150783. emmettneyman added a comment. - removed include statement meant for testing Repository: rC Clang https://reviews.llvm.org/D47964 Files: tools/clang-fuzzer/cxx_loop_proto.proto tools/clang-fuzzer/proto-to-cxx/loop_proto_to_cxx.cpp Index:

[PATCH] D48106: implemented proto to llvm

2018-06-12 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: kcc, vitalybuka, morehouse. Herald added subscribers: cfe-commits, mgorny. implemented proto_to_llvm - also removed div and mod to eliminate UB Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/

[PATCH] D48106: implemented proto to llvm

2018-06-12 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151063. emmettneyman added a comment. - removed unneeded file Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/cxx_loop_proto.proto tools/clang-fuzzer/proto-to-cxx/loop_proto_to_c

[PATCH] D48106: implemented proto to llvm

2018-06-12 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151066. emmettneyman added a comment. - fixed proto_to_cxx.cpp Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/cxx_loop_proto.proto tools/clang-fuzzer/proto-to-cxx/loop_proto_to_

[PATCH] D48106: implemented proto to llvm

2018-06-13 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151239. emmettneyman added a comment. - refactored loop_proto_to_llvm.cpp Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/cxx_loop_proto.proto tools/clang-fuzzer/proto-to-cxx/loo

[PATCH] D48106: implemented proto to llvm

2018-06-13 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. In https://reviews.llvm.org/D48106#1130581, @morehouse wrote: > Where is the fuzz target? I wanted to implement the proto_to_llvm converter before the fuzz target. Repository: rC Clang https://reviews.llvm.org/D48106

[PATCH] D48106: implemented proto to llvm

2018-06-13 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151240. emmettneyman added a comment. - removed typo in emitted llvm insn Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/cxx_loop_proto.proto tools/clang-fuzzer/proto-to-cxx/loo

[PATCH] D48106: implemented proto to llvm

2018-06-18 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151798. emmettneyman added a comment. Implemented HandleLLVM fuzz target -HandleLLVM function compiles LLVM IR -ExampleClangLLVMProtoFuzzer wraps the fuzz target -Next step is to compile at different opt levels and run the executables Repository:

[PATCH] D48106: implemented proto to llvm

2018-06-18 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151801. emmettneyman added a comment. - removed unnecessary includes and linked libs Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp tools/clang-f

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: tools/clang-fuzzer/handle-llvm/CMakeLists.txt:5 + handle_llvm.cpp + ) morehouse wrote: > There's fewer libraries linked here than in `handle-cxx/` (not saying this is > wrong, but it could be). Do you get link e

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: tools/clang-fuzzer/handle-llvm/\:62 + initializeScavengerTestPass(*Registry); + +} morehouse wrote: > Does this initialization need to happen every time the fuzzer generates a new > input, or can we call this from

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: tools/clang-fuzzer/handle-llvm/\:113 + + legacy::PassManager PM; + TargetLibraryInfoImpl TLII(Triple(M->getTargetTriple())); morehouse wrote: > Any reason not to use the newer PassManager? Clang (`llc`) and the `l

  1   2   >