General: - Use custom __builtin_offsetof definition to preserve the call until lower gimple Approach: - At the very last point of gimple (after gimple optimizations), recognize accesses - Build a mapping of statement location (multiple statements share) to a semantic graph (or tree) - Right after expansion to RTL, pattern match set of RTL instructions with same location to graph - Add notes (persistent over RTL transformations) to any RTL instruction that is relevant - After all RTL optimizations, add assembly labels before relevant RTL instructions (identified by notes) - Might need an additional early pass to prevent COMPONENT_REFs to constant/static stuff from being folded early