-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic analysis #1
base: master
Are you sure you want to change the base?
Conversation
DeducedConstraints deduceConstraints(int argIndex); | ||
|
||
private: | ||
llvm::SmallVector<llvm::SmallVector<mlir::Value>> expandToDNF(mlir::Value constraint); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think that DNF will be something that will come up a lot, you can wrap the vectors into a class like and put this in a header of their own
class DisjunctiveNormalFormExpression {
public:
<getters>
private:
llvm::SmallVector<llvm::SmallVector<mlir::Value>> Content;
};
to be honest i would not be even opposed to have a operation called DNFExpression and have this analysis as a pass that mutates the ir and turns every precondition into a DNF
} | ||
|
||
|
||
void helper( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename with a meaningful name, furthemore this function can be made static
*/ | ||
llvm::SmallVector<llvm::SmallVector<mlir::Value>> DynamicArgumentAnalysis::expandToDNF(mlir::Value constraint) { | ||
llvm::SmallVector<llvm::SmallVector<mlir::Value>> conjunctions; | ||
helper(conjunctions, {constraint}, precondition); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need the helper out of line here?
} | ||
|
||
//TODO | ||
const int64_t min_int = -800; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess you were looking for std::numeric_limits<int64_t>::min()
return KNOWN_VALUE; | ||
} | ||
|
||
mlir::Value DynamicArgumentAnalysis::compute(mlir::Value expression) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you provide a more informative name? compute is not very specific
the part of the code that emits the code that computes min and max is complex, can't it be somehow simplified by placing as much code as possible in the fuzzer standard library and calling it? |
…dy bound struct fields.
521821f
to
ffb82ec
Compare
9eb7c9a
to
73de6fa
Compare
No description provided.