similar to: LLVM IR to C++

Displaying 20 results from an estimated 1000 matches similar to: "LLVM IR to C++"

2015 Oct 14
2
Changing address space
Dear all, I would like to store thread local variables in a different address space than global variables in an OpenMP program. Is it possible to do it using LLVM (perhaps with an optimization pass)? Erdem Derebasoglu -------------- next part -------------- An HTML attachment was scrubbed... URL:
2015 Sep 27
2
Registering a MachineFunctionPass
Dear all, I wrote a machine function pass to run with llc. But I get this error while building: "/home/erdem/llvm/lib/CodeGen/CodeGen.cpp:80: error: undefined reference to 'llvm::initializeNoopInserterPass(llvm::PassRegistry&)'" NoopInserter is the name of my pass. I already added this line to InitializePasses.h: "void
2015 Oct 04
2
How to add NOP?
Hi Erdem, Since it is a target specific pass, you should put your pass inside the target's folder (e.g. lib/Target/X86/) and declare your pass in Target.h. Then you need to modify the target's TargetPassConfig ( http://llvm.org/docs/doxygen/html/classllvm_1_1TargetPassConfig.html) to enable your pass. You can check out the existing MachineFunction passes (e.g. X86ExpandPseudo.cpp) to get
2015 Sep 17
2
How to add NOP?
This seems to be what I am looking for. That was very helpful. Thank you. Erdem From: vlknkls at gmail.com Date: Wed, 16 Sep 2015 16:25:29 +0000 Subject: Re: [llvm-dev] How to add NOP? To: erdemderebasoglu at hotmail.com; llvm-dev at lists.llvm.org Use MachineInstr::memoperands() function to get memory operands then you can get the address space by using MachineMemOperand::getAddrSpace(). Volkan
2015 Sep 15
3
How to add NOP?
I would like to convert a C file that uses OpenMP library to X86 code with a condition: I want to insert a NOP before each instruction that does a private memory access.I have written an optimization pass that inserts an inline assembly call (NOP) but it is applied at IR level, and I cannot determine where to insert it. How can I use LLVM to add NOPs accordingly? Thanks. --------------
2015 Sep 28
2
Registering a MachineFunctionPass
I had INITIALIZE_PASS_BEGIN and INITIALIZE_PASS_END macros. I replaced them with INITIALIZE_PASS but I get the same error. If I understand correctly, I need to modify Passes.h, InitializePasses.h, and Codegen.cpp files to register my pass, right? Another question is: Is it necessary to have the createNoopInserterPass function? Erdem -------------- next part -------------- An HTML
2015 Nov 01
2
Re-numbering address space with a pass
Hi all, I would like my optimization pass to change an object's address space that is created by llvm.lifetime.start intrinsic. Because I want to be able to identify them later in a codegen pass. I can get a pointer from the intrinsic using CallInst::getArgOperand() function. However, I don't know what to do with it (or if it is the pointer that I want). How can I change its address space?
2013 Nov 26
2
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
Hello, using the LLVM API, I've build one very simple function that adds two ConstantInts and returns the result. I noticed that, when I emit IR code, it is optimized to a simple "ret i16 42" when I add 40 and 2. I'd like to see the operations that are necessary to compute the result, though. Can I somehow disable this optimization in the pass, leading to more verbose IR code?
2015 Oct 11
2
How to add NOP?
Can you send the IR you are using? Volkan On Thu, Oct 8, 2015 at 6:28 AM Erdem Derebaşoğlu < erdemderebasoglu at hotmail.com> wrote: > Thanks. I enabled my pass. I have one resolved issue though: > MachineMemOperand::getAddrSpace() always returns zero. How can I use it to > distinguish private memory accesses? > > Erdem > > ------------------------------ > From:
2013 Nov 28
0
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
IRBuilder is a templated class, and one of the template arguments is the constant folder to use. By default it uses the ConstantFolder class which does target-independant constant folding. If you want to disable constant folding you can specify the NoFolder class instead, i.e. declare the builder as follows: IRBuilder<true, llvm::NoFolder> builder(body) On 26 Nov 2013, at 19:23, Daniel
2012 Jun 11
2
[LLVMdev] Why always abort in verifyFunction?
Hello everyone: I have a little question about the second argument *action* of verifyFunction. In docs: *Enumerator: * *AbortProcessAction* verifyModule will print to stderr and abort() *PrintMessageAction* verifyModule will print to stderr and return true *ReturnStatusAction* verifyModule will just return true But it still abort when I pass
2009 May 12
1
[LLVMdev] Tutorial 1: casting cout
To get Tutorial 1 to compile, I had to cast cout as a raw_osstream, as in: PM.add(createPrintModulePass(&llvm::cout)); ----> PM.add(createPrintModulePass((raw_ostream*)&llvm::cout)); I was getting the following error: $ c++ -g tut1.cpp `llvm-config --cxxflags --ldflags --libs core` -o tut1 tut1.cpp: In function ‘int main(int, char**)’: tut1.cpp:19: error: cannot convert
2005 Jul 15
2
RES: Meet Me - this is not a valid conference number, please try again
Hello Haki I fixed this problem following the instructions in /usr/src/zaptel-1.0.9/README.udev. Regards Cec?lia -----Mensagem original----- De: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com]Em nome de Erdem HAKI Enviada em: sexta-feira, 15 de julho de 2005 05:11 Para: 'Asterisk Users Mailing List - Non-Commercial Discussion' Assunto:
2015 May 17
2
[LLVMdev] copy value of a global's data field to another global
Hi all, I can get access to the data stored in globals as follows: GlobalVariable* pGvarAct=_set_a_valid_global_; const_ptr_indicesVec=_the_indexes_ llvm::Constant* pConst; pConst=ConstantExpr::getGetElementPtr(pGvarAct, const_ptr_indicesVec); and e.g. use this to repalece an argumrnt of an instruction like: I->setOperand(someArgumentIndex,pConst); However, getGetElementPtr returns a
2015 May 18
2
[LLVMdev] copy value of a global's data field to another global
getInitializer returns the complete initializer of the global. My globals are complex nested structs, from which I want to extract e.g. one double datafield. Example: >From a struct Stuct having double,array(3xint),float fields, I could extract the second int value using the index sequence 0,1,1 with getGetElementPtr. This gives me a constantPointer, but I would need to get a constInt...
2012 Jun 11
0
[LLVMdev] Why always abort in verifyFunction?
Hi Xiu, The Verifier pass runs a PreVerifier pass, which does not honour the action argument, and will always abort on a broken module, (Line 106, lib/VMCore/Verifier.cpp) Perhaps you should file a bug against this, to allow you to not abort if you so wish. Joey On 11 June 2012 09:41, Guowei Xu <myesis at gmail.com> wrote: > Hello everyone: > > I have a little question
2005 Jun 19
1
help for making several calls at the same time..
Hi, I have installed latest stable version of Asterisk. I registered 1 Quintum Gateway and 5 eyeBeam SoftPhone. But I can make just one call at the same time, if i try to make calls from 2 softphones to anotherone, second caller listens " the person have extension xxxx is on the phone ...." . So we couldn't make two or more calls at the same time for a SoftPhone. What should we
2005 Jun 24
2
RTP session between two end users
Is it possible that a RTP session between two end users (so i want to use asterisk as a signaling proxy and bypass RTP sessions)? I used "canreinvite=yes" but it didn't work. Description from asterisk conf. File; (canreinvite=yes ; allow RTP voice traffic to bypass Asterisk) Thanks Erdem HAKI - erdemh@tesas.com -------------- next part
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.
2013 Jan 21
4
[LLVMdev] Embed LLVM/Clang in our project
On 1/21/2013 2:01 AM, Óscar Fuentes wrote: > Ashok Nalkund <ashoknn at qti.qualcomm.com> writes: > >> I was using the find_package(LLVM llvm/share/llvm/cmake) and >> llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES jit native) to get >> the libraries to link against. This works well for the libLLVM* >> libraries, but how do I implement similar find stuff for