Talk:Basic block

From Wikipedia, the free encyclopedia

Yaronf,

Your edits are okay, but you've made the concept more conservative and blurred the idea that basic blocks are intraprocedural entities (CFG edges don't leave the procedure). Generally, we allow function calls in the middle of basic blocks, as long as we know they will return; exceptions and continuations can mess this up. If you concur I'd like to revert some of your changes.

Derrick Coetzee 02:12, 29 Feb 2004 (UTC)

Hi Derrick,

When performing static code analysis, you rarely have complete information about who's calling a certain procedure. More precisely, this is a question of whether procedure addresses are observeable externally, e.g. through a linker-generated symbol table for dynamic loading. So often you have to assume that the procedure's boundary is also the start of a basic block. You can certainly optimize across function calls, but in such cases you are optimizing across basic blocks! Dynamic analysis is different: for example in a trace cache you can have a single trace with code from different procedures.

Also, exceptions are associated with instructions at this level, not with functions.

BTW, I used "instruction" while you're using "statement". The former may prevent confusion with high-level language statements, but in any case, the article should only use one of the terms for consistency.

Yaronf 12:15, Feb 29, 2004 (UTC)