[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 211988. emmettneyman marked 6 inline comments as done. emmettneyman added a comment. Addressed comments and feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ https://reviews.llvm.org/D64380

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-26 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman marked 16 inline comments as done. emmettneyman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1948 +def RequiresDesignator : InheritableAttr { + let Spellings = [Clang<"requires_designator">, GCC<"designated_init">]; + let Subjects = SubjectL

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-18 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 210649. emmettneyman added a comment. Created diagnostic group, added behavior and documentation for private fields, added documentation regarding GCC attribute Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-16 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman planned changes to this revision. emmettneyman added a comment. Changes planned: - Move diagnostics into a diagnostic group. - Add behavior and test cases for private members of structs/classes. - Investigate behavior of GCC `designated_init` attribute Repository: rG LLVM Github

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-11 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:1448 +def RequireDesignatedInitDocs : Documentation { + let Category = DocCatType; aaron.ballman wrote: > The behavior should be documented as to what happens when you apply

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-11 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 209362. emmettneyman marked 2 inline comments as done. emmettneyman added a comment. Added documentation about using the attributes with unions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ htt

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-11 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman marked 3 inline comments as done. emmettneyman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1948 +def RequiresDesignator : InheritableAttr { + let Spellings = [Clang<"requires_designator">]; + let Subjects = SubjectList<[Record]>; --

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-11 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 209256. emmettneyman added a comment. Small changes: adding `auto` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ https://reviews.llvm.org/D64380 Files: clang/include/clang/Basic/Attr.td cla

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-10 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman planned changes to this revision. emmettneyman added a comment. Working on adding more information to the documentation and adding more in-depth unit tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ https://reviews.llvm

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-10 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3533-3541 +def err_require_designated_init_failed : Error< + "variable declaration does not use designated initializer syntax">; +def note_declared_required_designated_init_here : No

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-10 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 209097. emmettneyman marked 32 inline comments as done. emmettneyman added a comment. Addressed several of the comments regarding naming and style. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman marked 2 inline comments as done. emmettneyman added inline comments. Comment at: clang/test/SemaCXX/attr-designated-init-required.cpp:3 + +#define ATTR [[clang::designated_init_required]] + compnerd wrote: > Why the macro? I modeled this file after

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. In D64380#1577350 , @compnerd wrote: > I don't see any cases where `[[clang::required]]` is tested, am I missing > something? I renamed the attribute at your suggestion. It's now called `[[clang::designated_init_required]`

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 208842. emmettneyman added a comment. slight change to specification reference format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ https://reviews.llvm.org/D64380 Files: clang/include/clang/

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 208840. emmettneyman marked an inline comment as done. emmettneyman added a comment. Remove cppreference link, add reference to C++ spec. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ https://re

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 208829. emmettneyman added a comment. Updated tests and diagnostic messages with new attribute spelling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ https://reviews.llvm.org/D64380 Files: cl

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 208814. emmettneyman marked 3 inline comments as done. emmettneyman added a comment. Changed attribute spelling from GNU to CXX11 and renamed the 'required' attribute to 'designated_init_required' Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 208741. emmettneyman marked 6 inline comments as done. emmettneyman added a comment. Small changes in response to feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ https://reviews.llvm.org/

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 208544. emmettneyman added a comment. Undo clang-format changes to SemaDecl.cpp and SemaDeclAttr.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ https://reviews.llvm.org/D64380 Files: clang

[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] 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
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-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-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] 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] 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
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 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 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 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 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 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 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 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-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] 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] 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
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 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 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] 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] 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
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 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: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 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 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] 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] 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
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 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 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 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 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 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] 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] 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
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 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 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 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 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 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-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-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 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] 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] 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] 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] 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] 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
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 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 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 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-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-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: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 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: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 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-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-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-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-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-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 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-18 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. The files Object.h Object.cpp llvm-objcopy.h are from llvm/tools/llvm-obj-copy with only slight modifications, mostly deleting irrelevant parts. Repository: rC Clang https://reviews.llvm.org/D49526 ___ cfe-c

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

2018-07-18 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: morehouse, kcc. Herald added subscribers: cfe-commits, mgorny. Herald added a reviewer: alexshap. Made changes to the llvm-proto-fuzzer - Added loop vectorizer optimization pass in order to have two IR versions - Updated old fuzz t

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 152006. emmettneyman added a comment. - actually fixed error statement Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp tools/clang-fuzzer/cxx_loop

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. In https://reviews.llvm.org/D48106#1137224, @morehouse wrote: > Looks like `exit(0)` is still there. oops, forgot to `:w` Repository: rC Clang https://reviews.llvm.org/D48106 ___ cfe-commits mailing list cfe-commi

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 152005. emmettneyman added a comment. - removed unnecessary comment and fixed exit statement Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp tools

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 152003. emmettneyman added a comment. - minor changes to improve readability and style Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp tools/clang

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151986. emmettneyman added a comment. - made changes to handle_llvm.cpp in response to reviewer comments Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer

[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/proto-to-llvm/loop_proto_to_llvm.cpp:71 +return val_var; + } +} morehouse wrote: > Is it still possible for the protobuf to not have a constant, a binOp, or a > varRef? Right now, since the

[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

[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/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

  1   2   >