similar to: [LLVMdev] Wrong optimisation (web demo)?

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Wrong optimisation (web demo)?"

2006 May 14
2
[LLVMdev] __main() function and AliasSet
In a code segment of my pass plugin, I try to gather AliasSets for all StoreInst, LoadInst and CallInst instructions in a function. Some behaviors of the pass puzzled me. Below is the *.ll of the test program which I run the pass on, it was get with "llvm-gcc -Wl,--disable-opt" from a rather simple *.c program. ---------------------------------- ; ModuleID = 'ptralias.bc'
2006 May 14
0
[LLVMdev] Re: __main() function and AliasSet
Oh, I appologize that I should not have asked about __main() ---- it appears in FAQ. But the question remains that why call to __main() can alias stack location? I think the memory location pointed by data_X pointers are not visible to __main(). In comparison, calls to printf() do not have similar effect. On 5/14/06, Nai Xia <nelson.xia at gmail.com> wrote: > > In a code segment of
2006 Feb 27
0
[LLVMdev] Using llvm-gcc with a simple program and the '-c' option
The -c option tells llvm-gcc to build a bytecode file without linking in the LLVM runtime library. This is similar to the -c option for regular gcc, which you use to build multiple separate .o files that you're going to link into a single executable. If you want to build from a single source file, it's easiest just to compile without the -c option. If you're building from
2006 Feb 27
2
[LLVMdev] Using llvm-gcc with a simple program and the '-c' option
Robert, Thanks for the info, you've confirmed what I was trying to do, but when I compile: ----------------------- #include <stdio.h> int main(int argc, char *argv[]) { printf("yo\n"); return 0; } ----------------------- without "-c" (llvm-gcc t1.c -o t1) the dissassembled bytecode does not call __main: ----------------------- ; ModuleID =
2006 Feb 27
2
[LLVMdev] Using llvm-gcc with a simple program and the '-c' option
Hello, When I compile a "hello.c" program with a printf in "main" and use llvm-gcc with a "-c" option: llvm-gcc -c t1.c -o t1.bc and then try to compile t1.bc to native using llc & gcc I get a call to "__main" which is undefined. If I don't use the "-c" option: llvm-gcc t1.c -o t1 I don't get a reference to
2006 Mar 05
1
[LLVMdev] Keyword documenation for target, deplibs ...
Hello, My goal is to create a language which can compile itself, therefore I feel I need to understand the Assembler/Byte code format. Starting with a C hello world program there are statements at the beginning of the disassembled bc file that I couldn't find any documentation: target endian = little target pointersize = 32 target triple = "i686-pc-linux-gnu"
2006 May 15
2
[LLVMdev] Re: __main() function and AliasSet
Hi Chris, I took a haste look at the "Points-to Analysis in Almost Linear Time" by Steens , your PHD thesis and SteensGaard.cpp in LLVM this afternoon. So I think: 1. Actually the basic algorithm described originally by SteensGaard does not provide MOD/REF information for functions. 2. The context insensitive part of Data Structure Analysis (LocalAnalysis) can be deemed as an
2006 May 17
2
[LLVMdev] Re: __main() function and AliasSet
On Tuesday 16 May 2006 03:19, Chris Lattner wrote: > On Mon, 15 May 2006, Nai Xia wrote: > > > In other words, if I only use -steens-aa and the data_XXXs are all > > external global variables( and so inComplete ), > > Sounds right! > > > the call to printf will > > make the same effect, which I have tested it. > > > > Am I right ? :) >
2006 May 17
0
[LLVMdev] Re: __main() function and AliasSet
On Wed, 17 May 2006, Nai Xia wrote: > Unfortunately, I did not locate the lines in steens-aa for "printf" special case. > In ds-aa, I found the lines below: Right, steens-aa and ds-aa share code for "local analysis", they just stitch it together into an interprocedural analysis in different ways. The code below is used for steens-aa. >
2006 May 15
0
[LLVMdev] Re: __main() function and AliasSet
On Mon, 15 May 2006, Nai Xia wrote: > In other words, if I only use -steens-aa and the data_XXXs are all > external global variables( and so inComplete ), Sounds right! > the call to printf will > make the same effect, which I have tested it. > > Am I right ? :) If you've tested it then, yes you're right :). I haven't played with this stuff for a long time,
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
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()); > //
2006 Nov 28
1
[LLVMdev] FP emulation (continued)
Chris Lattner wrote: > > P.S. A minor off-topic question: Is it possible to explain the LLVM > > backend that "float" is the same type as "double" on my target? I > > managed to explain it for immediates and also told to promote f32 > > to f64. But it does not work for float variables or parameters, > > because LLVM considers them to be float in
2006 Apr 03
2
[LLVMdev] lli: problem finding external symbol
Hi, I have a large-ish application I'm trying to build with LLVM, so I replaced g++ in the Makefiles with llvm-g++. This appears to work fine when I pass -Wl,-native to generate an ELF executable, but I want to control the inlining threshold it uses, so I am now passing -Wl,-disable-inlining and -Wa,-disable-inlining, and having it generate LLVM bytecode, then running opt -inlining to generate
2006 Apr 03
0
[LLVMdev] lli: problem finding external symbol
On Mon, 3 Apr 2006, Michael McCracken wrote: > the bytecode with lli - I get the following error: > > $ lli -load=/home/mmccrack/linux/lib/libTau.sh leo-inline-300-tau.bc > ERROR: Program used external function > '__llvm_cxxeh_allocate_exception' which could not be resolved! This is most likely because you are trying to link with llvmgcc, not with llvm-g++. Make sure that
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
Ok, I got home so I have more details. Here's the sample C program: ----------------- C program --------------- #include <stdio.h> int main() { printf("hello world\n"); return 0; } ------------- end C program ------------- This is compiled using llvm online demo into the following llvm code (target removed): ----------------- LLVM code -------------- deplibs
2005 Mar 08
3
[LLVMdev] GCC assembler rejects native code generated by LLVM
Vyacheslav, I've tracked down the change and I have a fix for you to test. The attached patch should be applied to the CVS head (version 1.132) of X86AsmPrinter.cpp in llvm/lib/Target/X86. The patch just includes MINGW targets in the same set of choices that it makes for Cygwin. Could you please try the patch and let me know if it solves your problem? If it does, I'll commit the patch.
2005 Mar 08
3
[LLVMdev] GCC assembler rejects native code generated by LLVM
Vyacheslav, This is the same problem that I had with Cygwin .. nearly identical. The issue was documented in PR492 if you want some background. I'm currently trying to dig up what I did to fix this in December for Cygwin and see if I can apply the same change for mingw. Reid. On Mon, 2005-03-07 at 16:39, Vyacheslav Akhmechet wrote: > Ok, I got home so I have more details. Here's the
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
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
Reid, This patch won't work for me. I compile llvm toolset with MSVC Express (hence __MINGW32__ won't be defined for me at compile time). I only try to feed the generated assembly into gcc (pretty much gnu assembler, I suppose). I don't use mingw tools at the earlier stage. However it's obvious for me how to modify the code now (just add MSVC at that line), thanks! I'll try it