similar to: Proper method to initialize all LLVM Internal Data Structures?

Displaying 20 results from an estimated 300 matches similar to: "Proper method to initialize all LLVM Internal Data Structures?"

2015 Jul 27
15
[LLVMdev] Help with using LLVM to re-compile hot functions at run-time
Hi Again, I'm a little confused regarding what is the exact Orc's functions I should use in order to save the functions code in a code cache so it could be later replaced with different versions of it and I appreciate your help. Just a reminder I want to dynamically recompile the program based on profile collected at the run-time. I would like to start executing the program from the
2011 Jul 25
4
[LLVMdev] Lack of use of LLVMContextImpl::NamedStructTypes
Several people on this list have reported issues with the linker regarding a named StructType instance with the same name in two different modules being resolved into two StructTypes with different names due to StructType:: setName(…) collision behavior. Looking at BitcodeReader::ParseTypeTableBody(…), I don't see use of LLVMContextImpl::NamedStructTypes or of Module::getTypeByName(…). Nor do
2009 Dec 06
2
[LLVMdev] Pass linking problems
Hi, I'm attempting to use Module::getTypeByName in my pass, but when I run the pass with opt, I get this: opt: symbol lookup error: /home/mmwu/Download/32/llvm/Release/lib/ParallelSort.so: undefined symbol: _ZNK4llvm6Module13getTypeByNameENS_9StringRefE The pass worked before I added the call in. What do I need to link with the pass to get it to work? Or is there something wrong
2016 Apr 28
2
Why duplicate "protected:" in SmallVector.h, StringMap.h?
In SmallVector.h: class SmallVectorBase { *protected:* void *BeginX, *EndX, *CapacityX; *protected:* SmallVectorBase(void *FirstEl, size_t Size) : BeginX(FirstEl), EndX(FirstEl), CapacityX((char*)FirstEl+Size) {} In StringMap.h: class StringMapImpl { *protected:* // Array of NumBuckets pointers to entries, null pointers are holes. // TheTable[NumBuckets] contains a sentinel value
2009 Dec 07
0
[LLVMdev] Pass linking problems
Hi, > I'm attempting to use Module::getTypeByName in my pass, but when I > run the pass with opt, I get this: > > opt: symbol lookup error: > /home/mmwu/Download/32/llvm/Release/lib/ParallelSort.so: undefined > symbol: _ZNK4llvm6Module13getTypeByNameENS_9StringRefE > > The pass worked before I added the call in. What do I need to link with > the pass to
2011 Jul 25
0
[LLVMdev] Lack of use of LLVMContextImpl::NamedStructTypes
On Mon, Jul 25, 2011 at 10:50 AM, Garrison Venn <gvenn.cfe.dev at gmail.com> wrote: > Several people on this list have reported issues with the linker regarding a > named StructType instance with the same name in two different modules > being resolved into two StructTypes with different names due to StructType:: > setName(…) collision behavior. Looking at
2011 Jul 26
0
[LLVMdev] Lack of use of LLVMContextImpl::NamedStructTypes
On Jul 25, 2011, at 10:50 AM, Garrison Venn wrote: > Several people on this list have reported issues with the linker regarding a > named StructType instance with the same name in two different modules > being resolved into two StructTypes with different names due to StructType:: > setName(…) collision behavior. Looking at BitcodeReader::ParseTypeTableBody(…), > I don't see
2011 Nov 11
2
[LLVMdev] Argument's types mismatch when creating CallInst.
Hello. I have an .bc, which defines @foo(%type* arg1, %type* arg2, %type* arg3). Firstly, i do this: runtimeModule = getLazyIRFileModule("runtime.bc", smd, llctx); then this: fooFunction = runtimeModule->getFunction("foo"); myType = runtimeModule->getTypeByName("type"); After that, i'm creating another module: myModule = new Module("My
2011 Sep 22
2
[LLVMdev] Need help in converting int to double
On Thu, Sep 22, 2011 at 3:46 PM, sarath chandra <sarathcse19 at gmail.com>wrote: > Hi James, > > First i converted the void * to int* and then did FPToSI...then did SHL...( > because CreateShl only accepts integers... i pointer casted it to int64 type > first)... Below is the code snippet.... > > > lhs = mBuilder.CreateStructGEP(firstArg, 0); > lhs =
2015 Jul 11
2
[LLVMdev] StringMap question
Hello everyone! I'm a newcomer for the great LLVM project. I've started to explore the source code of LLVM project to become more familiar with it, and I've found some strange usage of move semantics in constructor of StringMapImpl( StringMapImpl &&RHS) {...} class in include/llvm/ADT/StringMap.h line 56. Could anyone explain me the purpose of zeroing of all fields of RHS in
2011 Sep 22
0
[LLVMdev] Need help in converting int to double
Hi Sarath, It would have really helped if you had removed the commented out code and inlined the calls to your homemade helper functions before sending it... You are doing this, in LLVM IR: %0 = getelementptr %Value* %firstArg, i32 0 ; i8** %1 = load i8** %0 ; i8* %2 = bitcast i8* %1 to i64* %3 = getelementptr %Value* %secondArg, i32 0 ; i8** %4 = load i8** %3; i8* %5 = bitcast i8* %4 to i64*
2011 Sep 22
1
[LLVMdev] Need help in converting int to double
Yeah, that's the fault...got the answer...... Thanks James for the help... Struggling with this for so many days....... On Thu, Sep 22, 2011 at 4:02 PM, James Molloy <James.Molloy at arm.com> wrote: > Hi Sarath,**** > > ** ** > > It would have really helped if you had removed the commented out code and > inlined the calls to your homemade helper functions before
2018 Aug 30
2
Monorepo Updates Behind?
Possibly unrelated but since someone asked, I wonder why we don’t have monorepo for releases? For example a .tar.s containing all LLVM6.0 components placed at correct location Zhang > 在 2018年8月30日,18:16,Dean Michael Berris via llvm-dev <llvm-dev at lists.llvm.org> 写道: > > Thanks! >> On Thu, Aug 30, 2018 at 7:31 PM NAKAMURA Takumi <geek4civic at gmail.com> wrote:
2018 Dec 09
2
Parse LLVM IR
Hello, I am a newbie to LLVM and right now I am on the hook to parse some IR code and do some instrumentations. However, my problem is that no matter how I tweak my parsing code, it simply cannot print out anything. So here is my C code: int your_fun(int arg2) { int x = arg2; return x+2; } And here is my parsing code: #include <llvm/IR/Module.h> #include
2012 Oct 22
2
[LLVMdev] Reading IR from a std::ostream
Previously I had asked how to write then read back IR to/from a file. The write code looked like: LLVMContext ctx; SMDiagnostic diag; Module *m = ParseIRFile( "my_file", diag, ctx ); However, the code I'm trying to retrofit LLVM IR into passes me just a std::ostream&. How can I read IR from a std::ostream? I figured out how to use raw_os_ostream to adapt a
2018 Feb 24
1
Parsing a bit code file
I am trying to parse LLVM IR from a bit code file. I went through the following steps. hello.cpp #include <iostream> int main() { std::cout << "Hello world!" << "\n"; return 0;} dump.cpp #include <llvm/IR/Module.h>#include <llvm/IRReader/IRReader.h>#include <llvm/IR/LLVMContext.h>#include <llvm/Support/SourceMgr.h> using
2011 Sep 22
3
[LLVMdev] Need help in converting int to double
Hi, I'm pursuing M.Tech course. As a part of the project work i'm using LLVM as back-end. My project area is "Enhancing the performance of V8 javascript engine using LLVM as a back-end". Now i'm writing code for shift left(SHL) operator. I had my own Value Structure .. it's like this Struct Value { void *val ; char type; } The "char type" holds
2019 May 17
3
Copy Function from one LLVM IR file to another
Hello everyone, I wanted to copy a function from one file to another. The file that I wanted to copy the function into contains a function with the same name and same number of instructions. I decided to just replace the instructions with those of the other function. I am doing all of this from within a function pass. *1.* I created a function pass in which I extract a function using
2018 Aug 30
2
Monorepo Updates Behind?
Anton has fixed it. 2018年8月30日(木) 17:23 Martin Storsjö via llvm-dev <llvm-dev at lists.llvm.org>: > On Thu, 30 Aug 2018, Dean Michael Berris via llvm-dev wrote: > > > The monorepo updates seem to have been stuck for an hour now. > > > > Is this expected? > > It seems like the regular per-project git repos also are stuck right now - > which probably
2015 Jun 12
2
[LLVMdev] Register Allocation on IR
Hello all, I am trying to use the LLVM libraries to do register allocation on LLVM IR code -- and output IR as the result. There are two problems that arise when we try this : a. The LLVM backend requires that one goes through all the steps sequentially namely -- Instruction selection -- Scheduling and Formation -- SSA-based machine code optimizations -- Register