Skip to content

Commit

Permalink
Add names
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Oct 26, 2023
1 parent 66b8d0b commit 8eed629
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions enzyme/Enzyme/CApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,7 @@ void EnzymeFixupJuliaCallingConvention(LLVMValueRef F_C) {
T = FT->getParamType(i)->getPointerElementType();
#endif
IRBuilder<> EB(&NewF->getEntryBlock().front());
auto AL = EB.CreateAlloca(T);
auto AL = EB.CreateAlloca(T, "stack_roots");
EB.CreateStore(Constant::getNullValue(T), AL);
arg->replaceAllUsesWith(AL);
delete arg;
Expand All @@ -1606,7 +1606,7 @@ void EnzymeFixupJuliaCallingConvention(LLVMValueRef F_C) {
IRBuilder<> EB(&NewF->getEntryBlock().front());
Value *val = UndefValue::get(AT);
for (size_t j = 0; j < AT->getNumElements(); j++) {
auto AL = EB.CreateAlloca(T);
auto AL = EB.CreateAlloca(T, "stack_roots_v");
EB.CreateStore(Constant::getNullValue(T), AL);
val = EB.CreateInsertValue(val, AL, j);
}
Expand All @@ -1625,7 +1625,7 @@ void EnzymeFixupJuliaCallingConvention(LLVMValueRef F_C) {
size_t nexti = 0;
Value *sret = nullptr;
if (sretTy) {
sret = EB.CreateAlloca(sretTy);
sret = EB.CreateAlloca(sretTy, "stack_sret");
EB.CreateStore(Constant::getNullValue(sretTy), sret);
vals.push_back(sret);
NewAttrs = NewAttrs.addAttribute(
Expand All @@ -1635,7 +1635,7 @@ void EnzymeFixupJuliaCallingConvention(LLVMValueRef F_C) {
}
AllocaInst *roots = nullptr;
if (roots_AT) {
roots = EB.CreateAlloca(roots_AT);
roots = EB.CreateAlloca(roots_AT, "stack_roots_AT");
EB.CreateStore(Constant::getNullValue(roots_AT), roots);
vals.push_back(roots);
NewAttrs = NewAttrs.addAttribute(
Expand Down

0 comments on commit 8eed629

Please sign in to comment.