| 3760 | } |
| 3761 | |
| 3762 | MemInstr::ByteAccessInfo |
| 3763 | MemInstr::ByteAccessInfo::get(const Type &t, bool store, unsigned align) { |
| 3764 | bool ptr_access = hasPtr(t); |
| 3765 | ByteAccessInfo info; |
| 3766 | info.hasIntByteAccess = t.enforcePtrOrVectorType().isFalse(); |
| 3767 | info.doesPtrStore = ptr_access && store; |
| 3768 | info.doesPtrLoad = ptr_access && !store; |
| 3769 | info.byteSize = gcd(align, getCommonAccessSize(t)); |
| 3770 | info.subByteAccess = t.maxSubBitAccess(); |
| 3771 | return info; |
| 3772 | } |
| 3773 | |
| 3774 | MemInstr::ByteAccessInfo MemInstr::ByteAccessInfo::full(unsigned byteSize) { |
| 3775 | return { true, true, true, true, byteSize, 0 }; |