[PATCH] D117092: [GlobalOpt] Use generic type when converting malloc to global

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 14 01:50:21 PST 2022


nikic added a comment.

I've marked this as dependent on D117223 <https://reviews.llvm.org/D117223>, see the globalsra-generic-type.ll test there for why. Without that change, we would not be able to perform global SRA on the produced global. There are other transforms that might fail, but I think having global SRA should go a long way towards avoiding regressions, as it will end up splitting the global into natural types, and all other optimizations should apply at that point.

@reames I can't precommit the test because it currently crashes. I've folded the getObjectSize() change into here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117092/new/

https://reviews.llvm.org/D117092



More information about the llvm-commits mailing list