svn commit: r314418 - in projects/clang400-import: contrib/llvm/lib/CodeGen contrib/llvm/tools/llvm-xray lib/clang/include/clang/Basic lib/clang/include/lld/Config

Dimitry Andric dim at FreeBSD.org
Tue Feb 28 21:18:25 UTC 2017


Author: dim
Date: Tue Feb 28 21:18:23 2017
New Revision: 314418
URL: https://svnweb.freebsd.org/changeset/base/314418

Log:
  Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
  r296509, and update build glue.

Modified:
  projects/clang400-import/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp
  projects/clang400-import/contrib/llvm/tools/llvm-xray/xray-converter.cc
  projects/clang400-import/contrib/llvm/tools/llvm-xray/xray-extract.cc
  projects/clang400-import/lib/clang/include/clang/Basic/Version.inc
  projects/clang400-import/lib/clang/include/lld/Config/Version.inc
Directory Properties:
  projects/clang400-import/contrib/compiler-rt/   (props changed)
  projects/clang400-import/contrib/libc++/   (props changed)
  projects/clang400-import/contrib/llvm/   (props changed)
  projects/clang400-import/contrib/llvm/tools/clang/   (props changed)
  projects/clang400-import/contrib/llvm/tools/lld/   (props changed)
  projects/clang400-import/contrib/llvm/tools/lldb/   (props changed)

Modified: projects/clang400-import/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp
==============================================================================
--- projects/clang400-import/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp	Tue Feb 28 21:07:46 2017	(r314417)
+++ projects/clang400-import/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp	Tue Feb 28 21:18:23 2017	(r314418)
@@ -707,9 +707,8 @@ void ExeDepsFix::visitSoftInstr(MachineI
 
   // Kill off any remaining uses that don't match available, and build a list of
   // incoming DomainValues that we want to merge.
-  SmallVector<LiveReg, 4> Regs;
-  for (SmallVectorImpl<int>::iterator i=used.begin(), e=used.end(); i!=e; ++i) {
-    int rx = *i;
+  SmallVector<const LiveReg *, 4> Regs;
+  for (int rx : used) {
     assert(LiveRegs && "no space allocated for live registers");
     const LiveReg &LR = LiveRegs[rx];
     // This useless DomainValue could have been missed above.
@@ -718,16 +717,11 @@ void ExeDepsFix::visitSoftInstr(MachineI
       continue;
     }
     // Sorted insertion.
-    bool Inserted = false;
-    for (SmallVectorImpl<LiveReg>::iterator i = Regs.begin(), e = Regs.end();
-           i != e && !Inserted; ++i) {
-      if (LR.Def < i->Def) {
-        Inserted = true;
-        Regs.insert(i, LR);
-      }
-    }
-    if (!Inserted)
-      Regs.push_back(LR);
+    auto I = std::upper_bound(Regs.begin(), Regs.end(), &LR,
+                              [](const LiveReg *LHS, const LiveReg *RHS) {
+                                return LHS->Def < RHS->Def;
+                              });
+    Regs.insert(I, &LR);
   }
 
   // doms are now sorted in order of appearance. Try to merge them all, giving
@@ -735,14 +729,14 @@ void ExeDepsFix::visitSoftInstr(MachineI
   DomainValue *dv = nullptr;
   while (!Regs.empty()) {
     if (!dv) {
-      dv = Regs.pop_back_val().Value;
+      dv = Regs.pop_back_val()->Value;
       // Force the first dv to match the current instruction.
       dv->AvailableDomains = dv->getCommonDomains(available);
       assert(dv->AvailableDomains && "Domain should have been filtered");
       continue;
     }
 
-    DomainValue *Latest = Regs.pop_back_val().Value;
+    DomainValue *Latest = Regs.pop_back_val()->Value;
     // Skip already merged values.
     if (Latest == dv || Latest->Next)
       continue;

Modified: projects/clang400-import/contrib/llvm/tools/llvm-xray/xray-converter.cc
==============================================================================
--- projects/clang400-import/contrib/llvm/tools/llvm-xray/xray-converter.cc	Tue Feb 28 21:07:46 2017	(r314417)
+++ projects/clang400-import/contrib/llvm/tools/llvm-xray/xray-converter.cc	Tue Feb 28 21:18:23 2017	(r314418)
@@ -98,7 +98,7 @@ void TraceConverter::exportAsYAML(const 
                                        : std::to_string(R.FuncId),
                              R.TSC, R.TId});
   }
-  Output Out(OS);
+  Output Out(OS, nullptr, 0);
   Out << Trace;
 }
 

Modified: projects/clang400-import/contrib/llvm/tools/llvm-xray/xray-extract.cc
==============================================================================
--- projects/clang400-import/contrib/llvm/tools/llvm-xray/xray-extract.cc	Tue Feb 28 21:07:46 2017	(r314417)
+++ projects/clang400-import/contrib/llvm/tools/llvm-xray/xray-extract.cc	Tue Feb 28 21:18:23 2017	(r314418)
@@ -270,7 +270,7 @@ void InstrumentationMapExtractor::export
     YAMLSleds.push_back({FunctionIds[Sled.Function], Sled.Address,
                          Sled.Function, Sled.Kind, Sled.AlwaysInstrument});
   }
-  Output Out(OS);
+  Output Out(OS, nullptr, 0);
   Out << YAMLSleds;
 }
 

Modified: projects/clang400-import/lib/clang/include/clang/Basic/Version.inc
==============================================================================
--- projects/clang400-import/lib/clang/include/clang/Basic/Version.inc	Tue Feb 28 21:07:46 2017	(r314417)
+++ projects/clang400-import/lib/clang/include/clang/Basic/Version.inc	Tue Feb 28 21:18:23 2017	(r314418)
@@ -8,4 +8,4 @@
 
 #define	CLANG_VENDOR			"FreeBSD "
 
-#define	SVN_REVISION			"296202"
+#define	SVN_REVISION			"296509"

Modified: projects/clang400-import/lib/clang/include/lld/Config/Version.inc
==============================================================================
--- projects/clang400-import/lib/clang/include/lld/Config/Version.inc	Tue Feb 28 21:07:46 2017	(r314417)
+++ projects/clang400-import/lib/clang/include/lld/Config/Version.inc	Tue Feb 28 21:18:23 2017	(r314418)
@@ -4,5 +4,5 @@
 #define LLD_VERSION_STRING "4.0.0"
 #define LLD_VERSION_MAJOR 4
 #define LLD_VERSION_MINOR 0
-#define LLD_REVISION_STRING "296202"
+#define LLD_REVISION_STRING "296509"
 #define LLD_REPOSITORY_STRING "FreeBSD"


More information about the svn-src-projects mailing list