Commit Graph

4 Commits

Author SHA1 Message Date
Arnold Schwaighofer
597f8d9e99 Move swift-llvm-opt over to use the new pass manager
rdar://112424659
2023-08-04 07:50:38 -07:00
Michael Gottesman
81fada9fb5 [upstream-update] Update LLVMPasses for new objc arc intrinsics.
We used to represent these just as normal LLVM functions, e.x.:

  declare objc_object* @objc_retain(objc_object*)
  declare void @objc_release(objc_object*)

Recently, special objc intrinsics were added to LLVM. This pass updates these
small (old) passes to use the new intrinsics.

This turned out to not be too difficult since we never create these
instructions. We only analyze them, move them, and delete them.

rdar://47852297
2019-02-06 16:22:15 -08:00
Mike Ash
46309d9794 [Runtime] Rename swift_unknown* functions to swift_unknownObject*.
These functions don't accept local variable heap memory, although the names make it sound like they work on anything. When you try, they mistakenly identify such things as ObjC objects, call through to the equivalent objc_* function, and crash confusingly. This adds Object to the name of each one to make it more clear what they accept.

rdar://problem/37285743
2018-08-15 17:48:23 -04:00
Michael Gottesman
08fc956382 Make our LLVM level passes obey disable-llvm-optzns.
We weren't performing the right check here... I added a test that tests both
positive/negative cases.

rdar://40097698
2018-05-14 12:09:06 -07:00