Skip to content

Commit

Permalink
Replaces CreateGlobalStringPtr with CreateGlobalString
Browse files Browse the repository at this point in the history
  • Loading branch information
MattBolitho committed Jan 2, 2025
1 parent 7bc73fa commit df5ec38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions enzyme/Enzyme/TraceGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void TraceGenerator::visitFunction(Function &F) {
continue;

auto arg = fn->arg_begin() + i;
auto name = Builder.CreateGlobalStringPtr(arg->getName());
auto name = Builder.CreateGlobalString(arg->getName());

auto Outlined = [](IRBuilder<> &OutlineBuilder, TraceUtils *OutlineTutils,
ArrayRef<Value *> Arguments) {
Expand Down Expand Up @@ -348,7 +348,7 @@ void TraceGenerator::handleArbitraryCall(CallInst &call, CallInst *new_call) {
}
case ProbProgMode::Trace: {
auto trace = tutils->CreateTrace(Builder);
auto address = Builder.CreateGlobalStringPtr(
auto address = Builder.CreateGlobalString(
(call.getName() + "." + called->getName()).str());

SmallVector<Value *, 2> args_and_trace(args);
Expand All @@ -363,7 +363,7 @@ void TraceGenerator::handleArbitraryCall(CallInst &call, CallInst *new_call) {
}
case ProbProgMode::Condition: {
auto trace = tutils->CreateTrace(Builder);
auto address = Builder.CreateGlobalStringPtr(
auto address = Builder.CreateGlobalString(
(call.getName() + "." + called->getName()).str());

Instruction *hasCall =
Expand Down
10 changes: 5 additions & 5 deletions enzyme/tools/enzyme-tblgen/enzyme-tblgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2350,18 +2350,18 @@ static void emitDerivatives(const RecordKeeper &recordKeeper, raw_ostream &os,
<< " }\n"
<< " }\n"
<< " Value *moduleNameValue = "
"Builder2.CreateGlobalStringPtr(moduleName);\n"
"Builder2.CreateGlobalString(moduleName);\n"
<< " Value *functionNameValue = "
"Builder2.CreateGlobalStringPtr(functionName + \" (\" +"
"Builder2.CreateGlobalString(functionName + \" (\" +"
"std::to_string(funcIdx) + \")\");\n"
<< " Value *blockNameValue = "
"Builder2.CreateGlobalStringPtr(blockName + \" (\" +"
"Builder2.CreateGlobalString(blockName + \" (\" +"
"std::to_string(blockIdx) + \")\");\n"
<< " Value *opcodeNameValue = "
"Builder2.CreateGlobalStringPtr(opcodeName + \" (\" "
"Builder2.CreateGlobalString(opcodeName + \" (\" "
"+std::to_string(instIdx) + \")\");\n"
<< " Value *calleeNameValue = "
"Builder2.CreateGlobalStringPtr(calleeName);\n"
"Builder2.CreateGlobalString(calleeName);\n"
<< " Builder2.CreateCall(logFunc, {origValue, "
"errValue, opcodeNameValue, calleeNameValue, moduleNameValue, "
"functionNameValue, blockNameValue});\n"
Expand Down

0 comments on commit df5ec38

Please sign in to comment.