Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] About adding a pass into llvm"
2011 Jan 18
1
[LLVMdev] adding a codegen pass into llvm
Thanks for your last reply.
Could I understand the way to adding a pass (built into the llvm rather than
dynamic loadable) includes:
1. Declaring a creator function for this pass
2. Implementing the creator function for this pass
3. Instantiating this pass and get a object of it
3. Register this pass into the PassRegistry
Then, for a built-into bytecode pass,
task 1(declaration of the
2015 Oct 09
2
Get instance of CallGraph of a module in the pass
Hello,
I want an instance of CallGraph in my pass. By looking at -dot-callgraph
source, I've tried something like this:
CallGraphWrapperPass *CGWP = new CallGraphWrapperPass();
PM.add(CGWP);
CallGraph *CG = &CGWP->getCallGraph();
PM.add(new MyPass(CG));
I get the following error:
/home/riyad/installs/llvm-3.7.0/include/llvm/PassSupport.h:95:38: error: no
matching constructor for
2011 Jan 12
0
[LLVMdev] About adding a pass into llvm, cont
Hi,
Thanks for your last reply.
Could I understand the way to adding a pass (built into the llvm rather than
dynamic loadable) includes:
1. Declaring a creator function for this pass
2. Implementing the creator function for this pass
3. Instantiating this pass and get a object of it
3. Register this pass into the PassRegistry
Then, for a built-into bytecode pass,
task 1(declaration of
2010 Oct 06
2
[LLVMdev] Segmentation Fault of BasicCallGraph?
Hi,
I did a little experiment, basically to extract implemented CallGraph
to be a "new" pass with different registered name, and run the "new"
pass, but the result always gives out Segmentation Fault... I am
probably missing
sth?
Implemented another new class,
class BasicCallGraph2 : public ModulePass, public CallGraph {
.....
...
}
The inside code is exact same as
2016 Mar 22
1
Passing llvm option -mem2reg to clang
Unless mem2reg does something other than my understanding of it, I can't
see why any pass would "require" that... It is not guaranteed to do
anything to any particular piece of code, so relying on it seems very
unreliable, I would think.
--
Mats
On 22 March 2016 at 04:32, Kevin Hu via llvm-dev <llvm-dev at lists.llvm.org>
wrote:
> Hi,
>
> > Is there any way that
2010 Oct 07
0
[LLVMdev] Segmentation Fault of BasicCallGraph?
Shuying Liang wrote:
> Hi,
>
> I did a little experiment, basically to extract implemented CallGraph
> to be a "new" pass with different registered name, and run the "new"
> pass, but the result always gives out Segmentation Fault... I am
> probably missing
> sth?
>
> Implemented another new class,
> class BasicCallGraph2 : public ModulePass,
2009 Jun 05
1
[LLVMdev] Analysis Pass
Hi,
I am trying to set a prerequisite pass.
void PassName::getAnalysisUsage(AnalysisUsage &AU) const
{
AU.setPreservesAll();
AU.addRequired<LiveVariables>();
}
But when i am running the pass with the opt i get this error:
undefined symbol: _ZN4llvm13LiveVariables2IDE
If you need more information ...
Thank you.
-------------- next part --------------
An HTML
2011 Sep 23
3
[LLVMdev] statically link pass to clang
Hi all,
A question about statically linking a pass to clang instead of dynamically
loading it at runtime. I am stumped on this bug for a while. I inserted a
pass under lib/Transforms/mypass directory, registered it with
INITIALIZE_PASS and defined createMyPass in the pass. Also I added file
mypass.h in include/llvm/Transforms/ to expose the accessor functions that
expose my passes. Entries are
2010 Jul 23
0
[LLVMdev] Controlling the order of a FunctionPass
Trevor Harmon wrote:
> On Jul 22, 2010, at 2:05 PM, John Criswell wrote:
>
>
>> If you write your pass as a ModulePass, then you can iterate over the
>> functions in any order that you want.
>>
>
> I had considered that, but my FunctionPass depends on other passes
> processing the functions first:
>
Two things to consider:
1) The PassManager
2012 Oct 30
1
[LLVMdev] Error when trying to chain two llvm transform passes
On Oct 30, 2012, at 3:15 PM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:
> On 10/30/2012 4:10 PM, Ashwin kumar wrote:
>>
>> Assertion failed: (PI && "Expected required passes to be initialized"),
>> function schedulePass, file PassManager.cpp, line 597.
>>
>>
>> I register the passes using RegisterPass function call.
2010 Jul 22
3
[LLVMdev] Controlling the order of a FunctionPass
On Jul 22, 2010, at 2:05 PM, John Criswell wrote:
> If you write your pass as a ModulePass, then you can iterate over the
> functions in any order that you want.
I had considered that, but my FunctionPass depends on other passes
processing the functions first:
void MyPass::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<UnifyFunctionExitNodes>();
2016 Mar 22
2
Passing llvm option -mem2reg to clang
I have used the following command for my pass (without -mem2reg):
clang -Xclang -load -Xclang MYPASS.so -c ../../tests/test1.c
For mem2reg, I tried the following:
clang -mllvm -mem2reg -Xclang -load -Xclang MYPASS.so -c ../../tests/test1.c
On Mon, Mar 21, 2016 at 9:26 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
>> On Mar 21, 2016, at 6:23 PM, Syed Rafiul Hussain
2013 Jun 14
2
[LLVMdev] Pass Schedule Error
I've been puzzling over this for a day:
Unable to schedule 'Unnamed pass: implement Pass::getPassName()'
required by '<some pass>'
Unable to schedule pass
UNREACHABLE executed at llvm/lib/VMCore/PassManager.cpp:1213!
First, why can't getPassName find the name? I have provided one in the
usual way. Second, why is it unable to schedule the pass?
-debug-pass=Details
2011 May 30
1
[LLVMdev] about writing a functionpass requiring a modulepass
---------- Forwarded message ----------
From: Qingan Li <ww345ww at gmail.com>
Date: 2011/5/30
Subject:
To: llvmdev at cs.uiuc.edu
Hi,
I wrote an analysis pass, myPass, inherited from both ModulePass and
ProfileInfo, and this pass requires the CallGraph, i.e.,
* class myPass : public ModulePass, public ProfileInfo { ...};*
* void myPass::getAnalysisUsage(AnalysisUsage &AU) const
2013 Jun 14
0
[LLVMdev] Pass Schedule Error
On Jun 14, 2013, at 1:12 PM, dag at cray.com wrote:
> I've been puzzling over this for a day:
>
> Unable to schedule 'Unnamed pass: implement Pass::getPassName()'
> required by '<some pass>'
> Unable to schedule pass
> UNREACHABLE executed at llvm/lib/VMCore/PassManager.cpp:1213!
>
> First, why can't getPassName find the name? I have
2009 Oct 05
0
[LLVMdev] [Fwd: Re: problem with multiple LLVM passes]
Rakesh Komuravelli wrote:
> Hi John,
>
> I am having the exact same problem. Let me answer the four questions
> that you have asked..
>
> 1) Are both passes included in the same dynamic library? If not, are
> you loading their respective libraries with multiple -load options?
>
> Yes. I load both the libraries with two -load options. I see both the
> passes listed
2018 Sep 26
2
Liveness Analysis
So what is the status about LiveVariables. Is there a plan to remove it?
After searching in old lvm-dev-mails it is mentioned that LiveVariable
still exists due to one pass needing it. And a comment in
TargetPassConfig.cpp indicates that the pass in question is
TwoAddressInstruction:
// FIXME: Once TwoAddressInstruction pass no longer uses kill flags,
// LiveVariables can be removed
2014 Sep 29
2
[LLVMdev] questions about getAnalysisUsage
Hi,
I notice that there are several different methods called inside
getAnalysisUsage(). The parameters of addRequiredID and addPreservedID
are passID. What is the difference between Required and Preserved? There
are also function named addRequired<PassName>() called. What is the
difference between addRequired<PassName>() and addRequiredID(PassID)?
Thanks a lot!
Best,
2005 Sep 07
3
[LLVMdev] LiveIntervals invalidates LiveVariables?
I though LiveVariables may be invalidated by LiveIntervals, but it's
declared not:
void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const
{
AU.addPreserved<LiveVariables>();
AU.addRequired<LiveVariables>();
...
LiveInterval may coalesce virtual registers and remove identity moves
instructions:
bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
2004 Sep 02
0
[LLVMdev] Problem with CVS LLVM build in obj != src dir case
I resend email with updated (after mass header move) log examples.
> LLVM build without big problems in obj dir == src dir case (for example,
> last night tester build)
> But I have problem with building CVS version LLVM in obj dir != src dir
> case.
>
gmake[1]: Entering directory
`/usr/home/wanderer/pkg/build/llvm/obj/projects'
gmake[2]: Entering directory