-
Notifications
You must be signed in to change notification settings - Fork 9
Reduce and verify testcase iteratively #8
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
Open
jl3937
wants to merge
1
commit into
master
Choose a base branch
from
reduction
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // vim: sw=2 | ||
|
|
||
| #ifndef __DYN_AA_REDUCER_H | ||
| #define __DYN_AA_REDUCER_H | ||
|
|
||
| #include <string> | ||
|
|
||
| #include "llvm/IntrinsicInst.h" | ||
| #include "llvm/Module.h" | ||
| #include "llvm/Pass.h" | ||
| #include "llvm/ADT/DenseSet.h" | ||
| #include "llvm/Support/raw_ostream.h" | ||
| #include "llvm/Support/CommandLine.h" | ||
| #include "llvm/Support/CFG.h" | ||
|
|
||
| #include "rcs/typedefs.h" | ||
| #include "rcs/IDAssigner.h" | ||
|
|
||
| #include "dyn-aa/LogProcessor.h" | ||
| #include "dyn-aa/Utils.h" | ||
|
|
||
| typedef void (*ReductionFunction)(Module &); | ||
|
|
||
| using namespace llvm; | ||
| using namespace std; | ||
| using namespace rcs; | ||
|
|
||
| namespace dyn_aa { | ||
| struct Reducer: public ModulePass { | ||
| static char ID; | ||
|
|
||
| Reducer(): ModulePass(ID) { | ||
| ReductionFunctions.push_back(Reducer::reduceUnexecuted); | ||
| ReductionFunctions.push_back(Reducer::reduceUnrelatedFunctions); | ||
| ReductionFunctions.push_back(Reducer::reduceGlobalVariables); | ||
| } | ||
| virtual void getAnalysisUsage(AnalysisUsage &AU) const; | ||
| virtual bool runOnModule(Module &M); | ||
|
|
||
| bool setReductionOptions(const vector<bool> &RO); | ||
|
|
||
| private: | ||
| static void reduceUnexecuted(Module &M); | ||
| static void reduceUnrelatedFunctions(Module &M); | ||
| static void reduceGlobalVariables(Module &M); | ||
| static void reduceInstructions(Module &M); | ||
| // indicate whether the ith reduction function is executed | ||
| vector<bool> ReductionOptions; | ||
| vector<ReductionFunction> ReductionFunctions; | ||
| }; | ||
| } | ||
|
|
||
| #endif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // vim: sw=2 | ||
|
|
||
| #ifndef __DYN_AA_REDUCTION_VERIFIER_H | ||
| #define __DYN_AA_REDUCTION_VERIFIER_H | ||
|
|
||
| #include <cstdio> | ||
|
|
||
| #include "llvm/IntrinsicInst.h" | ||
| #include "llvm/Module.h" | ||
| #include "llvm/Pass.h" | ||
| #include "llvm/ADT/Statistic.h" | ||
| #include "llvm/Analysis/AliasAnalysis.h" | ||
| #include "llvm/Support/CallSite.h" | ||
| #include "llvm/Support/CommandLine.h" | ||
| #include "llvm/Support/raw_ostream.h" | ||
|
|
||
| #include "dyn-aa/BaselineAliasAnalysis.h" | ||
| #include "dyn-aa/Utils.h" | ||
|
|
||
| using namespace std; | ||
| using namespace llvm; | ||
| using namespace dyn_aa; | ||
|
|
||
| namespace dyn_aa { | ||
| struct ReductionVerifier: public ModulePass { | ||
| static char ID; | ||
|
|
||
| ReductionVerifier(): ModulePass(ID) { } | ||
| virtual bool runOnModule(Module &M); | ||
| virtual void getAnalysisUsage(AnalysisUsage &AU) const; | ||
|
|
||
| bool getVerified() { return Verified; } | ||
| private: | ||
| bool Verified; | ||
| }; | ||
| } | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
是说现在要不把unrelated functions都去掉,要不都不去掉么?有没有中间态?
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.
是吧,,需要中间态吗
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.
是啊,粒度可以做细一点。而且related function应该也可以删吧
On Tue, Mar 5, 2013 at 5:17 PM, jl3937 notifications@github.com wrote:
Jingyue Wu
Department of Computer Science
Columbia University
New York, NY 10027
http://www.cs.columbia.edu/~jingyue
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.
但一般都删了也还是verified啊,就不需要做细了吧。删related function就是下一步的事了
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.
那也行。明天开会你给我看一下现在的结果
On Tue, Mar 5, 2013 at 5:29 PM, jl3937 notifications@github.com wrote:
Jingyue Wu
Department of Computer Science
Columbia University
New York, NY 10027
http://www.cs.columbia.edu/~jingyue
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.
哦,那定了4点?
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.
ºÃ
On Tue, Mar 5, 2013 at 6:44 PM, jl3937 notifications@github.com wrote:
Jingyue Wu
Department of Computer Science
Columbia University
New York, NY 10027
http://www.cs.columbia.edu/~jingyue
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.
乱码。。。
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.
hao
On Tue, Mar 5, 2013 at 6:47 PM, jl3937 notifications@github.com wrote:
Jingyue Wu
Department of Computer Science
Columbia University
New York, NY 10027
http://www.cs.columbia.edu/~jingyue