Lines Matching refs:SsaEnv
60 struct SsaEnv { struct
80 SsaEnv* ssa_env; // SSA renaming environment.
87 SsaEnv* false_env;
88 SsaEnv* merge_env;
89 SsaEnv** case_envs;
174 SsaEnv* ssa_env_;
188 SsaEnv* ssa_env = reinterpret_cast<SsaEnv*>(zone_->New(sizeof(SsaEnv))); in InitSsaEnv()
190 ssa_env->state = SsaEnv::kReached; in InitSsaEnv()
338 SsaEnv* break_env = ssa_env_; in DecodeFunctionBody()
352 SsaEnv* break_env = ssa_env_; in DecodeFunctionBody()
354 SsaEnv* cont_env = Steal(break_env); in DecodeFunctionBody()
358 if (ssa_env_->go()) ssa_env_->state = SsaEnv::kReached; in DecodeFunctionBody()
443 ssa_env_->Kill(SsaEnv::kControlEnd); in DecodeFunctionBody()
587 void PushBlock(SsaEnv* ssa_env) { in PushBlock()
699 SsaEnv* false_env = ssa_env_; in Reduce()
700 SsaEnv* true_env = Split(ssa_env_); in Reduce()
708 SsaEnv* merge = env->merge_env; in Reduce()
710 merge->state = SsaEnv::kReached; in Reduce()
722 SsaEnv* merge_env = ssa_env_; in Reduce()
726 SsaEnv* false_env = Split(ssa_env_); in Reduce()
727 SsaEnv* true_env = Steal(ssa_env_); in Reduce()
737 SsaEnv* false_env = ifs_.back().false_env; in Reduce()
797 SsaEnv* fenv = ssa_env_; in Reduce()
798 SsaEnv* tenv = Split(fenv); in Reduce()
812 SsaEnv* break_env = ssa_env_; in Reduce()
834 SsaEnv** case_envs = zone_->NewArray<SsaEnv*>(case_count); in Reduce()
840 SsaEnv* break_env = ssa_env_; in Reduce()
842 SsaEnv* copy = Steal(break_env); in Reduce()
850 SsaEnv* env = Split(copy); in Reduce()
856 SsaEnv* tenv = blocks_[blocks_.size() - depth - 1].ssa_env; in Reduce()
872 SsaEnv* next = block->ssa_env; in Reduce()
878 SsaEnv* next = ifs_.back().case_envs[p->index - 1]; in Reduce()
896 ssa_env_->Kill(SsaEnv::kControlEnd); in Reduce()
1043 void MergeIntoProduction(Production* p, SsaEnv* target, Tree* expr) { in MergeIntoProduction()
1046 bool first = target->state == SsaEnv::kUnreachable; in MergeIntoProduction()
1111 void SetEnv(const char* reason, SsaEnv* env) { in SetEnv()
1126 void Goto(SsaEnv* from, SsaEnv* to) { in Goto()
1130 case SsaEnv::kUnreachable: { // Overwrite destination. in Goto()
1131 to->state = SsaEnv::kReached; in Goto()
1137 case SsaEnv::kReached: { // Create a new merge. in Goto()
1138 to->state = SsaEnv::kMerged; in Goto()
1161 case SsaEnv::kMerged: { in Goto()
1220 SsaEnv* cont_env = ssa_env_; in BuildInfiniteLoop()
1222 ssa_env_->state = SsaEnv::kReached; in BuildInfiniteLoop()
1227 void PrepareForLoop(SsaEnv* env) { in PrepareForLoop()
1229 env->state = SsaEnv::kMerged; in PrepareForLoop()
1243 SsaEnv* Split(SsaEnv* from) { in Split()
1245 SsaEnv* result = reinterpret_cast<SsaEnv*>(zone_->New(sizeof(SsaEnv))); in Split()
1249 result->state = from->state == SsaEnv::kUnreachable ? SsaEnv::kUnreachable in Split()
1250 : SsaEnv::kReached; in Split()
1253 result->state = SsaEnv::kReached; in Split()
1258 result->state = SsaEnv::kUnreachable; in Split()
1267 SsaEnv* Steal(SsaEnv* from) { in Steal()
1270 SsaEnv* result = reinterpret_cast<SsaEnv*>(zone_->New(sizeof(SsaEnv))); in Steal()
1271 result->state = SsaEnv::kReached; in Steal()
1275 from->Kill(SsaEnv::kUnreachable); in Steal()
1280 SsaEnv* UnreachableEnv() { in UnreachableEnv()
1281 SsaEnv* result = reinterpret_cast<SsaEnv*>(zone_->New(sizeof(SsaEnv))); in UnreachableEnv()
1282 result->state = SsaEnv::kUnreachable; in UnreachableEnv()