Home | History | Annotate | Download | only in optimizing

Lines Matching refs:Location

31  * A Location is an abstraction over the potential location
34 class Location : public ValueObject {
48 // Unallocated location represents a location that is not fixed and can be
49 // allocated by a register allocator. Each unallocated location has
50 // a policy that specifies what kind of location is suitable. Payload
55 Location() : value_(kInvalid) {
56 // Verify that non-tagged location kinds do not interfere with kConstantTag.
68 Location(const Location& other) : ValueObject(), value_(other.value_) {}
70 Location& operator=(const Location& other) {
79 static Location ConstantLocation(HConstant* constant) {
81 return Location(kConstant | reinterpret_cast<uword>(constant));
97 // Empty location. Used if there the location should be ignored.
98 static Location NoLocation() {
99 return Location();
103 static Location RegisterLocation(ManagedRegister reg) {
104 return Location(kRegister, reg.RegId());
122 static Location StackSlot(intptr_t stack_index) {
124 Location loc(kStackSlot, payload);
134 static Location DoubleStackSlot(intptr_t stack_index) {
136 Location loc(kDoubleStackSlot, payload);
158 static Location QuickParameter(uint32_t parameter_index) {
159 return Location(kQuickParameter, parameter_index);
179 bool Equals(Location other) const {
207 static Location UnallocatedLocation(Policy policy) {
208 return Location(kUnallocated, PolicyField::Encode(policy));
211 // Any free register is suitable to replace this unallocated location.
212 static Location Any() {
216 static Location RequiresRegister() {
220 static Location RegisterOrConstant(HInstruction* instruction);
222 // The location of the first input to the instruction will be
223 // used to replace this unallocated location.
224 static Location SameAsFirstInput() {
243 explicit Location(uword value) : value_(value) {}
245 Location(Kind kind, uword payload)
262 // Location either contains kind and payload fields or a tagged handle for
280 void SetInAt(uint32_t at, Location location) {
281 inputs_.Put(at, location);
284 Location InAt(uint32_t at) const {
292 void SetOut(Location location) {
293 output_ = Location(location);
296 void AddTemp(Location location) {
297 temps_.Add(location);
300 Location GetTemp(uint32_t at) const {
304 void SetTempAt(uint32_t at, Location location) {
305 temps_.Put(at, location);
312 Location Out() const { return output_; }
315 GrowableArray<Location> inputs_;
316 GrowableArray<Location> temps_;
317 Location output_;