[PATCH] D102257: [GlobalOpt] Remove heap SROA

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 10:24:08 PDT 2021


MaskRay created this revision.
MaskRay added reviewers: aeubanks, evgeny777, reames.
Herald added subscribers: jfb, hiraditya.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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 triggers PR50027 (GEP is not properly handled).
Just drop the implementation. I have deleted some obviously duplicated tests
but kept `heap-sra-[12]{,-no-nullopt}.ll`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102257

Files:
  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
  llvm/test/Transforms/GlobalOpt/heap-sra-3.ll
  llvm/test/Transforms/GlobalOpt/heap-sra-4-no-null-opt.ll
  llvm/test/Transforms/GlobalOpt/heap-sra-4.ll
  llvm/test/Transforms/GlobalOpt/heap-sra-phi.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102257.344462.patch
Type: text/x-patch
Size: 32070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210511/1e1a5ff4/attachment.bin>


More information about the llvm-commits mailing list