similar to: [LLVMdev] More detailed example...

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] More detailed example..."

2007 Jan 06
0
[LLVMdev] More detailed example...
Sarah Thompson wrote: > Further to that, I thought an example might be useful. In the following > code, n should end up with a value that varies nondeterministically with > the scheduling decisions made by the underlying run time system -- my > model checker, for example, should in theory be able to enumerate all > possible values. Anyway, if you look at the compiler output (see
2007 Jan 06
2
[LLVMdev] More detailed example...
> How are you compiling this? I get the following sort of output: > > llvm-gcc incdec.cpp -o incdec I am currently using LLVM 1.8 -- I was basically holding off porting until LLVM 2.0 stabilises because I want to be able to move to 64 bit Intel and don't want to have to hit a moving target. > void %inc(int* %p) { > entry: > %tmp = volatile load int* %p
2007 Mar 06
6
[LLVMdev] alloca & store generation
I am writing a transformation that needs to add a call to a function F() at the beginning of main() with the addresses of argc and argv as parameters to F(). However, the bytecode file I'm transforming has not allocated space on the stack for argc and argv. So, I developed my transformation to change main() from: ----- int main(int %argc, sbyte** %argv){ entry: ... // some use of
2006 Sep 07
2
[LLVMdev] Can a name in LLVM assembly language hold two types of value at the same time
I am trying to symbolically execute LLVM assembly language. I found a possible semantic inconsistancy of the LLVM assembly language, or maybe my understanding is wrong. The C code is: #include <stdlib.h> 1 int f(void) 2 { 3 int a; 4 int *b = (int *) malloc(3*sizeof(int)); 5 a = 3; 6 return 0; 7 } I compile it with llvm-gcc 4 front end. The generated
2007 Mar 06
0
[LLVMdev] alloca & store generation
After looking at this problem longer, I believe that there is something wrong with the disassembler. When I run my transformation and then disassemble the output, I get bytecode that looks like: ----- int %main(int %argc, sbyte** %argv) { entry: alloca int ; <int*>:0 [#uses=3] alloca sbyte** ; <sbyte***>:0 [#uses=3] store int %argc,
2007 Jun 21
1
[LLVMdev] A question about LLVM assembly
Hello, LLVM guys. I've tried to emit the following simple function to LLVM assmbly. --------------------------------------------------------- void test(long s, double* a) { char h = ttt(s); *a = s; mmm(); } --------------------------------------------------------- It's spat out as follows: --------------------------------------------------------- void %test(int %s, double* %a) {
2004 Jul 07
0
[LLVMdev] Duplicate assignment in LLVM?
Volodya, I think you may need to update your CFE and rebuild. I compiled the test using my local build and I didn't get the results you see below. I'm also very surprised to see this output. The first %tmp.11 should have been %tmp.1 .. not sure how it got corrupted. In any event, the attachment is obviously generated by code that runs quite differently because the virtual register names
2005 Feb 22
0
[LLVMdev] Area for improvement
When I increased COLS to the point where the loop could no longer be unrolled, the selection dag code generator generated effectively the same code as the default X86 code generator. Lots of redundant imul/movl/addl sequences. It can't clean it up either. Only unrolling all nested loops permits it to be optimized away, regardless of code generator. Jeff Cohen wrote: > I noticed
2004 Sep 28
1
[LLVMdev] How could I hide the visible string?
Hi, Is there a way to modify the string such as char a or char b? Could I use the way like "Replace an instruction with another Value" in Programm Manual? In fact, what I am interested in is string with visible expression, not all string, and I am trying to hide the orignal string by using simple way like XOR.. Is there a way to reorder the basic blocks? Thanks. Qiuyu C Source
2003 Dec 22
2
[LLVMdev] hello.bc & binary code
hi, I try to build hello.cpp using both llvmg++ and GNU g++, the generate llvm bytecode's size is about 960K, and the size of binary code generated by g++ is only 13K. Could anyone explain the difference between the two result? BWT: I rebuild the cfrontend in RH linux9.0, but when I build the hello.cpp the llvmG++ reports warnings too, it shows: ----------------------------- [yue at RH9
2006 Oct 16
1
[LLVMdev] initializer does not match global variable type.
I have an objective-c file, bar.m, that I try to process in the following way generating the error shown below. Any help would be appreciated. I suspect the error is in the first few lines of output. thanks, Todd > cfrontend-g++ -o bar.bc bar.m > llvm2cpp -o bar.cpp bar.bc > g++ -c bar.o bar.cpp > ld -o bar bar.o -l objc -l LLVMCore -l LLVMSupport -l LLVMSystem > ./bar Global
2004 Oct 10
1
[LLVMdev] Re: Hide visible string in variable
Hi, > On Mon, 27 Sep 2004, Zhang Qiuyu wrote: > > > Is there a way to modify the string such as char a or char b? Could I > > use the way like "Replace an instruction with another Value" in Programm > > Manual? In fact, what I am interested in is string with visible > > expression, not all string, and I am trying to hide the orignal string > > by
2006 Oct 17
1
[LLVMdev] initializer does not match global variable type.
>Right. This looks like it's just a simple bug in llvm2cpp. >CppWriter.cpp:698 contains: > > if (CA->isString() && CA->getType()->getElementType() == >Type::SByteTy) { > Out << "Constant* " << constName << " = ConstantArray::get(\""; > printEscapedString(CA->getAsString()); > //
2005 Mar 21
0
[LLVMdev] Recursive Types using the llvm support library
On Wed, Mar 09, 2005 at 04:05:32PM +0300, Vladimir Merzliakov wrote: > >>Is assert(!NewSTy->isAbstract()) must pass after this line? > > > >In this case, yup. > > > I create test program and assert failed in it: > > { \2 *, sbyte * } How do I decode the \2 in this? I am creating types through this interface and I get quite a mess seen below. And this is
2003 Dec 22
1
[LLVMdev] How to explain?
hi, I want to know what is exact meaning in the following code. target endian-- %struct..TorRec-- %struct.TorRec-- implementation-- ;<sbyte>[#uses=1/0]-- how to explain them in details? Does anyone give me a guide? thanks yueqiang -------------------------------------------------------------- target endian = little target pointersize = 32 %struct..TorRec = type { int, void ()* }
2005 Feb 22
5
[LLVMdev] Area for improvement
I noticed that fourinarow is one of the programs in which LLVM is much slower than GCC, so I decided to take a look and see why that is so. The program has many loops that look like this: #define ROWS 6 #define COLS 7 void init_board(char b[COLS][ROWS+1]) { int i,j; for (i=0;i<COLS;i++) for (j=0;j<ROWS;j++) b[i][j]='.';
2004 Apr 14
1
[LLVMdev] Linking strncpy
Hi, I'm working on a CS326 compiler project, and I'm having some problems using string functions. Some LLVM programs produced are either aborting or giving incorrect results; however, if I disassemble the LLVM bytecode and recompile with GCC, everything works fine. I encountered the following error when running lli with '-force-interpreter' option: "Tried to execute an
2005 Feb 02
1
[LLVMdev] RE: Question about Global Variable
Thanks for your reply. After I change Cstr to gI, it compiled successfully. Thanks again. Another question is for constructing getelementpt. // C code char gStrA[10] = "test str"; // here is Global variable,gStrA and initializer "test str" char gStrB[10]= "test str2"; main(){ int = i; char *pGVars[20]; // here, the pGVar is for storing the address of each
2002 Nov 28
1
[LLVMdev] lli unreliable?
lli executed the bytecode corresponding to test_3.0_ml.ll without a failure, even though Function() is accessing an invalid memory address. The original code is in test_3.0.c, and the malloc() in Create() has been replaced by alloca() in test_3.0_ml.ll. I expected lli to segfault or similar when testing my code. Are my assumptions erroneous? -------------- next part --------------
2004 Jul 22
2
[LLVMdev] GC questions.
Ok, here's the new patch. (Please tell me if I shouldn't mail patches directly on the mailing list.) While I was editing LowerGC.cpp I made a little test (not part of this patch, but the diff with LowerGC.cpp in cvs is attached). I've added a new intrinsic called llvm.gcroot_value(sbyte*, sbyte*), which takes a pointer directly instead and transforms it into an alloca. The idea is the