https://github.com/JuliaLang/julia
Revision 3f3d8b338b25ea68eadc073e883850a8d252ecd8 authored by Yichao Yu on 07 June 2017, 14:05:00 UTC, committed by Yichao Yu on 10 June 2017, 12:03:11 UTC
This makes sure induction like

```julia
s -= a[i]
```

in an at-simd loop can be vectorized without fastmath annotation.

LLVM currently support at least sub in the vectorizer.
I don't see why it can't handle div so let's first make sure we are ready for that.
1 parent ee9d28b
Raw File
Tip revision: 3f3d8b338b25ea68eadc073e883850a8d252ecd8 authored by Yichao Yu on 07 June 2017, 14:05:00 UTC
Treat sub and div as induction in simd loop lowering
Tip revision: 3f3d8b3
uv_constants.h
// This file is a part of Julia. License is MIT: https://julialang.org/license

#include "uv.h"
#define XX(uc,lc) :UV_##uc,
#define YY(uc,lc) (:UV_##uc,UV__##uc),
const uv_handle_types = [UV_HANDLE_TYPE_MAP(XX) :UV_FILE]
const uv_req_types = [UV_REQ_TYPE_MAP(XX)]
const uv_err_vals = [UV_ERRNO_MAP(YY)]
let
    handles = [:UV_UNKNOWN_HANDLE; uv_handle_types; :UV_HANDLE_TYPE_MAX; :UV_RAW_FD; :UV_RAW_HANDLE]
    reqs = [:UV_UNKNOWN_REQ; uv_req_types; :UV_REQ_TYPE_PRIVATE; :UV_REQ_TYPE_MAX]
    for i=0:(length(handles)-1)
    @eval const $(handles[i+1]) = $i
    end
    for i=0:(length(reqs)-1)
    @eval const $(reqs[i+1]) = $i
    end
    for (v,val) in uv_err_vals
    @eval const $v = $val
    end
end
back to top