[llvm-branch-commits] [lld] r371034 - Update ReleaseNotes for lld 9.0.

2019-09-05 Thread Rui Ueyama via llvm-branch-commits
Author: ruiu
Date: Thu Sep  5 02:00:16 2019
New Revision: 371034

URL: http://llvm.org/viewvc/llvm-project?rev=371034&view=rev
Log:
Update ReleaseNotes for lld 9.0.

Modified:
lld/branches/release_90/docs/ReleaseNotes.rst

Modified: lld/branches/release_90/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/lld/branches/release_90/docs/ReleaseNotes.rst?rev=371034&r1=371033&r2=371034&view=diff
==
--- lld/branches/release_90/docs/ReleaseNotes.rst (original)
+++ lld/branches/release_90/docs/ReleaseNotes.rst Thu Sep  5 02:00:16 2019
@@ -8,10 +8,12 @@ lld 9.0.0 Release Notes
 Introduction
 
 
-This document contains the release notes for the lld linker, release 9.0.0.
-Here we describe the status of lld, including major improvements
-from the previous release. All lld releases may be downloaded
-from the `LLVM releases web site `_.
+lld is a high-performance linker that supports ELF (Unix), COFF
+(Windows), Mach-O (macOS), MinGW and WebAssembly. lld is
+command-line-compatible with GNU linkers and Microsoft link.exe and is
+significantly faster than the system default linkers.
+
+lld 9.0 has lots of feature improvements and bug fixes.
 
 Non-comprehensive list of changes in this release
 =
@@ -22,52 +24,189 @@ ELF Improvements
 * ld.lld now has typo suggestions for flags:
   ``$ ld.lld --call-shared`` now prints
   ``unknown argument '--call-shared', did you mean '--call_shared'``.
+  (`r361518 `_)
+
+* ``--allow-shlib-undefined`` and ``--no-allow-shlib-undefined``
+  options are added. ``--no-allow-shlib-undefined`` is the default for
+  executables.
+  (`r352826 `_)
+
+* ``-nmagic`` and ``-omagic`` options are fully supported.
+  (`r360593 `_)
+
+* Segment layout has changed. PT_GNU_RELRO, which was previously
+  placed in the middle of readable/writable PT_LOAD segments, is now
+  placed at the beginning of them. This change permits lld-produced
+  ELF files to be read correctly by GNU strip older than 2.31, which
+  has a bug to discard a PT_GNU_RELRO in the former layout.
+
+* ``-z common-page-size`` is supported.
+  (`r360593 `_)
+
+* Diagnostics messages have improved. A new flag ``--vs-diagnostics``
+  alters the format of diagnostic output to enable source hyperlinks
+  in Microsoft Visual Studio IDE.
+
+* Linker script compatibility with GNU BFD linker has generally improved.
+
+* The clang ``--dependent-library`` form of autolinking is supported.
+
+  This feature is added to implement the Windows-style autolinking for
+  Unix. On Unix, in order to use a library, you usually have to
+  include a header file provided by the library and then explicitly
+  link the library with the linker ``-l`` option. On Windows, header
+  files usually contain pragmas that list needed libraries. Compilers
+  copies that information to object files, so that linkers can
+  automatically link needed libraries. ``--dependent-library`` is
+  added for implementing that Windows semantics on Unix.
+  (`r360984 `_)
+
+* AArch64 BTI and PAC are supported.
+  (`r362793 `_)
 
 * lld now supports replacing ``JAL`` with ``JALX`` instructions in case
-  of MIPS - microMIPS cross-mode jumps.
+  of MIPS ↔ microMIPS cross-mode jumps.
+  (`r354311 `_)
 
 * lld now creates LA25 thunks for MIPS R6 code.
+  (`r354312 `_)
 
 * Put MIPS-specific .reginfo, .MIPS.options, and .MIPS.abiflags sections
   into corresponding PT_MIPS_REGINFO, PT_MIPS_OPTIONS, and PT_MIPS_ABIFLAGS
   segments.
 
+* The quality of RISC-V and PowerPC ports have greatly improved. Many
+  applications can now be linked by lld. PowerPC64 is now almost
+  production ready.
+
+* The Linux kernel for arm32_7, arm64, ppc64le and x86_64 can now be
+  linked by lld.
+
+* x86-64 TLSDESC is supported.
+  (`r361911 `_,
+  `r362078 `_)
+
+* DF_STATIC_TLS flag is set for i386 and x86-64 when needed.
+  (`r353293 `_,
+  `r353378 `_)
+
+* The experimental partitioning feature is added to allow a program to
+  be split into multiple pieces.
+
+  The feature allows you semi-automatically split a single program
+  into multiple ELF files called "partitions". Since all partitions
+  share the same memory address space and don't use PLT/GOT, split
+  programs run as fast as regular programs.
+
+  With the mechanism, you can start a program only with a "main"
+  partition and load remaining partitions on-demand. For example, you
+  can split a web browser into a main partition and a PDF reader
+  

[llvm-branch-commits] [lld] r371037 - ReleaseNotes tweaks

2019-09-05 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Sep  5 02:25:04 2019
New Revision: 371037

URL: http://llvm.org/viewvc/llvm-project?rev=371037&view=rev
Log:
ReleaseNotes tweaks

Modified:
lld/branches/release_90/docs/ReleaseNotes.rst

Modified: lld/branches/release_90/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/lld/branches/release_90/docs/ReleaseNotes.rst?rev=371037&r1=371036&r2=371037&view=diff
==
--- lld/branches/release_90/docs/ReleaseNotes.rst (original)
+++ lld/branches/release_90/docs/ReleaseNotes.rst Thu Sep  5 02:25:04 2019
@@ -13,7 +13,7 @@ lld is a high-performance linker that su
 command-line-compatible with GNU linkers and Microsoft link.exe and is
 significantly faster than the system default linkers.
 
-lld 9.0 has lots of feature improvements and bug fixes.
+lld 9 has lots of feature improvements and bug fixes.
 
 Non-comprehensive list of changes in this release
 =
@@ -56,7 +56,7 @@ ELF Improvements
   include a header file provided by the library and then explicitly
   link the library with the linker ``-l`` option. On Windows, header
   files usually contain pragmas that list needed libraries. Compilers
-  copies that information to object files, so that linkers can
+  copy that information to object files, so that linkers can
   automatically link needed libraries. ``--dependent-library`` is
   added for implementing that Windows semantics on Unix.
   (`r360984 `_)
@@ -65,7 +65,7 @@ ELF Improvements
   (`r362793 `_)
 
 * lld now supports replacing ``JAL`` with ``JALX`` instructions in case
-  of MIPS ↔ microMIPS cross-mode jumps.
+  of MIPS-microMIPS cross-mode jumps.
   (`r354311 `_)
 
 * lld now creates LA25 thunks for MIPS R6 code.
@@ -93,7 +93,7 @@ ELF Improvements
 * The experimental partitioning feature is added to allow a program to
   be split into multiple pieces.
 
-  The feature allows you semi-automatically split a single program
+  The feature allows you to semi-automatically split a single program
   into multiple ELF files called "partitions". Since all partitions
   share the same memory address space and don't use PLT/GOT, split
   programs run as fast as regular programs.
@@ -104,9 +104,9 @@ ELF Improvements
   sub-partition and load the PDF reader partition only when a user
   tries to open a PDF file.
 
-  See https://lld.llvm.org/Partitions.html for more information.
+  See `the documentation `_ for more information.
 
-* If "-" is given as an output filename, lld write the final result
+* If "-" is given as an output filename, lld writes the final result
   to the standard output. Previously, it created a file "-" in the
   current directory.
   (`r351852 `_)
@@ -161,8 +161,6 @@ COFF Improvements
 
 * Several speed and memory usage improvements.
 
-* Range extension thunks are now created for ARM64, if needed.
-
 * lld-link now supports resource object files created by GNU windres and
   MS cvtres, not only llvm-cvtres.
 
@@ -189,7 +187,7 @@ WebAssembly Improvements
 * Imports from custom module names are supported.
   (`r352828 `_)
 
-* Symbols that are in llvm.used are no exported by default.
+* Symbols that are in llvm.used are now exported by default.
   (`r353364 `_)
 
 * Initial support for PIC and dynamic linking has landed.


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r371040 - Merging r370850:

2019-09-05 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Sep  5 02:48:06 2019
New Revision: 371040

URL: http://llvm.org/viewvc/llvm-project?rev=371040&view=rev
Log:
Merging r370850:

r370850 | hans | 2019-09-04 10:19:30 +0200 (Wed, 04 Sep 2019) | 20 lines

Re-commit r363191 "[MS] Pretend constexpr variable template specializations are 
inline"

While the next Visual Studio update (16.3) will fix this issue, that hasn't
shipped yet. Until then Clang wouldn't work with MSVC's headers which seems
unfortunate. Let's keep this in until VS 16.3 ships. (See also PR42843.)

> Fixes link errors with clang and the latest Visual C++ 14.21.27702
> headers, which was reported as PR42027.
>
> I chose to intentionally make these things linkonce_odr, i.e.
> discardable, so that we don't emit definitions of these things in every
> translation unit that includes STL headers.
>
> Note that this is *not* what MSVC does: MSVC has not yet implemented C++
> DR2387, so they emit fully specialized constexpr variable templates with
> static / internal linkage.
>
> Reviewers: rsmith
>
> Differential Revision: https://reviews.llvm.org/D63175


Added:
cfe/branches/release_90/test/CodeGenCXX/ms-constexpr-var-template.cpp
  - copied unchanged from r370850, 
cfe/trunk/test/CodeGenCXX/ms-constexpr-var-template.cpp
Modified:
cfe/branches/release_90/   (props changed)
cfe/branches/release_90/lib/AST/ASTContext.cpp

Propchange: cfe/branches/release_90/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  5 02:48:06 2019
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:366429,366447-366448,366457,366474,366480,366483,366511,366670,366694,366699,366878,367008,367039,367055,367103,367134,367301,367305,367323,367387,367403,367520,367530,367661,367675,367802,367823,367906,368104,368202,368552,368561,368874,368940,369043,369093,369251,369641,369749,369829,369834,370035,370073
+/cfe/trunk:366429,366447-366448,366457,366474,366480,366483,366511,366670,366694,366699,366878,367008,367039,367055,367103,367134,367301,367305,367323,367387,367403,367520,367530,367661,367675,367802,367823,367906,368104,368202,368552,368561,368874,368940,369043,369093,369251,369641,369749,369829,369834,370035,370073,370850
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_90/lib/AST/ASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_90/lib/AST/ASTContext.cpp?rev=371040&r1=371039&r2=371040&view=diff
==
--- cfe/branches/release_90/lib/AST/ASTContext.cpp (original)
+++ cfe/branches/release_90/lib/AST/ASTContext.cpp Thu Sep  5 02:48:06 2019
@@ -9814,10 +9814,25 @@ static GVALinkage basicGVALinkageForVari
 return StrongLinkage;
 
   case TSK_ExplicitSpecialization:
-return Context.getTargetInfo().getCXXABI().isMicrosoft() &&
-   VD->isStaticDataMember()
-   ? GVA_StrongODR
-   : StrongLinkage;
+if (Context.getTargetInfo().getCXXABI().isMicrosoft()) {
+  // If this is a fully specialized constexpr variable template, pretend it
+  // was marked inline. MSVC 14.21.27702 headers define _Is_integral in a
+  // header this way, and we don't want to emit non-discardable definitions
+  // of these variables in every TU that includes . This
+  // behavior is non-conforming, since another TU could use an extern
+  // template declaration for this variable, but for constexpr variables,
+  // it's unlikely for a user to want to do that. This behavior can be
+  // removed if the headers change to explicitly mark such variable 
template
+  // specializations inline.
+  if (isa(VD) && VD->isConstexpr())
+return GVA_DiscardableODR;
+
+  // Use ODR linkage for static data members of fully specialized templates
+  // to prevent duplicate definition errors with MSVC.
+  if (VD->isStaticDataMember())
+return GVA_StrongODR;
+}
+return StrongLinkage;
 
   case TSK_ExplicitInstantiationDefinition:
 return GVA_StrongODR;


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r371042 - Merging r369310:

2019-09-05 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Sep  5 02:51:30 2019
New Revision: 371042

URL: http://llvm.org/viewvc/llvm-project?rev=371042&view=rev
Log:
Merging r369310:

r369310 | hubert.reinterpretcast | 2019-08-20 01:12:48 +0200 (Tue, 20 Aug 2019) 
| 24 lines

[cmake] Link in LLVMPasses due to dependency by LLVMOrcJIT; NFC

Summary:
rL367756 (f5c40cb) increases the dependency of LLVMOrcJIT on LLVMPasses.
In particular, symbols defined in LLVMPasses that are referenced by the
destructor of `PassBuilder` are now referenced by LLVMOrcJIT through
`Speculation.cpp.o`.

We believe that referencing symbols defined in LLVMPasses in the
destructor of `PassBuilder` is valid, and that adding to the set of such
symbols is legitimate. To support such cases, this patch adds LLVMPasses
to the set of libraries being linked when linking in LLVMOrcJIT causes
such symbols from LLVMPasses to be referenced.

Reviewers: Whitney, anhtuyen, pree-jackie

Reviewed By: pree-jackie

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66441



Modified:
llvm/branches/release_90/   (props changed)
llvm/branches/release_90/lib/ExecutionEngine/Orc/CMakeLists.txt
llvm/branches/release_90/tools/lli/CMakeLists.txt
llvm/branches/release_90/unittests/ExecutionEngine/Orc/CMakeLists.txt

Propchange: llvm/branches/release_90/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  5 02:51:30 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369426,369443,369886,370036,370176,370204,370271,370355,370404
+/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404

Modified: llvm/branches/release_90/lib/ExecutionEngine/Orc/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/lib/ExecutionEngine/Orc/CMakeLists.txt?rev=371042&r1=371041&r2=371042&view=diff
==
--- llvm/branches/release_90/lib/ExecutionEngine/Orc/CMakeLists.txt (original)
+++ llvm/branches/release_90/lib/ExecutionEngine/Orc/CMakeLists.txt Thu Sep  5 
02:51:30 2019
@@ -33,4 +33,5 @@ target_link_libraries(LLVMOrcJIT
   PRIVATE
   LLVMBitReader
   LLVMBitWriter
+  LLVMPasses
   )

Modified: llvm/branches/release_90/tools/lli/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/tools/lli/CMakeLists.txt?rev=371042&r1=371041&r2=371042&view=diff
==
--- llvm/branches/release_90/tools/lli/CMakeLists.txt (original)
+++ llvm/branches/release_90/tools/lli/CMakeLists.txt Thu Sep  5 02:51:30 2019
@@ -12,6 +12,7 @@ set(LLVM_LINK_COMPONENTS
   MCJIT
   Object
   OrcJIT
+  Passes
   RuntimeDyld
   SelectionDAG
   Support

Modified: llvm/branches/release_90/unittests/ExecutionEngine/Orc/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/unittests/ExecutionEngine/Orc/CMakeLists.txt?rev=371042&r1=371041&r2=371042&view=diff
==
--- llvm/branches/release_90/unittests/ExecutionEngine/Orc/CMakeLists.txt 
(original)
+++ llvm/branches/release_90/unittests/ExecutionEngine/Orc/CMakeLists.txt Thu 
Sep  5 02:51:30 2019
@@ -4,6 +4,7 @@ set(LLVM_LINK_COMPONENTS
   ExecutionEngine
   Object
   OrcJIT
+  Passes
   RuntimeDyld
   Support
   native


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r371043 - Merging r370753:

2019-09-05 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Sep  5 02:54:36 2019
New Revision: 371043

URL: http://llvm.org/viewvc/llvm-project?rev=371043&view=rev
Log:
Merging r370753:

r370753 | jonpa | 2019-09-03 15:31:22 +0200 (Tue, 03 Sep 2019) | 6 lines

[SystemZ]  Recognize INLINEASM_BR in backend.

SystemZInstrInfo::analyzeBranch() needs to check for INLINEASM_BR
instructions, or it will crash.

Review: Ulrich Weigand


Added:
llvm/branches/release_90/test/CodeGen/SystemZ/asm-20.ll
  - copied unchanged from r370753, llvm/trunk/test/CodeGen/SystemZ/asm-20.ll
Modified:
llvm/branches/release_90/   (props changed)
llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.cpp

Propchange: llvm/branches/release_90/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  5 02:54:36 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404
+/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404,370753

Modified: llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.cpp?rev=371043&r1=371042&r2=371043&view=diff
==
--- llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.cpp (original)
+++ llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.cpp Thu Sep  5 
02:54:36 2019
@@ -462,8 +462,8 @@ bool SystemZInstrInfo::analyzeBranch(Mac
   break;
 
 // A terminator that isn't a branch can't easily be handled by this
-// analysis.
-if (!I->isBranch())
+// analysis.  Asm goto is not understood / optimized.
+if (!I->isBranch() || I->getOpcode() == SystemZ::INLINEASM_BR)
   return true;
 
 // Can't handle indirect branches.


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r371044 - Merging r370720 and r370721:

2019-09-05 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Sep  5 02:57:35 2019
New Revision: 371044

URL: http://llvm.org/viewvc/llvm-project?rev=371044&view=rev
Log:
Merging r370720 and r370721:


r370720 | bjope | 2019-09-03 11:33:40 +0200 (Tue, 03 Sep 2019) | 13 lines

[LV] Precommit test case showing miscompile from PR43166. NFC

Summary:  Precommit test case showing miscompile from PR43166.

Reviewers: fhahn, Ayal

Reviewed By: fhahn

Subscribers: rkruppe, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67072



r370721 | bjope | 2019-09-03 11:33:55 +0200 (Tue, 03 Sep 2019) | 20 lines

[LV] Fix miscompiles by adding non-header PHI nodes to AllowedExit

Summary:
Fold-tail currently supports reduction last-vector-value live-out's,
but has yet to support last-scalar-value live-outs, including
non-header phi's. As it relies on AllowedExit in order to detect
them and bail out we need to add the non-header PHI nodes to
AllowedExit, otherwise we end up with miscompiles.

Solves https://bugs.llvm.org/show_bug.cgi?id=43166

Reviewers: fhahn, Ayal

Reviewed By: fhahn, Ayal

Subscribers: anna, hiraditya, rkruppe, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67074


Added:

llvm/branches/release_90/test/Transforms/LoopVectorize/pr43166-fold-tail-by-masking.ll
  - copied, changed from r370720, 
llvm/trunk/test/Transforms/LoopVectorize/pr43166-fold-tail-by-masking.ll
Modified:
llvm/branches/release_90/   (props changed)

llvm/branches/release_90/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h

llvm/branches/release_90/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp

Propchange: llvm/branches/release_90/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  5 02:57:35 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404,370753
+/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404,370720-370721,370753

Modified: 
llvm/branches/release_90/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h?rev=371044&r1=371043&r2=371044&view=diff
==
--- 
llvm/branches/release_90/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
 (original)
+++ 
llvm/branches/release_90/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
 Thu Sep  5 02:57:35 2019
@@ -452,8 +452,8 @@ private:
   /// Holds the widest induction type encountered.
   Type *WidestIndTy = nullptr;
 
-  /// Allowed outside users. This holds the induction and reduction
-  /// vars which can be accessed from outside the loop.
+  /// Allowed outside users. This holds the variables that can be accessed from
+  /// outside the loop.
   SmallPtrSet AllowedExit;
 
   /// Can we assume the absence of NaNs.

Modified: 
llvm/branches/release_90/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp?rev=371044&r1=371043&r2=371044&view=diff
==
--- 
llvm/branches/release_90/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp 
(original)
+++ 
llvm/branches/release_90/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp 
Thu Sep  5 02:57:35 2019
@@ -631,6 +631,7 @@ bool LoopVectorizationLegality::canVecto
   // Unsafe cyclic dependencies with header phis are identified during
   // legalization for reduction, induction and first order
   // recurrences.
+   

[llvm-branch-commits] [llvm-branch] r371053 - Merging r370430:

2019-09-05 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Sep  5 03:50:25 2019
New Revision: 371053

URL: http://llvm.org/viewvc/llvm-project?rev=371053&view=rev
Log:
Merging r370430:

r370430 | djg | 2019-08-30 06:33:22 +0200 (Fri, 30 Aug 2019) | 12 lines

[CodeGen] Fix lowering for returning the result of an extractvalue

When the number of return values exceeds the number of registers available,
SelectionDAGBuilder::visitRet transforms a function's return to use a
pointer to a buffer to hold return values. When the returned value is an
operator such as extractvalue, the value may have a non-zero result number.
Add that number to the indexing when obtaining the values to store.

This fixes https://bugs.llvm.org/show_bug.cgi?id=43132.

Differential Revision: https://reviews.llvm.org/D66978



Added:
llvm/branches/release_90/test/CodeGen/WebAssembly/multi-return.ll
  - copied unchanged from r370430, 
llvm/trunk/test/CodeGen/WebAssembly/multi-return.ll
Modified:
llvm/branches/release_90/   (props changed)
llvm/branches/release_90/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Propchange: llvm/branches/release_90/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  5 03:50:25 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404,370720-370721,370753
+/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404,370430,370720-370721,370753

Modified: 
llvm/branches/release_90/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=371053&r1=371052&r2=371053&view=diff
==
--- llvm/branches/release_90/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp 
(original)
+++ llvm/branches/release_90/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp 
Thu Sep  5 03:50:25 2019
@@ -1810,7 +1810,7 @@ void SelectionDAGBuilder::visitRet(const
   // offsets to its parts don't wrap either.
   SDValue Ptr = DAG.getObjectPtrOffset(getCurSDLoc(), RetPtr, Offsets[i]);
 
-  SDValue Val = RetOp.getValue(i);
+  SDValue Val = RetOp.getValue(RetOp.getResNo() + i);
   if (MemVTs[i] != ValueVTs[i])
 Val = DAG.getPtrExtOrTrunc(Val, getCurSDLoc(), MemVTs[i]);
   Chains[i] = DAG.getStore(Chain, getCurSDLoc(), Val,


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r371057 - Merging r371048:

2019-09-05 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Sep  5 04:33:27 2019
New Revision: 371057

URL: http://llvm.org/viewvc/llvm-project?rev=371057&view=rev
Log:
Merging r371048:

r371048 | jonpa | 2019-09-05 12:20:05 +0200 (Thu, 05 Sep 2019) | 7 lines

[SystemZ]  Recognize INLINEASM_BR in backend

Handle the remaining cases also by handling asm goto in
SystemZInstrInfo::getBranchInfo().

Review: Ulrich Weigand
https://reviews.llvm.org/D67151


Modified:
llvm/branches/release_90/   (props changed)
llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.cpp
llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.h
llvm/branches/release_90/lib/Target/SystemZ/SystemZLongBranch.cpp
llvm/branches/release_90/lib/Target/SystemZ/SystemZMachineScheduler.cpp
llvm/branches/release_90/test/CodeGen/SystemZ/asm-20.ll

Propchange: llvm/branches/release_90/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  5 04:33:27 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404,370430,370720-370721,370753
+/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404,370430,370720-370721,370753,371048

Modified: llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.cpp?rev=371057&r1=371056&r2=371057&view=diff
==
--- llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.cpp (original)
+++ llvm/branches/release_90/lib/Target/SystemZ/SystemZInstrInfo.cpp Thu Sep  5 
04:33:27 2019
@@ -462,13 +462,13 @@ bool SystemZInstrInfo::analyzeBranch(Mac
   break;
 
 // A terminator that isn't a branch can't easily be handled by this
-// analysis.  Asm goto is not understood / optimized.
-if (!I->isBranch() || I->getOpcode() == SystemZ::INLINEASM_BR)
+// analysis.
+if (!I->isBranch())
   return true;
 
 // Can't handle indirect branches.
 SystemZII::Branch Branch(getBranchInfo(*I));
-if (!Branch.Target->isMBB())
+if (!Branch.hasMBBTarget())
   return true;
 
 // Punt on compound branches.
@@ -478,7 +478,7 @@ bool SystemZInstrInfo::analyzeBranch(Mac
 if (Branch.CCMask == SystemZ::CCMASK_ANY) {
   // Handle unconditional branches.
   if (!AllowModify) {
-TBB = Branch.Target->getMBB();
+TBB = Branch.getMBBTarget();
 continue;
   }
 
@@ -490,7 +490,7 @@ bool SystemZInstrInfo::analyzeBranch(Mac
   FBB = nullptr;
 
   // Delete the JMP if it's equivalent to a fall-through.
-  if (MBB.isLayoutSuccessor(Branch.Target->getMBB())) {
+  if (MBB.isLayoutSuccessor(Branch.getMBBTarget())) {
 TBB = nullptr;
 I->eraseFromParent();
 I = MBB.end();
@@ -498,7 +498,7 @@ bool SystemZInstrInfo::analyzeBranch(Mac
   }
 
   // TBB is used to indicate the unconditinal destination.
-  TBB = Branch.Target->getMBB();
+  TBB = Branch.getMBBTarget();
   continue;
 }
 
@@ -506,7 +506,7 @@ bool SystemZInstrInfo::analyzeBranch(Mac
 if (Cond.empty()) {
   // FIXME: add X86-style branch swap
   FBB = TBB;
-  TBB = Branch.Target->getMBB();
+  TBB = Branch.getMBBTarget();
   Cond.push_back(MachineOperand::CreateImm(Branch.CCValid));
   Cond.push_back(MachineOperand::CreateImm(Branch.CCMask));
   continue;
@@ -517,7 +517,7 @@ bool SystemZInstrInfo::analyzeBranch(Mac
 
 // Only handle the case where all conditional branches branch to the same
 // destination.
-if (TBB != Branch.Target->getMBB())
+if (TBB != Branch.getMBBTarget())
   return true;
 
 // If the conditions are the same, we can leave them alone.
@@ -547,7 +547,7 @@ unsigned SystemZInstrInfo::removeBranch(
   continue;
 if (!I->isBranch())
  

[llvm-branch-commits] [cfe-branch] r371058 - Merging r369760:

2019-09-05 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Sep  5 04:37:40 2019
New Revision: 371058

URL: http://llvm.org/viewvc/llvm-project?rev=371058&view=rev
Log:
Merging r369760:

r369760 | szelethus | 2019-08-23 16:21:13 +0200 (Fri, 23 Aug 2019) | 13 lines

[analyzer] Avoid unnecessary enum range check on LValueToRValue casts

Summary: EnumCastOutOfRangeChecker should not perform enum range checks on 
LValueToRValue casts, since this type of cast does not actually change the 
underlying type.   Performing the unnecessary check actually triggered an 
assertion failure deeper in EnumCastOutOfRange for certain input (which is 
captured in the accompanying test code).

Reviewers: #clang, Szelethus, gamesh411, NoQ

Reviewed By: Szelethus, gamesh411, NoQ

Subscribers: NoQ, gamesh411, xazax.hun, baloghadamsoftware, szepet, a.sidorin, 
mikhail.ramalho, donat.nagy, dkrupp, Charusso, bjope, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66014


Added:
cfe/branches/release_90/test/Analysis/enum-cast-out-of-range.c
  - copied unchanged from r369760, 
cfe/trunk/test/Analysis/enum-cast-out-of-range.c
Modified:
cfe/branches/release_90/   (props changed)

cfe/branches/release_90/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
cfe/branches/release_90/test/Analysis/enum-cast-out-of-range.cpp

Propchange: cfe/branches/release_90/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  5 04:37:40 2019
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:366429,366447-366448,366457,366474,366480,366483,366511,366670,366694,366699,366878,367008,367039,367055,367103,367134,367301,367305,367323,367387,367403,367520,367530,367661,367675,367802,367823,367906,368104,368202,368552,368561,368874,368940,369043,369093,369251,369641,369749,369829,369834,370035,370073,370850
+/cfe/trunk:366429,366447-366448,366457,366474,366480,366483,366511,366670,366694,366699,366878,367008,367039,367055,367103,367134,367301,367305,367323,367387,367403,367520,367530,367661,367675,367802,367823,367906,368104,368202,368552,368561,368874,368940,369043,369093,369251,369641,369749,369760,369829,369834,370035,370073,370850
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: 
cfe/branches/release_90/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_90/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp?rev=371058&r1=371057&r2=371058&view=diff
==
--- 
cfe/branches/release_90/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
 (original)
+++ 
cfe/branches/release_90/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
 Thu Sep  5 04:37:40 2019
@@ -91,6 +91,22 @@ void EnumCastOutOfRangeChecker::reportWa
 
 void EnumCastOutOfRangeChecker::checkPreStmt(const CastExpr *CE,
  CheckerContext &C) const {
+
+  // Only perform enum range check on casts where such checks are valid.  For
+  // all other cast kinds (where enum range checks are unnecessary or invalid),
+  // just return immediately.  TODO: The set of casts whitelisted for enum
+  // range checking may be incomplete.  Better to add a missing cast kind to
+  // enable a missing check than to generate false negatives and have to remove
+  // those later.
+  switch (CE->getCastKind()) {
+  case CK_IntegralCast:
+break;
+
+  default:
+return;
+break;
+  }
+
   // Get the value of the expression to cast.
   const llvm::Optional ValueToCast =
   C.getSVal(CE->getSubExpr()).getAs();

Modified: cfe/branches/release_90/test/Analysis/enum-cast-out-of-range.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_90/test/Analysis/enum-cast-out-of-range.cpp?rev=371058&r1=371057&r2=371058&view=diff
==
--- cfe/branches/release_90/test/Analysis/enum-cast-out-of-range.cpp (original)
+++ cfe/branches/release_90/test/Analysis/enum-cast-out-of-range.cpp Thu Sep  5 
04:37:40 2019
@@ -150,7 +150,15 @@ void scopedSpecifiedCStyle() {
   scoped_specified_t InvalidAfterRangeEnd = (scoped_specified_t)(5); // 
expected-warning {{The value provided to the cast expression is not in the 
valid range of values for the enum}}
 }
 
-void rangeContstrained1(int input) {
+unscoped_unspecified_t unused;
+void unusedExpr() {
+  // following line is not something that EnumCastOutOfRangeChecker should 
evaluate.  checker should either ignore this line
+  // or process it without producing any warnings.  However, compilation will 
(and should) still generate a warning having
+  // nothing to do with this checker.
+  unused; // expected-warning {{expres

[llvm-branch-commits] [llvm-branch] r371059 - Merging r370426:

2019-09-05 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Sep  5 04:43:42 2019
New Revision: 371059

URL: http://llvm.org/viewvc/llvm-project?rev=371059&view=rev
Log:
Merging r370426:

r370426 | maskray | 2019-08-30 04:20:49 +0200 (Fri, 30 Aug 2019) | 26 lines

[PPC32] Emit R_PPC_GOT_TPREL16 instead R_PPC_GOT_TPREL16_LO

Unlike ppc64, which has ADDISgotTprelHA+LDgotTprelL pairs,
ppc32 just uses LDgotTprelL32, so it does not make lots of sense to use
_LO without a paired _HA.

Emit R_PPC_GOT_TPREL16 instead R_PPC_GOT_TPREL16_LO to match GCC, and
get better linker relocation check. Note, R_PPC_GOT_TPREL16_{HA,LO}
don't have good linker support:

(a) lld does not support R_PPC_GOT_TPREL16_{HA,LO}.
(b) Top of tree ld.bfd does not support R_PPC_GOT_REL16_HA Initial-Exec -> 
Local-Exec relaxation:

  // a.o
  addis 3, 3, tsd_tls@got@tprel@ha
  lwz 3, tsd_tls@got@tprel@l(3)
  add 3, 3, tsd_tls@tls
  // b.o
  .section .tdata,"awT"; .globl tsd_tls; tsd_tls:

  // ld/ld-new a.o b.o
  internal error, aborting at ../../bfd/elf32-ppc.c:7952 in 
ppc_elf_relocate_section

Reviewed By: adalava

Differential Revision: https://reviews.llvm.org/D66925


Modified:
llvm/branches/release_90/   (props changed)
llvm/branches/release_90/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/branches/release_90/test/CodeGen/PowerPC/tls.ll

Propchange: llvm/branches/release_90/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  5 04:43:42 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404,370430,370720-370721,370753,371048
+/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,30,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368164,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369310,369426,369443,369886,370036,370176,370204,370271,370355,370404,370426,370430,370720-370721,370753,371048

Modified: llvm/branches/release_90/lib/Target/PowerPC/PPCAsmPrinter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=371059&r1=371058&r2=371059&view=diff
==
--- llvm/branches/release_90/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
+++ llvm/branches/release_90/lib/Target/PowerPC/PPCAsmPrinter.cpp Thu Sep  5 
04:43:42 2019
@@ -866,8 +866,10 @@ void PPCAsmPrinter::EmitInstruction(cons
 const GlobalValue *GValue = MO.getGlobal();
 MCSymbol *MOSymbol = getSymbol(GValue);
 const MCExpr *Exp =
-  MCSymbolRefExpr::create(MOSymbol, MCSymbolRefExpr::VK_PPC_GOT_TPREL_LO,
-  OutContext);
+MCSymbolRefExpr::create(MOSymbol,
+isPPC64 ? MCSymbolRefExpr::VK_PPC_GOT_TPREL_LO
+: MCSymbolRefExpr::VK_PPC_GOT_TPREL,
+OutContext);
 TmpInst.getOperand(1) = MCOperand::createExpr(Exp);
 EmitToStreamer(*OutStreamer, TmpInst);
 return;

Modified: llvm/branches/release_90/test/CodeGen/PowerPC/tls.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/test/CodeGen/PowerPC/tls.ll?rev=371059&r1=371058&r2=371059&view=diff
==
--- llvm/branches/release_90/test/CodeGen/PowerPC/tls.ll (original)
+++ llvm/branches/release_90/test/CodeGen/PowerPC/tls.ll Thu Sep  5 04:43:42 
2019
@@ -43,7 +43,7 @@ entry:
 ;OPT0-PPC32-LABEL:main2:
 ;OPT0-PPC32:   li [[REG1:[0-9]+]], _GLOBAL_OFFSET_TABLE_@l
 ;OPT0-PPC32:   addis [[REG1]], [[REG1]], _GLOBAL_OFFSET_TABLE_@ha
-;OPT0-PPC32:   lwz [[REG2:[0-9]+]], a2@got@tprel@l([[REG1]])
+;OPT0-PPC32:   lwz [[REG2:[0-9]+]], a2@got@tprel([[REG1]])
 ;OPT0-PPC32:   add 3, [[REG2]], a2@tls
 
 ;OPT0-PPC32-PIC-LABEL:  main2:
@@ -51,4 +51,4 @@ entry:
 ;OPT0-PPC32-PIC-NOT:li {{[0-9]+}}, _GLOBAL_OFFSET_TABLE_@l
 ;OPT0-PPC32-PIC-NOT:addis {{[0-9]+}}, {{[0-9+]}}, _GLOBAL_OFFSET_TABLE_@ha
 ;OPT0-PPC32-PIC-NOT:bl __tls_get_addr(a2@tlsgd)@PLT
-;OPT0-PPC32-PIC:lwz {

[llvm-branch-commits] [cfe-branch] r371060 - Merging r371027:

2019-09-05 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Sep  5 04:55:39 2019
New Revision: 371060

URL: http://llvm.org/viewvc/llvm-project?rev=371060&view=rev
Log:
Merging r371027:

r371027 | hans | 2019-09-05 10:43:00 +0200 (Thu, 05 Sep 2019) | 20 lines

Revert r361885 "[Driver] Fix -working-directory issues"

This made clang unable to open files using relative paths on network shares on
Windows (PR43204). On the bug it was pointed out that createPhysicalFileSystem()
is not terribly mature, and using it is risky. Reverting for now until there's
a clear way forward.

> Currently the `-working-directory` option does not actually impact the working
> directory for all of the clang driver, it only impacts how files are looked up
> to make sure they exist.  This means that that clang passes the wrong paths
> to -fdebug-compilation-dir and -coverage-notes-file.
>
> This patch fixes that by changing all the places in the driver where we 
> convert
> to absolute paths to use the VFS, and then calling setCurrentWorkingDirectory 
> on
> the VFS.  This also changes the default VFS for `Driver` to use a virtualized
> working directory, instead of changing the process's working directory.
>
> Differential Revision: https://reviews.llvm.org/D62271

This also revertes the part of r369938 which checked that -working-directory 
works.


Modified:
cfe/branches/release_90/   (props changed)
cfe/branches/release_90/include/clang/Basic/DiagnosticDriverKinds.td
cfe/branches/release_90/lib/Driver/Driver.cpp
cfe/branches/release_90/lib/Driver/ToolChains/Clang.cpp
cfe/branches/release_90/test/Driver/working-directory.c

Propchange: cfe/branches/release_90/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  5 04:55:39 2019
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:366429,366447-366448,366457,366474,366480,366483,366511,366670,366694,366699,366878,367008,367039,367055,367103,367134,367301,367305,367323,367387,367403,367520,367530,367661,367675,367802,367823,367906,368104,368202,368552,368561,368874,368940,369043,369093,369251,369641,369749,369760,369829,369834,370035,370073,370850
+/cfe/trunk:366429,366447-366448,366457,366474,366480,366483,366511,366670,366694,366699,366878,367008,367039,367055,367103,367134,367301,367305,367323,367387,367403,367520,367530,367661,367675,367802,367823,367906,368104,368202,368552,368561,368874,368940,369043,369093,369251,369641,369749,369760,369829,369834,370035,370073,370850,371027
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_90/include/clang/Basic/DiagnosticDriverKinds.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_90/include/clang/Basic/DiagnosticDriverKinds.td?rev=371060&r1=371059&r2=371060&view=diff
==
--- cfe/branches/release_90/include/clang/Basic/DiagnosticDriverKinds.td 
(original)
+++ cfe/branches/release_90/include/clang/Basic/DiagnosticDriverKinds.td Thu 
Sep  5 04:55:39 2019
@@ -91,8 +91,6 @@ def err_no_external_assembler : Error<
   "there is no external assembler that can be used on this platform">;
 def err_drv_unable_to_remove_file : Error<
   "unable to remove file: %0">;
-def err_drv_unable_to_set_working_directory : Error <
-  "unable to set working directory: %0">;
 def err_drv_command_failure : Error<
   "unable to execute command: %0">;
 def err_drv_invalid_darwin_version : Error<

Modified: cfe/branches/release_90/lib/Driver/Driver.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_90/lib/Driver/Driver.cpp?rev=371060&r1=371059&r2=371060&view=diff
==
--- cfe/branches/release_90/lib/Driver/Driver.cpp (original)
+++ cfe/branches/release_90/lib/Driver/Driver.cpp Thu Sep  5 04:55:39 2019
@@ -133,7 +133,7 @@ Driver::Driver(StringRef ClangExecutable
 
   // Provide a sane fallback if no VFS is specified.
   if (!this->VFS)
-this->VFS = llvm::vfs::createPhysicalFileSystem().release();
+this->VFS = llvm::vfs::getRealFileSystem();
 
   Name = llvm::sys::path::filename(ClangExecutable);
   Dir = llvm::sys::path::parent_path(ClangExecutable);
@@ -1010,11 +1010,6 @@ Compilation *Driver::BuildCompilation(Ar
 }
   }
 
-  // Check for working directory option before accessing any files
-  if (Arg *WD = Args.getLastArg(options::OPT_working_directory))
-if (VFS->setCurrentWorkingDirectory(WD->getValue()))
-  Diag(diag::err_drv_unable_to_set_working_directory) << WD->getValue();
-
   // FIXME: This stuff needs to go into the Compilation, not the driver.
   bool CCCPrintPhases;
 
@@ -1995,11 +1990,20 @@ bool Driver::DiagnoseInputExistence(cons
   if (Value == "-")
 return true;
 
-  if (getVFS()