[PATCH] D51744: [WIP] Early ThinLTOLayer2 prototype

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 6 11:33:03 PDT 2018


sgraenitz created this revision.
sgraenitz added a reviewer: lhames.
Herald added subscribers: llvm-commits, jfb, steven_wu, mgrang, eraman, inglorion, mehdi_amini, mgorny.

Prototype for an ORC layer that discovers future callees from ThinLTO module summaries. It aims to minimize frontloading and compiler interception overhead.

When adding a module, instead of parsing the entire IR code, the layer will only read its summary and merge it into the global index.
When querying an initial function, the layer will identify the defining module and stage it for compilation. Additionally it discovers all callees from that function, stage their modules and so on.
Materialization for the initial function will then trigger materialization of all callees.

Discovery is not yet configurable. It only runs once and unlimited. Undiscovered call sites will cause resolution errors in the linking layer.
The goal is to limit discovery and insert special stubs at the end points, that would trigger further discovery once execution arrives there. This requires some more work though.

For now I would like to discuss the general approach and find a good way to get rid of the current hack in `Core.cpp` (search for `hackReplaceGuidWithNameIn`).


Repository:
  rL LLVM

https://reviews.llvm.org/D51744

Files:
  include/llvm/ExecutionEngine/Orc/Core.h
  include/llvm/ExecutionEngine/Orc/Layer.h
  include/llvm/ExecutionEngine/Orc/ThinLTOLayer.h
  lib/ExecutionEngine/Orc/CMakeLists.txt
  lib/ExecutionEngine/Orc/Core.cpp
  lib/ExecutionEngine/Orc/Layer.cpp
  lib/ExecutionEngine/Orc/ThinLTOLayer.cpp
  unittests/ExecutionEngine/Orc/CMakeLists.txt
  unittests/ExecutionEngine/Orc/Inputs/Bar.ll
  unittests/ExecutionEngine/Orc/Inputs/Foo.ll
  unittests/ExecutionEngine/Orc/ThinLTOLayerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51744.164254.patch
Type: text/x-patch
Size: 41693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180906/c38ed7a8/attachment.bin>


More information about the llvm-commits mailing list