[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 Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-cxx/loop_proto_to_cxx.cpp:124 +void SingleLoopToString(std::ostream &os, const LoopFunction &x) { + inner_loop = false; + os << "void foo(int *a, int *b, int *__restrict__ c, size_t s) {\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 Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:127 } + inner_loop = true; return os; emmettneyman wrote: > morehouse wrote: > > Maybe this fixes the bug, but modifying `inner_loop` from different

[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 Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:127 } + inner_loop = true; return os; Maybe this fixes the bug, but modifying `inner_loop` from different functions is still error-prone. Please ei

[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 nested loops in cxx_loop_proto

2018-08-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Does this hit new coverage in the vectorizer? Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:46 std::string VarRefToString(std::ostream &os, const VarRef &x) { + std::string var = inner_loop ? "inner" : "outer"; std::st