[llvm] r230692 - Re-instate the pragma optimize hack for MSVC, but not clang-cl

Justin Bogner justin at justinbogner.com
Thu Feb 26 16:57:55 PST 2015


On Thursday, February 26, 2015, Reid Kleckner <reid at kleckner.net> wrote:

> Author: rnk
> Date: Thu Feb 26 15:34:11 2015
> New Revision: 230692
>
> URL: http://llvm.org/viewvc/llvm-project?rev=230692&view=rev
> Log:
> Re-instate the pragma optimize hack for MSVC, but not clang-cl
>
> Reverts commit r230686 with define modifications.
>
> Modified:
>     llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
>
> Modified: llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp?rev=230692&r1=230691&r2=230692&view=diff
>
> ==============================================================================
> --- llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp (original)
> +++ llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp Thu Feb 26 15:34:11 2015
> @@ -292,6 +292,10 @@ static void EncodeFixedValueType(MVT::Si
>    }
>  }
>
> +#if defined(_MSC_VER) && !defined(__clang__)
> +#pragma optimize("",off) // MSVC 2010 optimizer can't deal with this
> function.
> +#endif
> +


Does the comment need updating? Surely this isn't for MSVC 2010 at this
point.


>  static void EncodeFixedType(Record *R, std::vector<unsigned char>
> &ArgCodes,
>                              std::vector<unsigned char> &Sig) {
>
> @@ -377,6 +381,10 @@ static void EncodeFixedType(Record *R, s
>    EncodeFixedValueType(VT, Sig);
>  }
>
> +#if defined(_MSC_VER) && !defined(__clang__)
> +#pragma optimize("",on)
> +#endif
> +
>  /// ComputeFixedEncoding - If we can encode the type signature for this
>  /// intrinsic into 32 bits, return it.  If not, return ~0U.
>  static void ComputeFixedEncoding(const CodeGenIntrinsic &Int,
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu <javascript:;>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150226/a714af31/attachment.html>


More information about the llvm-commits mailing list