RFC: [patch] Update shark for LLVM r95390 API change.
gbenson at redhat.com
Fri Feb 19 06:31:34 PST 2010
Xerxes Rånby wrote:
> The attached patch makes shark build and run using llvm 2.7 svn r95390.
> The LLVM change-set r95390 pawed the way to make LLVM a dynamic library
> wich are quite cool and in order to do so it moved the implicitly used
> --march, --mcpu, and --mattr functionality from JIT/TargetSelect.cpp to
> lli.cpp to prevent a clutch with llc.
> These changes made it necessary for Shark to explicitly define that it
> makes use of --mcpu and --mattr, in a similar spirit like lli, for the
> cpu autotuner.
> Shark also needs to explicitly set these options during the creation of
> the LLVM execution engine.
> For some reason shark also needs to include the JIT.h header for the JIT
> ctors to be linked in at all.
> * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
> (MCPU): Explicitly defined for use by LLVM command line parser.
> (MAttrs): Likewise.
> (SharkCompiler::SharkCompiler): Create the JIT using LLVM EngineBuilder
> in order to explicitly set MCPU and MAttrs when using LLVM 2.7.
> * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp:
> Include llvm/ExecutionEngine/JIT.h for LLVM 2.7 to make sure the
> JIT are linked in.
> OK to push?
More information about the zero-dev