> Let's say I have 2 bytecode files, X.bc and Y.bc that I want to combine
> into Z.bc. Which of the following command sequences will produce more
> optimized code?
> Sequence 1:
> llvm-link -o tmp.bc X.bc Y.bc
> opt -std-compile-opts -o Z.bc tmp.bc
> Sequence 2:
> llvm-ld -O5 -o Z.bc X.bc Y.bc
These are very different options. :)
Option #1 runs the "compile time" optimizations again at link time.
Option #2 runs a different set of optimizations, more tuned for
> Without looking at details it seems like sequence 2 should produce the
> most optimized code. As a follow up, where does -std-compile-opts fall
> within -O1 to -O5?
-std-compile-opts is roughly similar to GCC -O3. llvm-ld has no analog to