search for: constantvalue

Displaying 9 results from an estimated 9 matches for "constantvalue".

2008 Jul 11
1
[LLVMdev] Cloning Functions
...t; I had wondered that myself. In what way is global data optimized? > My assumption is that global data might be added by optimizations > but that nothing would be deleted or drastically changed. Hmm...it seems you are right. When I try to merge the two value maps I get a faullt mapping a ConstantValue from one of the pristine Function clones. Apparently this ConstantValue got deleted by optimization somewhere. This actually doesn't make a lot of sense to me. What happens if I clone a function and optimize it or the original function and ConstantValues start getting deleted? That Constant...
2008 Jul 11
0
[LLVMdev] Cloning Functions
On Friday 11 July 2008 12:05, Devang Patel wrote: > > Ok, I've mostly got a mechanism to do what I want: > > > > 1. As each function comes in for op/codegen, clone it and save off > > the clone and its associated ValueMap (I call these clones > > "pristine" > > functions. > > > > 2. After all processing is done, clone the resulting
2008 Jul 11
2
[LLVMdev] Cloning Functions
On Jul 11, 2008, at 9:59 AM, David Greene wrote: > On Wednesday 09 July 2008 13:49, David Greene wrote: > >>> then it seems you're doing >>> >>> for each function >>> generate_ir >>> convert_to_llvm_ir >>> optimize_llvm_ir >> >> Yep. > > Ok, I've mostly got a mechanism to do what I want: > > 1. As
2013 Jan 11
0
[LLVMdev] modifiy the address of GlobalVariable emitted by JIT
Hi everyone, I am building a binary translator, and try to do block chaining. LLVM version : 3.1 my machine : x86-32 bit, Linux Before each *LLVM IR returnInst constantValue*, I insert a call instruction & a returnInst which looks like %x = call @G ; ret %x; then remove the *LLVM IR returnInst constantValue* The initializer of @G is a function which has prototype int f(struct MyType* ); and the content in terms of LLVM IR is define internal i32 @chaining1057...
2010 Feb 27
3
[LLVMdev] Object layout bug for C++ derived class with long long integer
...; Then I have a derived C++ class that look like this: struct Bar : Foo { long long fourth; } I generate JIT code to access 'fourth' from a Foo * as follows: BarPtr = CreateBitCast(FooPtr, BarPtrTy); FourthPtr = CreateConstGEP2_32(BarPtr, 0, 3); FourthValue = CreateLoad(FourthPtr); ConstantValue = ConstantInt::get(FourthValue->getType(), 0x2A4); ComparisonValue = CreateICmpEQ(FourthValue, ConstantValue); This appears to work on Linux and MacOSX with LLVM 2.6 and LLVM 2.7. On Windows, however, where I only have LLVM 2.6 with MINGW/MSYS, the generated code looks like this: 0x13df70b3:...
2009 Jul 23
2
[LLVMdev] patch for llc/ARM: added mechanism to move switch tables from .text -> .data; also cleanup and documentation
...start of the table. The tables live in .rodata (or > even in .text itself, but not inline in the code) which is in the same > segment as .text and thus the code is still PIC. > Bob: Thanks for cleaning this up. I like the new patch much better than the old one. Teaching the (abstract) ConstantValue class about jumptable indices is a little bit ugly but I do not see any better solution without massive refactoring. I have added TODOs here and elsewhere and plan to address them in future patches. I also added a test and pcleaned up a few things. The new patch is attached. I also uploaded it to...
2009 Jul 27
0
[LLVMdev] patch for llc/ARM: added mechanism to move switch tables from .text -> .data; also cleanup and documentation
On Jul 23, 2009, at 12:10 PM, robert muth wrote: > Bob: > > Thanks for cleaning this up. I like the new patch much better than > the old one. > Teaching the (abstract) ConstantValue class about jumptable indices > is a little > bit ugly but I do not see any better solution without massive > refactoring. > I have added TODOs here and elsewhere and plan to address them in > future > patches. I also added a test and pcleaned up a few things. Maybe I'...
2009 Jul 14
0
[LLVMdev] patch for llc/ARM: added mechanism to move switch tables from .text -> .data; also cleanup and documentation
On Jul 2, 2009, at 10:48 AM, robert muth wrote: > I spend over a day trying to follow your suggestion. In the end I > was not successful. Here is what Iearned: > > After setting > > ARMJITInfo::hasCustomJumpTables -> true > setOperationAction for ISD::BR_JT -> Expand > > I needed to add a "brind" definition to ARMInstrInfo.td > I picked
2009 Jul 02
2
[LLVMdev] patch for llc/ARM: added mechanism to move switch tables from .text -> .data; also cleanup and documentation
On Thu, Jun 25, 2009 at 6:17 PM, Bob Wilson <bob.wilson at apple.com> wrote: > Hi Robert, > Evan asked me to review this patch, and I have some questions about it. I > apologize for not following the discussion earlier and for hitting you with > questions after you've already gone through several revisions. > > LLVM provides some default behavior for handling jump