similar to: Removing constants from a constant array?

Displaying 20 results from an estimated 20000 matches similar to: "Removing constants from a constant array?"

2017 Aug 09
2
Can a Constant have more than one use?
As the question asks. IIRC, I have only seen constants use to: 1. setup globals 2. as "constant parameters" to instructions. In both these cases, from what I understand, they will have a single use. Is it possible to create a Constant with multiple use(r)s? Thanks, Siddharth -- Sending this from my phone, please excuse any typos! -------------- next part -------------- An HTML
2015 May 05
2
[LLVMdev] llvm DSA - reproduce the result in PLDI 07 paper
Dear John, I intend to implement the improvements on DSA. After running DSA on SPEC, I found DSA gives low precision for mcf and bzip2. I have checked the most imprecise c files in mcf an found that the code seems to be a mixture of "PHI" and "GEP" instructions. Could you please give me some hints about what the big picture of the improvement should be and how to start? Thank
2011 Oct 20
2
[LLVMdev] common type at compile time?
I'm a bit confused. For the Type did you mean something like: ArrayType *type = ArrayType::get(Type::getInt8PtrTy(M.getContext()), 4); This does not work, it gives me ""Wrong type in array element initializer" at runtime. Also it doesn't look like ConstantExpr inherits ConstantArray, so I'm not sure how I could use this instead. Thanks On Thu, Oct 20, 2011 at
2015 Mar 17
2
[LLVMdev] casting Constant * to value *?
Hi all, extracting datafields of globals, the API code ends up in a Constant * Constant* const_ptr_103 = ConstantExpr::getGetElementPtr(gvar_struct_foo, const_ptr_103_indices); it can be used to initialize e.g. a new instruction like: StoreInst* void_119 = new StoreInst(const_float_102, const_ptr_103, false, label_entry_113); But how about replacing the operand of an already existing
2015 Apr 06
2
[LLVMdev] llvm DSA - reproduce the result in PLDI 07 paper
Dear all, I am trying to reproduce the "Percent May Alias" result described in PLDI 07's paper "Making Context-Sensitive Points-to Analysis with Heap Cloning Practical For The Real World" (http://llvm.org/pubs/2007-06-10-PLDI-DSA.html ). However, my "Percent May Alias" for all the benchmarks is much greater, especially "bzip2". The DSA code I use is
2011 Oct 20
0
[LLVMdev] common type at compile time?
On 10/20/11 11:34 AM, ret val wrote: > I'm a bit confused. For the Type did you mean something like: > ArrayType *type = ArrayType::get(Type::getInt8PtrTy(M.getContext()), 4); I assume that creates an ArrayType of 4 elements whose elements are pointers to 8-bit values. If so, then this is what I meant. > This does not work, it gives me ""Wrong type in array
2017 Sep 17
1
Usage of base register other than ebp for array accesses
Hello All, We want to write a transformation pass such that the array accesses use a base register other than ebp (assuming that the code is compiled for x86 architecture). For example, The below C code ->int a[5]; ->a[2] = 2 by default, gets compiled to something like this: ->mov dword ptr [ebp - 28], eax However, we want our pass to emit the something similar to the following
2016 Apr 24
2
Retrieving numeric value of instruction operand
hey john, yes indeed, that's what I'm trying, retreiving the values of %a and %b in an LLVM pass, sorry about the confusion. On Apr 24, 2016 7:18 AM, "John Criswell" <jtcriswel at gmail.com> wrote: > Dear Ammar, > > It is not clear what you are asking. %a and %b in your code below are not > constants; there is no way, at compile time, to determine what
2011 Oct 20
3
[LLVMdev] common type at compile time?
I'm trying to create a ConstantArray(whose contents will be of types Function*, GlobalVariable *) so I can immediately create a new GlobalVariable(that will be in its own section). I'm doing this so I have these address stored. In order to create this ConstantArray I need a valid ArrayType, but I'm not sure what to use for the element type. I want this to be done at compile time, so I
2015 Mar 18
5
[LLVMdev] casting Constant * to value *?
John, you are right. I 'browsed' the doxygen's inheritance diagram. Shouldn't I then be able to cast Constant * to Value*? Plugging the retrieved Constant* (from ConstantExpr::getGetElementPtr) into Instruction->setOperand compiles, but gives me an assertion failure at runtime. I have no access to the code at the moment. I will gather more information possibly tomorrow.
2016 Apr 24
2
Retrieving numeric value of instruction operand
Hi John, Thank you so much for the valuable answer! :) However, i have one tough issue that i need to solve, in my pass : let's say here %s = add %a, %b I need to check if the value of %a or %b is 2 or 4 and then apply a transformation to the other operand accordingly, for example if the value of %a = 2 the i'll multiply %b by 2 in my transform pass. I'm having a hard time
2015 Oct 08
2
Pool allocator + safecode
Thanks for the fast response John. On Thu, Oct 1, 2015, at 04:51 PM, John Criswell wrote: > Dear Ed, > > First, someone has updated the DSA code in the poolalloc project to LLVM > 3.7, and a Master's student worked for me over the summer to update a > large chunk of SAFECode to LLVM 3.7. However, the update to LLVM 3.7 > isn't finished (we need to finish integrating
2011 Oct 20
0
[LLVMdev] common type at compile time?
On 10/20/11 10:43 AM, ret val wrote: > I'm trying to create a ConstantArray(whose contents will be of types > Function*, GlobalVariable *) so I can immediately create a new > GlobalVariable(that will be in its own section). I'm doing this so I > have these address stored. In order to create this ConstantArray I > need a valid ArrayType, but I'm not sure what to use for
2015 May 19
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
Thanks John. Does this solve the problem of analysis availability though? If I still have to run the function analyses manually, I might as well keep rolling with the CallGraphSCCPass. (I probably should have mentioned that this is what I’m using right now.) Félix > Le 2015-05-19 à 10:12:32, John Criswell <jtcriswel at gmail.com> a écrit : > > On 5/18/15 10:45 PM, Félix Cloutier
2017 Mar 09
5
What is ConstantExpr?
Hi, All. Does anybody know about ConstantExpr in llvm? What's it? Since it always appears after llvm optimization such as -O2 level, what is it supposed to be to codegen? I am wondering it represents constant value which can be determined or computed at compile-time(actually is link-time) to improve performance. Although we do not know the actual constant value util the object file is linked.
2015 Feb 17
3
[LLVMdev] Google Summer of Code
John, Yes, I'm taking care about application as usual. On Tue, Feb 17, 2015 at 4:48 AM, Eric Christopher <echristo at gmail.com> wrote: > I believe Anton was going to do so. > > > On Mon, Feb 16, 2015, 5:14 PM John Criswell <jtcriswel at gmail.com> wrote: >> >> Dear All, >> >> Has someone registered LLVM as an organization for Google Summer of
2016 Mar 22
2
GSOC inquiry.
Sir, I am interested in adding a new analysis or optimization pass and building the getting started guide as a project for gsoc. On Mon, Mar 21, 2016 at 1:29 AM, John Criswell <jtcriswel at gmail.com> wrote: > On 3/17/16 10:58 AM, Om Shivom Nagpal wrote: > > No i have not worked previously on llvm. I have looked through the > projects but because of no prior experience i am
2015 Jul 18
4
[LLVMdev] How can i differentiate pointer type int 32* from int 32** ?
John, thanks for your helpful advice. My ultimate goal is to construct a full instruction-level program dependence graph for a given IR file. The hard point is how to establish the correct data dependence edges when some function arguments are multi-level pointers. To solve this problem I hope to check the point-to level for each pointer variable. I think the data dependence through pointers can
2016 Feb 19
3
Metadata and compile time performance
Dear LLVMers, I’m investigating the response time of my JIT, and according to profiling, optimization takes 85% of the compile time, while the rest is being split evenly between the front-end and machine code generation. Much of the optimizer time is spent in various alias analysis passes. I’m happy with the generated code quality and wouldn’t like to lower the optimization level (O2). Would
2015 Feb 27
2
[LLVMdev] Walking thru CallGraph bottom up
Hi Simon, > From: Simone Atzeni <simone.at at gmail.com> > To: John Criswell <jtcriswel at gmail.com> > Cc: llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] Walking thru CallGraph bottom up > Message-ID: <318EBA41-2040-4EFE-B330-5813C817C2A2 at gmail.com> > Content-Type: text/plain; charset="windows-1252" > > I think I got it and the example is