I know @ncannasse is opposed to platform-specific AST-changes, but it should be noted that we need this transformation to run before DCE. I'm not sure if something generic like platform_optimize makes sense though. Even if we add platform-specific optimizations for other targets, it's not clear if they all have to run in the same place.