[LLVMdev] loop pragmas

Tobias Grosser tobias at grosser.es
Wed Nov 21 10:48:14 PST 2012


On 11/21/2012 06:56 PM, Krzysztof Parzyszek wrote:
> On 11/21/2012 11:32 AM, Tobias Grosser wrote:
>> On 11/21/2012 03:45 PM, Krzysztof Parzyszek wrote:
>>>
>>> I'm thinking of this in terms of parallelization directives.  The
>>> optimizations that rely on such annotations would need to be done as
>>> early as possible, before any optimization that could invalidate them.
>>> If the annotation can become false, you are right---it's probably not a
>>> good idea to have it as the medium.
>>
>> If we use metadata to model annotations, we need to ensure that it is
>> either correct or in case a transformation can not guarantee the
>> correctness of the meta data, that it is removed.
>
> Yes, that is not hard to accomplish.

Actually, I believe this is _not_ easy. Though, it makes only sense to 
discuss this with a specific annotation in mind.

>>> Other types of annotations that are
>>> "harmless" are probably good to have, for example "unroll-by" (assuming
>>> that this is a suggestion to the compiler, not an order).
>>
>> To my knowledge, we are avoiding to allow the user to 'tune' the
>> compiler. Manual tuning may be good for a certain piece of hardware, but
>> will have negative effects on other platforms.
>
> A lot of ISV code is meant to run on a particular platform, or on a
> small set of target platforms.  Such code is often hand-tuned and the
> tuning directives will be different for different targets..  I see no
> reason why we shouldn't allow that.  As a matter of fact, not allowing
> it will make us less competitive.

This was the impression I got. Feel free to show examples/patches that 
convince people to push this.

Cheers
Tobi






More information about the llvm-dev mailing list