[PATCH] D49753: [windows] Don't inline fieldFromInstruction on Windows
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 24 15:26:43 PDT 2018
Can you add a comment explaining why this is necessary? Other than that,
lgtm. Feel free to submit after adding the comment
On Tue, Jul 24, 2018 at 3:14 PM Stella Stamenova via Phabricator <
reviews at reviews.llvm.org> wrote:
> stella.stamenova updated this revision to Diff 157140.
> stella.stamenova added a comment.
>
> Follow Zachary's advise and do not force no inline in the case of clang.
>
>
> Repository:
> rL LLVM
>
> https://reviews.llvm.org/D49753
>
> Files:
> utils/TableGen/FixedLenDecoderEmitter.cpp
>
>
> Index: utils/TableGen/FixedLenDecoderEmitter.cpp
> ===================================================================
> --- utils/TableGen/FixedLenDecoderEmitter.cpp
> +++ utils/TableGen/FixedLenDecoderEmitter.cpp
> @@ -2066,7 +2066,10 @@
> static void emitFieldFromInstruction(formatted_raw_ostream &OS) {
> OS << "// Helper function for extracting fields from encoded
> instructions.\n"
> << "template<typename InsnType>\n"
> - << "static InsnType fieldFromInstruction(InsnType insn, unsigned
> startBit,\n"
> + << "#if defined(_MSC_VER) && !defined(__clang__)\n"
> + << "__declspec(noinline)\n"
> + << "#endif\n"
> + << "static InsnType fieldFromInstruction(InsnType insn, unsigned
> startBit,\n"
> << " unsigned numBits) {\n"
> << " assert(startBit + numBits <= (sizeof(InsnType)*8) &&\n"
> << " \"Instruction field out of bounds!\");\n"
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180724/b7f52ab5/attachment.html>
More information about the llvm-commits
mailing list