mirror of
https://github.com/apple/swift.git
synced 2025-12-25 12:15:36 +01:00
It is a hint to the optimizer that the code, where this builtin is called, is on the fast path. Specifically, the inliner takes it into account and increases the assumed benefit for code where the builtin is located. Compared to the fastPath/slowPath builtins, this builtin can be placed into plain linear code and doesn't need to be used in conditions. Compared to the @inline(__always) attribute, this builtin has also an effect on the caller function. Let's assume foo() calls bar() contains onFastPath and both foo and bar are small functions. Then if bar gets inlined into foo, the builtin also increases the chances that foo gets inlined. This would not be the case if @inline(__always) is used just for bar.
58 KiB
58 KiB