-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
LLVM supports output constraints like "=&r", which it calls early clobbers. Such a constraint (i.e. one using an ampersand) indicates that this output might be written before all of the inputs are finished being used so that LLVM will allocate a separate register for that output instead of sharing one with an input. Currently, we require the programmer to write something like this, which goes against our goal of not having to look things up:
let output: out("&r") = 0usize;My idea right now is to add a new keyword that can be put inside those parentheses--maybe something like this:
let output: out(early "r") = 0usize;I'm not sure that's the best keyword to use, but it's a bit more expressive than an ampersand.
The same keyword should apply to inout variables, like so:
let input_output: inout(early "r") = 0usize;Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers