[LLVMdev] "Refactoring" Basic Blocks into a new function
ejones at uwaterloo.ca
Tue Apr 19 19:10:00 PDT 2005
On Apr 19, 2005, at 21:39, Evan Jones wrote:
> 1. To mark the section of code to be cut out, I'm using "magic"
> function calls (begin() and end()). In order to locate these calls, I
> am currently iterating over the basic blocks in a function using the
> iterator. Is it possible that I could get the blocks "out of order"
> with respect to the control flow?
I just found the Interval class, and it looks like it could help me out
here. I want to locate the Interval that begins with the call to the
"magic" begin(), and ends with the call to the "magic" end(), if it
exists. If there is no such valid interval, then I want to detect that
and return an error. Can I make this happen by using the
IntervalPartition pass? It looks like LLVM has some functionality that
I could use *some where.* I just can't quite figure out how to make use
More information about the llvm-dev