Home | History | Annotate | Download | only in src

Lines Matching refs:instr

105 void HBasicBlock::AddInstruction(HInstruction* instr) {
107 ASSERT(!instr->IsLinked());
114 instr->InsertAfter(last_);
115 last_ = instr;
123 HDeoptimize* instr = new(zone()) HDeoptimize(environment->length());
127 instr->AddEnvironmentValue(val);
130 return instr;
143 HSimulate* instr = new(zone()) HSimulate(id, pop_count);
145 instr->AddPushedValue(environment->ExpressionStackAt(i));
149 instr->AddAssignedValue(index, environment->Lookup(index));
152 return instr;
175 HGoto* instr = new(zone()) HGoto(block);
176 instr->set_include_stack_check(include_stack_check);
177 Finish(instr);
188 HGoto* instr = new(zone()) HGoto(target);
189 Finish(instr);
644 HInstruction* instr = blocks()->at(i)->first();
645 while (instr != NULL) {
646 HValue* value = instr->Canonicalize();
647 if (value != instr) instr->ReplaceAndDelete(value);
648 instr = instr->next();
903 HInstruction* instr = block->first();
904 while (instr != block->end()) {
905 InferRange(instr);
906 instr = instr->next();
1220 HInstruction* instr = dominator->first();
1221 while (instr != NULL && !back_edge_dominated_by_call) {
1222 if (instr->IsCall()) {
1226 instr = instr->next();
1236 HInstruction* instr = block->first();
1237 while (instr != NULL) {
1238 if (instr->IsGoto()) {
1239 HGoto::cast(instr)->set_include_stack_check(false);
1242 instr = instr->next();
1272 bool ShouldMove(HInstruction* instr, HBasicBlock* loop_header);
1303 HInstruction* instr = block->first();
1306 while (instr != NULL) {
1307 side_effects |= (instr->flags() & HValue::ChangesFlagsMask());
1308 instr = instr->next();
1353 HInstruction* instr = block->first();
1354 while (instr != NULL) {
1355 HInstruction* next = instr->next();
1356 if (instr->CheckFlag(HValue::kUseGVN) &&
1357 (instr->flags() & depends_flags) == 0) {
1359 instr->id(),
1360 instr->Mnemonic());
1362 for (int i = 0; i < instr->OperandCount(); ++i) {
1363 if (instr->OperandAt(i)->IsDefinedAfter(pre_header)) {
1368 if (inputs_loop_invariant && ShouldMove(instr, loop_header)) {
1369 TraceGVN("Found loop invariant instruction %d\n", instr->id());
1371 instr->Unlink();
1372 instr->InsertBefore(pre_header->end());
1375 instr = next;
1385 bool HGlobalValueNumberer::ShouldMove(HInstruction* instr,
1392 if (FLAG_aggressive_loop_invariant_motion && !instr->IsChange()) {
1401 HBasicBlock* block = instr->block();
1430 HInstruction* instr = block->first();
1431 while (instr != NULL) {
1432 HInstruction* next = instr->next();
1433 int flags = (instr->flags() & HValue::ChangesFlagsMask());
1435 ASSERT(!instr->CheckFlag(HValue::kUseGVN));
1438 TraceGVN("Instruction %d kills\n", instr->id());
1439 } else if (instr->CheckFlag(HValue::kUseGVN)) {
1440 HValue* other = map->Lookup(instr);
1442 ASSERT(instr->Equals(other) && other->Equals(instr));
1444 instr->id(),
1445 instr->Mnemonic(),
1448 instr->ReplaceAndDelete(other);
1450 map->Add(instr);
1453 instr = next;
2070 void EffectContext::ReturnInstruction(HInstruction* instr, int ast_id) {
2071 owner()->AddInstruction(instr);
2072 if (instr->HasSideEffects()) owner()->AddSimulate(ast_id);
2076 void ValueContext::ReturnInstruction(HInstruction* instr, int ast_id) {
2077 owner()->AddInstruction(instr);
2078 owner()->Push(instr);
2079 if (instr->HasSideEffects()) owner()->AddSimulate(ast_id);
2083 void TestContext::ReturnInstruction(HInstruction* instr, int ast_id) {
2085 builder->AddInstruction(instr);
2088 if (instr->HasSideEffects()) {
2089 builder->Push(instr);
2093 BuildBranch(instr);
2248 HReturn* instr = new(zone()) HReturn(graph()->GetConstantUndefined());
2249 current_block()->FinishExit(instr);
2301 HInstruction* instr = blocks()->at(i)->first();
2302 while (instr != NULL) {
2303 if (instr->IsBoundsCheck()) {
2305 ASSERT(instr->uses()->length() > 0);
2306 instr->ReplaceValue(HBoundsCheck::cast(instr)->index());
2308 instr = instr->next();
2314 HInstruction* HGraphBuilder::AddInstruction(HInstruction* instr) {
2316 current_block()->AddInstruction(instr);
2317 return instr;
2327 void HGraphBuilder::AddPhi(HPhi* instr) {
2329 current_block()->AddPhi(instr);
2333 void HGraphBuilder::PushAndAdd(HInstruction* instr) {
2334 Push(instr);
2335 AddInstruction(instr);
2875 HFunctionLiteral* instr =
2877 ast_context()->ReturnInstruction(instr, expr->id());
2959 HLoadContextSlot* instr = new(zone()) HLoadContextSlot(context, index);
2960 ast_context()->ReturnInstruction(instr, expr->id());
2974 HLoadGlobalCell* instr = new(zone()) HLoadGlobalCell(cell, check_hole);
2975 ast_context()->ReturnInstruction(instr, expr->id());
2981 HLoadGlobalGeneric* instr =
2986 instr->set_position(expr->position());
2987 ASSERT(instr->HasSideEffects());
2988 ast_context()->ReturnInstruction(instr, expr->id());
2997 HConstant* instr =
2999 ast_context()->ReturnInstruction(instr, expr->id());
3004 HRegExpLiteral* instr = new(zone()) HRegExpLiteral(expr->pattern(),
3007 ast_context()->ReturnInstruction(instr, expr->id());
3173 HStoreNamedField* instr =
3177 instr->set_transition(transition);
3180 instr->SetFlag(HValue::kChangesMaps);
3182 return instr;
3248 HInstruction* instr =
3250 instr->set_position(expr->position());
3252 AddInstruction(instr);
3266 HInstruction* instr = BuildStoreNamedGeneric(object, name, value);
3267 instr->set_position(expr->position());
3268 AddInstruction(instr);
3277 if (instr->HasSideEffects()) {
3305 HInstruction* instr = NULL;
3321 instr = BuildStoreNamed(object, value, expr);
3328 instr = BuildStoreNamedGeneric(object, name, value);
3338 instr = BuildStoreKeyed(object, key, value, expr);
3341 instr->set_position(expr->position());
3342 AddInstruction(instr);
3343 if (instr->HasSideEffects()) AddSimulate(expr->AssignmentId());
3361 HInstruction* instr = new(zone()) HStoreGlobalCell(value, cell, check_hole);
3362 instr->set_position(position);
3363 AddInstruction(instr);
3364 if (instr->HasSideEffects()) AddSimulate(ast_id);
3370 HStoreGlobalGeneric* instr =
3376 instr->set_position(position);
3377 AddInstruction(instr);
3378 ASSERT(instr->HasSideEffects());
3379 if (instr->HasSideEffects()) AddSimulate(ast_id);
3408 HStoreContextSlot* instr =
3410 AddInstruction(instr);
3411 if (instr->HasSideEffects()) AddSimulate(expr->AssignmentId());
3440 HInstruction* instr = BuildBinaryOperation(operation, left, right);
3441 PushAndAdd(instr);
3442 if (instr->HasSideEffects()) AddSimulate(operation->id());
3444 HInstruction* store = BuildStoreNamed(obj, instr, prop);
3448 Push(instr);
3467 HInstruction* instr = BuildBinaryOperation(operation, left, right);
3468 PushAndAdd(instr);
3469 if (instr->HasSideEffects()) AddSimulate(operation->id());
3472 HInstruction* store = BuildStoreKeyed(obj, key, instr, expr);
3476 Push(instr);
3523 HStoreContextSlot* instr =
3525 AddInstruction(instr);
3526 if (instr->HasSideEffects()) AddSimulate(expr->AssignmentId());
3557 HThrow* instr = new(zone()) HThrow(value);
3558 instr->set_position(expr->position());
3559 AddInstruction(instr);
3836 HInstruction* instr = NULL;
3843 instr = new(zone()) HJSArrayLength(array);
3851 instr = new(zone()) HStringLength(string);
3858 instr = new(zone()) HStringCharFromCode(char_code);
3863 instr = new(zone()) HLoadFunctionPrototype(function);
3871 instr = BuildLoadNamed(obj, expr, types->first(), name);
3874 instr = new(zone()) HLoadNamedFieldPolymorphic(obj, types, name);
3876 instr = BuildLoadNamedGeneric(obj, expr);
3884 instr = BuildLoadKeyed(obj, key, expr);
3886 instr->set_position(expr->position());
3887 ast_context()->ReturnInstruction(instr, expr->id());
4649 HDeleteProperty* instr = new(zone()) HDeleteProperty(obj, key);
4650 ast_context()->ReturnInstruction(instr, expr->id());
4695 HInstruction* instr = NULL;
4698 instr = new(zone()) HBitNot(value);
4701 instr = new(zone()) HMul(value, graph_->GetConstantMinus1());
4704 instr = new(zone()) HMul(value, graph_->GetConstant1());
4710 ast_context()->ReturnInstruction(instr, expr->id());
4719 HInstruction* instr = new(zone()) HAdd(value, delta);
4720 AssumeRepresentation(instr, Representation::Integer32());
4721 return instr;
4754 HStoreContextSlot* instr =
4756 AddInstruction(instr);
4757 if (instr->HasSideEffects()) AddSimulate(expr->AssignmentId());
4869 HInstruction* instr = NULL;
4872 instr = new(zone()) HAdd(left, right);
4875 instr = new(zone()) HSub(left, right);
4878 instr = new(zone()) HMul(left, right);
4881 instr = new(zone()) HMod(left, right);
4884 instr = new(zone()) HDiv(left, right);
4887 instr = new(zone()) HBitXor(left, right);
4890 instr = new(zone()) HBitAnd(left, right);
4893 instr = new(zone()) HBitOr(left, right);
4896 instr = new(zone()) HSar(left, right);
4899 instr = new(zone()) HShr(left, right);
4902 instr = new(zone()) HShl(left, right);
4914 return instr;
4921 if (instr->IsBitwiseBinaryOperation() && rep.IsDouble()) {
4924 AssumeRepresentation(instr, rep);
4925 return instr;
5026 HInstruction* instr = BuildBinaryOperation(expr, left, right);
5027 instr->set_position(expr->position());
5028 ast_context()->ReturnInstruction(instr, expr->id());
5067 HInstruction* instr = new(zone()) HClassOfTest(value, rhs);
5068 instr->set_position(expr->position());
5069 ast_context()->ReturnInstruction(instr, expr->id());
5082 HInstruction* instr = new(zone()) HTypeofIs(left,
5084 instr->set_position(expr->position());
5085 ast_context()->ReturnInstruction(instr, expr->id());
5097 HInstruction* instr = NULL;
5129 instr = new(zone()) HInstanceOf(context, left, right);
5132 instr = new(zone()) HInstanceOfKnownGlobal(left, target);
5144 instr = new(zone()) HCompareJSObjectEq(left, right);
5155 instr = compare;
5157 instr->set_position(expr->position());
5158 ast_context()->ReturnInstruction(instr, expr->id());