Heads up -- take two for renaming VMCore -> IR

Hello folks,

Now that the includes are sortable and I have another chunk of free time, I’ll be making another attempt at the mass renaming from VMCore to IR for LLVM.

I’m also planning to move the header files currently in the top level for LLVM down into the appropriate subdirectory. I’ll create an IR directory for the headers that really belong to that library component. However, I’m going to look at each header, and if I can either lift it into Support, or sink it all the way into Analysis or some other lower library, I will do that. I’ll move each header one at a time so that folks can chime in on the review thread if there are questions / concerns about the layering here.

-Chandler

Please make sure to update any documentation that references VMCore.

-- Sean Silva

Sounds great, thanks Chandler. In addition to each file being discussed, it would be nice to have a high level plan to kick things off.

-Chris

Sounds great, thanks Chandler. In addition to each file being discussed,
it would be nice to have a high level plan to kick things off.

What exact plan are you looking for?

From the original thread:

- lib/VMCore -> lib/IR
- include/llvm/Foo.h -> include/llvm/IR/Foo.h (if Foo.h belongs in that
library)

I didn't have a more detailed plan. ;]

Right, I just meant which specific header files should move. Pass manager doesn’t seem like it should, for example.

-Chris

Right, I just meant which specific header files should move. Pass manager
doesn't seem like it should, for example.

lib/VMCore/PassManager.cpp indicates to me that include/llvm/PassManager.h
should become include/llvm/IR/PassManager.h

It feels like what you're really interested in is splitting out
non-IR-specific things (like passes) into a separate library. I agree that
this would be goodness, but it seems orthogonal to structuring the *files*
in the IR library correctly.

I'd like to solve the file structure given the existing library layering
first as a simple and entirely mechanical change.

I'm then happy to look into how to make a better layering of libraries (and
generally make the libraries more fine grained). But that is *not*
mechanical, and I don't want to block fixing the naming bits while waiting
to figure out the design issue of how best to restructure these libraries.

Ok seems reasonable. The downside is that headers will move twice, but that isn’t a big deal I guess.

-Chris