Mari
Mari

Reputation: 83

How does inlining work in LLVM?

I am trying to understand how llvm inlining work (Inliner class). The operation that I don't understand is the follow:

SmallVector<std::pair<CallSite, int>, 16> CallSites;

when SmallVector is an llvm class. In particular I don't understand what is the function of "16" in this code..

Upvotes: 0

Views: 288

Answers (1)

CAFxX
CAFxX

Reputation: 30351

You're declaring a SmallVector of 16 elements, each element being a std::pair<CallSite, int>.

edit: As Eli has correctly pointed out, SmallVector can be dynamically resized. 16 is just the built-in size (this means that storing up to 16 elements doesn't incur in any heap allocations).

Upvotes: 2

Related Questions