Commit Graph

10 Commits

Author SHA1 Message Date
Erik Eckstein
ba4081ee76 Optimizer: replace PredictableMemoryAccessOptimizations with MandatoryRedundantLoadElimination in the pass pipeline
PredictableMemoryAccessOptimizations has become unmaintainable as-is.
RedundantLoadElimination does (almost) the same thing as PredictableMemoryAccessOptimizations.
It's not as powerful but good enough because PredictableMemoryAccessOptimizations is actually only needed for promoting integer values for mandatory constant propagation.
And most importantly: RedundantLoadElimination does not insert additional copies which was a big problem in PredictableMemoryAccessOptimizations.

Fixes rdar://142814676
2025-02-07 11:30:35 +01:00
Egor Zhdan
8610974cba [cxx-interop] Re-enable a test for C foreign reference types
This test has been disabled since 2022.

This re-enables the test in order to have  some test coverage of the `-experimental-c-foreign-reference-types` compiler flag.

See `test/Interop/Cxx/foreign-reference/reference-counted.swift` for a very similar test that enables C++ interop.

rdar://101790203
2024-09-24 13:00:36 +01:00
Arnold Schwaighofer
79894ff461 Fix test/Interop with opaque pointers 2023-07-03 03:36:07 -07:00
Arnold Schwaighofer
c1a93e0bde Move tests over to use the %use_no_opaque_pointers option 2023-06-14 10:49:48 -07:00
Zoe Carver
ae7466f699 Merge pull request #61895 from zoecarver/add-flag-for-c-frt
Put C foreign refernece types behind a flag.
2022-11-03 13:54:01 -07:00
zoecarver
bf652b6f31 Put C foreign refernece types behind a flag. 2022-11-02 17:08:31 -07:00
zoecarver
448d16a9f0 [nfc] XFAIL Interop/C/foreign-reference.swift on rdar://101790203. 2022-11-02 13:49:07 -07:00
zoecarver
dc581b9d58 Support foreign reference types when C++ interop is disabled. 2022-10-26 14:50:09 -07:00
zoecarver
eeeb27d66e [cxx-interop] Add members to the LookupTable where possible.
If possible, add imported members to the StructDecl's LookupTable rather than adding them directly as members. This will fix the issues with ordering that #39436 poorly attempted to solve during IRGen.

This also allows us to break out most of the test changes from #39436.
2021-10-13 11:53:58 -07:00
Dmitri Gribenko
61d4793970 Added tests for edge cases in importing and mangling C structs
Some of the patterns in the new test header are special-cased by
ClangImporter (for example, the names of typedefs become names of
imported structs).

Nested structs have been historically imported in Swift according to C
rules, that is, structs lexically declared nested in other structs are
imported into the global namespace anyway. For the same reason, C
structs have been mangled in Swift names as if they are declared in the
global namespace. These rules are problematic when importing C++, see
https://bugs.swift.org/browse/SR-12803.
2020-05-15 18:50:19 +02:00