Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Problems with void*"
2005 Jun 10
0
[LLVMdev] Problems with void*
No value can be stored in a void and a function returning void* points
to nowhere in particular. I think what you are really wanting to do here
is use an opaque type. The other alternative is to simply use sbyte*.
Remember, this isn't C even though some of the names/ideas look
familiar.
Reid.
On Fri, 2005-06-10 at 15:32 -0700, Ricardo wrote:
> Hello,
>
> I am trying to use the
2005 Feb 25
0
[LLVMdev]Linker error building (modified) lli
Linking lli debug executable (without symbols)
/mounts/zion/disks/0/localhome/pmeredit/llvm/lib/Debug/lli-interpreter.o(.te
xt+0x643a): In function
`llvm::Interpreter::callExternalFunction(llvm::Function*,
std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> >
const&)':
/localhome/pmeredit/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.c
pp:98: undefined
2004 Jul 07
2
[LLVMdev] Duplicate assignment in LLVM?
Hello,
when I'm compiling
test/Programs/SingleSource/UnitTests/2003-05-26-Shorts.c
I get LLVM assembler which looks like:
int %main(int %argc, sbyte** %argv) {
entry:
call void %__main( )
%tmp.11 = call ulong %getL( ) ; <ulong> [#uses=16]
%tmp.3 = cast ulong %tmp.11 to long ; <long> [#uses=
%tmp.5 = cast ulong %tmp.11 to
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
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]='.';
2005 Mar 09
4
[LLVMdev] Recursive Types using the llvm support library
----- Original Message -----
From: "Chris Lattner" <sabre at nondot.org>
To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
Sent: Tuesday, March 08, 2005 6:31 PM
Subject: Re: [LLVMdev] Recursive Types using the llvm support library
> On Tue, 8 Mar 2005, Vladimir Merzliakov wrote:
>
>>>> An example where something really simple like the
2006 Nov 12
4
[LLVMdev] need help understanding getelementptr assembler instruction
I am trying to understand the hello word assember example. This is
my version:
%str1 = internal constant [13 x sbyte] c"Hello World\0a\00"
declare int %printf(sbyte*, ...)
implementation ; Functions:
int %main() {
%str2 = getelementptr [13 x sbyte]* %str1, long 0, long 0
call int(sbyte*, ...) *%printf(sbyte* %str2)
ret int 0
}
Why is getelementptr being given two "long
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 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
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 24
4
[LLVMdev] LLVM CygWin build error ?
There do not seem to be any binaries for CygWin only Linux and the Mac :(
I tried building the frontend on CygWin but ended up with a makeinfo error
then a build error that I could not do anything about.
I will have to get my Linux Laptop from home and use that.
Many thanks,
Aaron
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
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,
2004 May 11
2
[LLVMdev] Problems accessing structs
Hello!
I get some odd behaviour using my structs:
"myKernelMap" = type {int (sbyte*)*, int ()*}
"Kernel" = type {"myKernelMap"*}
The second member ( int()* ) is a pointer to the %getchar() function.
I want to call getchar using this function:
int "callmyKernelgetchar_kernel"("Kernel"* "myKernel")
{
"PTRMAP" =
2004 Jul 21
0
[LLVMdev] GC questions.
Ok, that makes sense :).
, Tobias
On Wed, 21 Jul 2004, Chris Lattner wrote:
> On Wed, 21 Jul 2004, Tobias Nurmiranta wrote:
> > > void *llvm_gc_read(void *ObjPtr, void **FieldPtr) {
> > > return *FieldPtr;
> > > }
> >
> > Hm, but doesn't FieldPtr need to be calculated target-specific in those
> > cases?
>
> For the field pointer, one
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
2004 Apr 14
5
[LLVMdev] Linking strncpy
Chris,
I'm fine with using JIT, but I'm trying to understand this problem:
1. My LLVM program does not produce correct results
2. Using llvm-dis, I disassemble the bytecode to C
3. I recompile using GCC and the program _works correctly_.
The only odd thing is when I recompile with GCC, I see these messages:
pal3.c:195: warning: conflicting types for built-in function `strcmp'