This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Go patch committed: Statically allocate constant interface data


This patch to the Go frontend by Cherry Zhang statically allocates
constant interface data.  When converting a constant to interface,
such as interface{}(42) or interface{}("hello"), if the interface
escapes, we currently generate a heap allocation to hold the constant
value.  This patch changes it to generate a static allocation instead,
as the gc compiler does. This reduces allocations in such cases.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]