tag:blogger.com,1999:blog-1862878851303132605.post1706187924862393537..comments2023-06-07T10:48:04.238-04:00Comments on Notes on the LHC: New backend.SamBhttp://www.blogger.com/profile/06560268240719951351noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1862878851303132605.post-34058676056845158052009-06-10T10:48:25.392-04:002009-06-10T10:48:25.392-04:0023Skidoo:
Re Re 1: Yes, the reference manual was ...23Skidoo:<br /><br />Re Re 1: Yes, the reference manual was helpful but a formal specification is essential.<br /><br />Re Re 3:<br />This is valid:<br />ret i32 0<br /><br />But this isn't:<br />%local_var = i32 0<br />ret i32 %local_var<br /><br />This is valid though:<br />%local_var = bitcast i32 0 to i32<br />ret i32 %local_var<br /><br />There may be a perfectly reasonable explanation for this but without a specification you wouldn't know.<br /><br /><br />Re LLVM backend:<br />Oh yes, absolutely. Contact me on email or irc and I'll help you in any way I can.David Himmelstruphttps://www.blogger.com/profile/12982136700651117492noreply@blogger.comtag:blogger.com,1999:blog-1862878851303132605.post-71096003221068571052009-06-10T10:24:55.213-04:002009-06-10T10:24:55.213-04:00Re 1: http://llvm.org/docs/LangRef.html is what I ...Re 1: http://llvm.org/docs/LangRef.html is what I use when coding in IR. Or do you want a more formal spec?<br /><br />Re 2: Yes, but in my experience static typing helped to catch A LOT of bugs.<br /><br />Re 3: care to elaborate? Do you mean that you can't do 'ret add %1, 2'? This isn't possible in assembly either.<br /><br />> Writing this backend was surprisingly easy<br /><br />Hearing this makes me want to try coding a LLVM backend myself. Would you accept such a backend into LHC if I wrote it?Mikhail Glushenkovhttps://www.blogger.com/profile/16766775468165268210noreply@blogger.comtag:blogger.com,1999:blog-1862878851303132605.post-45636197378352720122009-06-09T14:06:48.133-04:002009-06-09T14:06:48.133-04:00(1) Could not find a specification for the LLVM IR...(1) Could not find a specification for the LLVM IR.<br />(2) The type-system got in the way too often. (I'm saying this as a bondage-and-discipline loving Haskeller).<br />(3) The language has quite a few oddities I couldn't wrap my head around. For example, 'ret X' and '%local_var = X \n ret %local_var' are not the same.David Himmelstruphttps://www.blogger.com/profile/12982136700651117492noreply@blogger.comtag:blogger.com,1999:blog-1862878851303132605.post-43265702218461083662009-06-08T16:18:07.823-04:002009-06-08T16:18:07.823-04:00What problems did you encounter with LLVM that mad...What problems did you encounter with LLVM that made you drop (or delay) it as a code generator?Max Bolingbrokehttps://www.blogger.com/profile/05003540528496327090noreply@blogger.com