Skip to content

Commit

Permalink
Merge pull request #18124 from JuliaLang/jb/O0onoutput
Browse files Browse the repository at this point in the history
disable llvm optimizations in JIT when generating output
  • Loading branch information
JeffBezanson authored Aug 24, 2016
2 parents 2390055 + 9f50de4 commit 52346ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/jitlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,13 @@ JuliaOJIT::JuliaOJIT(TargetMachine &TM)
}
)
{
addOptimizationPasses(&PM);
if (!jl_generating_output()) {
addOptimizationPasses(&PM);
}
else {
PM.add(createLowerGCFramePass(tbaa_gcframe));
PM.add(createLowerPTLSPass(imaging_mode, tbaa_const));
}
if (TM.addPassesToEmitMC(PM, Ctx, ObjStream))
llvm_unreachable("Target does not support MC emission.");

Expand Down Expand Up @@ -1038,6 +1044,7 @@ static void jl_gen_llvm_globaldata(llvm::Module *mod, ValueToValueMapTy &VMap,
extern "C"
void jl_dump_native(const char *bc_fname, const char *obj_fname, const char *sysimg_data, size_t sysimg_len)
{
JL_TIMING(NATIVE_DUMP);
assert(imaging_mode);
// We don't want to use MCJIT's target machine because
// it uses the large code model and we may potentially
Expand Down
3 changes: 2 additions & 1 deletion src/timing.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ static inline uint64_t rdtscp(void)
X(AST_COMPRESS), \
X(AST_UNCOMPRESS), \
X(SYSIMG_LOAD), \
X(SYSIMG_DUMP),
X(SYSIMG_DUMP), \
X(NATIVE_DUMP),

enum jl_timing_owners {
#define X(name) JL_TIMING_ ## name
Expand Down

4 comments on commit 52346ec

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something went wrong when running your job: NanosoldierError: encountered error when retrieving old daily build data: BoundsError(String[],(0,))
Unfortunately, the logs could not be uploaded.
cc @jrevels

@yuyichao
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that @nanosoldier can't run daily job if there isn't a previous run?

@jrevels
Copy link
Member

@jrevels jrevels commented on 52346ec Aug 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks back up to a month for previous data to compare against, but only looks for report directories, not data. This logic is incorrect now that Nanosoldier will upload logs even when data can't be uploaded - it tried to retrieve data from a directory that didn't have any data, thus the error.

EDIT: See here for a fix.

Please sign in to comment.