[LLVMdev] Turning on/off instruction extensions

Pablo Barrio
Tue, 29 Nov 2011 15:26:17 -0000

On 28/11/2011, at 18:52, Hal Finkel wrote:

> On Mon, 2011-11-28 at 17:49 +0100, Pablo Barrio wrote:
>> How can I install the patch? Any step-by-step guide?
>
> First, grab the trunk versions of llvm and clang. This is detailed on
> http://clang.llvm.org/get_started.html
>
> Then you apply the patch. On a Unix-like system, this is something like:
> cd llvm
> patch -p1 < /path/to/the-patch-file.diff
>

I tried to apply the patch to llvm 2.9 (not the trunk) but it shows a lot of
"... hunk FAILED -- saving rejects to file ...". Is it safe to ignore
these errors? Is it impossible to apply this patch to LLVM 2.9? Do you have a
version of the patch compatible with 2.9?

Right now I cannot switch to the trunk version.

Thanks in advance,
Pablo

> Then you rebuild.
>
> If you have any further questions, or need a more-detailed answer,
> please let me know.
>
> -Hal
>
>>
>> Thanks,
>> Pablo
>>
>> On 24/11/2011, at 15:33, Hal Finkel wrote:
>>
>>> On Thu, 2011-11-24 at 15:09 +0100, Pablo Barrio López-Cortijo
wrote:
>>>> Hi everybody,
>>>>
>>>> I'm trying to run some examples with different backend
options (turning
>>>> on/off SSE, 3dnow, or MMX instructions). However, I don't
see any
>>>> difference in terms of execution time. Does anybody know which
language
>>>> constructs (in C/C++ preferably) should I try to make these
instructions
>>>> generated (and thus make a difference between a backend that
enables
>>>> them or not) ?
>>>>
>>>> I tried generating vector instructions with loops but it's
not
>>>> happening. Perhaps Polly can generate vector instructions?
>>>
>>> You can also try my basic-block autovectorization patch.
>>>
>>>
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20111121/132206.html
>>>
>>> After applying the patch (I recommend applying it to the current
trunk),
>>> then run clang with the flags:
>>> -mllvm -vectorize -mllvm -unroll-allow-partial
>>> (the -unroll-allow-partial is not necessary for the vectorization,
but
>>> tends to expose additional vectorization opportunities). The
basic-block
>>> vectorizer has a number of flags that can be used to customize its
>>> behavior, so if it is not vectorizing something that you think it
should
>>> be (or is doing something performance detrimental), please let me
know
>>> and I'll be happy to help.
>>>
>>> -Hal
>>>
>>>>
>>>> Thanks ahead,
>>>>
>>>> Pablo
>>>> DIE-UPM
>>>> Madrid
>>>>
>>>> _______________________________________________
>>>> LLVM Developers mailing list
>>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>
>>> --
>>> Hal Finkel
>>> Postdoctoral Appointee
>>> Leadership Computing Facility
>>> Argonne National Laboratory
>>>
>>
>
> --
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
>