<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Natanael,<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 9, 2015, at 1:06 PM, Natanael Ramos <<a href="mailto:naelr8@gmail.com" class="">naelr8@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Good Afternoon.<br class=""><br class=""><span id="result_box" class="" lang="en"><span title="Sou um estudante de graduação em Ciência da Computação no Brasil e como trabalho de conclusão de curso, estou desenvolvendo um alocador de registradores, utilizando a infraestrutura da LLVM.

" class="">I am a Computer Science undergraduate student in Brazil and as 
completion of course work, I am developing an register allocator, using
 the infrastructure of the LLVM.<br class=""><br class=""></span><span title="Para realizar tal tarefa, tenho baseado minha implementação nos alocadores já implementados na LLVM." class="">To accomplish this task, I have based my implementation in allocators already implemented in LLVM. </span><span title="Porém, surgiu-me uma dúvida enquanto eu pesquisava em livros e artigos da teoria de compiladores e na própria documentação da LLVM, notei um passo importante na fase de otimização, que a desconstrução da forma SSA (PHI Elimination), pelo que tenho lido," class="">But
 a question came to me while I was researching in books and articles of 
compiler theory and own documentation of LLVM, I noticed an important 
step in the optimization phase, the deconstruction of form SSA (<b class="">PHI 
Elimination</b>), from what I've read, </span><span title="esse passo tem grande impacto na geração de código e pode ser feito antes ou depois da fase de alocação de registradores." class="">this step has great impact on the code generation and can be done before or after the register allocation phase. </span><span title="E pretendo implementar o alocador de registradores utilizando dos recursos da representação SSA, tornando esse passo (PHI Elimination) vital para o desenvolvimento.

" class="">And I intend to implement the allocator registers using the resources 
of SSA representation, making this step (<b class="">PHI Elimination</b>) vital for 
development.<br class=""><br class=""></span><span title="Olhando os códigos fonte dos alocadores da LLVM, não vejo nenhuma chamada explícita da PHI Elimination (AU.addRequiredID(PHIEliminationID)), minha dúvida é se caso esse passo seja chamado, quando e onde ocorre tal chamada?

" class="">Looking at the source code of allocators of LLVM, I see no explicit 
call of PHI Elimination (<i class=""><b class="">AU.addRequiredID (PHIEliminationID</b><b class="">)</b></i>), my 
question is whether if this step is called, occurs when and where such a
 call?</span></span><br clear="all" class=""></div></div></div></blockquote><div><br class=""></div><div>Yes, this pass is always called, but before register allocation. (Though the liveness information still uses the SSA form.)</div><div><br class=""></div>The pass is added in the pipeline in lib/CodeGen/Passes.cpp, see for instance: <span style="font-family: Menlo; font-size: 11px;" class="">TargetPassConfig::addOptimizedRegAlloc</span></div><div><br class=""></div><div>Cheers,</div><div>-Quentin<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><br class="">-- <br class=""><div class="gmail_signature">Natanael Ramos <br class="">Membro do corpo discente de Ciência da Computação pelo Instituto Federal de <br class="">Minas Gerais - Campus Formiga<br class=""><br class=""></div>
</div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:LLVMdev@cs.uiuc.edu" class="">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" class="">http://llvm.cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class=""></div></blockquote></div><br class=""></div></body></html>