[llvm-dev] first class types

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Thu May 24 23:16:29 PDT 2018


On 25 May 2018 at 01:39, Alexandre Isoard via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> That the return instruction must only return values of first class types,
> which would exclude struct and arrays. But some llvm instrinsics do return
> struct, and it does not seems to be enforced on any function.

IMO it's the wording that tries to define "first-class" that's dodgy.
I don't think it's trying to describe the concept of primitive types
(which would exclude structs), but rather to distinguish first-class
from metadata and function types (as distinguished from function
pointer types) that it makes no sense to return, or do much else with.

This fits with the introductory sentence: "Values of these types are
the only ones which can be produced by instructions".

Cheers.

Tim.


More information about the llvm-dev mailing list