Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Register allocation on IR"
2015 Jun 17
3
[LLVMdev] Register Allocation on IR
Having worked on SSA register allocators in the past I have to say that SSA is actually a good fit for register allocation. However LLVM IR is indeed not. You don't have any target instructions or register classed/constraints. It wouldn't make much sense to designate registers to llvm IR values nor is there a way to express that in IR. llvm has the machine instruction (MI) representation
2015 Jun 15
2
[LLVMdev] Register Allocation on IR
Thanks. I will also work on doing an SSA register allocation that returns
SSA form (IR), since it is not yet implemented.
On Fri, Jun 12, 2015 at 9:20 PM, Matthias Braun <mbraun at apple.com> wrote:
> llvm uses three different representations until machine code is emitted:
>
> - the llvm language as specified in the llvm manuals, we usually call that
> IR
> - the selection
2012 Aug 20
0
[LLVMdev] How to eliminate PHI nodes on pointer types?
Hi Andrew,
> Somewhere during optimization PHI nodes on pointer types (including
> alloca instructions) are being introduced, and they persist through the
> scalar replacement of aggregates pass and others. I can't seem to find
> a combination of passes or transformations to get rid of them. Has
> anyone had this problem before, and know a transformation to eliminate
> it?
2012 Aug 20
1
[LLVMdev] How to eliminate PHI nodes on pointer types?
On 08/20/2012 03:46 PM, Duncan Sands wrote:
> Hi Andrew,
>
>> Somewhere during optimization PHI nodes on pointer types (including
>> alloca instructions) are being introduced, and they persist through the
>> scalar replacement of aggregates pass and others. I can't seem to find
>> a combination of passes or transformations to get rid of them. Has
>> anyone
2014 Feb 01
2
[LLVMdev] Eliminate SSA Virtual registers
Hi Ben,
That did help. I continue to notice the virtual register in the program. I use LLVM 3.4. The program i am looking at is a very simple one. Listed below
int global_var;
int *global_ptr;
int32_t main(int32_t argc, char ** argv){
int p = 10;
int k = 20;
int *pp;
char *c_pp;
pp = &k;
global_ptr = pp;
pp = &p;
global_ptr = &global_var;
return 0;
}
BR/Nizam
2017 Dec 19
3
Register Allocation Graph Coloring algorithm and Others
Hi Leslie,
I suggest adding these 3 papers to your reading list.
Register allocation for programs in SSA-form
Sebastian Hack, Daniel Grund, and Gerhard Goos
http://www.rw.cdl.uni-saarland.de/~grund/papers/cc06-ra_ssa.pdf
Simple and Efficient Construction of Static Single Assignment Form
Matthias Braun , Sebastian Buchwald , Sebastian Hack , Roland Leißa , Christoph Mallon , and Andreas
2007 Aug 10
0
[LLVMdev] Reg2Mem pass
On Fri, 2007-08-10 at 00:51 -0500, Seung Jae Lee wrote:
> Hi, guys.
>
> I'm interested in using reg2mem pass but not sure about the concept of it.
> Can you let me know a reference about it, if any?
> Forgive my ignorance. -_-;
The reg2mem pass undoes SSA form. That is, it turns SSA registers into
alloca instructions with loads and stores.
>
> Thanks,
> Seung J.
2012 Aug 20
2
[LLVMdev] How to eliminate PHI nodes on pointer types?
Somewhere during optimization PHI nodes on pointer types (including
alloca instructions) are being introduced, and they persist through the
scalar replacement of aggregates pass and others. I can't seem to find
a combination of passes or transformations to get rid of them. Has
anyone had this problem before, and know a transformation to eliminate
it? My optimization passes rely on
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
2008 Jul 07
0
[LLVMdev] SSA or not SSA?
All register uses are SSA. Memory is not in SSA. The mem2reg pass
which promotes stack variables to registers effectively converts non-
SSA to SSA. There was a reg2mem pass, written by Andrew Lenharth, I'm
not sure if it's still being maintained.
On Jul 7, 2008, at 8:47 AM, Matthieu Moy wrote:
> Hi,
>
> Silly question from an LLVM newbie: the LLVM LRM say that the
2011 Jan 23
0
[LLVMdev] Undoing SSA and Phi instructions
On 01/22/2011 10:30 PM, Surinder wrote:
> Hi,
>
> I am emitting llvm bit code using
>
> llvm-gcc -c -emit-llvm -O0 -o test.bc test.c
>
> and then optimizing it with
>
> opt -O3 -print-module test.bc
>
> in order to obtain a dump of generated IR.
>
>
> The resulting code has Phi nodes and is perhaps in SSA form. I want
> to undo the SSA form while
2009 Sep 26
1
[LLVMdev] LLVM SSA
I tried using the mem2reg pass with opt,
e.g. opt -reg2mem x.bc > x2.bc
where x.bc was produced with:
llvm-gcc -O2 -emit-llvm -c x.c -o x.bc
This did not reduce the # of variables in x2.bc
I use -O2 because it produces the least # of instructions and hence the
least # of new SSA virtual registers.
Do you have a set of options to give to llvm-gcc or opt in mind ?
My goal is to take a .c
2017 Jul 06
3
[RFC][SVE] Supporting Scalable Vector Architectures in LLVM IR (take 2)
On 6 July 2017 at 23:13, Chris Lattner <clattner at nondot.org> wrote:
>> Yes, as an extension to VectorType they can be manipulated and passed
>> around like normal vectors, load/stored directly, phis, put in llvm
>> structs etc. Address computation generates expressions in terms vscale
>> and it seems to work well.
>
> Right, that works out through
2015 Apr 24
2
[LLVMdev] convert LLVM IR to another IR without SSA
Hi, Diego,
Thanks for your quick reply. Inserting a copy instruction may not work here
because I have a limitation of virtual register number. I need to assign
registers with ssa form to registers without ssa form. I will look the
source code you point out.
Thanks
Xiangyang
On Fri, Apr 24, 2015 at 4:19 PM, Diego Novillo <dnovillo at google.com> wrote:
>
>
> On Fri, Apr 24, 2015
2011 Dec 09
1
[LLVMdev] Greedy Register Allocation in LLVM 3.0
Hi Jakob,
After reading your blog article, I have some questions. :-) In [1], it says:
"It was an important design goal to make the algorithm as flexible as possible,
and to avoid introducing arbitrary constraints. It is possible to change machine
code and live ranges at any time. Simply evict the relevant live ranges, make
the change, and put them back on the queue."
Q1.
The
2011 Mar 31
0
[LLVMdev] LiveValues removal
LiveVariables is the optimized and tested way to get variable liveness
information (it's used by register allocation). Unfortunately it
requires a MachineFunction to work - so you'll either need to lower to
one of the built-in targets or add your own target to acquire access to
this pass.
Andrew
On 03/31/2011 12:28 PM, Carlo Alberto Ferraris wrote:
> I've read that LiveValues
2008 Aug 25
1
[LLVMdev] Un-SSA pass and cloning basic blocks
Hi,
Sorry if this question has been asked earlier:
Is the -reg2mem the pass to convert SSA form of LLVM IR to non-SSA
form (ie, eliminate all phi-functions from LLVM IR) ? I tried it with
a small example and it did remove all the phi function, I just wanted
to confirm that the pass guarantees to remove all phi functions. Also,
assuming I have this pass as a required pass, is it safe to clone
2010 Sep 20
0
[LLVMdev] Supporting Complex Register Allocation Constraints (PBQP Allocator Status Update)
On Sep 20, 2010, at 7:53 AM, Lang Hames wrote:
> I've just committed some changes to the PBQP allocator which are designed to make it easier to implement custom register allocation constraints. This is a quick summary of those changes, and of the status of the PBQP allocator in general.
Thanks, Lang!
Out of curiosity, how are you dealing with live range splitting and coalescing in PBQP?
2017 Feb 23
2
Bundling MachineInstr instructions before register allocation seems to always give errors
Hello.
I am having difficulties to bundle MachineInstr instructions, before register
allocation (RA).
More exactly, I registered a simple pass in addPreRegAlloc() that is trying to create
bundles.
I see that it is written at http://llvm.org/docs/CodeGenerator.html#machineinstr-bundles:
<<Packing / bundling of MachineInstr’s should be done as part of the register
2011 Mar 31
3
[LLVMdev] LiveValues removal
I've read that LiveValues has been removed from trunk. Did it bitrot or
was simply removed because a replacement is available?
If it's the former, what caused the bitrotting? If it's the latter,
what's the replacement? (I've found LiveVariables but I'm not sure it
can be used in a ModulePass).
b.r.
--
Carlo Alberto Ferraris <cafxx at strayorange.com
<mailto:cafxx