Commit Graph

3 Commits

Author SHA1 Message Date
Gabor Horvath 12b6809813 [SILOptimizer] Correctly compute the effects of TSan instrumentation
Passing a C++ object to the TSanInOutAccess builtin resulted in an extra
temporary copy. This copy was not optimized out because the semantics of this
builtin was not understood by the optimizer. Teaching the utils that this
intrinsic does not actually modify the object, does not escape it,
and does not read it lets the optimizer eliminate this copy.

Strictly speaking, the test code that uses interop is not safe/correct,
this is why it had a lifetime issue.

rdar://173921363
2026-04-30 11:21:17 +01:00
Zoe Carver 34b560f9e2 [NFC] Give test input header a meaningful name. (#32386)
Re-name the file "foo.h" in the SILOptimizer inputs to "TypesWithUserProvidedDestructor.h" which better describes its purpose (to define types with user provided destructors).
2020-06-16 21:42:33 -07:00
Zoe Carver ee1d76ed44 [opt] Re-work broadenSingleElementStores to use projections. (#32318)
* Fixes loadable edge case for address-only types.
* Re-work, generalize, and simplify by using projections.
* Support `-enable-cxx-interop` in sil-opt.
2020-06-11 23:10:19 -07:00