Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lin-hitonami committed Jun 9, 2023
1 parent 00464bb commit 2c5586e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
18 changes: 0 additions & 18 deletions taichi/ir/control_flow_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,6 @@ Stmt *CFGNode::get_store_forwarding_data(Stmt *var, int position) const {
// [Intra-block Search]
int last_def_position = -1;
for (int i = position - 1; i >= begin_location; i--) {
// if (auto func_call = block->statements[i]->cast<FuncCallStmt>()) {
// const auto &dests = graph_->func_store_dests.at(func_call->func);
// for (const auto &dest : dests) {
// if (irpass::analysis::maybe_same_address(var, dest)) {
// return nullptr;
// }
// }
// }

// Find previous store stmt to the same dest_addr, stop at the closest one.
// store_ptr: prev-store dest_addr
for (auto store_ptr :
Expand Down Expand Up @@ -223,14 +214,6 @@ Stmt *CFGNode::get_store_forwarding_data(Stmt *var, int position) const {

// Check if store_stmt will ever influence the value of var
auto may_contain_address = [&](Stmt *store_stmt, Stmt *var) {
// if (auto func_call = store_stmt->cast<FuncCallStmt>()) {
// const auto &dests = graph_->func_store_dests.at(func_call->func);
// for (const auto &dest : dests) {
// if (irpass::analysis::maybe_same_address(var, dest)) {
// return true;
// }
// }
// }
for (auto store_ptr : irpass::analysis::get_store_destination(store_stmt)) {
if (var->is<MatrixPtrStmt>() && !store_ptr->is<MatrixPtrStmt>()) {
// check for aliased address with var
Expand Down Expand Up @@ -395,7 +378,6 @@ void CFGNode::reaching_definition_analysis(bool after_lower_access) {
for (int i = end_location - 1; i >= begin_location; i--) {
// loop in reversed order
auto stmt = block->statements[i].get();
// TODO: handle real function calls
auto data_source_ptrs = irpass::analysis::get_store_destination(stmt);
for (auto data_source_ptr : data_source_ptrs) {
// stmt provides a data source
Expand Down
1 change: 0 additions & 1 deletion taichi/ir/control_flow_graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace taichi::lang {

class ControlFlowGraph;
class Function;
/**
* A basic block in control-flow graph.
Expand Down

0 comments on commit 2c5586e

Please sign in to comment.