Displaying 6 results from an estimated 6 matches for "mylooppass".
Did you mean:
looppass
2010 Nov 17
1
[LLVMdev] L->isLoopInvariant giving wrong results?
my changed code.
namespace {
class MyLoopPass:public LoopPass {
bool changed;
public:
static char ID;
Loop* curLoop;
// AnalysisType* AA;
DominatorTree* DT;
LoopInfo* LI;
MyLoopPass() : LoopPass(ID){}
bool isLoopInvariantInst(Instruction &I) ;
bool runOnLoop(Loop * L, LPPassManager &lpm);
virtual void getAnalysisUsag...
2010 Nov 17
0
[LLVMdev] L->isLoopInvariant giving wrong results?
i am getting seg fault on functions like I->eraseFromParent also.
I'm assuming that the problem comes when i change the loop structure.
On Thu, Nov 18, 2010 at 4:05 AM, Sreeraj a <writetosrj at gmail.com> wrote:
> The funny thing is that i am manually able to hoist the Loop invariant
> instruction to the basicBlock terminator, by editing the human readable form
> and then
2010 Nov 17
2
[LLVMdev] L->isLoopInvariant giving wrong results?
The funny thing is that i am manually able to hoist the Loop invariant
instruction to the basicBlock terminator, by editing the human readable form
and then using llvm-as to convert it into bytecode.
On Thu, Nov 18, 2010 at 4:01 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On Nov 17, 2010, at 1:38 PM, Sreeraj a wrote:
>
> > Thanks Chris,
> >
> > I was
2010 Nov 17
2
[LLVMdev] L->isLoopInvariant giving wrong results?
Hi,
I'm trying to write a simple pass to print out Loop invariant instructions,
using the
Loop::isLoopInvariant(Instruction *I)
function. it is giving me false value on instructions which should be loop
invariant.
the code i am using is:
bool MyLoopPass::runOnLoop(Loop * L, LPPassManager &lpm){
BasicBlock* lat=L->getLoopLatch();
for (BasicBlock::iterator i = lat->begin(), e = lat->end(); i != e; ++i){
Instruction* hijk= i;
if(L->isLoopInvariant(hijk))
errs() << "hurray " << *hijk << " is loo...
2010 Nov 17
0
[LLVMdev] L->isLoopInvariant giving wrong results?
...ant method just works for scalar operations like 'add' and 'multiply'. It doesn't apply to memory operations, because hoisting them requires more analysis (e.g. mod-ref analysis for the rest of the loop). Please see the LICM pass to see how to do this.
-Chris
>
> bool MyLoopPass::runOnLoop(Loop * L, LPPassManager &lpm){
> BasicBlock* lat=L->getLoopLatch();
> for (BasicBlock::iterator i = lat->begin(), e = lat->end(); i != e; ++i){
> Instruction* hijk= i;
> if(L->isLoopInvariant(hijk))
> errs() << "hurray " <<...
2010 Nov 17
2
[LLVMdev] L->isLoopInvariant giving wrong results?
...ations like 'add' and
> 'multiply'. It doesn't apply to memory operations, because hoisting them
> requires more analysis (e.g. mod-ref analysis for the rest of the loop).
> Please see the LICM pass to see how to do this.
>
> -Chris
>
> >
> > bool MyLoopPass::runOnLoop(Loop * L, LPPassManager &lpm){
> > BasicBlock* lat=L->getLoopLatch();
> > for (BasicBlock::iterator i = lat->begin(), e = lat->end(); i != e;
> ++i){
> > Instruction* hijk= i;
> > if(L->isLoopInvariant(hijk))
> >...