Skip to content

Commit 57c39f8

Browse files
committed
Remove disabled code in splitAggregateLoad.
It is no longer necessary to use debug fragments for load splitting. (cherry picked from commit 664ec22)
1 parent a5a11dc commit 57c39f8

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

lib/SILOptimizer/Utils/CanonicalizeInstruction.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ using namespace swift;
3636
// Tracing within the implementation can also be activated by the pass.
3737
#define DEBUG_TYPE pass.debugType
3838

39-
llvm::cl::opt<bool> EnableLoadSplittingDebugInfo(
40-
"sil-load-splitting-debug-info", llvm::cl::init(false),
41-
llvm::cl::desc("Create debug fragments at -O for partial loads"));
42-
4339
// Vtable anchor.
4440
CanonicalizeInstruction::~CanonicalizeInstruction() {}
4541

@@ -301,19 +297,6 @@ splitAggregateLoad(LoadOperation loadInst, CanonicalizeInstruction &pass) {
301297
}
302298
pass.notifyNewInstruction(**lastNewLoad);
303299

304-
// FIXME: This drops debug info at -Onone load-splitting is required at
305-
// -Onone for exclusivity diagnostics. Fix this by
306-
//
307-
// 1. At -Onone, preserve the original load when pass.preserveDebugInfo is
308-
// true, but moving it out of its current access scope and into an "unknown"
309-
// access scope, which won't be enforced as an exclusivity violation.
310-
//
311-
// 2. At -O, create "debug fragments" recover as much debug info as possible
312-
// by creating debug_value fragments for each new partial load. Currently
313-
// disabled because of LLVM back-end crashes.
314-
if (!pass.preserveDebugInfo && EnableLoadSplittingDebugInfo) {
315-
createDebugFragments(*loadInst, proj, lastNewLoad->getLoadInst());
316-
}
317300
if (loadOwnership) {
318301
if (*loadOwnership == LoadOwnershipQualifier::Copy) {
319302
// Destroy the loaded value wherever the aggregate load was destroyed.

0 commit comments

Comments
 (0)