Lines Matching refs:rhs
258 bool EarlyElimination::MayAccessOneMemory(GateRef lhs, GateRef rhs)
260 auto rop = acc_.GetOpCode(rhs);
264 ASSERT(acc_.GetMemoryType(rhs) == MemoryType::ELEMENT_TYPE);
269 GateRef ropValueIn = acc_.GetValueIn(rhs, 0); // migrate receiver
277 bool ropIsTypedArray = acc_.TypedOpIsTypedArray(rhs, TypedOpKind::TYPED_STORE_OP);
286 auto roff = acc_.GetValueIn(rhs, 1);
292 auto rindex = acc_.GetHClassIndex(rhs);
300 auto roff = acc_.GetOffset(rhs);
307 if (acc_.GetGateType(lhs).Value() != acc_.GetGateType(rhs).Value()) {
317 bool EarlyElimination::CompareOrder(GateRef lhs, GateRef rhs)
319 return visitor_->GetGateOrder(lhs) < visitor_->GetGateOrder(rhs);
322 bool EarlyElimination::CheckReplacement(GateRef lhs, GateRef rhs)
324 if (!acc_.MetaDataEqu(lhs, rhs)) {
325 if (acc_.GetOpCode(lhs) != acc_.GetOpCode(rhs)) {
332 if (Rename(acc_.GetValueIn(lhs, i)) != Rename(acc_.GetValueIn(rhs, i))) {
340 if (acc_.GetTypedLoadOp(lhs) != acc_.GetTypedLoadOp(rhs)) {
347 auto rhsOp = acc_.GetTypedBinaryOp(rhs);
355 auto rhsOp = acc_.GetTypedUnAccessor(rhs).GetTypedUnOp();
363 TypedArrayMetaDataAccessor rhsAccessor = acc_.GetTypedArrayMetaDataAccessor(rhs);
371 if (acc_.GetParamType(lhs) != acc_.GetParamType(rhs)) {
377 if (acc_.GetHClassIndex(lhs) != acc_.GetHClassIndex(rhs)) {
383 if (acc_.GetOffset(lhs) != acc_.GetOffset(rhs)) {
386 if (acc_.GetMachineType(lhs) != acc_.GetMachineType(rhs)) {
389 if (acc_.GetMemoryAttribute(lhs).Value() != acc_.GetMemoryAttribute(rhs).Value()) {
395 if (acc_.GetIndex(lhs) != acc_.GetIndex(rhs)) {
401 if (acc_.GetFuncGT(lhs) != acc_.GetFuncGT(rhs)) {
410 if (acc_.GetValueIn(lhs) != acc_.GetValueIn(rhs)) {
416 if (acc_.GetIndex(lhs) != acc_.GetIndex(rhs)) {
427 bool EarlyElimination::CheckRenameReplacement(GateRef lhs, GateRef rhs)
433 if (Rename(index) == Rename(rhs)) {
481 auto rhs = that->head_;
483 while (lhs != rhs) {
484 if (lhs == nullptr || rhs == nullptr) {
488 } else if (lhs->gate == rhs->gate) {
492 rhs = rhs->next;
493 } else if (elimination->CompareOrder(lhs->gate, rhs->gate)) {
494 rhs = rhs->next;
500 // lhs : common suffix of lhs-chain and rhs-chain
523 auto rhs = that->head_;
524 while (lhs != rhs) {
525 if (lhs->gate != rhs->gate) {
529 rhs = rhs->next;