Skip to content

Commit 09fec7d

Browse files
Merge pull request #85087 from aschwaighofer/loadable_by_address_backtraces
Add more information to backtraces from the LoadableByAddress pass
2 parents 17a8706 + 78a3393 commit 09fec7d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/IRGen/LoadableByAddress.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "swift/Basic/Assertions.h"
2727
#include "swift/IRGen/IRGenSILPasses.h"
2828
#include "swift/SIL/DebugUtils.h"
29+
#include "swift/SIL/PrettyStackTrace.h"
2930
#include "swift/SIL/SILArgument.h"
3031
#include "swift/SIL/SILBuilder.h"
3132
#include "swift/SIL/SILCloner.h"
@@ -1914,6 +1915,8 @@ static void allocateAndSetAll(StructLoweringState &pass,
19141915
LoadableStorageAllocation &allocator,
19151916
SILInstruction *user,
19161917
MutableArrayRef<Operand> operands) {
1918+
PrettyStackTraceSILNode backtrace("Running allocateAndSetAll on ", user);
1919+
19171920
for (Operand &operand : operands) {
19181921
SILValue value = operand.get();
19191922
SILType silType = value->getType();
@@ -2424,6 +2427,8 @@ static bool rewriteFunctionReturn(StructLoweringState &pass) {
24242427
}
24252428

24262429
void LoadableByAddress::runOnFunction(SILFunction *F) {
2430+
PrettyStackTraceSILFunction backtrace("Running LoadableByAddress on ", F);
2431+
24272432
CanSILFunctionType funcType = F->getLoweredFunctionType();
24282433
IRGenModule *currIRMod = getIRGenModule()->IRGen.getGenModule(F);
24292434

0 commit comments

Comments
 (0)