Lines Matching defs:use
4 * you may not use this file except in compliance with the License.
92 GateRef use = *it;
96 VisitGateUse(use);
101 void StringBuilderOptimizer::VisitGateUse(GateRef use)
103 Status useStatus = GetStatus(use);
108 auto useOpCode = acc_.GetOpCode(use);
109 if (useOpCode == OpCode::VALUE_SELECTOR && IsLoopHeader(use)) {
114 UpdateStatus(use, State::IN_STRING_BUILDER);
115 toVisit_.push_back(use);
118 // if this use is string-add
119 // we need to determine whether to set the current use to IN_STRING_BUILDER
122 GateRef left = acc_.GetValueIn(use, 0);
125 UpdateStatus(use, State::IN_STRING_BUILDER);
126 toVisit_.push_back(use);
128 curStringAddId_ = acc_.GetId(use);
130 UpdateStatus(use, State::IN_STRING_BUILDER);
131 toVisit_.push_back(use);
133 SetStatus(use, State::INVALID_OPT);
136 SetStatus(use, State::INVALID_OPT);
167 GateRef use = *it;
171 auto useStatus = GetStatus(use);
175 toVisit_.push_back(use);
177 if (currIsLoopHeader && !LoopContains(curr, use)) {
219 GateRef use = *it;
223 auto op = acc_.GetOpCode(use);
224 if ((op == OpCode::STRING_ADD && HasConcatOrPhiUse(use)) || op == OpCode::VALUE_SELECTOR) {
237 GateRef use = *it;
241 auto useOp = acc_.GetOpCode(use);
244 // or this gate has an invalid use
246 if (curStringAddId_ != acc_.GetId(use) || IsInvalidGate(use)) {
252 // this gate has a phi use, then check the phi use gate
253 if (useOp == OpCode::VALUE_SELECTOR && !CheckStringAddUses(use)) {
257 if (useOp == OpCode::ECMA_STRING_CHECK || acc_.IsFrameValues(use) || acc_.IsValueSelector(use)) {