search for: machinefunct

Displaying 20 results from an estimated 954 matches for "machinefunct".

2006 Dec 14
1
[LLVMdev] MachineFunction.cpp!!!
Did someone make a change in MachineFunction and forget to update something? g++ -I/Volumes/data/Wendling/llvm-submission/build/obj/obj-llvm/lib/CodeGen -I/Volumes/data/Wendling/llvm-submission/build/obj/src/llvm/lib/CodeGen -I/Volumes/data/Wendling/llvm-submission/build/obj/obj-llvm/include -I/Volumes/data/Wendling/llvm-submission/build/...
2009 Nov 07
2
[LLVMdev] MachineFunction::get
Hi I have a ModulePass in LLC that runs after most of codegen completes, right before OBJ emission. I want the ModulePass to iterate over all MachineFunctions, emulating them. I used to do this by iterating over all Module Function's, and using MachineFunction::get() to get the MachineFunction associated with said Function. In LLVM 2.6, MachineFunction::get() is gone. What is the new way of doing what I need? thanks Sumesh
2012 May 31
2
[LLVMdev] DFG of machine functions
...achine function. But the build is throwing the following error: llvm[2]: Compiling MC_DFG.cpp for Debug+Asserts build /home/abhi/work/llvm31/llvm/include/llvm/Support/GraphWriter.h: In member function ‘void llvm::GraphWriter<GraphType>::writeNodes() [with GraphType = llvm::MCDFGraph<llvm::MachineFunction*>]’: /home/abhi/work/llvm31/llvm/include/llvm/Support/GraphWriter.h:100: instantiated from ‘void llvm::GraphWriter<GraphType>::writeGraph(const std::string&) [with GraphType = llvm::MCDFGraph<llvm::MachineFunction*>]’ /home/abhi/work/llvm31/llvm/include/llvm/Support/GraphWrite...
2012 Jun 02
0
[LLVMdev] DFG of machine functions
I tried debugging it and the issue seems to be in the implementation of MachineInstrIterator.h and the way it interacts with GraphWriter.h functions. I found this by replacing the ( template <> struct GraphTraits<MCDFGraph<MachineFunction*> >) with a similar MCDFGraph based template of CFG similar to the one in MachineFunction.h (similarly replacing the DOTGraphTraits with the one for CFG) and it works and pops up the GraphViz window with the CFG for the machine function. I am attaching the MachineInstrIterator.h file. Al...
2006 Aug 17
0
[LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
Thanks, Ralph, this line worked well :) Here it is, my first patch to LLVM :) I've changed all allocation_order_begin() and allocation_order_end() methods to take const MachineFunction &MF as a parameter. I also added const version of MachineFunction::getInfo<Ty>() method. And I changed three static hasFP() functions to take const reference to MachineFunction. While doing this I've found that some methods of MachineFunction are const but return non-const pointer...
2006 Aug 17
2
[LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
Hi Chris, > On Wed, 16 Aug 2006, Anton Vayvod wrote: > > I'm willing :) I don't know how to do it. What's "to put together a > > patch"? :) > > In your local CVS tree, change the methods to be const, and adjust any > code that is neccesary for that to work. Once that is done, from the > top level, type 'cvs diff -u >& patch.txt'
2012 Jul 29
3
[LLVMdev] global control flow graph at machine code level
Hi all, I am trying to build a global control flow graph at machine code level. Essentially, I need the handles to the MachineFunction's corresponding to every call site inside a MachineFunction in order to get the handles to MachineBasicBlock's with return statements inside the callee. Currently, the codegen module processes one MachineFunction at a time and hence I can't find a way to gather information about othe...
2004 Jun 04
1
[LLVMdev] MachineFunction::create docs
The docs for MachineFunction::create method have a couple of nits: // The next three methods are used to construct, destruct, and retrieve the // MachineFunction object for the given method. // // construct() -- Allocates and initializes for a given method and target // get() -- Returns a handle to the obje...
2006 Aug 17
1
[LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
On Thu, 17 Aug 2006, Anton Vayvod wrote: > Thanks, Ralph, this line worked well :) > Here it is, my first patch to LLVM :) > I've changed all allocation_order_begin() and allocation_order_end() methods > to take const MachineFunction &MF as a parameter. I also added const version > of MachineFunction::getInfo<Ty>() method. And I changed three static hasFP() > functions to take const reference to MachineFunction. Looks great, applied: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060814/03683...
2004 Oct 19
2
[LLVMdev] Question about MachineFunction Pass
Hi, I wrote a machinefunction pass to try to see what's going on. Does it mean that it is target machine dependent pass, like x86? However, after compile it, I found there wasnot command option I registered. I used regular way to do it like RegisterOpt <...> X("... ", "... "), but I cannot see t...
2015 Nov 03
2
Confused on how to do a machinefunction pass
Hi everyone, I am a LLVM newbie. I need to write a machinefunction pass for my project. This should be an analyzer of the machine code to do some profiling. I have written a couple of function passes for front end, but it seems they are completely different. I searched through forum and llvm documents, but couldn't find anything useful or questions were una...
2016 Mar 18
2
[GSoC 2016] Need more info on Add a MachineModulePass
...hink this is particularly useful feature for LLVM. > > > +1. I’d like to use something this feature in GlobalISel. The idea is that > has as soon as we lowered the LLVM IR of the whole module to MachineInstr, > the LLVM IR should be deallocable. > In other words, the MachineModule/MachineFunctions should contain enough > information such that we do not have to keep the LLVM IR around. > > One of the main challenge is about alias analysis information that are > tight with LLVM IR, but may be used in MachineFunctionPass. > > A quick use I can think of this is Implementing...
2015 Nov 04
2
Confused on how to do a machinefunction pass
Dear John, Thank you so much for your help. I looked at those documents. Could you kindly answer the following questions: Does it mean that I have to make my own backend target in order to write a machine pass even if I want to run a simple machinefunction pass? for example,if I want my pass to get MIPS instructions as an input, I have to copy all the files from mips target and add a file to it which implements my pass. and there should be a way to connect the pass to other MIPS backend files? As a result, is the way that I described in my first...
2012 Jul 30
0
[LLVMdev] global control flow graph at machine code level
Hi Abhishek, On Sunday, July 29, 2012 18:32:11 AbhishekR wrote: > It seems like I may have to modify the way MachineFunction is instantiated in MachineFunctionAnalysis. Instead of doing it per Function, it may have to be done for the entire Module by instantiating MachineFunction objects for every Function inside the Module. This might require major changes to the PassManager framework as well. Is there some work in t...
2006 Aug 16
2
[LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
Hi! Could someone tell me the reason why allocation_order_begin method of TargetRegisterClass class takes a non-const reference to MachineFunction? I can't imagine why this method will change function and didn't find any override within llvm source which uses non-const methods of the MF parameter. Just run into compiler error because I passed a const reference to the method. Best regards, Tony. -------------- next part ---------...
2013 Jun 26
2
[LLVMdev] Proposal: extended MDString syntax
...ltiple lines: !0 = metadata !{metadata !""" hello world """} The special three-quote sequence marks the beginning and end of a multi-line string. This syntax could have a variety of uses, but of particular interest is that it could be used as a basis for serializing MachineFunctions. MachineFunctions are not an entirely self-contained IR; they contain references to LLVM IR. As such, a serialization of a MachineFunction needs to have an LLVM Module to refer to. By encoding MachineFunctions in metadata, they can easily accompany an LLVM Module. By being multi-line, the data...
2015 Dec 02
2
Unable to clone an instruction in AsmPrinter::EmitInstruction
...we call it Escala). At the moment I'm trying to implement EscalaAsmPrinter::EmitInstruction(const MachineInstr *MI). I'm trying to clone an instruction and this produces and error. Below are the code as well as error: void EscalaAsmPrinter::EmitInstruction(const MachineInstr *MI) { const MachineFunction *MF = MI->getParent()->getParent(); MachineInstr *CloneMI = MF->CloneMachineInstr(MI); ... ... } Here is the error: lib/Target/Escala/EscalaAsmPrinter.cpp: In member function ‘virtual void {anonymous}::EscalaAsmPrinter::EmitInstruction(const llvm::MachineInstr*)’: lib/Target/Esc...
2015 Nov 04
3
Confused on how to do a machinefunction pass
..., fateme Hoseini wrote: > > Dear John, > Thank you so much for your help. I looked at those documents. Could you > kindly answer the following questions: > > Does it mean that I have to make my own backend target in order to write a > machine pass even if I want to run a simple machinefunction pass? for > example,if I want my pass to get MIPS instructions as an input, I have to > copy all the files from mips target and add a file to it which implements > my pass. and there should be a way to connect the pass to other MIPS > backend files? > > > No, you do not nee...
2004 Oct 19
0
[LLVMdev] Question about MachineFunction Pass
On Tue, 19 Oct 2004, Zhang Qiuyu wrote: > I wrote a machinefunction pass to try to see what's going on. Does it > mean that it is target machine dependent pass, like x86? However, after > compile it, I found there wasnot command option I registered. I used > regular way to do it like RegisterOpt <...> X("... ", "... "), but...
2006 Aug 16
0
[LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
Hi Tony, It doesn't look right to me either. The "begin" and "end" methods which allocation_order_begin should return a const_iterator instead of an iterator. Those methods are "const". And, yes, the MachineFunction reference isn't even used so at the very least it could be const (if not removed). However, I'm not an expert in this area of the code. Chris or someone else will have to look at this and provide a determination. Reid. On Wed, 2006-08-16 at 18:14 +0400, Anton Vayvod wrote: > Hi! &g...