Skip to content

Commit 7b36b82

Browse files
committed
Add comments
1 parent 6d767c2 commit 7b36b82

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@ class BoxedProcedurePass
276276
auto loc = embox.getLoc();
277277
mlir::Type i8Ty = builder.getI8Type();
278278
mlir::Type i8Ptr = builder.getRefType(i8Ty);
279+
// For AArch64, PPC32 and PPC64, the thunk is populated by a call to
280+
// __trampoline_setup, which is defined in
281+
// compiler-rt/lib/builtins/trampoline_setup.c and requires the
282+
// thunk size greater than 32 bytes. For RISCV and x86_64, the
283+
// thunk setup doesn't go through __trampoline_setup and fits in 32
284+
// bytes.
279285
fir::SequenceType::Extent thunkSize = 32;
280286
if (triple.isPPC32())
281287
thunkSize = 40;

0 commit comments

Comments
 (0)