similar to: [LLVMdev] Check the location of the definition of a Value object

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Check the location of the definition of a Value object"

2010 Apr 08
0
[LLVMdev] Check the location of the definition of a Value object
Zheng Wang wrote: > Hello, > > How to check whether a value object is within a particular basic block or not. > There is a much simpler way to do this. Assuming that Value * pb holds the pointer to the value of %2, you do the following: 1) Check to see if %2 is an instruction (use dyn_cast<Instruction>(pb) and see if the result is NULL). If it's not an instruction,
2010 Apr 08
4
[LLVMdev] How to Load a Value?
Hello, I have a problem of generating a load instruction. The LLVM bytecode is: ------------------------ entry: ... %2 = call i32 (...)* @atoi(i8*%1) nounwind /*<- Insertpos*/ ... -- bb1: .. %5 = icmp sgt i32 %2, %i.0 ... ----------------- Now I have pb: pointer to the Value object of *%2* of bb1. Here, I want to generate a load instruction and I did it as: new LoadInst(pb,
2010 Apr 08
0
[LLVMdev] How to Load a Value?
Zheng Wang <jason.wangz at gmail.com> writes: > I have a problem of generating a load instruction. The LLVM bytecode is: > > ------------------------ > entry: > ... > %2 = call i32 (...)* @atoi(i8*%1) nounwind > /*<- Insertpos*/ > ... > > -- > bb1: > .. > %5 = icmp sgt i32 %2, %i.0 > ... > ----------------- > > > Now I have >
2010 Apr 05
3
[LLVMdev] Get the loop trip count variable
Hello, I am wondering whether I can get the variable name of loop trip count in LLVM? For example, int NUM; NUM=atoi(argv[i]); for (int i=0; i<NUM; i++) { ... } How can I get the corresponding variable name for "NUM"? Then, I can instrument something in the source code to record the loop trip count for a given input data set. BasicBlock* b = L->getHeader(); returns the
2010 Apr 05
0
[LLVMdev] Get the loop trip count variable
On Mon, Apr 5, 2010 at 1:19 PM, Zheng Wang <jason.wangz at gmail.com> wrote: > Hello, > > I am wondering whether I can get the variable name of loop trip count in LLVM? > > For example, > > int NUM; > > NUM=atoi(argv[i]); > > for (int i=0; i<NUM; i++) > { >    ... > } > > How can I get the corresponding variable name for "NUM"?
2010 Apr 06
1
[LLVMdev] Get the loop trip count variable
Hi Eli, Could you tell me how to extract the variable name? The reason I want to do it at the IR level is because I have more information at this stage, such as, constant propagation and back edges. Cheers, Zheng On 5 April 2010 21:51, Eli Friedman <eli.friedman at gmail.com> wrote: > On Mon, Apr 5, 2010 at 1:19 PM, Zheng Wang <jason.wangz at gmail.com> wrote: >> Hello,
2010 Apr 07
2
[LLVMdev] Get the loop trip count variable
Hi, On 04/05/2010 10:51 PM, Eli Friedman wrote: > On Mon, Apr 5, 2010 at 1:19 PM, Zheng Wang<jason.wangz at gmail.com> wrote: >> Hello, >> >> I am wondering whether I can get the variable name of loop trip count in LLVM? >> >> For example, >> >> int NUM; >> >> NUM=atoi(argv[i]); >> >> for (int i=0; i<NUM; i++) >>
2010 Apr 06
2
[LLVMdev] Get the loop trip count variable
Thanks a lot for your guys' help!!! I guess once I am able to get *V* (which probably is a pointer to a Value object), then, I can instrument some code at the IR level to dump V. As long as I maintain V at this pass stage, I should be able to dump the loop trip count. This is true, isn't it? Basically, what I am going to do is to add a function call before the loop body, such as:
2004 Aug 24
5
MMX/mmxext optimisations
quite some speed improvement indeed. attached the updated patch to apply to svn/trunk. j -------------- next part -------------- A non-text attachment was scrubbed... Name: theora-mmx.patch.gz Type: application/x-gzip Size: 8648 bytes Desc: not available Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20040824/5a5f2731/theora-mmx.patch-0001.bin
2013 Jul 03
2
[LLVMdev] [Polly] Assert in Scope construction
Should have changed the subject line... --- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation > -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Sergei Larin > Sent: Wednesday, July 03, 2013 12:29 PM > To: 'Tobias Grosser' > Cc: 'llvmdev'
2013 Jul 05
0
[LLVMdev] [Polly] Assert in Scope construction
Hi Sergei, On Thu, Jul 4, 2013 at 1:36 AM, Sergei Larin <slarin at codeaurora.org> wrote: > Should have changed the subject line... > > --- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted > by > The Linux Foundation > > > > -----Original Message----- > > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at
2013 Aug 16
2
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
Hi Sebpop, Thanks for your explanation. I noticed that Polly would finally run the SROA pass to transform these load/store instructions into scalar operations. Is it possible to run such a pass before polly-dependence analysis? Star Tan At 2013-08-15 21:12:53,"Sebastian Pop" <sebpop at gmail.com> wrote: >Codeprepare and independent blocks are introducing these loads and
2013 Oct 01
3
[LLVMdev] ScalarEvolution::createNodeForPHI
Hello to everybody, I'm working on some improvements on trip count computation with ScalarEvolution analysis. Considering the following test ;----------------------------------------------------------------------------; define void @foo(i32 %a, i32 %b, i32 %s) #0 { entry: %cmp = icmp sgt i32 %s, 0 %cmp15 = icmp sgt i32 %a, %b %or.cond = and i1 %cmp, %cmp15 br i1 %or.cond, label
2004 Aug 04
2
theora_decode_init bug
I found a bug in theora_decode_init when I was implementing the decoder. theora_decode_init should be zeroing the theora state structure right? memset(th, 0, sizeof(theora_state)); // Erik -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20040805/26350ca4/attachment.htm
2013 Aug 15
4
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
Hi all, I have investigated the 6X extra compile-time overhead when Polly compiles the simple nestedloop benchmark in LLVM-testsuite. (http://188.40.87.11:8000/db_default/v4/nts/31?compare_to=28&baseline=28). Preliminary results show that such compile-time overhead is resulted by the complicated polly-dependence analysis. However, the key seems to be the polly-prepare pass, which introduces
2009 Jun 04
1
[LLVMdev] endian issue of llvm-gcc and llvm backend
Hi, all As I'm a Chinese, be patient of my poor description below. I compiled libgcc into llvm bitcode in both big endian and little endian. and got 2 different version of function: _ashldi3, the following is the fragment of this function: little endian: ============================================= ...... target datalayout =
2013 Aug 15
0
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
Codeprepare and independent blocks are introducing these loads and stores. These are prepasses that polly runs prior to building the dependence graph to transform scalar dependences into data dependences. Ether was working on eliminating the rewrite of scalar dependences. On Thu, Aug 15, 2013 at 5:32 AM, Star Tan <tanmx_star at yeah.net> wrote: > Hi all, > > I have investigated the
2017 Apr 28
3
Store unswitch
Hi Danny, Thanks for that :) However I've just updated the prototype patch to NewGVN and it didn't need any API changes - all I rely on is GVNExpression. Hongbin, I wanted to explain a little about what GVNSink can currently do, what it was designed for and hopefully how to make it handle your testcase. *Background* Common code sinking is more difficult to efficently do than one might
2018 Dec 18
2
should we do this time-consuming transform in InstCombine?
Hi, There is an opportunity in instCombine for following instruction pattern: %mul = mul nsw i32 %b, %a %cmp = icmp sgt i32 %mul, -1 %sub = sub i32 0, %a %mul2 = mul nsw i32 %sub, %b %cond = select i1 %cmp, i32 %mul, i32 %mul2 Source code for above pattern: return (a*b) >=0 ? (a*b) : -a*b; Currently, llvm(-O3) can not recognize this as abs(a*b). I initially think we could do this in
2011 Jan 04
4
[LLVMdev] Is PIC code defeating the branch predictor?
I noticed that we generate code like this for i386 PIC: calll L0$pb L0$pb: popl %eax movl %eax, -24(%ebp) ## 4-byte Spill I worry that this defeats the return address prediction for returns in the function because calls and returns no longer are matched. From Intel's Optimization Reference Manual: "The return address stack mechanism augments the static and dynamic