[PATCH] D49434: Put "built-in" function definitions in global Used list, for LTO. (fix bug 34169)

Caroline Tice via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 19 14:51:43 PDT 2018


cmtice updated this revision to Diff 156360.
cmtice edited the summary of this revision.
cmtice added a comment.
Herald added subscribers: atanasyan, JDevlieghere, kbarton, aheejin, jgravelle-google, sbc100, nemanjai, sdardis, dschuff.
Herald added a reviewer: javed.absar.

pcc's original suggested fix did not work, because the real issue was the function definitions being initially internalized by LTO and later DCE'd.  Peter's suggestion did not prevent them from being internalized.   I consulted with him offline and we came up with this alternative solution.  It fixes the issue for the new LTO implemention.  The old LTO implementation still internalizes the function definitions, but they do not get Dead Code Eliminated.  I have also fixed the test case, and have generalized the code to check for all builtin functions (as requested).


https://reviews.llvm.org/D49434

Files:
  include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
  include/llvm/CodeGen/TargetLowering.h
  include/llvm/module.modulemap
  lib/CodeGen/AtomicExpandPass.cpp
  lib/CodeGen/DwarfEHPrepare.cpp
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/SelectionDAG/StatepointLowering.cpp
  lib/CodeGen/TargetLoweringBase.cpp
  lib/Object/IRSymtab.cpp
  lib/Target/AArch64/AArch64FastISel.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/ARM/ARMFastISel.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMLegalizerInfo.h
  lib/Target/ARM/ARMSelectionDAGInfo.h
  lib/Target/Hexagon/HexagonISelLowering.cpp
  lib/Target/Lanai/LanaiISelLowering.cpp
  lib/Target/Mips/MipsISelLowering.cpp
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
  lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h
  test/ThinLTO/X86/Inputs/builtin-nostrip.ll
  test/ThinLTO/X86/builtin-nostrip.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49434.156360.patch
Type: text/x-patch
Size: 21915 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180719/4b0af75f/attachment.bin>


More information about the llvm-commits mailing list