[PATCH] D72624: [WIP] TargetMachine Hook for Module Metadata
Sam Elliott via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 13 08:50:37 PST 2020
lenary created this revision.
lenary added reviewers: tejohnson, dblaikie, khchen, dsanders, echristo.
Herald added subscribers: llvm-commits, lldb-commits, cfe-commits, liufengdb, herhut, lucyrfox, mgester, arpith-jacob, csigg, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini, dang, dexonsmith, steven_wu, hiraditya.
Herald added projects: clang, LLDB, LLVM.
This patch attempts to add a target-overridable hook for allowing module metadata
to override TargetMachine options, especially during LTO.
The new hook is called `TargetMachine::resetTargetDefaultOptions` and takes the
`llvm::Module` so that the module metadata can be read with the API provided
by `llvm::Module`.
It is not clear that this patch handles LTO correctly at the moment.
This patch relates to D72245 <https://reviews.llvm.org/D72245> and D72246 <https://reviews.llvm.org/D72246> and the discussion in
http://lists.llvm.org/pipermail/llvm-dev/2020-January/138151.html
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72624
Files:
clang/lib/CodeGen/BackendUtil.cpp
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp
llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst
llvm/examples/Kaleidoscope/Chapter8/toy.cpp
llvm/include/llvm/Target/TargetMachine.h
llvm/lib/LTO/LTOCodeGenerator.cpp
llvm/lib/Target/TargetMachine.cpp
llvm/lib/Target/TargetMachineC.cpp
llvm/tools/llc/llc.cpp
llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp
llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp
llvm/tools/opt/opt.cpp
mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
mlir/lib/ExecutionEngine/ExecutionEngine.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72624.237697.patch
Type: text/x-patch
Size: 8176 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200113/98303f40/attachment-0001.bin>
More information about the cfe-commits
mailing list