| 38 | } // namespace |
| 39 | |
| 40 | Pass::Status ReplaceDescArrayAccessUsingVarIndex::Process() { |
| 41 | Status status = Status::SuccessWithoutChange; |
| 42 | for (Instruction& var : context()->types_values()) { |
| 43 | if (descsroautil::IsDescriptorArray(context(), &var)) { |
| 44 | Status s = ReplaceVariableAccessesWithConstantElements(&var); |
| 45 | if (s == Status::Failure) return Status::Failure; |
| 46 | if (s == Status::SuccessWithChange) status = Status::SuccessWithChange; |
| 47 | } |
| 48 | } |
| 49 | return status; |
| 50 | } |
| 51 | |
| 52 | Pass::Status ReplaceDescArrayAccessUsingVarIndex:: |
| 53 | ReplaceVariableAccessesWithConstantElements(Instruction* var) const { |
nothing calls this directly
no test coverage detected