Author: dim
Date: Mon Oct 12 21:31:12 2020
New Revision: 366653
URL: https://svnweb.freebsd.org/changeset/base/366653

Log:
  Vendor import of llvm-project branch release/11.x
  llvmorg-11.0.0-0-g176249bd673 (aka 11.0.0 release).

Modified:
  vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/TailDuplicator.cpp

Modified: vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td
==============================================================================
--- vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td      
Mon Oct 12 18:02:51 2020        (r366652)
+++ vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td      
Mon Oct 12 21:31:12 2020        (r366653)
@@ -1435,11 +1435,11 @@ def fno_pch_validate_input_files_content:
   Group<f_Group>, Flags<[DriverOption]>;
 def fpch_instantiate_templates:
   Flag <["-"], "fpch-instantiate-templates">,
-  Group<f_Group>, Flags<[CC1Option]>,
+  Group<f_Group>, Flags<[CC1Option, CoreOption]>,
   HelpText<"Instantiate templates already while building a PCH">;
 def fno_pch_instantiate_templates:
   Flag <["-"], "fno-pch-instantiate-templates">,
-  Group<f_Group>, Flags<[CC1Option]>;
+  Group<f_Group>, Flags<[CC1Option, CoreOption]>;
 defm pch_codegen: OptInFFlag<"pch-codegen", "Generate ", "Do not generate ",
   "code for uses of this PCH that assumes an explicit object file will be 
built for the PCH">;
 defm pch_debuginfo: OptInFFlag<"pch-debuginfo", "Generate ", "Do not generate 
",

Modified: vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp
==============================================================================
--- vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp      
Mon Oct 12 18:02:51 2020        (r366652)
+++ vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp      
Mon Oct 12 21:31:12 2020        (r366653)
@@ -1197,7 +1197,11 @@ void Clang::AddPreprocessingOptions(Compilation &C, co
     if (YcArg && JA.getKind() >= Action::PrecompileJobClass &&
         JA.getKind() <= Action::AssembleJobClass) {
       CmdArgs.push_back(Args.MakeArgString("-building-pch-with-obj"));
-      CmdArgs.push_back(Args.MakeArgString("-fpch-instantiate-templates"));
+      // -fpch-instantiate-templates is the default when creating
+      // precomp using /Yc
+      if (Args.hasFlag(options::OPT_fpch_instantiate_templates,
+                       options::OPT_fno_pch_instantiate_templates, true))
+        CmdArgs.push_back(Args.MakeArgString("-fpch-instantiate-templates"));
     }
     if (YcArg || YuArg) {
       StringRef ThroughHeader = YcArg ? YcArg->getValue() : YuArg->getValue();

Modified: 
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
==============================================================================
--- 
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
   Mon Oct 12 18:02:51 2020        (r366652)
+++ 
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
   Mon Oct 12 21:31:12 2020        (r366653)
@@ -5751,10 +5751,8 @@ SDValue TargetLowering::getNegatedExpression(SDValue O
 
     // If we already have the use of the negated floating constant, it is free
     // to negate it even it has multiple uses.
-    if (!Op.hasOneUse() && CFP.use_empty()) {
-      RemoveDeadNode(CFP);
+    if (!Op.hasOneUse() && CFP.use_empty())
       break;
-    }
     Cost = NegatibleCost::Neutral;
     return CFP;
   }

Modified: vendor/llvm-project/release-11.x/llvm/lib/CodeGen/TailDuplicator.cpp
==============================================================================
--- vendor/llvm-project/release-11.x/llvm/lib/CodeGen/TailDuplicator.cpp        
Mon Oct 12 18:02:51 2020        (r366652)
+++ vendor/llvm-project/release-11.x/llvm/lib/CodeGen/TailDuplicator.cpp        
Mon Oct 12 21:31:12 2020        (r366653)
@@ -627,6 +627,14 @@ bool TailDuplicator::shouldTailDuplicate(bool IsSimple
     if (PreRegAlloc && MI.isCall())
       return false;
 
+    // TailDuplicator::appendCopies will erroneously place COPYs after
+    // INLINEASM_BR instructions after 4b0aa5724fea, which demonstrates the 
same
+    // bug that was fixed in f7a53d82c090.
+    // FIXME: Use findPHICopyInsertPoint() to find the correct insertion point
+    //        for the COPY when replacing PHIs.
+    if (MI.getOpcode() == TargetOpcode::INLINEASM_BR)
+      return false;
+
     if (MI.isBundle())
       InstrCount += MI.getBundleSize();
     else if (!MI.isPHI() && !MI.isMetaInstruction())
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to