Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #12 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 month ago

pass small structs in registers

Reported by: lindquist Assigned to: lindquist
Priority: minor Milestone:
Version: Keywords:
Cc:

Description

Currently only types that resolve to first class LLVM types are passed in registers. It would be nice to pass small structs/unions, dynamic arrays and complex numbers in registers.

Change History

11/22/07 13:41:03 changed by lindquist

I just had a chat with chris lattner on llvm's irc channel. turns out that a byval parameter attribute is in the works in llvm svn, so this is basically a non issue!

For return values it turns out llvm 2.1 already has an sret attribute documented as: "This indicates that the parameter specifies the address of a structure that is the return value of the function in the source program." This should be put to use! He did say that it will not currently pass anything in registers, but that is a codegen issue, not something that llvmdc should worry about!

06/05/08 00:54:52 changed by lindquist

  • owner set to lindquist.

The 'byval' attribute is now used for passing aggregate type by value. I'm leaving the ticket open as arrays, delegates and complex numbers should still be pass directly as two seperate arguments.

10/22/08 11:46:07 changed by lindquist

  • status changed from new to closed.
  • resolution set to fixed.

Closing, specific issues should get seperate tickets. this is too general and lots of it already implemented.

Copyright © 2008, LDC Development Team.