search for: regallocpbqp

Displaying 20 results from an estimated 43 matches for "regallocpbqp".

2011 Apr 26
2
[LLVMdev] Register pairing in PBQP
...tation of PBQP as a part of a bachelors thesis im doing on register allocation for regular architectures. In particullar, im looking at the possibility for improving the spill rate of PBQP for a particular DSP architecture, by using register pairing. >From reading the source code of lib/CodeGen/RegAllocPBQP.cpp i conclude that support for register paring is not yet implemented (correct me if im wrong here). However this feature was mentioned as a future goal in a slide i found (http://llvm.org/devmtg/2009-10/RegisterAllocationFutureWorks.pdf<http://llvm.org/devmtg/2009-10/RegisterAllocationFutureW...
2009 Oct 20
0
[LLVMdev] request for help writing a register allocator
Hi Susan, You may find the PBQP allocator implementation useful as a reference to what's involved in adding a new allocator to LLVM. It's located in lib/CodeGen/RegAllocPBQP.cpp, with supporting files in the lib/CodeGen/ PBQP directory. I'm no expert on the LLVM register allocation interfaces, so I'll defer to those who are regarding the specifics of your questions. -Jim On Oct 19, 2009, at 5:20 PM, Susan Horwitz wrote: > I'm using LLVM for a comp...
2011 Nov 14
2
[LLVMdev] Build LLVM as a DLL on Windows x86
...l libs together for static libstdc++.a llvm[1]: Making dummy -lstdc++ to lib llvm[1]: Collecting global symbols of stdc++ llvm[1]: Generating exports for LLVM-3.0 llvm[1]: Generating LLVM-3.0.def llvm[1]: Linking Release Shared Library LLVM-3.0.dll c:/dev/llvm/build-rc3/Release/lib/libLLVMCodeGen.a(RegAllocPBQP.o):fake:(.text$_ ZN4PBQP5Graph7addNodeERKNS_6VectorE[PBQP::Graph::addNode(PBQP::Vector const&)]+0 x9c): undefined reference to `std::_List_node_base::_M_hook(std::_List_node_base *)' c:/dev/llvm/build-rc3/Release/lib/libLLVMCodeGen.a(RegAllocPBQP.o):fake:(.text$_ ZN4PBQP19HeuristicSolverI...
2009 Oct 20
2
[LLVMdev] request for help writing a register allocator
I'm using LLVM for a compiler course, and I'd like to have my students implement a graph-coloring register allocator. I'm having a lot of trouble figuring out how this should be done. Is there anyone who has written an LLVM register allocator who would be willing to help me understand the basic ideas? I understand the algorithm, it's LLVM that I don't understand. For
2011 Apr 27
0
[LLVMdev] Register pairing in PBQP
...l have to derive your own PBQPBuilder in your target and set PBQP to be the default allocator for your system. If the CodeGen framework can represent this kind of pairing constraint now you could add your new PBQPBuilder to CodeGen so that other target writers can benefit from it. See lib/CodeGen/RegAllocPBQP.cpp for examples of how to write PBQPBuilders, and I'm happy to answer any questions, time permitting. :) Cheers, Lang. On Wed, Apr 27, 2011 at 5:59 PM, Jakob Stengård <jakobste at kth.se> wrote: > >Can you describe your pairing constraint in more detail? I've seen a few &gt...
2009 Oct 20
7
[LLVMdev] request for help writing a register allocator
Hi Susan, > You may find the PBQP allocator implementation useful as a reference > to what's involved in adding a new allocator to LLVM. It's located in > lib/CodeGen/RegAllocPBQP.cpp, with supporting files in the lib/CodeGen/ > PBQP directory. > Yes - as far as working allocators go PBQP is pretty simple. If you're just interested in LLVM API details you can focus on the lower half of the RegAllocPBQP.cpp source file (everything from PBQPRegAlloc::findVRegInterva...
2017 Jun 05
3
VirtRegMap invariant: no reserved physical registers?
...ail: unsigned VirtReg = MO.getReg(); unsigned PhysReg = VRM->getPhys(VirtReg); ... assert(!MRI->isReserved(PhysReg) && "Reserved register assignment"); Indeed there is a case where PhysReg may be a reserved physical register. Specificially, RegAllocPBQP::finalizeAlloc() may select a physical register thusly: const TargetRegisterClass &RC = *MRI.getRegClass(LI.reg); PReg = RC.getRawAllocationOrder(MF).front(); ... VRM.assignVirt2Phys(LI.reg, PReg); The documentation for TargetRegisterClass::getRawAllocationOrder() notes...
2010 Jan 31
1
[LLVMdev] The PBQP Allocator: Status update, and who might want to use it.
...ther target audience for PBQP is people who want to implement a backend for an architecture with an unusual register file. If you've got an odd architectural feature to model (one that's not currently handled by LLVM) then the easiest way to get up and running with it is probably to hack up RegAllocPBQP.cpp to introduce your feature into the cost model. For examples on modeling different features I'd check the papers referenced in RegAllocPBQP.cpp: (1) Hames, L. and Scholz, B. 2006. Nearly optimal register allocation with PBQP. In Proceedings of the 7th Joint Modular Languages Conference (JML...
2011 Jun 17
0
[LLVMdev] PBQP & register pairing
...J > > The last issue I have is an assert during regalloc in LiveIntervalAnalysis > : “attempt to spill already spilled interval!”, and I do not know where to > start looking. Any hint would be welcome. > > The data structure you want to keep your eye on is the set vregsToAlloc to RegAllocPBQP. This set holds the virtual registers which PBQP must allocate for on its next round. Once a virtual register has been spilled it should be erased from this set (see RegAllocPBQP::mapPBQPToRegAlloc), and it should never re-enter it, and thus never be considered again by the PBQP allocator. At a gue...
2017 Jun 15
2
LLC does not do proper copy propagation (or copy coalescing)
...se that handles this in PHI elimination (PHIElimination.cpp); - create a new pass that does copy propagation (based on DFA) on machine instructions before Register Allocation; - optimize copy coalescing such as the standard one or the one activated by -pbqp-coalescing in lib/CodeGen/RegAllocPBQP.cpp (there is an email also about PBQP coalescing at http://lists.llvm.org/pipermail/llvm-dev/2016-June/100523.html). Best regards, Alex
2011 Nov 14
0
[LLVMdev] Build LLVM as a DLL on Windows x86
2011/11/13 Alan Garny <agarny at hellix.com>: > Now, I know that shared libraries are not supported on Windows using CMake > (according to http://www.llvm.org/docs/CMake.html) which would have been my > preferred building choice, but I didn’t see anything against them not being > supported using Autotools, so I thought I would try it that way (as I > successively did on Linux
2010 Oct 03
1
[LLVMdev] [LLVMDev] Coalescing Registers
I want to full understand register coalescing and how to coalesce copies. From what I have seen from "SimpleRegisterCoalescing," "RegAllocLinearSpan," and "RegAllocPBQP" there are three indicators for the copy instruction x = copy y. Assume that the value number of x does not equal the value number of y. For "x = copy y", let the boolean values a,b, and c, equal the following: a = x is virtual or physical, b = y is virtual or physical, and c = clas...
2011 Jun 15
2
[LLVMdev] PBQP & register pairing
Attached is a small patch to allow users of the PBQP allocator to optionally insert a custom pass. I believe it can be usefull to other users of the pbqp. I used it to undo some of the coalescer work, and make sure that I have different virtual registers, inserting a copy if necessary, to build a pair. I noticed an unexpected --- to me at least --- behaviour of the allocator. I have some
2011 Nov 13
5
[LLVMdev] Build LLVM as a DLL on Windows x86
Hi, I need to build a shared version of LLVM on Windows, Linux (both x86 and x64) and Mac OS X. So far, I have been able to build LLVM on Linux and Mac OS X, and it's all working fine as confirmed by a small LLVM test code that I wrote. However, on Windows, even though I get a DLL, that DLL doesn't contain any (exported) functions (according to DLL Export Viewer; see
2008 Oct 11
0
[LLVMdev] 2.4 Pre-release (v1) Available for Testing
On Oct 10, 2008, at 1:44 PM, Óscar Fuentes wrote: > OvermindDL1 <overminddl1 at gmail.com> writes: > > [snip] > >> On this first compile everything compiled except for llc and lli, >> which did not link due to: >> unresolved external symbol "class llvm::FunctionPass * __cdecl >> llvm::createPBQPRegisterAllocator(void)" > > That is because
2010 May 12
0
[LLVMdev] Need help for my PBQP regAlloc proj in llvm....
Hi Prasad, The comments at the beginning of RegAllocPBQP.cpp list the two most relevant papers for PBQP register allocation. // (1) Hames, L. and Scholz, B. 2006. Nearly optimal register allocation with // PBQP. In Proceedings of the 7th Joint Modular Languages Conference // (JMLC'06). LNCS, vol. 4228. Springer, New York, NY, USA. 346-361....
2012 Mar 21
2
[LLVMdev] PBQP & CalcSpillWeights
Hi All, I finally had a chance to get back to my pbqp trials, now using the 3.0 release. I still hit the same assert : "Attempting to spill already spilled value." This is triggered because in RegAllocPBQP::mapPBQPToRegAlloc, a vreg node is either : - a physical register (problem.isPRegOption(vreg, alloc)), - or a spill (problem.isSpillOption(vreg, alloc)) The problem is that pass CalcSpillWeights can 'hint' that it is a poor idea to spill this specific register with : CalcSpillWeights.cp...
2010 May 11
2
[LLVMdev] Need help for my PBQP regAlloc proj in llvm....
Hello, we are currently working on my project that aims at improving the register allocation scheme by identifying if the interference graphs are chordal or not. we are working on the llvm compiler .we are forcing the compiler to use PBQP register allocation scheme by an option of ' ' regalloc=pbqp ' during the execution of prgm. we have been succesfull in accessing the interference
2010 Sep 20
4
[LLVMdev] Supporting Complex Register Allocation Constraints (PBQP Allocator Status Update)
...tively quickly. There's a lot more detail on all of this in [1] and [2], so I'll leave you to read them for more information if you're interested (or feel free to shoot me questions via email). For now I'll get on to the the how-to bit for LLVM. The new header include/llvm/CodeGen/RegAllocPBQP.h includes a class called PBQPBuilder. This class represents the mapping between machine functions and PBQP problems. By extending it and implementing the build method you can add your own register allocation constraints to the PBQP problem. Just call back to the PBQPBuilder base to have the spill...
2012 Jan 20
3
[LLVMdev] register allocation
...then PBQP should be able to support that. > > /jakob I take it then that it is not possible to write operand-combinations as in GCC in LLVM so as to handle register pairing on a high level? The PBQP algorithm as such supports register pairing per the article, but it was not implemented in RegAllocPBQP.cpp as far as I can see. For my needs, I would like to say that whenever two registers are used in the same instruction, they must follow any register-pairing rule defined for any such occurence. Possibly, one could add a Constraint per instruction def as well to indicate the use of the register p...