[cfe-dev] '-fsave-optimization-record' and VS2015 built compiler

Hal Finkel via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 8 06:28:35 PDT 2017


On 09/08/2017 05:27 AM, ORiordan, Martin wrote:
>
> Hi Hal,
>
> I am still using the LLVM v4.0 sources, haven’t yet had a chance to do 
> the “Big Bang” update to v5.0, but hope to get to that soon.
>
> I’ve check out these patches and see if they fix the problem before I 
> consider filing a bug. Curiously enough, on Linux the file is named 
> ‘</basename/>.opt.yaml’ in the current directory, but on Windows it 
> gets the name ‘</TMP/>\</basename/>-######.opt.yaml’, so it appears 
> that on Linux it is written directly to the intended final file, while 
> on Windows it gets an intermediate temporary file name.
>

Yes, that sounds like the problem that I fixed. As a workaround, you can 
also specify the file name manually:

   -foptimization-record-file=<filename>

  -Hal

> Thanks very much for your insight and help,
>
>             MartinO
>
> *From:*Hal Finkel [mailto:hfinkel at anl.gov]
> *Sent:* Thursday, September 7, 2017 4:54 PM
> *To:* ORiordan, Martin <martin.oriordan at intel.com>; Clang Dev 
> <cfe-dev at lists.llvm.org>
> *Subject:* Re: [cfe-dev] '-fsave-optimization-record' and VS2015 built 
> compiler
>
> Hi again,
>
> What version of the compiler are you using? I'm wondering if this was 
> fixed by r311041+r311043.
>
>  -Hal
>
> On 09/07/2017 09:57 AM, ORiordan, Martin via cfe-dev wrote:
>
>     Hi CFE-Devs,
>
>     I had posted the following question on LLVM-Dev but it seems more
>     appropriate to CFE-Dev.  It appears that the temporary YAML file
>     is being left in the TMP directory and not promoted to its final
>     intended location.
>
>     Thanks,
>
>                 MartinO
>
>     -------------
>
>     Thanks Hal,
>
>     Though the option is handled in the driver, I was not sure if this
>     was an LLVM implemented feature or a CLang implemented feature,
>     and I know the list does not like cross-posting a message ;-)
>
>     And thanks too Brian:
>
>     *From:*Brian Cain [mailto:brian.cain at gmail.com]
>
>     That's pretty odd.  Can you rule out for sure that the files
>     aren't being written somewhere unexpected or that the other clang
>     was built against different sources?
>
>     Yes you’re right, it appears to be in
>     ‘c:\tmp\foo-XXXXXX.opt.yaml’, though on Linux it is located in
>     ‘./foo.opt.yaml’.  The sources for my Linux and VS2015 builds are
>     identical.
>
>     So it would appear that the temporary files is being created but
>     not finalised – probably a CLang driver issue.  I’ll dig deeper
>     and see where this is going wrong and I’ll re-post this to CFE-Dev.
>
>     Thanks again to both of you,
>
>                 MartinO
>
>     *From:*Hal Finkel [mailto:hfinkel at anl.gov]
>     *Sent:* Thursday, September 7, 2017 3:37 PM
>     *To:* ORiordan, Martin <martin.oriordan at intel.com
>     <mailto:martin.oriordan at intel.com>>; llvm-dev
>     <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>>
>     *Subject:* Re: [llvm-dev] '-fsave-optimization-record' and VS2015
>     built compiler
>
>     On 09/07/2017 09:10 AM, ORiordan, Martin via llvm-dev wrote:
>
>     Not 100% if this is an LLVM question or a CLang question, though I
>     expect LLVM.
>
>     On Linux, if I pass ‘-fsave-optimization-record’ to ‘clang’, then
>     it produces a ‘*.opt.yaml’ file.  However, the same thing run on
>     Windows using ‘clang’ built with VS2015 silently ignores this option.
>
>     Is this a bug or is it intentional? And if it is intentional, how
>     can I configure and build on Windows to enable this feature?
>
>
>     Sounds like a bug (I've never tested on Windows). I suggest filing
>     a bug report. Also, in general, you'll have better luck with
>     frontend questions on cfe-dev.
>
>      -Hal
>
>
>     Thanks,
>
>                 MartinO
>
>     --------------------------------------------------------------
>     Intel Research and Development Ireland Limited
>     Registered in Ireland
>     Registered Office: Collinstown Industrial Park, Leixlip, County
>     Kildare
>     Registered Number: 308263
>
>     This e-mail and any attachments may contain confidential material
>     for the sole use of the intended recipient(s). Any review or
>     distribution by others is strictly prohibited. If you are not the
>     intended recipient, please contact the sender and delete all copies.
>
>
>
>
>     _______________________________________________
>
>     cfe-dev mailing list
>
>     cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
>
>     http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
>
> -- 
> Hal Finkel
> Lead, Compiler Technology and Programming Languages
> Leadership Computing Facility
> Argonne National Laboratory
>
> --------------------------------------------------------------
> Intel Research and Development Ireland Limited
> Registered in Ireland
> Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
> Registered Number: 308263
>
> This e-mail and any attachments may contain confidential material for 
> the sole use of the intended recipient(s). Any review or distribution 
> by others is strictly prohibited. If you are not the intended 
> recipient, please contact the sender and delete all copies.
>

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170908/ebb3ccc9/attachment.html>


More information about the cfe-dev mailing list