[cfe-dev] Proposed changes to vectorize_width #pragma (original) (raw)
Michael Kruse via cfe-dev cfe-dev at lists.llvm.org
Tue Dec 1 16:59:21 PST 2020
- Previous message: [cfe-dev] Proposed changes to vectorize_width #pragma
- Next message: [cfe-dev] Proposed changes to vectorize_width #pragma
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I see the motivation, but there are different requirements for LLVM-internals and user-facing extensions, which is why e.g. clang does not implement a #pragma ivdep.
The definitions looks fine to me, as long as it is documented without referring to compiler internals.
Michael
Am Di., 1. Dez. 2020 um 07:46 Uhr schrieb David Sherwood <David.Sherwood at arm.com>:
Hi, So by adding support for scalable vectorisation widths we are effectively updating the pragma to mirror the existing VectorType class in LLVM, which is defined by a ElementCount and an element Type. The ElementCount is a tuple consisting of a minimum number of elements and a scalable flag. The meaning of 'scalable' as used in the vectorizewidth pragma as identical to that of ElementCount. Using one of my examples in the initial proposal then this pragma #pragma clang loop vectorizewidth(4, scalable) would mean the same in LLVM as a VectorType like this: <vscale x 4 x eltty> where eltty depends upon the types used in the loop. The 'vscale' parameter is defined by the target - it is at least 1 and does not have to be a power of 2. Kind Regards, David. -----Original Message----- From: Michael Kruse <llvm at meinersbur.de> Sent: 30 November 2020 18:01 To: Sjoerd Meijer <Sjoerd.Meijer at arm.com> Cc: David Sherwood <David.Sherwood at arm.com>; cfe-dev at lists.llvm.org; Sander De Smalen <Sander.DeSmalen at arm.com> Subject: Re: [cfe-dev] Proposed changes to vectorizewidth #pragma Am Mi., 25. Nov. 2020 um 10:15 Uhr schrieb Sjoerd Meijer via cfe-dev <cfe-dev at lists.llvm.org>: > I think that leaves us with 2 options that can express the same things, i.e. change or introduce: > > 1) > vectorizewidth(VF, fixed|scalable) > vectorizewidth(fixed|scalable) > vectorizewidth(VF) > > 2) > vectorizestyle(fixed|scalable) Another proposal: 3) vectorizewidth(VF) // For fixed vector width. vectorizewidthatleast(MinVF) // For SVE; alternatives: vectorizedynamic, vectorizescalable. What are the intended semantics? Does scalable mean "width of MinVF or more", "any multiple of MinVF", "power-of-2 multiple of MinVF", "any width of at least MinVF allowed by ARM's SVE"?
Michael
- Previous message: [cfe-dev] Proposed changes to vectorize_width #pragma
- Next message: [cfe-dev] Proposed changes to vectorize_width #pragma
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]