Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] addRequired vs addPreserved"
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>();
2012 Aug 06
3
[LLVMdev] How to call some transformation passes (LoopRotate and LoopUnroll) from my own pass
Hello,
I wrote my own pass which needs to do some loop unrolling.
I can perform loop unrolling via opt:
opt -mem2reg -loops -loop-simplify -loop-rotate -lcssa -loop-unroll
-unroll-count=50 mytest.bc -o mytest.bc
This command works perfectly.
However, what I really want is to produce the **same behavior** but
from my own pass (i.e., I don't want to use opt). I wrote a Module
pass which
2015 Jul 29
1
[LLVMdev] Loop Dependence Analysis(getDistance())
Hi,
I am trying to use the DependenceAnalysis pass to get the Distance vector
for the innermost loop. I am in LLVM learing process. I have used the
following code inside my original code to get the distance vector. It is
not giving any syntax error but it is has some logical but and giving
segmentation fault.
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
2012 Aug 06
0
[LLVMdev] How to call some transformation passes (LoopRotate and LoopUnroll) from my own pass
On Aug 6, 2012, at 6:04 AM, Jorge Navas <navas at comp.nus.edu.sg> wrote:
>
> Hello,
>
> I wrote my own pass which needs to do some loop unrolling.
>
> I can perform loop unrolling via opt:
>
> opt -mem2reg -loops -loop-simplify -loop-rotate -lcssa -loop-unroll
> -unroll-count=50 mytest.bc -o mytest.bc
>
> This command works perfectly.
>
>
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
2011 Aug 22
1
[LLVMdev] Infinite loop when adding a new analysis pass
I am trying to add an analysis pass as a FunctionPass, and let LICM
(LoopPass) depends upon it. So in LICM.cpp, I have the following:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<DominatorTree>();
AU.addRequired<LoopInfo>();
AU.addRequiredID(LoopSimplifyID);
AU.addRequired<AliasAnalysis>();
2009 May 08
3
[LLVMdev] problem with analysis required
Hello,
I was trying to get the loop info in a module pass to be able to
iterate over the loops int the module itself. Since my pass requires
to make module level changes including adding new types to module
hence a looppass cannot be used here.
I am getting the following error on running opt.
opt: /root/llvm-2.4/include/llvm/PassAnalysisSupport.h:199:
AnalysisType&
2011 Dec 14
2
[LLVMdev] Adding dependency on MemoryDependenceAnalysis pass to LICM causes opt to get stuck in addPass
I'm attempting to add some support for hoisting/sinking of memory-using
intrinsics in loops, and so I want to use MemoryDependenceAnalysis in
LICM, but when I modify getAnalysisUsge to include this :
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<DominatorTree>();
AU.addRequired<LoopInfo>();
2012 Mar 23
3
[LLVMdev] Function Pass Manager
Hi,
I'm writing a function pass which is dynamically loaded by opt and I
need some analysis and passes to be run before my pass:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
AU.addPreserved<LoopInfo>();
AU.addRequiredID(LoopSimplifyID);
AU.addPreservedID(LoopSimplifyID);
2006 May 03
1
[LLVMdev] Patch for transform dependencies
Hi,
A number of transforms are actually independent, so here's a partial fix. I
updated the
dependencies in a cluster of transforms: LowerSwitch, Mem2Reg, LowerSelect,
LowerAllocations, UnifyFunctionExitNodes.
The patch has been tested, but not extensively. PassManager doesn't
complain, and
the result of a test pass that requires all these (except for
LowerAllocations) together
works
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
2012 Apr 12
0
[LLVMdev] Function Pass Manager
Hi again,
I come back to this issue with an example. It's a pass which does
nothing but throw the 'Unable to schedule' error.
namespace {
struct MyPass : public FunctionPass {
static char ID; // Pass identification, replacement for typeid
MyPass() : FunctionPass(ID) {
initializeMyPassPass(*PassRegistry::getPassRegistry());
}
virtual void
2013 Apr 03
1
[LLVMdev] YSU_Student
Hello,
I wrote my own pass which needs to do some loop unrolling.
I can perform loop unrolling via opt:
opt -mem2reg -loops -loop-simplify -loop-rotate -lcssa -loop-unroll
-unroll-count=50 mytest.bc -o mytest.bc
This command works perfectly.
However, what I really want is to produce the **same behavior** but
from my own pass (i.e., I don't want to use opt). I wrote a Module
pass which
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) {
2014 Apr 18
3
[LLVMdev] PassManager Woes
Ok, I've been struggling with this for two days and hopefully someone
can help me out.
I have a set of passes, analysis passes A, B, C, D and transformation
passes E and F.
Pass C depends on pass A and pass D depends on pass B. Pass E depends
on C and D and does not preserve any analysis pass. Pass F depeds on
pass A and pass C. Pass F runs after pass E.
Graphically the dependency graph
2011 Nov 10
3
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
LLVMers,
I am doing a CallGraphPass but would like to get the LoopInfo of the
functions inside this pass, is this possible? Currently I have a function
inside the CallGraph struct:
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
AU.addPreserved<LoopInfo>();
}
And later inside the pass I am calling:
LoopInfo &LI =
2012 Jul 05
3
[LLVMdev] "symbol lookup error" while running a Simple Loop Pass
Hello;
I wrote this simple loop pass to collect the number of instructions in each
loop of the program. The code is as follows-
#define DEBUG_TYPE "loopinst"
#include "llvm/Pass.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Instructions.h"
#include
2017 Oct 03
1
About LLVM Pass dependency
Hi Hongbin
I am not quite familiar with AnalysisUsage, let me correct question a bit.
I have read Writing Pass
<http://llvm.org/docs/WritingAnLLVMPass.html#specifying-interactions-between-passes>,
All examples that i see here are based on collecting information .i.e
Analysis Passes.
I wonder if this applies to Transformation passes also.
e.g.
void MyInliner::getAnalysisUsage(AnalysisUsage
2012 Mar 13
2
[LLVMdev] GPU thread/block/grid size contraints in LLVM PTX backend
but does it have default values ?
Thanks
Xin
On Tue, Mar 13, 2012 at 5:19 AM, Che-Liang Chiou <clchiou at gmail.com> wrote:
> You specify shader model, bit size and etc. arch-specified parameters
> though -march, -mattr and -mcpu, but AFAIK, PTX backend does not use
> the GPU thread/block/grid size information in optimization yet.
>
> On Mon, Mar 12, 2012 at 8:17 PM, Xin
2012 Jan 05
5
[LLVMdev] clang for opencl
I do not know too much about clang, is opencl publicly supported in
clang ? how about cuda ?
Thanks
Xin