[GlobalOpt] Remove heap SROA
authorFangrui Song <i@maskray.me>
Tue, 11 May 2021 18:34:37 +0000 (11:34 -0700)
committerFangrui Song <i@maskray.me>
Tue, 11 May 2021 18:34:37 +0000 (11:34 -0700)
commit129f466e222e13fdf680356831bb935e1229bdf4
treec5c7af56ecfdb252727323cd38f1acc8b66483d7
parentae2b36e8bdfa612649c6f2d8b6b9079679cb2572
[GlobalOpt] Remove heap SROA

GlobalOpt implements a heap SROA (SROA for an malloc allocatated struct or array
of structs) which is largely undertested (heap-sra-[1234].ll are basically the
same test with very little difference) and does not trigger at all when
bootstrapping clang (it only supports the case of one single store).

The heap SROA implementation causes PR50027 (GEP is not properly handled; crash or miscompile).
Just drop the implementation. I have deleted some obviously duplicated tests
but kept `heap-sra-[12]{,-no-nullopt}.ll`.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D102257
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/Transforms/GlobalOpt/MallocSROA-section.ll
llvm/test/Transforms/GlobalOpt/heap-sra-1.ll
llvm/test/Transforms/GlobalOpt/heap-sra-2.ll
llvm/test/Transforms/GlobalOpt/heap-sra-3-no-null-opt.ll [deleted file]
llvm/test/Transforms/GlobalOpt/heap-sra-3.ll [deleted file]
llvm/test/Transforms/GlobalOpt/heap-sra-4-no-null-opt.ll [deleted file]
llvm/test/Transforms/GlobalOpt/heap-sra-4.ll [deleted file]
llvm/test/Transforms/GlobalOpt/heap-sra-phi.ll