beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
seninha has joined #picolisp
seninha has quit [Remote host closed the connection]
seninha has joined #picolisp
seninha has quit [Quit: Leaving]
seninha has joined #picolisp
seninha has quit [Client Quit]
seninha has joined #picolisp
seninha has quit [Client Quit]
seninha has joined #picolisp
seninha has quit [Remote host closed the connection]
alexshendi has quit [Quit: -a- Connection Timed Out]
alexshendi has joined #picolisp
aw- has quit [Ping timeout: 244 seconds]
aw- has joined #picolisp
alexshe90 has joined #picolisp
alexshendi has quit [Ping timeout: 250 seconds]
alexshe90 has quit [Ping timeout: 265 seconds]
alexshendi has joined #picolisp
rob_w has joined #picolisp
alexshendi has quit [Quit: -a- Connection Timed Out]
alexshendi has joined #picolisp
alexshendi has quit [Ping timeout: 268 seconds]
alexshe30 has joined #picolisp
aw- has quit [Ping timeout: 264 seconds]
aw- has joined #picolisp
rob_w has quit [Remote host closed the connection]
alexshendi has joined #picolisp
alexshe30 has quit [Ping timeout: 265 seconds]
seninha has joined #picolisp
seninha has quit [Quit: Leaving]
seninha has joined #picolisp
alexshe39 has joined #picolisp
alexshendi has quit [Ping timeout: 265 seconds]
alexshe39 has quit [Ping timeout: 268 seconds]
alexshendi has joined #picolisp
alexshendi has quit [Ping timeout: 250 seconds]
<tankf33der> hi all
<tankf33der> LLVM15 failed to build out of box:
<abu[m]> Uh. Is this the first time you try 15?
<abu[m]> Need to set -opaque-pointers ?
<tankf33der> did not helped
<tankf33der> read bottom of page
<tankf33der> Version support chapter
<abu[m]> I must first understand the issue
<abu[m]> Never heard about it, but typeless ponters would be wonderful. Simplifies the compiler a lot.
<tankf33der> i have successfully built pil21 on LLVM15 by disable pointers in clang, opt and linker
<tankf33der> testing
<abu[m]> All that casting would not be necessary, it was a pain to implement
<tankf33der> in general in the future i can test in all major version after LLVM7
<abu[m]> Rewriting all to opaque is a big task
<tankf33der> i belive it
<abu[m]> Was it supported all the time?
<abu[m]> i.e. in 7 ?
<tankf33der> i do not understand the issue
<tankf33der> unknown
<abu[m]> They say the concept exists since 2015
<abu[m]> just that typed pointers were the default
<abu[m]> I never saw this mentioned in the docs I used :(
<abu[m]> @src/lib/llvm.l would have been a lot easier and simpler I suspect
<tankf33der> that why i do all llvm stuff
<tankf33der> that why i do all llvm stuff to test
<abu[m]> yeah, good
<abu[m]> Perhaps we need to restrict to >= 14
<tankf33der> almost impossible for users
<abu[m]> maybe later
<tankf33der> llvm15 passed all tests
<abu[m]> You use -opaque-pointers=0 ?
<tankf33der> clang -Xclang -no-opaque-pointers ..
<tankf33der> opt -O3 -opaque-pointers=0 ...
<abu[m]> And with 16 I need to rewrite all?
<tankf33der> llvm-link -no-opaque-pointers ...
<tankf33der> rest the same
<abu[m]> ok
<tankf33der> maybe to host required llvm libs and do not handle users llvm's versions in the system ?
<abu[m]> Hard
<abu[m]> How to do a smooth transition?
<abu[m]> There are many places to change in llvm.l, and then it will break old versions
<tankf33der> or just handle issue in Makefile by checking llvm version?
<abu[m]> And then do what? Use two versions of llvm.l ?
<tankf33der> pil21 passed tests in llvm15 disabling opaque pointers
<tankf33der> just add no-opaque... in three calls
<abu[m]> My problem is what to change how step by step, to always have a testable system
<abu[m]> Can both ways co-exist?
<tankf33der> yeah
<abu[m]> I mean, can I change just one type of instruction (e.g. all load's), then test, and then the next?
<tankf33der> unknown now
<abu[m]> So after some time everything will be opaque
<abu[m]> And then the problem is what to do with older llvm versions
<tankf33der> this is how i understood
<abu[m]> Good
<tankf33der> disable-enable opaque in Makefile
<tankf33der> and do not touch llvm.l
<abu[m]> So in the end there will be two versions of llvm.l, selected in Makefile perhaps
<tankf33der> no
<tankf33der> just handle arguments for clang, opt and linker
<abu[m]> I think llvm.l must be rewritten, because it outputs typed pointers
<abu[m]> latest for 16
<tankf33der> i can run pil21 on llvm15 without problems
<abu[m]> I understood that from 16 pointers *must* be opaque
<abu[m]> in your link at the end
<abu[m]> "LLVM 16: Only opaque pointers will be supported"
<tankf33der> damn, right, yeah.
<tankf33der> does llvm7 supports opaqueness ?
<abu[m]> When will 16 be available?
<tankf33der> unknown
<abu[m]> Perhaps, if so it would be nice
<tankf33der> i know how to setup ubuntu with latests llvm snapshots
<abu[m]> Good that you found this. Gives us time for the transition.
<abu[m]> Ubuntu with 7?
<tankf33der> with llvm16
<abu[m]> ah
<abu[m]> In the next future I will experiment
<abu[m]> Replace some pointers and see what happens
<abu[m]> I think the code will become simpler
<abu[m]> At the moment I don't understand enough
<abu[m]> It seems that this does not address the llvm-ir level
<abu[m]> more about Clang, right?
<abu[m]> Clang does what *I* need to implement
<tankf33der> since i disable opaque in three places this is llvm's level
<abu[m]> For example, types will always be needed. E.g. for variables. So I don't know exachty which pointers need to be opaque.
<abu[m]> I don't understand. src/base.ll is still full of instructions that do bitcast conversions and convert between types
<abu[m]> things like "%38 = load i8*, i8** bitcast (i8* getelementptr (i8, i8* bitcast ([18 x i64]* @env to i8*), i32 56) to i8**)"
<abu[m]> ok
<abu[m]> These "Changes to the LLVM IR" are not relevant for Pil as I see it
<tankf33der> searching reference for llvm15
<abu[m]> cause Pil does not use these things
<abu[m]> For example, a CAR now compiles to LLVM-IR as "%38 = inttoptr i64 %37 to i64*" and "%39 = load i64, i64* %38"
<abu[m]> Will the above just be "%38 = load i64, ptr %38" ?
<abu[m]> Hmm, no video please
<abu[m]> I will experiment, generating "ptr" like above
<abu[m]> and then see if it compiles
<abu[m]> wrong, must be "%38 = load i64, ptr %37" to be exact (just for the records)
<abu[m]> base.ll:3168:19: warning: ptr type is only supported in -opaque-pointers mode
<abu[m]> So I cannot mix both modes
<abu[m]> (I changed only a single line in llvm.l)
<abu[m]> only the 'load' in 'car'
<abu[m]> this causes 6659 lines in base.ll to change
<abu[m]> What if I use -opaque-pointers ?
<abu[m]> Both ways then?
<abu[m]> Where do I need to use -opaque-pointers in Makefile?
<abu[m]> in "ASM = opt -O3" ?
<abu[m]> seems so
<abu[m]> But then another error
<abu[m]> "'%37' defined with type 'i64' but expected 'ptr'"
<abu[m]> This propagates through all the code then
<abu[m]> I reverted the change to llvm.l, and kept -opaque-pointers for 'opt'. Now 'opt' crashes with a segfault
<abu[m]> I give up
<tankf33der> Your opt is too old then
<abu[m]> It is on Termux, from LLVM 14
<abu[m]> But this is not the problem anyway
<abu[m]> I must find out what code to generate
<abu[m]> *Which* pointers are opaque
<abu[m]> Bitcast everything to 'ptr'? This would be strange, as the casting is still needed then
<abu[m]> So I will read more about it over the weekend perhaps, and experiment
<abu[m]> But it seems I cannot fix just isolated instructions like fetching the CAR of a cell. The *whole* system must be rewritten.
<abu[m]> Hard to test incrementally :(
seninha has quit [Ping timeout: 250 seconds]
alexshendi has joined #picolisp
seninha has joined #picolisp
alexshendi has quit [Quit: -a- IRC for Android 2.1.60]
chexum has quit [Remote host closed the connection]
chexum has joined #picolisp
kuao has joined #picolisp