Commit Graph

8 Commits

Author SHA1 Message Date
Slava Pestov
330be4a38e SILOptimizer: Remove 'unique ID' from FSO mangling 2018-07-11 15:29:45 -07:00
Adrian Prantl
fafdc510d0 Use compiler-generated location for func.-sig.-spec. thunks
Function signature specialization thunks don't have any correspondence
to code the user wrote.

rdar://problem/28859432
2018-06-27 13:14:32 -07:00
Huon Wilson
85424c0c3c [SILOptimizer] Properly disconnect the signature optimized function from a parent class.
The new function with an optimized signature _shouldn't_ have a non-trivial
classSubclassScope, even if the original function did, since the original
function (that becomes the thunk) is the symbol that serves that role.

Also part of rdar://problem/40738913
2018-06-27 12:09:14 +10:00
Huon Wilson
ed64fadb28 [SIL]/[SILOpt] Thunks and specializations shouldn't be connected to their parent class.
The "subclass scope" is meant to represent a connection to a vtable (and how
public something needs to be), for things that end up in class
vtables. Specializations and thunks are mostly internal implementation details
and do not end up there, so subclass scope is not applicable to them. This stops
the thunks and specializations being incorrectly public.

(Note, there are some thunks that _are_ public facing: if a function has its
signature optimized, the original entry point becomes a thunk, and this entry
point is what ends up in vtables etc., so needs to remain around, which means
keeping the same hacks for `private` members of an `open` class.)

Fixes rdar://problem/40738913.
2018-06-26 16:25:42 +10:00
Huon Wilson
413501b34a [SIL] Separate thunks from signature optimization from other thunks.
Signature optimization is slightly different to (most) other thunks, in that
it's taking an existing function and turning that into a thunk, rather than
creating a thunk that calls an existing function. These symbols can be public,
etc. and so need to be handled a bit different to other types of thunks.
2018-06-26 14:53:58 +10:00
Michael Gottesman
e02266d4fa [func-sig-opts][projection] All projection trees during the run on a function should share the same bump ptr allocator.
Found while reading code.
2018-06-11 20:51:26 -07:00
Michael Gottesman
bfc2dac336 [func-sig-opts] Split FunctionSignatureOpts.cpp into 3 files one for each of the operations it employs now.
This is one step along the way to splitting FSO into sub-transforms.
2018-06-04 00:49:14 -07:00
Michael Gottesman
30d4f45468 [func-sig-opts] Move FunctionSignatureOpts into the directory FunctionSignatureTransform in preparation for splitting it. 2018-06-04 00:49:14 -07:00