Skip to content

Commit

Permalink
speed up llvmcall unique name generation (#35144)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5d5f799)
  • Loading branch information
JeffBezanson authored and KristofferC committed Mar 23, 2020
1 parent 8ea1225 commit 1b9d8ac
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 @@ -849,7 +849,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 @@ -908,7 +907,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 1b9d8ac

Please sign in to comment.