Is the LLVM C++ API better than string building the IR file and feeding to llc?

Viewed 60

I was wondering, are there any benefits to using the C++ API instead of building an IR file on my own and feeding the output to llc?

1 Answers

Performance is definitely a reason. Faster to build the in-memory representation directly than writing a serialized form to a file, then having llc read it in and parse it into exactly that in-memory representation.

Related