Commit Graph

3 Commits

Author SHA1 Message Date
Arnold Schwaighofer
609428cad9 IRGen: disable-llvm-optzns should disable the objc-arc-contract pass
Don't run the objc-arc-contract pass when disable-llvm-optzns is passed.

In pipeline setups where the swift-frontend is called twice;
- the first time to create bitcode
- the second time to generate object code from the bitcode (using
  disable-llvm-optzns)
we don't want to run the objc-arc-contract pass twice.

rdar://91908312
2022-04-18 13:47:10 -07:00
John McCall
b45ca0439b Use the new ObjC retain/release intrinsics in IRGen. 2019-02-08 14:22:57 -08:00
Michael Gottesman
723c6212f2 Run ObjCARCContract when optimizing no matter the IRGenOutputKind.
Previously, we were just running ObjCARCContract when codegening. This is out of
character with the rest of the LLVM passes in Swift, namely that after these
have run, an IR pass no longer contains any compiler intrinsics. This can be
seen by SwiftARCContract running in the -O pipeline.

This commit harmonizes the behavior here.

For testing purposes, I added a flag that disables the running of
ObjCARCContract for testing purposes.

rdar://34824507
2017-10-06 08:59:58 -07:00