Skip to content

Commit

Permalink
speed up llvmcall unique name generation (#35144)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored Mar 20, 2020
1 parent 144859d commit 5d5f799
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ccall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,6 @@ static jl_cgval_t emit_llvmcall(jl_codectx_t &ctx, jl_value_t **args, size_t nar
}
if (at == NULL)
at = try_eval(ctx, args[3], "error statically evaluating llvmcall argument tuple");
int i = 1;
if (jl_is_tuple(ir)) {
// if the IR is a tuple, we expect (declarations, ir)
if (jl_nfields(ir) != 2)
Expand Down Expand Up @@ -940,7 +939,7 @@ static jl_cgval_t emit_llvmcall(jl_codectx_t &ctx, jl_value_t **args, size_t nar
std::string ir_name;
while (true) {
std::stringstream name;
name << (ctx.f->getName().str()) << "u" << i++;
name << (ctx.f->getName().str()) << "u" << globalUnique++;
ir_name = name.str();
if (jl_Module->getFunction(ir_name) == NULL)
break;
Expand Down

0 comments on commit 5d5f799

Please sign in to comment.