similar to: [LLVMdev] Patch: MSIL backend global pointers initialization

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Patch: MSIL backend global pointers initialization"

2009 Apr 03
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur > I'm working on that backend now, so probably I'll send some more patches > soon. I'd be grateful if you could give me some suggestions how to add > some test for that backend to the test-suite. On Linux the output code > could be run on Mono and compared with outputs for other backends but > I'm not sure if it's preferable to involve third party
2009 Apr 03
6
[LLVMdev] Patch: MSIL backend global pointers initialization
Anton Korobeynikov wrote: > Hi, Artur > > >> I'm working on that backend now, so probably I'll send some more patches >> soon. I'd be grateful if you could give me some suggestions how to add >> some test for that backend to the test-suite. On Linux the output code >> could be run on Mono and compared with outputs for other backends but >>
2009 Apr 03
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur > So again, one of them makes the global pointers initialization work. > The second one allows executing code with vararg pinvoke functions under > Mono. It generates separate function declaration for each call signature. Is this mono-only feature? Or pretty "universal" one? -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint
2009 Mar 30
2
[LLVMdev] MSIL codegen
Hello, I work in Kalray (Montbonnot, France) and I'm PhD student at Universite Joseph Fourier in Grenoble. We want to use LLVM framework for MSIL code generation, which is part of my thesis. Currently I'm still reading LLVM's documentation and I've started completing the MSIL backend for running on Mono. Things that need to be fixed include pointers initialization, call to
2009 Mar 30
0
[LLVMdev] MSIL codegen
Hi Artur, Artur Pietrek wrote: > Hello, > > I work in Kalray (Montbonnot, France) and I'm PhD student at Universite > Joseph Fourier in Grenoble. > We want to use LLVM framework for MSIL code generation, which is part of > my thesis. > Currently I'm still reading LLVM's documentation and I've started > completing the MSIL backend for running on Mono.
2009 Apr 07
3
[LLVMdev] Patch: MSIL backend global pointers initialization
Hello Anton > %1 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([16 x > > i8]* @.str, i32 0, i32 0), i32 %0) nounwind > > %10 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([11 x i8]* > > @.str2, i32 0, i32 0), i32 5) nounwind > > > > Instruction::isSameOperationAs() returns false for those two. Is it a > > bug or I misunderstood
2009 Apr 06
2
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi Anton, Anton Korobeynikov wrote: > Minor comments: > Thanks for your comments and your patience, I'll now check the style four times before I send anything ;) >> + Instruction *instr = >> + const_cast<Instruction*>(dynamic_cast<const >> Instruction*>(*i)); >> > Sounds hacky. Why do you need to cast away const?
2009 Apr 15
2
[LLVMdev] Patch: MSIL backend global pointers initialization
Hello, > So, looking for type of callee (not result, but function type!) you'll > obtain the > real "signature" of callee and if you'll strip all pointer cast you'll > obtain the "declaration" (=variadic) type of the callee. Maybe I misunderstood something but I just get the variadic declaration not the real "signature", like this: const
2009 Apr 07
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Artur, > OK, I just need the same signature for both of those instructions. Both are callinsts of same function, isn't that enough? Since it's a variadic function there is also a bitcast to proper type. So, looking for type of callee (not result, but function type!) you'll obtain the real "signature" of callee and if you'll strip all pointer cast you'll obtain the
2009 Apr 16
2
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi Anton > > > The interesting for me part of the CallInst is printf(i8* noalias %0, i32 > > 123). > > I was diging in doxygen documentation but I really can't see the easy way > to > > compare those instructions and again finish with reinvented (but working) > > wheel ;). > Ah, sorry. I missed that you're doing variadic calls, not casting >
2009 Apr 16
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur > // CallSites have equal signatures > bool MSILWriter::cmpCallSite(CallSite A, CallSite B) { >   return (getCallSiteFType(A)==getCallSiteFType(B) && >     A.getAttributes()==B.getAttributes()); > } As it is impossible to honour argument attributes in MSIL I don't see why you should compare attributes. You seems to have the same MSIL call signature for calls
2009 Apr 03
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur Minor comments: > +// Comparision for std::lower_bound used in > MSILWriter::printExternals() > +static bool CompareInstructions(Instruction *A,Instruction *B) > +{ Put brace on the same line as function def. > + if ( !F->use_empty() ) // Print only if used > + { Likewise. Plus use "if (foo)" instead of "if ( foo )". All code
2009 Apr 03
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur > + if (isa<ConstantExpr>(I->constant)){ > + const ConstantExpr *CE = > dyn_cast<ConstantExpr>(I->constant); > + printConstantExpr(CE); > + ty = CE->getType(); > + } else { > + const Function * F = dyn_cast<Function>(I->constant); > + printValueLoad(F); > + ty =
2009 Apr 07
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur > %1 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([16 x > i8]* @.str, i32 0, i32 0), i32 %0) nounwind > %10 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([11 x i8]* > @.str2, i32 0, i32 0), i32 5) nounwind > > Instruction::isSameOperationAs() returns false for those two. Is it a > bug or I misunderstood something? These are two
2009 Apr 15
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur > The interesting for me part of the CallInst is printf(i8* noalias %0, i32 > 123). > I was diging in doxygen documentation but I really can't see the easy way to > compare those instructions and again finish with reinvented (but working) > wheel ;). Ah, sorry. I missed that you're doing variadic calls, not casting variadic function to definite ones. I think you
2009 Apr 02
0
[LLVMdev] patch: MSIL backend - interfacing vararg pinvoke functions with Mono
Hi, This patch allows executing code with vararg pinvoke functions under Mono. It generates separate function declaration for each call signature. Artur -------------- next part -------------- A non-text attachment was scrubbed... Name: varargs.patch Type: text/x-patch Size: 5331 bytes Desc: not available URL:
2009 Aug 21
3
[LLVMdev] GEP instruction change
Hi All, Since few days I observe weird change. Consider the following C code char array[] = "0123456789"; extern int test(char arr[], int size); int main(void) { return test(array-1, sizeof(array)-1); } using clang frontend i get this: %call = call i32 @test(i8* getelementptr inbounds ([11 x i8]* @array, i32 0, i32 -1), i32 10) ; <i32> [#uses=1] and using LLVM-GCC this: %1 =
2009 Apr 21
0
[LLVMdev] MSIL backend: external varargs signatures printing
Hi, After discussion with Anton, I did the whole thing in a little bit different way (please see the attached patch). It again looks like reinvented wheel for LLVM experts, I suppose, but it works. What I want to achieve is to generate real (with all variadic arguments) call signature for each variadic and external function, without the "vararg" keyword and without the "...",
2009 Aug 21
1
[LLVMdev] GEP instruction change
On Fri, Aug 21, 2009 at 12:33 PM, Eli Friedman <eli.friedman at gmail.com>wrote: > On Fri, Aug 21, 2009 at 2:02 AM, Artur Pietrek<pietreka at gmail.com> wrote: > > Hi All, > > Since few days I observe weird change. > > Consider the following C code > > > > char array[] = "0123456789"; > > extern int test(char arr[], int size); > >
2014 Nov 29
3
[LLVMdev] Frontend: How to use Member to Function Pointer as callbacks
Hello, As part of a MSIL (i.e. C#) to LLVM frontend I am currently working on ( https://github.com/xen2/SharpLang ), I would need some help/hint about how to properly design "PInvoke callbacks". Through "PInvoke" mechanism .NET allows you to call C functions, i.e.: C#: [DllImport("libc.so")] extern void mempcy(void* dest, void* src, int size); // declaration of C