Displaying 20 results from an estimated 33 matches for "promotememtoreg".
2004 Nov 29
2
[LLVMdev] Running specific passes
...lier).
> Alternatively, if you don't want to do that, you can build mem2reg into
> your pass if it works better. To do this, your pass needs to
> 'addRequired' DominatorTree and DominatorFrontier, then use the
> interfaces exposed through
> include/llvm/Transforms/Utils/PromoteMemToReg.h.
This still leaves the question of TargetData parameter -- which is not used by
the PromoteMemToReg function, AFAICT. Passing *(TargetData*)0 is dirty.
- Volodya
2011 Nov 08
4
[LLVMdev] loadable passes with dependencies?
Just shows me what I expect
void getAnalysisUsage(AnalysisUsage &AU) const {
DominatorTree *dt = &getAnalysis<DominatorTree>();
So I'm only using it for DominatorTree(so I can use PromoteMemToReg).
Thanks
On Tue, Nov 8, 2011 at 2:28 PM, Tobias Grosser <tobias at grosser.es> wrote:
> On 11/08/2011 07:33 PM, ret val wrote:
>>
>> Sorry to keep dragging this out on you. Im now getting: Assertion
>> failed: (ResultPass&& "getAnalysis*() called on an ana...
2004 Nov 29
0
[LLVMdev] Running specific passes
...tively, if you don't want to do that, you can build mem2reg into
> > your pass if it works better. To do this, your pass needs to
> > 'addRequired' DominatorTree and DominatorFrontier, then use the
> > interfaces exposed through
> > include/llvm/Transforms/Utils/PromoteMemToReg.h.
>
> This still leaves the question of TargetData parameter -- which is not used by
> the PromoteMemToReg function, AFAICT. Passing *(TargetData*)0 is dirty.
Just addRequired<TargetData>(), and pass in getAnalysis<TargetData>() as
appropriate.
-Chris
--
http://llvm.org/
h...
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
I still have the addRequired:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<DominatorTree>();
}
The other line
DominatorTree *dt = &getAnalysis<DominatorTree>();
Is for later use when I try to use PromoteMemToReg
On Tue, Nov 8, 2011 at 4:22 PM, Michael Ilseman <michael at lunarg.com> wrote:
> Something's different here, earlier in the thread you said you had:
> void getAnalysisUsage(AnalysisUsage &AU) const {
> AU.addRequired<DominatorTree>();
> }
> Now you...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
...he addRequired:
> virtual void getAnalysisUsage(AnalysisUsage&AU) const {
> AU.addRequired<DominatorTree>();
> }
>
> The other line
> DominatorTree *dt =&getAnalysis<DominatorTree>();
> Is for later use when I try to use PromoteMemToReg
Isn't DominatorTree a FunctionPass? If your pass is a ModulePass, you
need to pass a Function * or Function & to getAnalysis<>():
getAnalysis<DominatorTree>(F)
-- John T.
>
> On Tue, Nov 8, 2011 at 4:22 PM, Michael Ilseman<michael at lunarg.com> wrote:
>>...
2009 May 01
1
[LLVMdev] DominatorTrees, DominanceFrontiers, interfaces and cloning
...but I'm having some
problems with the llvm codebase.
I have two questions:
(1) Is there any way to clone a DominatorTree or DominanceFrontier
object, so that I can modify the cloned copy? It looks like Pass
makes the copy constructor private...
(2) Is there any reason why functions (such as PromoteMemToReg) accept
parameters of types DominatorTree and DominanceFrontier instead of
types DominatorTreeBase and DominanceFrontierBase? It seems to me
that they should accept the abstract interface instead of the
implementation (and avoid the extra baggage of a pass).
Having said that, I'm willing to h...
2004 Nov 26
0
[LLVMdev] Running specific passes
...39;opt
-yourpass -mem2reg'?
Alternatively, if you don't want to do that, you can build mem2reg into
your pass if it works better. To do this, your pass needs to
'addRequired' DominatorTree and DominatorFrontier, then use the
interfaces exposed through
include/llvm/Transforms/Utils/PromoteMemToReg.h.
-Chris
> use PassManager. Here's the code I ended up with:
>
> bool runOnFunction(llvm::Function& m)
> {
> visit(m);
>
> ExistingModuleProvider mp(m.getParent());
> FunctionPassManager pm(&mp);
>...
2011 Nov 09
1
[LLVMdev] loadable passes with dependencies?
...ual void getAnalysisUsage(AnalysisUsage&AU) const {
>> AU.addRequired<DominatorTree>();
>> }
>>
>> The other line
>> DominatorTree *dt =&getAnalysis<DominatorTree>();
>> Is for later use when I try to use PromoteMemToReg
>
> Isn't DominatorTree a FunctionPass? If your pass is a ModulePass, you need
> to pass a Function * or Function & to getAnalysis<>():
>
> getAnalysis<DominatorTree>(F)
>
> -- John T.
>
>>
>> On Tue, Nov 8, 2011 at 4:22 PM, Michael Ilseman&l...
2004 Nov 26
2
[LLVMdev] Running specific passes
Hello,
in the implementation of some analysis, I need to change the program and then
invoke Mem2Reg pass. That pass, in turn, requires other analysis, so I must
use PassManager. Here's the code I ended up with:
bool runOnFunction(llvm::Function& m)
{
visit(m);
ExistingModuleProvider mp(m.getParent());
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
...:50 PM, ret val <retval386 at gmail.com> wrote:
> Just shows me what I expect
> void getAnalysisUsage(AnalysisUsage &AU) const {
> DominatorTree *dt = &getAnalysis<DominatorTree>();
>
> So I'm only using it for DominatorTree(so I can use PromoteMemToReg).
>
> Thanks
>
> On Tue, Nov 8, 2011 at 2:28 PM, Tobias Grosser <tobias at grosser.es> wrote:
> > On 11/08/2011 07:33 PM, ret val wrote:
> >>
> >> Sorry to keep dragging this out on you. Im now getting: Assertion
> >> failed: (ResultPass&&...
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
I'm writing a Pass that I would like to remain loadable by opt. The
pass also requires DominatorTree(for PromoteMemToReg).
Looking for examples the only way I found to require a dependecny is
by doing something like this:
char Hello::ID = 0;
namespace llvm { void initializeHelloPass(llvm::PassRegistry&); }
INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello World Pass", false...
2013 Mar 03
2
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
...'m not supposed to reply to all.
Are you saying all PHI nodes are required to include all its predecessor
blocks no matter they have input or not?
What about successor blocks? Are they optional if they don't provide inputs?
BTW, where should I look at to verify this, the mem2reg.cpp &
PromoteMemToReg.cpp?
Thanks a lot.
On Sat, Mar 2, 2013 at 6:39 PM, Caldarale, Charles R <
Chuck.Caldarale at unisys.com> wrote:
> > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> > On Behalf Of Wei Dang
> > Subject: [LLVMdev] Question about method
> Code...
2008 Oct 07
0
[LLVMdev] mem2reg optimization
...round loads and stores?
> I
> fully understand the design goal to arbitrarily reorder other passes but
> for
> mem2reg it actually seems vital to run it as the first pass to make all
> other passes useful.
In addition to the mem2reg pass, the underlying logic is also
exposed via the PromoteMemToReg utility routine, for use in
other passes. In the same way that mem2reg frees front-ends from
having to compute SSA form, PromoteMemToReg can be used by
transformation passes that wish to insert or modify code without
having to jump through SSA hoops themselves. An example of a pass
that uses mem2re...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
On 11/08/2011 08:50 PM, ret val wrote:
> Just shows me what I expect
> void getAnalysisUsage(AnalysisUsage&AU) const {
> DominatorTree *dt =&getAnalysis<DominatorTree>();
>
> So I'm only using it for DominatorTree(so I can use PromoteMemToReg).
Interesting. Is the same assert triggered when you use RegisterPass to
register the pass? Is getAnalysisUsage() called at all?
My definition of getAnalysisUsage looks like:
virtual void getAnalysisUsage(AnalysisUsage &AU) const
^^^^^^^
Why do you omit the 'virtual'?
Cheers
Tobi
2003 Aug 13
1
[LLVMdev] Running a pass
...he Mem2Reg pass on a function without using the the LLVM opt utility. I wrote some code, which I am not sure is correct:
TS_ASSERT(!verifyFunction(*function));
// find the dominance frontier of the CFG
DominanceFrontier DF;
DF.runOnFunction(*function);
// try to promote stack allocated variables
PromoteMemToReg(function->getRegAllocas(), DF, *tgt_data);
function->print(std::cout);
TS_ASSERT(!verifyFunction(*function));
Is this supposed to work? Or what is the preferred way passes
are to be run on functions? With the above code, my program
crashes even before main(), when doing some static
initial...
2004 Nov 30
3
[LLVMdev] Running specific passes
...39;t want to do that, you can build mem2reg into
> > > your pass if it works better. To do this, your pass needs to
> > > 'addRequired' DominatorTree and DominatorFrontier, then use the
> > > interfaces exposed through
> > > include/llvm/Transforms/Utils/PromoteMemToReg.h.
> >
> > This still leaves the question of TargetData parameter -- which is not
> > used by the PromoteMemToReg function, AFAICT. Passing *(TargetData*)0 is
> > dirty.
>
> Just addRequired<TargetData>(), and pass in getAnalysis<TargetData>() as
> appro...
2013 Mar 03
0
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
...9;t provide inputs?
The question doesn't make sense; we're only concerned with the predecessors here. If you have a loop, some successor (possibly the block of interest) is also a predecessor and must conform to SSA usage.
> where should I look at to verify this, the mem2reg.cpp & PromoteMemToReg.cpp?
It's an inherent characteristic of SSA:
http://en.wikipedia.org/wiki/Static_single_assignment_form
(or any of numerous textbooks and papers).
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient....
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
On 11/08/2011 03:20 AM, ret val wrote:
> I'm writing a Pass that I would like to remain loadable by opt. The
> pass also requires DominatorTree(for PromoteMemToReg).
>
> Looking for examples the only way I found to require a dependecny is
> by doing something like this:
> char Hello::ID = 0;
> namespace llvm { void initializeHelloPass(llvm::PassRegistry&); }
> INITIALIZE_PASS_BEGIN(Hello, "hello", &qu...
2009 Aug 05
2
[LLVMdev] Dominator error inserting instructions into BasicBlock
Hi,
I've been writing some optimization passes for LLVM and had good luck
with
the simple stuff, but I am running into all kinds of trouble trying to
make copies of variables within a BasicBlock as part of a LoopPass
I am trying to make copies of the variables that are in scope in the
loop body like so:
//Remove the existing terminator
2007 May 29
4
[LLVMdev] Code generation issues
...6-->391 of
PromoteMemoryToRegister.cpp when in the control flow of -scalarrepl:
#4 0x08764f72 in (anonymous namespace)::PromoteMem2Reg::run
(this=0xbff9bfa0)
at /home/bram/workspace/svn/aspicere2/trunk/llvm/lib/Transforms/
Utils/PromoteMemoryToRegister.cpp:271
#5 0x08767021 in llvm::PromoteMemToReg (Allocas=@0xbff9c120,
ET=@0x8b14c10, DF=@0x8b14d98, AST=0x0)
at /home/bram/workspace/svn/aspicere2/trunk/llvm/lib/Transforms/
Utils/PromoteMemoryToRegister.cpp:812
#6 0x08744713 in (anonymous namespace)::SROA::performPromotion
(this=0x8b14f38, F=@0x8bc8468)
at /home/bram/workspace/s...