Changeset 220625 in webkit for trunk/Source/JavaScriptCore/b3
- Timestamp:
- Aug 12, 2017, 11:44:48 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore/b3
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/b3/B3LowerToAir.cpp
r220579 r220625 190 190 case Trunc: 191 191 case Identity: 192 case Opaque: 192 193 return true; 193 194 default: … … 3337 3338 } 3338 3339 3339 case Identity: { 3340 case Identity: 3341 case Opaque: { 3340 3342 ASSERT(tmp(m_value->child(0)) == tmp(m_value)); 3341 3343 return; -
trunk/Source/JavaScriptCore/b3/B3Opcode.cpp
r214942 r220625 107 107 out.print("Identity"); 108 108 return; 109 case Opaque: 110 out.print("Opaque"); 111 return; 109 112 case Const32: 110 113 out.print("Const32"); -
trunk/Source/JavaScriptCore/b3/B3Opcode.h
r214592 r220625 44 44 // Polymorphic identity, usable with any value type. 45 45 Identity, 46 47 // This is an identity, but we prohibit the compiler from realizing this until the bitter end. This can 48 // be used to block reassociation and other compiler reasoning, if we find that it's wrong or 49 // unprofitable and we need an escape hatch. 50 Opaque, 46 51 47 52 // Constants. Use the ConstValue* classes. Constants exist in the control flow, so that we can … … 259 264 // because it unlocks reordering of users of @result and @phantom. 260 265 // 261 // On X86, this is lowered to a load-load fence and @result uses @phantom directly.266 // On X86, this is lowered to a load-load fence and @result folds to zero. 262 267 // 263 268 // On ARM, this is lowered as if like: -
trunk/Source/JavaScriptCore/b3/B3ReduceStrength.cpp
r219702 r220625 486 486 { 487 487 switch (m_value->opcode()) { 488 case Opaque: 489 // Turn this: Opaque(Opaque(value)) 490 // Into this: Opaque(value) 491 if (m_value->child(0)->opcode() == Opaque) { 492 replaceWithIdentity(m_value->child(0)); 493 break; 494 } 495 break; 496 488 497 case Add: 489 498 handleCommutativity(); -
trunk/Source/JavaScriptCore/b3/B3Validate.cpp
r215533 r220625 140 140 break; 141 141 case Identity: 142 case Opaque: 142 143 VALIDATE(!value->kind().hasExtraBits(), ("At ", *value)); 143 144 VALIDATE(value->numChildren() == 1, ("At ", *value)); -
trunk/Source/JavaScriptCore/b3/B3Value.cpp
r215533 r220625 547 547 case Nop: 548 548 case Identity: 549 case Opaque: 549 550 case Const32: 550 551 case Const64: … … 701 702 ValueKey Value::key() const 702 703 { 704 // NOTE: Except for exotic things like CheckAdd and friends, we want every case here to have a 705 // corresponding case in ValueKey::materialize(). 703 706 switch (opcode()) { 704 707 case FramePointer: 705 708 return ValueKey(kind(), type()); 706 709 case Identity: 710 case Opaque: 707 711 case Abs: 708 712 case Ceil: … … 795 799 case ConstFloat: 796 800 case Identity: 801 case Opaque: 797 802 case Nop: 798 803 return true; … … 810 815 switch (kind.opcode()) { 811 816 case Identity: 817 case Opaque: 812 818 case Add: 813 819 case Sub: -
trunk/Source/JavaScriptCore/b3/B3Value.h
r215407 r220625 329 329 break; 330 330 case Identity: 331 case Opaque: 331 332 case Neg: 332 333 case Clz: -
trunk/Source/JavaScriptCore/b3/B3ValueKey.cpp
r208848 r220625 1 1 /* 2 * Copyright (C) 2015-201 6Apple Inc. All rights reserved.2 * Copyright (C) 2015-2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 57 57 Value* ValueKey::materialize(Procedure& proc, Origin origin) const 58 58 { 59 // NOTE: We sometimes cannot return a Value* for some key, like for Check and friends. That's because 60 // though those nodes have side exit effects. It would be weird to materialize anything that has a side 61 // exit. We can't possibly know enough about a side exit to know where it would be safe to emit one. 59 62 switch (opcode()) { 60 63 case FramePointer: 61 64 return proc.add<Value>(kind(), type(), origin); 62 65 case Identity: 66 case Opaque: 67 case Abs: 68 case Floor: 69 case Ceil: 63 70 case Sqrt: 71 case Neg: 72 case Depend: 64 73 case SExt8: 65 74 case SExt16: … … 72 81 case FloatToDouble: 73 82 case DoubleToFloat: 74 case Check:75 83 return proc.add<Value>(kind(), type(), origin, child(proc, 0)); 76 84 case Add: … … 97 105 case AboveEqual: 98 106 case BelowEqual: 107 case EqualOrUnordered: 99 108 return proc.add<Value>(kind(), type(), origin, child(proc, 0), child(proc, 1)); 100 109 case Select:
Note:
See TracChangeset
for help on using the changeset viewer.