Commit Graph

4 Commits

Author SHA1 Message Date
Erik Eckstein
eb626c2814 ObjectOutliner: don't outline objects with tail allocations
An object with tail allocated elements is in risk of being passed to malloc_size, which does not work for non-heap allocated objects.
Conservatively, disable objects with tail allocations.

rdar://121886093
2024-01-31 16:25:21 +01:00
Erik Eckstein
cb768c20d7 tests: re-enable and fix SILOptimizer/static_objects.swift
rdar://120802375
2024-01-11 13:01:17 +01:00
Allan Shortlidge
cdd7b52a9d Temporarily disable test/SILOptimizer/static_objects.swift. 2024-01-10 16:43:40 -08:00
Erik Eckstein
fa3a959524 ObjectOutliner: support outlining of classes in global let variables
```
  let c = SomeClass()
```

is turned into

```
  private let outlinedVariable = SomeClass()  // statically initialized and allocated in the data section
  let c = outlinedVariable
```

rdar://111021230
rdar://115502043

Also, make the ObjectOutliner work for OSSA. Though, it currently doesn't run in the OSSA pipeline.
2024-01-10 09:34:01 +01:00