[PATCH] D39761: [Support] Make llvm::Error faster

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 14:44:11 PST 2017


Zachary Turner via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:

> +  // assertIsChecked() happens very frequently, but under normal circumstances
> +  // is supposed to be a no-op.  So we want it to be inlined, but having a bunch
> +  // of debug prints can cause the function to be too large for inlining.  So
> +  // we hint the compiler by making sure the unlikely path doesn't get inlined,
> +  // which should guarantee that the fast path does get inlined.
> +  LLVM_ATTRIBUTE_NOINLINE

noinline in a header looks funny. Why not move it to the .cpp?

Cheers,
Rafael


More information about the llvm-commits mailing list