[LLVMdev] 2.3 Pre-release available for testing

heisenbug ggreif at gmail.com
Wed May 21 09:41:15 PDT 2008


On May 21, 6:07 pm, Morten Ofstad <mor... at hue.no> wrote:
> Razvan Aciu wrote:
> > As I saw from the mailing list the MSVC 2005 patches were made to take into
> > account the new files from the development branch, files which are not in
> > the 2.3 release. So for now the below patch is the only one functional for
> > the release. If I am wrong, please someone correct me.
>
> > If someone can make a 2005 patch for the release branch, it is ok. Else, I
> > am afraid that this one is for now the only functional one, with the
> > drawback that it is made for MSVC 2008. If there will be no other patches,
> > the alternative is that the 2.3 release will not work with any MSVC.
> > Anyway, it is not so hard to sync the MSVC projects with the 2.3 release
> > files and if someone with MSVC 2005 can do it, please do it.
>
> Ok, I got the release_23 branch and added/removed files until it would build without errors. I didn't have time to test
> the clang build, but at least this patch will make things compile so someone else can test it.
>
> m.
>
> PS. Visual Studio really hates how the operator new is overridden in User.h:42, you get thousands upon thousands of
> warnings of the form:

Can you please add this line just below "operator new":

  void operator delete(void*, unsigned) {}

Rationale: this operator is only needed when the constructor
*actually throws an exception*.

Since VMCore library does not even use exceptions (it is compiled
without exceptions on gcc platforms), this "operator delete" will
never be called, and thus may be defined as empty.

Morten, if you could send this as a patch (User.h.diff only) to llvm-
commits that would be cool. Also please tell us if the warnings went
away and whether everything is still working fine.

Cheers,

    Gabor


>
> warning C4291: 'void *llvm::User::operator new(size_t,size_t)' : no matching operator delete found; memory will not be
> freed if initialization throws an exception
>
> There's also quite a few other things you get warnings about, mixed use of struct/class for the same thing and
> conversions from 64 bit to 32 bit that are potentially unsafe. Also constantfolding.cpp has two functions that don't
> return a value (but have assert(0 && ...) at the end) at line 622 and 605 without calling abort() -- Visual Studio give
> warnings about other places that _do_ call abort() as well, but I guess that's fine.
>
> [release_23_vs2005.patch]Index: Analysis/Analysis.vcproj
> ===================================================================
> --- Analysis/Analysis.vcproj    (revision 51376)
> +++ Analysis/Analysis.vcproj    (working copy)
> @@ -1,7 +1,7 @@
>  <?xml version="1.0" encoding="Windows-1252"?>
>  <VisualStudioProject
>         ProjectType="Visual C++"
> -       Version="8.00"
> +       Version="8,00"
>         Name="Analysis"
>         ProjectGUID="{0622E827-8464-489D-8B1C-B0B496F35C08}"
>         Keyword="Win32Proj"
> @@ -89,7 +89,7 @@
>                         />
>                 </Configuration>
>                 <Configuration
> -                       Name="Release|Win32"
> +                       Name="Debug|x64"
>                         OutputDirectory="$(SolutionDir)\bin\$(PlatformName)\$(ConfigurationName)"
>                         IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
>                         ConfigurationType="4"
> @@ -110,17 +110,22 @@
>                         />
>                         <Tool
>                                 Name="VCMIDLTool"
> +                               TargetEnvironment="3"
>                         />
>                         <Tool
>                                 Name="VCCLCompilerTool"
> +                               Optimization="0"
>                                 AdditionalIncludeDirectories="..\..\include;.."
> -                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS"
> +                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS"
>                                 StringPooling="true"
> -                               RuntimeLibrary="2"
> +                               MinimalRebuild="true"
> +                               BasicRuntimeChecks="3"
> +                               RuntimeLibrary="3"
>                                 ForceConformanceInForLoopScope="true"
>                                 RuntimeTypeInfo="true"
>                                 UsePrecompiledHeader="0"
>                                 ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
> +                               BrowseInformation="1"
>                                 WarningLevel="3"
>                                 Detect64BitPortabilityProblems="false"
>                                 DebugInformationFormat="3"
> @@ -156,7 +161,7 @@
>                         />
>                 </Configuration>
>                 <Configuration
> -                       Name="Debug|x64"
> +                       Name="Release|Win32"
>                         OutputDirectory="$(SolutionDir)\bin\$(PlatformName)\$(ConfigurationName)"
>                         IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
>                         ConfigurationType="4"
> @@ -177,22 +182,17 @@
>                         />
>                         <Tool
>                                 Name="VCMIDLTool"
> -                               TargetEnvironment="3"
>                         />
>                         <Tool
>                                 Name="VCCLCompilerTool"
> -                               Optimization="0"
>                                 AdditionalIncludeDirectories="..\..\include;.."
> -                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS"
> +                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS"
>                                 StringPooling="true"
> -                               MinimalRebuild="true"
> -                               BasicRuntimeChecks="3"
> -                               RuntimeLibrary="3"
> +                               RuntimeLibrary="2"
>                                 ForceConformanceInForLoopScope="true"
>                                 RuntimeTypeInfo="true"
>                                 UsePrecompiledHeader="0"
>                                 ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
> -                               BrowseInformation="1"
>                                 WarningLevel="3"
>                                 Detect64BitPortabilityProblems="false"
>                                 DebugInformationFormat="3"
> @@ -353,6 +353,14 @@
>                                 >
>                         </File>
>                         <File
> +                               RelativePath="..\..\lib\Analysis\LibCallAliasAnalysis.cpp"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\lib\Analysis\LibCallSemantics.cpp"
> +                               >
> +                       </File>
> +                       <File
>                                 RelativePath="..\..\lib\Analysis\LoadValueNumbering.cpp"
>                                 >
>                         </File>
> @@ -483,6 +491,10 @@
>                                 >
>                         </File>
>                         <File
> +                               RelativePath="..\..\include\llvm\Analysis\LibCallSemantics.h"
> +                               >
> +                       </File>
> +                       <File
>                                 RelativePath="..\..\include\llvm\Analysis\LoadValueNumbering.h"
>                                 >
>                         </File>
> Index: Transforms/Transforms.vcproj
> ===================================================================
> --- Transforms/Transforms.vcproj        (revision 51376)
> +++ Transforms/Transforms.vcproj        (working copy)
> @@ -1,7 +1,7 @@
>  <?xml version="1.0" encoding="Windows-1252"?>
>  <VisualStudioProject
>         ProjectType="Visual C++"
> -       Version="8.00"
> +       Version="8,00"
>         Name="Transforms"
>         ProjectGUID="{C59374C1-9FC0-4147-B836-327DFDC52D99}"
>         Keyword="Win32Proj"
> @@ -89,7 +89,7 @@
>                         />
>                 </Configuration>
>                 <Configuration
> -                       Name="Release|Win32"
> +                       Name="Debug|x64"
>                         OutputDirectory="$(SolutionDir)\bin\$(PlatformName)\$(ConfigurationName)"
>                         IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
>                         ConfigurationType="4"
> @@ -110,17 +110,22 @@
>                         />
>                         <Tool
>                                 Name="VCMIDLTool"
> +                               TargetEnvironment="3"
>                         />
>                         <Tool
>                                 Name="VCCLCompilerTool"
> +                               Optimization="0"
>                                 AdditionalIncludeDirectories="..\..\include;.."
> -                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS"
> +                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS"
>                                 StringPooling="true"
> -                               RuntimeLibrary="2"
> +                               MinimalRebuild="true"
> +                               BasicRuntimeChecks="3"
> +                               RuntimeLibrary="3"
>                                 ForceConformanceInForLoopScope="true"
>                                 RuntimeTypeInfo="true"
>                                 UsePrecompiledHeader="0"
>                                 ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
> +                               BrowseInformation="1"
>                                 WarningLevel="3"
>                                 Detect64BitPortabilityProblems="false"
>                                 DebugInformationFormat="3"
> @@ -156,7 +161,7 @@
>                         />
>                 </Configuration>
>                 <Configuration
> -                       Name="Debug|x64"
> +                       Name="Release|Win32"
>                         OutputDirectory="$(SolutionDir)\bin\$(PlatformName)\$(ConfigurationName)"
>                         IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
>                         ConfigurationType="4"
> @@ -177,22 +182,17 @@
>                         />
>                         <Tool
>                                 Name="VCMIDLTool"
> -                               TargetEnvironment="3"
>                         />
>                         <Tool
>                                 Name="VCCLCompilerTool"
> -                               Optimization="0"
>                                 AdditionalIncludeDirectories="..\..\include;.."
> -                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS"
> +                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS"
>                                 StringPooling="true"
> -                               MinimalRebuild="true"
> -                               BasicRuntimeChecks="3"
> -                               RuntimeLibrary="3"
> +                               RuntimeLibrary="2"
>                                 ForceConformanceInForLoopScope="true"
>                                 RuntimeTypeInfo="true"
>                                 UsePrecompiledHeader="0"
>                                 ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
> -                               BrowseInformation="1"
>                                 WarningLevel="3"
>                                 Detect64BitPortabilityProblems="false"
>                                 DebugInformationFormat="3"
> @@ -352,6 +352,10 @@
>                                         >
>                                 </File>
>                                 <File
> +                                       RelativePath="..\..\lib\Transforms\IPO\ExtractGV.cpp"
> +                                       >
> +                               </File>
> +                               <File
>                                         RelativePath="..\..\lib\Transforms\Ipo\GlobalDCE.cpp"
>                                         >
>                                 </File>
> @@ -396,10 +400,6 @@
>                                         >
>                                 </File>
>                                 <File
> -                                       RelativePath="..\..\lib\Transforms\Ipo\SimplifyLibCalls.cpp"
> -                                       >
> -                               </File>
> -                               <File
>                                         RelativePath="..\..\lib\Transforms\IPO\StripDeadPrototypes.cpp"
>                                         >
>                                 </File>
> @@ -653,7 +653,7 @@
>                                                 />
>                                         </FileConfiguration>
>                                         <FileConfiguration
> -                                               Name="Release|Win32"
> +                                               Name="Debug|x64"
>                                                 >
>                                                 <Tool
>                                                         Name="VCCLCompilerTool"
> @@ -661,7 +661,7 @@
>                                                 />
>                                         </FileConfiguration>
>                                         <FileConfiguration
> -                                               Name="Debug|x64"
> +                                               Name="Release|Win32"
>                                                 >
>                                                 <Tool
>                                                         Name="VCCLCompilerTool"
> @@ -721,6 +721,10 @@
>                                 >
>                         </File>
>                         <File
> +                               RelativePath="..\..\include\llvm\Transforms\RSProfiling.h"
> +                               >
> +                       </File>
> +                       <File
>                                 RelativePath="..\..\include\llvm\Transforms\Scalar.h"
>                                 >
>                         </File>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVM... at cs.uiuc.edu        http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list