[LLVMdev] Changes between 2.6 and 2.7: SSA Verifier and visitFreeInst
Duncan Sands
baldrick at free.fr
Tue Mar 9 03:49:11 PST 2010
Hi Jianzhou Zhao
> For example,
> 1) Can I have a block that does not start with a label?
yes.
> Verifier checks that a block must end with a terminator
> instruction. If the block without a label is not the entry block
> in a function, could that be jumped into? or is it still a valid block?
> since the syntax allows the label to be optional.
A block with no label is unreachable if it is not the entry block. It
is nonetheless a valid basic block.
> 2) Verifier checks a block must contain only one terminator
> insn which must be the last insn, and phi insns must be
> in the beginning of the block as a group. If this is the right grammar,
> could we not change the syntax of blocks as..?
> phi* i* t* where
> phi is a Phi node, i is an insn except Phi and terminator,
> and t is a terminator node.
> So we dont need to check this at runtime.
I don't understand what you are saying. Bitcode is not just obtained
by parsing .ll files, it can also be (and usually is) constructed via
the API.
> This is same to ask if the verifier is a module that we have to run.
It is wise to run it, especially when you are developing your front-end,
but running it is not obligatory.
Ciao,
Duncan.
More information about the llvm-dev
mailing list