public Expression VisitRegisterStorage(RegisterStorage reg) { // If the architecture has no subregisters, this test will // be true. if (map.TryGetValue(reg, out CallBinding cb)) { return(cb.Expression); } // If the architecture has subregisters, we need a more // expensive test. //$TODO: perhaps this can be done with another level of lookup, // eg by using a Dictionary<StorageDomain<Dictionary<Storage, CallBinding>> foreach (var de in map) { if (reg.OverlapsWith(de.Value.Storage)) { return(de.Value.Expression); } } if (bindUses) { return(EnsureRegister(reg)); } return(null); }