Skip to content

Commit

Permalink
Update LLVM IR attribute to LLVM 16.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Apr 5, 2023
1 parent 97a5846 commit 95e8cea
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 25 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Latest development builds (artifacts in Release configuration for each compiler
* [Kotlin](tools/lang/Kotlin.kt), up to Kotlin 1.7.
* LaTeX
* Lisp Script (Common Lisp, Clojure, Scheme, etc.)
* [LLVM IR](tools/lang/LLVM.ll), up to LLVM 15.
* [LLVM IR](tools/lang/LLVM.ll), up to LLVM 16.
* [Lua Script](tools/lang/Lua.lua), up to Lua 5.4.
* Makefile, [Screenshots](https://github.com/zufuliu/notepad2/wiki/Screenshots#makefile)
* nmake
Expand Down
32 changes: 17 additions & 15 deletions src/EditLexers/stlLLVM.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,30 @@ static KEYWORDLIST Keywords_LLVM = {{

, // 2 attribute
"acq_rel acquire addrspace( afn "
"align align( alignstack alignstack( allocalign allockind( allocptr allocsize( alwaysinline any anyregcc arcp argmemonly "
"atomic "
"align align( alignstack alignstack( alloc-family allocalign allockind( allocptr allocsize( alwaysinline any anyregcc "
"arcp atomic "
"blockaddress( builtin byval byval( ccc cfguard_checkcc cold coldcc contract convergent cxx_fast_tlscc "
"default denormal-fp-math denormal-fp-math-f32 dereferenceable( dereferenceable_or_null( "
"disable_sanitizer_instrumentation dllexport dllimport dontcall-error dontcall-warn "
"dso_local dso_local_equivalent dso_preemptable "
"exact exactmatch fast fastcc fn_ret_thunk_extern frame-pointer hidden hot "
"immarg inaccessiblemem_or_argmemonly inaccessiblememonly inalloca inbounds indirect-tls-seg-refs initialexec inlinehint "
"inrange inreg inteldialect "
"jumptable largest local_unnamed_addr localdynamic localexec min-legal-vector-width minsize monotonic mustprogress "
"elementtype( exact exactmatch fast fastcc fn_ret_thunk_extern frame-pointer hidden hot "
"immarg inalloca inbounds indirect-tls-seg-refs initialexec inlinehint inrange inreg inteldialect jumptable "
"largest local_unnamed_addr localdynamic localexec memory( minsize monotonic mustprogress "
"naked nest ninf nnan no-inline-line-tables no-jump-tables no-stack-arg-probe "
"no_cfi no_sanitize_address no_sanitize_hwaddress noalias nobuiltin nocapture nocf_check noduplicate noduplicates nofree "
"noimplicitfloat noinline nomerge nonlazybind nonnull norecurse noredzone noreturn "
"nosanitize_bounds nosanitize_coverage nosync noundef nounwind nsw nsz null_pointer_is_valid nuw "
"no_cfi no_sanitize_address no_sanitize_hwaddress noalias nobuiltin nocallback nocapture nocf_check "
"noduplicate noduplicates nofpclass( nofree noimplicitfloat noinline nomerge nonlazybind nonnull nooutline noprofile "
"norecurse noredzone noreturn nosanitize_bounds nosanitize_coverage nosync noundef nounwind nsw nsz "
"null_pointer_is_valid nuw "
"optforfuzzing optnone optsize "
"patchable-function personality preallocated( preserve_allcc preserve_mostcc probe-stack prologue protected "
"readnone readonly reassoc release returned returns_twice "
"safestack samesize "
"sanitize_address sanitize_address_dyninit sanitize_hwaddress sanitize_memory sanitize_memtag sanitize_thread seq_cst "
"shadowcallstack sideeffect signext speculatable speculative_load_hardening sret ssp sspreq sspstrong "
"stack-probe-size strictfp swiftasync swiftcc swifterror swiftself swifttailcc syncscope( "
"tailcc thread_local( thunk unnamed_addr unordered uwtable vector-function-abi-variant volatile vscale_range( "
"warn-stack-size webkit_jscc willreturn writeonly zeroext zeroinitializer "
"sanitize_address sanitize_address_dyninit sanitize_hwaddress sanitize_memory sanitize_memtag sanitize_thread "
"separate_storage( seq_cst shadowcallstack sideeffect signext skipprofile speculatable speculative_load_hardening sret "
"ssp sspreq sspstrong stack-probe-size strictfp swiftasync swiftcc swifterror swiftself swifttailcc syncscope( "
"tailcc thread_local( thunk tls-load-hoist unnamed_addr unordered uwtable "
"vector-function-abi-variant volatile vscale_range( warn-stack-size webkit_jscc willreturn writeonly "
"zeroext zeroinitializer "

, // 3 instruction
"add addrspacecast alloca and ashr atomicrmw bitcast br "
Expand All @@ -46,7 +47,8 @@ static KEYWORDLIST Keywords_LLVM = {{
"icmp indirectbr insertelement insertvalue inttoptr invoke landingpad load lshr max min mul musttail nand ne notail "
"oeq oge ogt ole olt one or ord phi ptrtoint resume ret "
"sdiv select sext sge sgt shl shufflevector sitofp sle slt srem store sub switch tail to trunc "
"udiv ueq uge ugt uitofp ule ult umax umin une uno unreachable unwind urem va_arg within xchg xor zext "
"udec_wrap udiv ueq uge ugt uinc_wrap uitofp ule ult umax umin une uno unreachable unwind urem va_arg within xchg xor "
"zext "

, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
//--Autogenerated -- end of section automatically generated
Expand Down
30 changes: 21 additions & 9 deletions tools/lang/LLVM.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; LLVM 15 https://llvm.org/docs/LangRef.html
; LLVM 16 https://llvm.org/docs/LangRef.html

;! Keywords ===========================================================
; Linkage Types
Expand Down Expand Up @@ -140,6 +140,7 @@ local_unnamed_addr
no_sanitize_address
no_sanitize_hwaddress
sanitize_address_dyninit
sanitize_memtag

; Comdats
; https://llvm.org/docs/LangRef.html#comdats
Expand All @@ -159,6 +160,7 @@ byval(<ty>)
preallocated(<ty>)
inalloca
sret
elementtype(<ty>)
align <n>
align(<n>)
noalias
Expand All @@ -174,9 +176,13 @@ swiftasync
swifterror
immarg
noundef
nofpclass(<test mask>)
alignstack(<n>)
allocalign
allocptr
readnone
readonly
writeonly

; Prologue Data
; https://llvm.org/docs/LangRef.html#prologue-data
Expand All @@ -188,6 +194,7 @@ personality
; Function Attributes
; https://llvm.org/docs/LangRef.html#function-attributes
alignstack(<n>)
alloc-family
allockind("KIND")
allocsize(<EltSizeParam>[, <NumEltsParam>])
alwaysinline
Expand All @@ -200,21 +207,23 @@ dontcall-warn
frame-pointer
fn_ret_thunk_extern
hot
inaccessiblememonly
inaccessiblemem_or_argmemonly
inlinehint
jumptable
memory(...)
minsize
naked
no-inline-line-tables
no-jump-tables
nobuiltin
nocallback
noduplicate
nofree
noimplicitfloat
noinline
nomerge
nonlazybind
noprofile
skipprofile
noredzone
indirect-tls-seg-refs
noreturn
Expand All @@ -230,12 +239,8 @@ optnone
optsize
patchable-function
probe-stack
readnone
readonly
stack-probe-size
no-stack-arg-probe
writeonly
argmemonly
returns_twice
safestack
sanitize_address
Expand All @@ -252,13 +257,14 @@ strictfp
denormal-fp-math
denormal-fp-math-f32
thunk
tls-load-hoist
uwtable
nocf_check
shadowcallstack
mustprogress
warn-stack-size
vscale_range(<min>[, <max>])
min-legal-vector-width
nooutline

; Call Site Attributes
; https://llvm.org/docs/LangRef.html#call-site-attributes
Expand All @@ -272,6 +278,10 @@ no_sanitize_hwaddress
sanitize_memtag
sanitize_address_dyninit

; Assume Operand Bundles
; https://llvm.org/docs/LangRef.html#assume-operand-bundles
separate_storage(<val1>, <val2>)

; Atomic Memory Ordering Constraints
; https://llvm.org/docs/LangRef.html#atomic-memory-ordering-constraints
unordered
Expand Down Expand Up @@ -331,7 +341,7 @@ invoke [cconv] [ret attrs] [addrspace(<num>)] <ty>|<fnty> <fnptrval>(<function a
[operand bundles] to label <normal label>
unwind label <exception label>
callbr [cconv] [ret attrs] [addrspace(<num>)] <ty>|<fnty> <fnptrval>(<function args>) [fn attrs]
[operand bundles] to label <normal label> [other labels]
[operand bundles] to label <fallthrough label> [indirect labels]
resume <type> <value>
catchswitch
within <parent> [ label <handler1>, label <handler2>, ... ] unwind to
Expand Down Expand Up @@ -426,6 +436,8 @@ atomicrmw [volatile] <operation> ptr <pointer>, <ty> <value> [syncscope("<target
fsub
fmax
fmin
uinc_wrap
udec_wrap
getelementptr <ty>, ptr <ptrval>{, [inrange] <ty> <idx>}*
getelementptr inbounds <ty>, ptr <ptrval>{, [inrange] <ty> <idx>}*
getelementptr <ty>, <N x ptr> <ptrval>, [inrange] <vector index type> <idx>; Conversion Operations
Expand Down

0 comments on commit 95e8cea

Please sign in to comment.