search for: block_end

Displaying 20 results from an estimated 47 matches for "block_end".

2014 May 02
2
[LLVMdev] An unexpected behavior in RegionInfo's block_iterator
...even a sequence of basic blocks. So maybe the above degenerated case is considered "will never happen"? ... ... BasicBlock *BB = Func.getARandomBasicBlock; Region *R = new Region(BB, BB, RI, DT); for (Region::block_iterator i = R->block_begin(), e = R->block_end(); i != e; ++i) { errs() << (*i)->getName() << "\n"; } ... ... Best Regards, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140502/aaf19ef1/attachment.h...
2011 Oct 14
0
[LLVMdev] BasicBlock succ iterator
...sicBlock> (termInst->getOperand(i)); if (bb == header) { termInst->setOperand(i,newBlock); } } }* * cout << "begin to delete loop" << endl; for (Loop::block_iterator bi = L->block_begin(), bi2; bi != L->block_end(); bi = bi2) { bi2 = bi; bi2++; BasicBlock * BB = *bi; for (BasicBlock::iterator ii = BB->begin(), ii2; ii != BB->end(); ii= ii2) { ii2 = ii; ii2++; Instruction *inst = ii; inst->replaceAllUsesWith(...
2012 Jul 05
3
[LLVMdev] "symbol lookup error" while running a Simple Loop Pass
...blic LoopPass { static char ID; // Pass identification, replacement for typeid LoopInst() : LoopPass(ID) {} virtual bool runOnLoop(Loop *L, LPPassManager &LPM) { LoopInfo *LI = &getAnalysis<LoopInfo>(); for (Loop::block_iterator b = L->block_begin(), be = L->block_end();b != be; ++b) { for (BasicBlock::iterator i = (*b)->begin(), ie = (*b)->end(); i != ie; ++i) { ++LoopInstNum; errs() << "Hello: "; } } return false; } // We don't modify the program, so we preserve all analyses virtual void getAnalysisUsag...
2007 Sep 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_scope.c libswfdec/swfdec_as_scope.h libswfdec/swfdec_as_script_function.c
...= frame->pc; - check_scope = TRUE; + check_block = TRUE; while (context->state < SWFDEC_AS_CONTEXT_ABORTED) { - if (pc == endpc) { - swfdec_as_frame_return (frame, NULL); - goto start; + if (check_block && (pc < frame->block_start || pc >= frame->block_end)) { + SWFDEC_LOG ("code exited block"); + swfdec_as_frame_check_block (frame); + pc = frame->pc; + if (frame != context->frame) + goto start; } if (pc < startpc || pc >= endpc) { SWFDEC_ERROR ("pc %p not in valid range [%p, %p) anymore...
2011 Oct 06
1
[LLVMdev] replacing a global variable by a constant
I would delete the Loop. I used the following code. cout << "begin to delete loop" << endl; for (Loop::block_iterator bi = L->block_begin(), bi2; bi != L->block_end(); bi = bi2) { bi2 = bi; bi2++; BasicBlock * BB = *bi; for (BasicBlock::iterator ii = BB->begin(), ii2; ii != BB->end(); ii= ii2) { ii2 = ii; ii2++; Instruction *inst = ii; inst->eraseFromParent(); }...
2012 Dec 01
0
[LLVMdev] [RFC] "noclone" function attribute
...afeToClone - Return true if the loop body is safe to clone in practice. /// Routines that reform the loop CFG and split edges often fail on indirectbr. bool Loop::isSafeToClone() const { // Return false if any loop blocks contain indirectbrs. for (Loop::block_iterator I = block_begin(), E = block_end(); I != E; ++I) { if (isa<IndirectBrInst>((*I)->getTerminator())) return false; } return true; } Maybe a similar interface could be added to Instruction, and an instruction would declare itself unsafe to clone if it was a call to a function with the attribute that yo...
2023 Jun 19
9
[PATCH v2 0/5] clean up block_commit_write
Changelog: v1--v2: 1. Re-order patches to avoid breaking compilation. Bean Huo (5): fs/buffer: clean up block_commit_write ext4: No need to check return value of block_commit_write() fs/ocfs2: No need to check return value of block_commit_write() udf: No need to check return value of block_commit_write() fs/buffer.c: convert block_commit_write to return void fs/buffer.c
2007 Oct 28
1
9 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_object.c libswfdec/swfdec_codec_gst.c test/trace
...c/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@@ -856,16 -856,16 +856,12 @@@ start check_block = TRUE; while (context->state < SWFDEC_AS_CONTEXT_ABORTED) { - while (context->exception && frame->blocks->len > 0) { - frame->pc = frame->block_end; - swfdec_as_frame_check_block (frame); - pc = frame->pc; - } - // in case of an exception, skip blocks until exception is cleared or we - // run out of blocks - while (context->exception && frame->blocks->len > 0) { - frame->pc = frame-&g...
2007 Oct 26
0
3 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c
...check_block = TRUE; while (context->state < SWFDEC_AS_CONTEXT_ABORTED) { + // in case of an exception, skip blocks until exception is cleared or we + // run out of blocks while (context->throwing && frame->blocks->len > 0) { frame->pc = frame->block_end; swfdec_as_frame_check_block (frame); diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 3ab6fc0..cf41ff0 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -2543,6 +2543,7 @@ swfdec_action_throw (SwfdecAsContext *cx, guint...
2012 Jul 05
0
[LLVMdev] "symbol lookup error" while running a Simple Loop Pass
...blic LoopPass { static char ID; // Pass identification, replacement for typeid LoopInst() : LoopPass(ID) {} virtual bool runOnLoop(Loop *L, LPPassManager &LPM) { LoopInfo *LI = &getAnalysis<LoopInfo>(); for (Loop::block_iterator b = L->block_begin(), be = L->block_end();b != be; ++b) { for (BasicBlock::iterator i = (*b)->begin(), ie = (*b)->end(); i != ie; ++i) { ++LoopInstNum; errs() << "Hello: "; } } return false; } // We don't modify the program, so we preserve all analyses virtual void getAnalysisU...
2012 Jul 05
1
[LLVMdev] "symbol lookup error" while running a Simple Loop Pass
...ic char ID; // Pass identification, replacement for typeid > LoopInst() : LoopPass(ID) {} > > virtual bool runOnLoop(Loop *L, LPPassManager &LPM) { > LoopInfo *LI = &getAnalysis<LoopInfo>(); > for (Loop::block_iterator b = L->block_begin(), be = L->block_end();b != be; > ++b) > { > for (BasicBlock::iterator i = (*b)->begin(), ie = (*b)->end(); i != ie; ++i) > { > ++LoopInstNum; > errs() << "Hello: "; > } > } > > return false; > } > > // We don't modify the progra...
2007 Oct 26
0
8 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c test/trace
...D) { // in case of an exception, skip blocks until exception is cleared or we // run out of blocks - while (context->throwing && frame->blocks->len > 0) { + while (context->exception && frame->blocks->len > 0) { frame->pc = frame->block_end; swfdec_as_frame_check_block (frame); pc = frame->pc; } - if (context->throwing) { + if (context->exception) { SWFDEC_ERROR ("Unhandled exception: %s", - swfdec_as_value_to_string (context, &context->throw_value)); + swfdec_as_value_to_s...
2007 Oct 28
0
9 commits - configure.ac libswfdec/swfdec_as_context.c libswfdec/swfdec_audio_internal.h libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_sound.c
....c b/libswfdec/swfdec_as_context.c index 54a1ac8..ca1af3d 100644 --- a/libswfdec/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -863,13 +863,6 @@ start: pc = frame->pc; continue; } - if (check_block && (pc < frame->block_start || pc >= frame->block_end)) { - SWFDEC_LOG ("code exited block"); - swfdec_as_frame_pop_block (frame); - pc = frame->pc; - if (frame != context->frame) - goto start; - } if (pc == exitpc) { swfdec_as_frame_return (frame, NULL); goto start; @@ -878,6 +871,13 @@ start:...
2009 Jul 13
1
[PATCH 1/1] adds mlogs to aops.c
...,6 +461,8 @@ int walk_page_buffers( handle_t *handle, int err, ret = 0; struct buffer_head *next; + mlog_entry("(0x%p, 0x%p, %u, %u, 0x%p)\n", handle, head, from, to, fn); + for ( bh = head, block_start = 0; ret == 0 && (bh != head || !block_start); block_start = block_end, bh = next) @@ -454,18 +478,23 @@ int walk_page_buffers( handle_t *handle, if (!ret) ret = err; } + + mlog_exit(ret); return ret; } handle_t *ocfs2_start_walk_page_trans(struct inode *inode, - struct page *page, - unsigned from, - unsigned to) + struct p...
2009 Jul 21
1
(no subject)
...,6 +464,8 @@ int walk_page_buffers( handle_t *handle, int err, ret = 0; struct buffer_head *next; + mlog_entry("(0x%p, 0x%p, %u, %u, 0x%p)\n", handle, head, from, to, fn); + for ( bh = head, block_start = 0; ret == 0 && (bh != head || !block_start); block_start = block_end, bh = next) @@ -454,18 +481,23 @@ int walk_page_buffers( handle_t *handle, if (!ret) ret = err; } + + mlog_exit(ret); return ret; } handle_t *ocfs2_start_walk_page_trans(struct inode *inode, - struct page *page, - unsigned from, - unsigned to) + struct p...
2011 Oct 05
2
[LLVMdev] replacing a global variable by a constant
hi i want replacing a global variable by a constant value for erase instruction. i had seen the code that as follows for (llvm::GlobalVariable::use_iterator U = gv->use_begin(); U != gv->use_end();--U ) { llvm::Instruction *I = llvm::cast<llvm::Instruction>(U); I->replaceAllUsesWith(constPtr); I->eraseFromParent(); } but i dont know how can declare constptr.
2011 Oct 05
0
[LLVMdev] replacing a global variable by a constant
Hi nada, > i want replacing a global variable by a constant value for erase instruction. I'm not sure what you mean exactly. A GlobalVariable has pointer type. Do you want to replace that pointer by a constant pointer? Or is it rather that you want to say that the contents of the memory pointed to by the GlobalVariable is constant, and have all places that load that GlobalVariable
2023 Jun 19
0
[PATCH v1 1/5] fs/buffer: clean up block_commit_write
...ed len, > } > EXPORT_SYMBOL(__block_write_begin); > > -static int __block_commit_write(struct inode *inode, struct page *page, > - unsigned from, unsigned to) > +int block_commit_write(struct page *page, unsigned int from, unsigned int to) > { > unsigned block_start, block_end; > int partial = 0; > @@ -2154,6 +2153,7 @@ static int __block_commit_write(struct inode *inode, struct page *page, > SetPageUptodate(page); > return 0; > } > +EXPORT_SYMBOL(block_commit_write); > > /* > * block_write_begin takes care of the basic task of blo...
2023 Jun 19
1
[PATCH v1 2/5] fs/buffer.c: convert block_commit_write to return void
...age *page, loff_t pos, unsigned len, > } > EXPORT_SYMBOL(__block_write_begin); > > -int block_commit_write(struct page *page, unsigned int from, unsigned int to) > +void block_commit_write(struct page *page, unsigned int from, unsigned int to) > { > unsigned block_start, block_end; > int partial = 0; > @@ -2151,7 +2151,6 @@ int block_commit_write(struct page *page, unsigned int from, unsigned int to) > */ > if (!partial) > SetPageUptodate(page); > - return 0; > } > EXPORT_SYMBOL(block_commit_write); > > @@ -2577,11 +2576,11 @@ int...
2007 Oct 28
0
2 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_format.c
...- SWFDEC_ERROR ("Unhandled exception: %s", - swfdec_as_value_to_string (context, &context->exception_value)); + SWFDEC_ERROR ("Unhandled exception"); goto error; } if (check_block && (pc < frame->block_start || pc >= frame->block_end)) {