[mono/mono] b68ef214: [jit] Remove a few LLVM_MONO_BRANCH defines, we don't support non-mono versions of LLVM any more.
"Zoltan Varga (
[email protected])" <
[email protected]>
Fri, 8 Nov 2013 04:27:02 +0000
| Newsgroups |
gmane.comp.gnome.mono.patches |
| Message-ID |
<0000014235f69775-8eb96a70-490e-46b2-ace0-702fff2aabf4-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/09a0c58b7a6e...b68ef214e196
Commit: b68ef214e1961910eb9284e0655b53641925294b
Author: Zoltan Varga <[email protected]> (vargaz)
Date: 2013-11-08 04:24:30 GMT
URL: https://github.com/mono/mono/commit/b68ef214e1961910eb9284e0655b53641925294b
[jit] Remove a few LLVM_MONO_BRANCH defines, we don't support non-mono versions of LLVM any more.
Changed paths:
M mono/mini/ir-emit.h
M mono/mini/mini-llvm-cpp.cpp
M mono/mini/mini-llvm.c
M mono/mini/mini.h
Modified: mono/mini/ir-emit.h
===================================================================
@@ -835,8 +835,6 @@
/* Loads/Stores which can fault are handled correctly by the LLVM mono branch */
#define MONO_EMIT_NEW_IMPLICIT_EXCEPTION_LOAD_STORE(cfg) do { \
- if (COMPILE_LLVM (cfg) && !IS_LLVM_MONO_BRANCH) \
- MONO_EMIT_NEW_IMPLICIT_EXCEPTION ((cfg)); \
} while (0)
/* Emit an explicit null check which doesn't depend on SIGSEGV signal handling */
Modified: mono/mini/mini-llvm-cpp.cpp
===================================================================
@@ -262,17 +262,8 @@ class MonoJITEventListener : public JITEventListener {
* install a profiler hook and reset the code model here.
* This should be inside an ifdef, but we can't include our config.h either,
* since its definitions conflict with LLVM's config.h.
- *
+ * The LLVM mono branch contains a workaround.
*/
- //#if defined(TARGET_X86) || defined(TARGET_AMD64)
-#ifndef LLVM_MONO_BRANCH
- /* The LLVM mono branch contains a workaround, so this is not needed */
- if (Details.MF->getTarget ().getCodeModel () == CodeModel::Large) {
- Details.MF->getTarget ().setCodeModel (CodeModel::Default);
- }
-#endif
- //#endif
-
emitted_cb (wrap (&F), Code, (char*)Code + Size);
}
};
@@ -547,7 +538,6 @@ class MonoJITEventListener : public JITEventListener {
mono_mm->alloc_cb = alloc_cb;
mono_mm->dlsym_cb = dlsym_cb;
- //JITExceptionHandling = true;
// PrettyStackTrace installs signal handlers which trip up libgc
DisablePrettyStackTrace = true;
@@ -568,14 +558,6 @@ class MonoJITEventListener : public JITEventListener {
#endif
g_assert (EE);
-#if 0
- ExecutionEngine *EE = ExecutionEngine::createJIT (unwrap (MP), &Error, mono_mm, CodeGenOpt::Default, true, Reloc::Default, CodeModel::Large);
- if (!EE) {
- errs () << "Unable to create LLVM ExecutionEngine: " << Error << "\n";
- g_assert_not_reached ();
- }
-#endif
-
EE->InstallExceptionTableRegister (exception_cb);
mono_event_listener = new MonoJITEventListener (emitted_cb);
EE->RegisterJITEventListener (mono_event_listener);
@@ -587,12 +569,10 @@ class MonoJITEventListener : public JITEventListener {
PassRegistry &Registry = *PassRegistry::getPassRegistry();
initializeCore(Registry);
initializeScalarOpts(Registry);
- //initializeIPO(Registry);
initializeAnalysis(Registry);
initializeIPA(Registry);
initializeTransformUtils(Registry);
initializeInstCombine(Registry);
- //initializeInstrumentation(Registry);
initializeTarget(Registry);
llvm::cl::ParseEnvironmentOptions("mono", "MONO_LLVM", "");
Modified: mono/mini/mini-llvm.c
===================================================================
@@ -2039,7 +2039,6 @@
lcall = emit_call (ctx, bb, &builder, callee, args, LLVMCountParamTypes (llvm_sig));
-#ifdef LLVM_MONO_BRANCH
/*
* Modify cconv and parameter attributes to pass rgctx/imt correctly.
*/
@@ -2055,7 +2054,6 @@
LLVMAddInstrAttribute (lcall, 1 + sinfo.rgctx_arg_pindex, LLVMInRegAttribute);
if (call->imt_arg_reg)
LLVMAddInstrAttribute (lcall, 1 + sinfo.imt_arg_pindex, LLVMInRegAttribute);
-#endif
/* Add byval attributes if needed */
for (i = 0; i < sig->param_count; ++i) {
@@ -4296,9 +4294,7 @@
method = LLVMAddFunction (module, method_name, method_type);
ctx->lmethod = method;
-#ifdef LLVM_MONO_BRANCH
LLVMSetFunctionCallConv (method, LLVMMono1CallConv);
-#endif
LLVMSetLinkage (method, LLVMPrivateLinkage);
LLVMAddFunctionAttr (method, LLVMUWTable);
Modified: mono/mini/mini.h
===================================================================
@@ -102,17 +102,6 @@
#define LLVM_CHECK_VERSION(major,minor) 0
#endif
-/*
- * Whenever we are using mono's LLVM branch.
- * This can be used in if statements, code which references new definitions from the branch
- * still needs an #ifdef LLVM_MONO_BRANCH.
- */
-#ifdef LLVM_MONO_BRANCH
-#define IS_LLVM_MONO_BRANCH 1
-#else
-#define IS_LLVM_MONO_BRANCH 0
-#endif
-
#define NOT_IMPLEMENTED do { g_assert_not_reached (); } while (0)
/* for 32 bit systems */
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches