-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[async] [opt] Field value killing analysis (#1929)
* [async] Field value killing analysis * element-wise * [skip ci] enforce code format * Fix reaching_definition_analysis being too conservative * Rename insert_state_flow to insert_edge * Fix broken state flow chain Co-authored-by: Taichi Gardener <taichigardener@gmail.com>
- Loading branch information
1 parent
cfed2d9
commit 4fa0d60
Showing
8 changed files
with
135 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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,16 @@ | ||
#include "taichi/ir/analysis.h" | ||
#include "taichi/ir/control_flow_graph.h" | ||
#include "taichi/program/async_utils.h" | ||
|
||
TLANG_NAMESPACE_BEGIN | ||
|
||
namespace irpass::analysis { | ||
void get_meta_input_value_states(IRNode *root, TaskMeta *meta) { | ||
auto cfg = analysis::build_cfg(root); | ||
auto snodes = cfg->gather_loaded_snodes(); | ||
for (auto &snode : snodes) { | ||
meta->input_states.emplace(snode, AsyncState::Type::value); | ||
} | ||
} | ||
} // namespace irpass::analysis | ||
TLANG_NAMESPACE_END |
This file contains 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 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 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 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 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 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 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