[LLVMdev] setPreservesCFG

Chris Lattner clattner at apple.com
Mon Feb 23 13:37:08 PST 2009


On Feb 23, 2009, at 1:23 PM, John Criswell wrote:

> Dear All,
>
> Does the setPreservesCFG() call for passes indicate that the CFG in  
> the
> local function does not change or that the global CFG does not change?

The CFG in this context is just the per-function CFG.   
"setPreservesCFG" can only be used meaninfully for FunctionPasses.

> In other words, can a pass call setPreservesCFG() if it adds call
> instructions to a function?

Adding a call does not modify the per-function CFG.  Adding an invoke  
does.

-Chris



More information about the llvm-dev mailing list