[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [csmith-dev] Adding StatementWhile in Csmith
Is there a particular need for generating while-loops?
Ya, for adding tasking constructs of OpenMP inside while statement.
We considered the question at the very beginning of implementing Csmith, and decided to use for-loops to represent all sorts of loops (while, do-while, etc.) which are different at the language level, but are normalized to the same form at the IR level. We believe generating both for-loops and while-loops would find marginally more bugs than just generating for-loops alone.
I started hacking Csmith for adding StatementWhile.h and
StatementWhile.cpp in Csmith.
I have made necessary changes in Makefile which builds the above files
I just need a pointer to
1. What changes do I need to make if I try cloning
StatementFor.cpp ---------> StatementWhile.cpp
StatementFor.h -------> StatementWhile.h ?
2. Which files do I need to check for adding the increment _expression_
in StatementWhile inside the body of a while statement ? Are there any
similar implementations which I can refer to?
3. Will the post_loop_analysis and visit_facts of StatementFor need
any changes to be made when used in StatementWhile ?
3. Any files which have dependencies apart from Statement* ?