Skip to content

Commit a8d7b68

Browse files
committed
Improvements to JITLink
Seeing what this will look like, since it has a number of features (delayed compilation, concurrent compilation) that are starting to become important, so it would be nice to switch to only supporting one common implementation of memory management. Refs #50248 I am expecting llvm/llvm-project#63236 may cause some problems, since we reconfigured some CI machines to minimize that issue, but it is still likely relevant.
1 parent 636a35d commit a8d7b68

File tree

3 files changed

+174
-155
lines changed

3 files changed

+174
-155
lines changed

src/codegen.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10396,7 +10396,7 @@ static void init_jit_functions(void)
1039610396
}
1039710397

1039810398
#ifdef JL_USE_INTEL_JITEVENTS
10399-
char jl_using_intel_jitevents; // Non-zero if running under Intel VTune Amplifier
10399+
char jl_using_intel_jitevents = 0; // Non-zero if running under Intel VTune Amplifier
1040010400
#endif
1040110401

1040210402
#ifdef JL_USE_OPROFILE_JITEVENTS
@@ -10510,9 +10510,6 @@ extern "C" void jl_init_llvm(void)
1051010510
#if defined(JL_USE_INTEL_JITEVENTS) || \
1051110511
defined(JL_USE_OPROFILE_JITEVENTS) || \
1051210512
defined(JL_USE_PERF_JITEVENTS)
10513-
#ifdef JL_USE_JITLINK
10514-
#pragma message("JIT profiling support (JL_USE_*_JITEVENTS) not yet available on platforms that use JITLink")
10515-
#else
1051610513
const char *jit_profiling = getenv("ENABLE_JITPROFILING");
1051710514

1051810515
#if defined(JL_USE_INTEL_JITEVENTS)
@@ -10529,24 +10526,23 @@ extern "C" void jl_init_llvm(void)
1052910526

1053010527
#if defined(JL_USE_PERF_JITEVENTS)
1053110528
if (jit_profiling && atoi(jit_profiling)) {
10532-
jl_using_perf_jitevents= 1;
10529+
jl_using_perf_jitevents = 1;
1053310530
}
1053410531
#endif
1053510532

1053610533
#ifdef JL_USE_INTEL_JITEVENTS
1053710534
if (jl_using_intel_jitevents)
10538-
jl_ExecutionEngine->RegisterJITEventListener(JITEventListener::createIntelJITEventListener());
10535+
jl_ExecutionEngine->enableIntelJITEventListener();
1053910536
#endif
1054010537

1054110538
#ifdef JL_USE_OPROFILE_JITEVENTS
1054210539
if (jl_using_oprofile_jitevents)
10543-
jl_ExecutionEngine->RegisterJITEventListener(JITEventListener::createOProfileJITEventListener());
10540+
jl_ExecutionEngine->enableOProfileJITEventListener();
1054410541
#endif
1054510542

1054610543
#ifdef JL_USE_PERF_JITEVENTS
1054710544
if (jl_using_perf_jitevents)
10548-
jl_ExecutionEngine->RegisterJITEventListener(JITEventListener::createPerfJITEventListener());
10549-
#endif
10545+
jl_ExecutionEngine->enablePerfJITEventListener();
1055010546
#endif
1055110547
#endif
1055210548

0 commit comments

Comments
 (0)