Displaying 20 results from an estimated 65 matches for "initialize_pass".
2015 Aug 21
2
Guidelines for pass initialization?
...hem? So, if you
have a pass which isn't part of LLVM itself, you should prefer
RegisterPass? Seems to make sense. Is there also an implicit
assumption here that any RegisterPass pass is a leaf in the dependency
graph? i.e. you couldn't use this to define your own Analysis?
>
> INITIALIZE_PASS is used for a pass that is a leaf in the dependency graph, whereas INITIALIZE_PASS_BEGIN is used for interior nodes.
Almost all transform passes - with the exception of LoopSimplify and the
like - do not have passes which require them. As a result, most
transform passes are leaves in the depende...
2011 Jan 12
1
[LLVMdev] About adding a pass into llvm
I have seen
INITIALIZE_PASS(LiveVariables, "livevars", "Live Variable Analysis", false,
false);
in the llvm/lib/codegen/LiveVariables.cpp, where LiveVariables is a subclass
of MachineFunctionPass, and
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis) \
static RegisterPass<passName> passNa...
2011 May 16
2
[LLVMdev] InstructionCombining.cpp inconsistency in whether it modifies the CFG?
InstCombine says in its getAnalysisUsage that it preserves the CFG,
but for the 4th argument in its INITIALIZE_PASS call, it says false,
which I believe corresponds to whether it preserves the CFG. Is this a
mistake, or is there deeper meaning here?
InstructionCombining.cpp:73-82
char InstCombiner::ID = 0;
INITIALIZE_PASS(InstCombiner, "instcombine",
"Combine redundant instructio...
2015 Aug 21
2
Guidelines for pass initialization?
Does anyone know what the guidelines are supposed to be for properly
initializing a pass? Looking around, we seem to have three styles of
pass registration in use.
INITIALIZE_PASS(...)
INITIALIZE_PASS_BEGIN(...)
INITIALIZE_PASS_DEPENDENCY(...)
...
INITIALIZE_PASS_END(...)
static RegisterPass<FooPass> X(...);
(This is the one encouraged in the docs, but seemingly the least widely
used in tree?)
As far as I can tell, these often appear to work interchangeably. (At
l...
2011 May 16
2
[LLVMdev] Upgrading to llvm-2.9
Hi,
Is the RegisterPass interface still supported, or do we have to use the
INITIALIZE_PASS construct to register passes?
Thanks,
Arushi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110516/98bc0ab0/attachment.html>
2011 May 16
0
[LLVMdev] Upgrading to llvm-2.9
...using namespace llvm;
namespace {
class Foo : public ModulePass {
public:
static char ID;
Foo() : ModulePass(ID) {
initializeFooPass(*PassRegistry::getPassRegistry());
}
bool runOnModule(Module& M) {
M.dump();
return false;
}
};
}
char Foo::ID = 0;
INITIALIZE_PASS(Foo, "foo", "DUMP MODULE", false, false)
I have the above pass written for llvm 2.9. When I load the module with opt,
I get
Unknown command line argument '-foo'.
Am I missing some intialization step.
Thanks,
Arushi
~
On Mon, May 16, 2011 at 11:33 AM, Arushi Aggarwal...
2011 May 16
0
[LLVMdev] InstructionCombining.cpp inconsistency in whether it modifies the CFG?
Hi Michael,
> InstCombine says in its getAnalysisUsage that it preserves the CFG,
> but for the 4th argument in its INITIALIZE_PASS call, it says false,
> which I believe corresponds to whether it preserves the CFG.
that argument should be set to true if the pass only looks at the CFG, i.e.
whatever it computes/does is only a function of the CFG, and doesn't otherwise
depend on what particular instructions make up the f...
2013 Jun 24
0
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
I try to use INITIALIZE_PASS instead of RegisterPass<> to register my pass,
though I don't understand what's their difference and how it works because
its documents doesn't exist. But it still doesn't work.
Parts of my codes is as follows:
in NVPTXTest.h
namespace llvm {
void initializeNVPTXTestPass(...
2016 May 04
3
status of IPO/IPCP?
...e createXYZPass path.
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp
index b3ee499..8d70b98 100644
--- a/lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -253,7 +253,9 @@ char IPCP::ID = 0;
INITIALIZE_PASS(IPCP, "ipconstprop",
"Interprocedural constant propagation", false, false)
-ModulePass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
+ModulePass *llvm::createIPConstantPropagationPass() {
+ llvm_unreachable("fnord");
+}
bool IPC...
2013 Mar 15
2
[LLVMdev] write a simple MachineFunctionPass
...es:
opt: PassManager.cpp:638: void
llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI &&
"Expected required passes to be initialized"' failed.
So I have to initialize the pass. But in my all other passes I did not any
initialization and I don't want to use INITIALIZE_PASS since I have to
recompile the llvm file that is keeping the pass registration... Is there a
way to keep using static RegisterPass for a MachineFunctionPass ? I mention
that if I change to FunctionPass, I have no problems and that is weird..
Thank you for any advice !
-------------- next part -----...
2013 Jun 22
2
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
I write my pass in a mix way of NVPTXAllocaHoisting, NVPTXSplitBBatBar and
transforms/Hello.
The following is part of the codes:
in NVPTXTargetMachine.cpp
bool NVPTXPassConfig::addPreEmitPass()
{
addPass(createTest());
return false;
}
in NVPTXTest.h
namespace llvm{
2013 Mar 15
0
[LLVMdev] write a simple MachineFunctionPass
...: void
> llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI &&
> "Expected required passes to be initialized"' failed.
>
>
> So I have to initialize the pass. But in my all other passes I did not any
> initialization and I don't want to use INITIALIZE_PASS since I have to
> recompile the llvm file that is keeping the pass registration... Is there a
> way to keep using static RegisterPass for a MachineFunctionPass ? I mention
> that if I change to FunctionPass, I have no problems and that is weird..
>
> Thank you for any advice !
>
&...
2011 Jan 18
1
[LLVMdev] adding a codegen pass into llvm
...n of the creator) should be done in Scalar.h;
task 2(implementation of the creator) should be done the related
mypass.cpp file;
task 3(instantiation of the pass class) should be done in
LinkAllPasses.h;
task 4(registration of the pass into the PassRegistry) should be
done by INITIALIZE_PASS
class LiveVariables : public MachineFunctionPass is a case of point.
For a built-into codegen/MachineCode pass,
task 1 should be done in Passes.h;
task 2 should be done in the related mypass.cpp file;
task 3 should be done in LLVMTargetMachine.cpp
task 4 should be d...
2010 Jul 21
0
[LLVMdev] API CHANGE: RegisterPass going away
...at link against them), I'm going to be eliminating the RegisterPass class. They will be replaced with an initialization-function based system that I will detail in a future email.
But, for now, what you need to know is that these classes are going away, and are being replaced with a new macro INITIALIZE_PASS(). I will be applying this change to LLVM HEAD shortly.
You can update you code as follows:
static RegisterPass<GVN> X("arg", "My Pass's Name", CFGOnly, IsAnalysis);
becomes:
INITIALIZE_PASS(GVN, "arg", "My Pass's Name", CFGOnly, IsAnalysi...
2010 Aug 12
1
[LLVMdev] Compile error for the Hello pass example
...I got the compile
errors:
Hello.cpp:20: error: expected identifier before string constant
Hello.cpp:20: error: expected ',' or '...' before string constant
Hello.cpp:20: error: expected constructor, destructor, or type conversion
before ';' token
which is the line "INITIALIZE_PASS(Hello, "Hello", "Hello World Pass",
false, false);" in the code. Could any one help me with this? Thank you
very much!
Best,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20...
2015 Sep 27
2
Registering a MachineFunctionPass
Dear all,
I wrote a machine function pass to run with llc. But I get this error while building:
"/home/erdem/llvm/lib/CodeGen/CodeGen.cpp:80: error: undefined reference to 'llvm::initializeNoopInserterPass(llvm::PassRegistry&)'"
NoopInserter is the name of my pass. I already added this line to InitializePasses.h: "void
2015 Sep 28
2
Registering a MachineFunctionPass
I had INITIALIZE_PASS_BEGIN and INITIALIZE_PASS_END macros. I replaced them with INITIALIZE_PASS but I get the same error. If I understand correctly, I need to modify Passes.h, InitializePasses.h, and Codegen.cpp files to register my pass, right? Another question is: Is it necessary to have the createNoopInserterPass fu...
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 added in include/llvm/LinkAllPasses.h to force
pass linking. The archive files of my passes are added to LINK_COMPONENTS in
the Makefiles...
2016 May 03
2
status of IPO/IPCP?
The pass is pretty rudimental (as the comment at the top of the file
hints), and it seems LLVM already has IPSCCP (which should do a better
job at interprocedural constant propagation).
I'm also not entirely sure it's used anywhere.
Is there any reason to keep it around?
Thanks,
--
Davide
"There are no solved problems; there are only problems that are more
or less solved" --
2011 Jan 12
0
[LLVMdev] About adding a pass into llvm, cont
...f the creator) should be done in Scalar.h;
task 2(implementation of the creator) should be done the related
mypass.cpp file;
task 3(instantiation of the pass class) should be done in
LinkAllPasses.h;
task 4(registration of the pass into the PassRegistry) should be
done by INITIALIZE_PASS
class LiveVariables : public MachineFunctionPass is a case of point.
For a built-into codegen/MachineCode pass,
task 1 should be done in Passes.h;
task 2 should be done in the related mypass.cpp file;
task 3 should be done in LLVMTargetMachine.cpp
task 4 should...