[LLVMdev] Metadata for Argument, BasicBlock

Dan Gohman gohman at apple.com
Tue May 8 17:01:50 PDT 2012


On May 7, 2012, at 11:11 PM, Ralf Karrenberg <Chareos at gmx.de> wrote:

> Hi Dan,
> 
> I am using it to store results of a vectorization analysis. A BasicBlock has certain properties in this context, e.g. we mark control flow that may never diverge in different instances ("threads" if you think in terms of CUDA) of the same function by marking the corresponding blocks. This information is later used when linearizing the function (control flow to data flow conversion). I'll be happy to give you more detail on this if you want to :).

Why are you using metadata to store the results of an analysis?
LLVM has infrastructure for running analysis passes and making
their information available to other passes.

> I could imagine there are other things that could make use of this, or am I wrong with that?

There are surely many things it could be used for. Interesting
questions include whether or not there are other ways to
achieve those things, and whether making a basic block be
something which can carry special semantics is a concept that
makes sense within the rest of the system.

Dan




More information about the llvm-dev mailing list