search for: xinfin

Displaying 20 results from an estimated 37 matches for "xinfin".

Did you mean: xinmin
2010 Mar 05
3
[LLVMdev] How to .. jump from inline asm to a BasicBlock?
Hello, I have a problem trying to create an inline asm that checks one condition and based on the result of the condition it should jump to one BasicBlock or to another. My question is: is this possible in LLVM, from the inline asm to jump out, to the LLVM code, and if it is, how can I pass the label to which the code should jump. I tried passing the address of the BasicBlocks, using
2010 Oct 26
2
[LLVMdev] Prevent instruction elimination
Hello, Devang Patel wrote: > > > On Oct 25, 2010, at 12:09 PM, Xinfinity wrote: > >> #pragma my_pragma{ >> code >> } > >> I use a map >> (source_location, pragma) and I insert the dummy instruction when this >> location is reached in the code generator. It seems difficult to attach >> the >> metadata to the fir...
2010 Oct 26
0
[LLVMdev] Prevent instruction elimination
On Oct 26, 2010, at 9:23 AM, Xinfinity wrote: > > Hello, > > > Devang Patel wrote: >> >> >> On Oct 25, 2010, at 12:09 PM, Xinfinity wrote: >> >>> #pragma my_pragma{ >>> code >>> } >> >>> I use a map >>> (source_location, pragma) and I in...
2011 Mar 01
3
[LLVMdev] metadata to inform the optimizers that some code should stay unchanged
Hello LLVM, I am working on some passes that perform code transformations. Since I am interested in performance, I apply the O3 passes, right after my pass. However, the optimization passes modify the code inserted by my pass in an undesirable way. As far I know, there is no way to prevent the optimizers from optimizing some regions of code. So what I intend to do is to attach metadata to the
2010 May 10
0
[LLVMdev] Separate loop condition and loop body
On May 10, 2010, at 8:43 AM, Xinfinity wrote: > Is it possible to get the list of BasicBlocks building the condition > of a > loop and the list of BasicBlocks that form the body? Based on my (limited) experience with Loop and LoopInfo, this isn't possible. (But don't take my word for it.) > My aim is to man...
2011 Mar 04
0
[LLVMdev] metadata to inform the optimizers that some code should stay unchanged
Xinfinity wrote: > > > Hello LLVM, > > I am working on some passes that perform code transformations. Since I am > interested in performance, I apply the O3 passes, right after my pass. > However, the optimization passes modify the code inserted by my pass in an > undesirable way....
2010 May 10
2
[LLVMdev] Separate loop condition and loop body
Hi, Is it possible to get the list of BasicBlocks building the condition of a loop and the list of BasicBlocks that form the body? My first approach was to iterate over the list of all Basicblocks of a loop and separate the header as the condition and the remaining as the body of the loop. However, this is not correct for instance in the case of a while loop in the form: while( A & B) do {
2010 Oct 25
0
[LLVMdev] Prevent instruction elimination
On Oct 25, 2010, at 12:09 PM, Xinfinity wrote: > > > Devang Patel wrote: >> >> >> What are you going to do if "optimized LLVM code" is hoisted above or >> sinked below LLVM_dummy_inst by the optimizer ? It seems you are looking >> for a way communicate some info for a block of inst...
2010 Oct 13
4
[LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
Hello, I upgraded to llvm 2.8 and when I generate *.ll files from C/C++ with clang -S -emit-llvm I obtain a *.ll file in which instructions and basicblocks have no names. I tried as well compiling with the -g option, but no names were given. In the release notes it is indicated to use "--show-annotations" to print the number of uses. Is there something similar for assigning names to
2010 Oct 25
4
[LLVMdev] Prevent instruction elimination
Hello, Does there exist something like a "dummy" instruction that is not removed by the optimizers, even if it seems to be dead code? I want to use such instructions to carry metadata information, but they should have a minimal impact on the code generation and optimization. I used an add instruction: %0 = add i8 1, 2, !pragma_instrument_mem_add !0 ; <i8> [#uses=0] which
2010 Oct 25
2
[LLVMdev] Prevent instruction elimination
Devang Patel wrote: > > > What are you going to do if "optimized LLVM code" is hoisted above or > sinked below LLVM_dummy_inst by the optimizer ? It seems you are looking > for a way communicate some info for a block of instructions. If that is > the case then one solution is to extract interesting block of instructions > in a separate function and make sure that
2010 Oct 25
0
[LLVMdev] Prevent instruction elimination
On 10/25/10 4:13 AM, Xinfinity wrote: > Hello, > > Does there exist something like a "dummy" instruction that is not removed by > the optimizers, even if it seems to be dead code? > I want to use such instructions to carry metadata information, but they > should have a minimal impact on the code ge...
2010 Oct 25
0
[LLVMdev] Prevent instruction elimination
On Oct 25, 2010, at 2:13 AM, Xinfinity wrote: > > Hello, > > Does there exist something like a "dummy" instruction that is not removed by > the optimizers, even if it seems to be dead code? > I want to use such instructions to carry metadata information, but they > should have a minimal impact on the...
2010 Nov 02
0
[LLVMdev] "multiple definition of .. " in clang 2.8
It seems that the problem occurs from the optimization level. In the 2.7 version I was using -O0 and in 2.8 I tested the same benchmarks with -O3. clang -O0 works fine, while clang -O3 makes redefinitions (probably it is related to inlining) of the functions from stdlib.h, math.h and some other libraries. To give one example, function atoi is defined in the generated *.ll file: define i32
2011 Jan 21
1
[LLVMdev] goto in inline asm
Is goto from inline asm supported in LLVM 2.8 ? I am searching for something similar to what gcc 4.5 does: http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Extended%20asm%20with%20goto http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Extended%20asm%20with%20goto which allows jumping from inline assembly to a label defined in C. I want to jump from inline asm to a basic block in LLVM.
2010 Oct 12
1
[LLVMdev] Specify dominator for BasicBlock to avoid "Instruction does not dominate all uses!"
Hi, I tried adding the PHI nodes in BB_unique, and it works for the simple case described here, but in case the nodes were declared in some predecessors of ExitBB1 and used in ExitBB1_redirect and its successors, it won't work, unless I create entries for all of them in BB_unique. B1 (declares PHI_1) B3 | | B2
2010 Jun 24
0
[LLVMdev] How to prevent an instruction to be executed more than once?
Hello- Doing control-flow (jumps and/or labels) in inline asm is a really bad idea. What are you trying to achieve? Alistair On 24 Jun 2010, at 12:54, Xinfinity wrote: > > Hi LLVM-devs, > > I am looking for a way to prevent an instruction to be executed more than > once, or duplicated .. I know that by default everything can be duplicated, > but is there a work-around? > > The structure of the code is > BB1 BB2 >...
2010 Oct 25
0
[LLVMdev] Prevent instruction elimination
On 10/25/10 9:49 AM, Xinfinity wrote: > Hi, > > > John Criswell-4 wrote: >> >> You may want to use LLVM Metadata features. Search for MDNode in the >> doxygen docs for some information on how to create metadata. >> >> > I use metadata information in this way: > unsigned m...
2010 Jun 24
0
[LLVMdev] How to prevent an instruction to be executed more than once?
On Jun 24, 2010, at 7:00 AMPDT, Xinfinity wrote: > > I need to mark the beginning of some regions of code, that I want to > patch at > runtime. > In this case, I want to mark the beginning of BB4 and then to patch > the > jumps, because I want to temporarily change the flow at runtime and > then to > re...
2010 May 10
0
[LLVMdev] Separate loop condition and loop body
On May 10, 2010, at 11:05 AM, Trevor Harmon wrote: >>> To me it looks like any basic block from the loop body with a >>> successor not in the loop body is a BB "building the condition" (an >>> "exit" block). >> >> I assume you mean "any basic block from the loop header". > > No really, loop body. In that case, what does