forked from OSchip/llvm-project
[X86] Mark builtins 'const' where possible
I attempted to go through all the builtins and marked them const if they didn't touch memory or other hidden state. I don't know how to test this or if it really matters. Differential Revision: https://reviews.llvm.org/D46349 llvm-svn: 331814
This commit is contained in:
parent
ec37c640dd
commit
384621e985
File diff suppressed because it is too large
Load Diff
|
@ -27,8 +27,8 @@ TARGET_HEADER_BUILTIN(_BitScanReverse64, "UcUNi*ULLi", "nh", "intrin.h", ALL_MS_
|
|||
|
||||
TARGET_HEADER_BUILTIN(__mulh, "LLiLLiLLi", "nch", "intrin.h", ALL_MS_LANGUAGES, "")
|
||||
TARGET_HEADER_BUILTIN(__umulh, "ULLiULLiULLi", "nch", "intrin.h", ALL_MS_LANGUAGES, "")
|
||||
TARGET_HEADER_BUILTIN(_mul128, "LLiLLiLLiLLi*", "nh", "intrin.h", ALL_MS_LANGUAGES, "")
|
||||
TARGET_HEADER_BUILTIN(_umul128, "ULLiULLiULLiULLi*", "nh", "intrin.h", ALL_MS_LANGUAGES, "")
|
||||
TARGET_HEADER_BUILTIN(_mul128, "LLiLLiLLiLLi*", "nch", "intrin.h", ALL_MS_LANGUAGES, "")
|
||||
TARGET_HEADER_BUILTIN(_umul128, "ULLiULLiULLiULLi*", "nch", "intrin.h", ALL_MS_LANGUAGES, "")
|
||||
|
||||
TARGET_HEADER_BUILTIN(__faststorefence, "v", "nh", "intrin.h", ALL_MS_LANGUAGES, "")
|
||||
|
||||
|
@ -44,12 +44,12 @@ TARGET_HEADER_BUILTIN(_InterlockedCompareExchange128, "UcLLiD*LLiLLiLLi*", "nh",
|
|||
|
||||
TARGET_BUILTIN(__builtin_ia32_readeflags_u64, "ULLi", "n", "")
|
||||
TARGET_BUILTIN(__builtin_ia32_writeeflags_u64, "vULLi", "n", "")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtss2si64, "LLiV4f", "n", "sse")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvttss2si64, "LLiV4f", "n", "sse")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtsd2si64, "LLiV2d", "n", "sse2")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvttsd2si64, "LLiV2d", "n", "sse2")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtss2si64, "LLiV4f", "nc", "sse")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvttss2si64, "LLiV4f", "nc", "sse")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtsd2si64, "LLiV2d", "nc", "sse2")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvttsd2si64, "LLiV2d", "nc", "sse2")
|
||||
TARGET_BUILTIN(__builtin_ia32_movnti64, "vLLi*LLi", "n", "sse2")
|
||||
TARGET_BUILTIN(__builtin_ia32_crc32di, "ULLiULLiULLi", "n", "sse4.2")
|
||||
TARGET_BUILTIN(__builtin_ia32_crc32di, "ULLiULLiULLi", "nc", "sse4.2")
|
||||
TARGET_BUILTIN(__builtin_ia32_rdfsbase32, "Ui", "n", "fsgsbase")
|
||||
TARGET_BUILTIN(__builtin_ia32_rdfsbase64, "ULLi", "n", "fsgsbase")
|
||||
TARGET_BUILTIN(__builtin_ia32_rdgsbase32, "Ui", "n", "fsgsbase")
|
||||
|
@ -75,25 +75,25 @@ TARGET_BUILTIN(__builtin_ia32_addcarry_u64, "UcUcULLiULLiULLi*", "n", "")
|
|||
TARGET_BUILTIN(__builtin_ia32_subborrow_u64, "UcUcULLiULLiULLi*", "n", "")
|
||||
TARGET_BUILTIN(__builtin_ia32_rdrand64_step, "UiULLi*", "n", "rdrnd")
|
||||
TARGET_BUILTIN(__builtin_ia32_rdseed64_step, "UiULLi*", "n", "rdseed")
|
||||
TARGET_BUILTIN(__builtin_ia32_bextr_u64, "ULLiULLiULLi", "n", "bmi")
|
||||
TARGET_BUILTIN(__builtin_ia32_bzhi_di, "ULLiULLiULLi", "n", "bmi2")
|
||||
TARGET_BUILTIN(__builtin_ia32_pdep_di, "ULLiULLiULLi", "n", "bmi2")
|
||||
TARGET_BUILTIN(__builtin_ia32_pext_di, "ULLiULLiULLi", "n", "bmi2")
|
||||
TARGET_BUILTIN(__builtin_ia32_bextri_u64, "ULLiULLiIULLi", "n", "tbm")
|
||||
TARGET_BUILTIN(__builtin_ia32_bextr_u64, "ULLiULLiULLi", "nc", "bmi")
|
||||
TARGET_BUILTIN(__builtin_ia32_bzhi_di, "ULLiULLiULLi", "nc", "bmi2")
|
||||
TARGET_BUILTIN(__builtin_ia32_pdep_di, "ULLiULLiULLi", "nc", "bmi2")
|
||||
TARGET_BUILTIN(__builtin_ia32_pext_di, "ULLiULLiULLi", "nc", "bmi2")
|
||||
TARGET_BUILTIN(__builtin_ia32_bextri_u64, "ULLiULLiIULLi", "nc", "tbm")
|
||||
TARGET_BUILTIN(__builtin_ia32_lwpins64, "UcULLiUiUi", "n", "lwp")
|
||||
TARGET_BUILTIN(__builtin_ia32_lwpval64, "vULLiUiUi", "n", "lwp")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvtsd2si64, "LLiV2dIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvtsd2usi64, "ULLiV2dIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvtss2si64, "LLiV4fIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvtss2usi64, "ULLiV4fIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvttsd2si64, "LLiV2dIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvttsd2usi64, "ULLiV2dIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvttss2si64, "LLiV4fIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvttss2usi64, "ULLiV4fIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtsi2sd64, "V2dV2dLLiIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtsi2ss64, "V4fV4fLLiIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtusi2sd64, "V2dV2dULLiIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtusi2ss64, "V4fV4fULLiIi", "n", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvtsd2si64, "LLiV2dIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvtsd2usi64, "ULLiV2dIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvtss2si64, "LLiV4fIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvtss2usi64, "ULLiV4fIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvttsd2si64, "LLiV2dIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvttsd2usi64, "ULLiV2dIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvttss2si64, "LLiV4fIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_vcvttss2usi64, "ULLiV4fIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtsi2sd64, "V2dV2dLLiIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtsi2ss64, "V4fV4fLLiIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtusi2sd64, "V2dV2dULLiIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtusi2ss64, "V4fV4fULLiIi", "nc", "avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_directstore_u64, "vULi*ULi", "n", "movdiri")
|
||||
|
||||
#undef BUILTIN
|
||||
|
|
Loading…
Reference in New Issue