Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch

r296509, and update build glue.
This commit is contained in:
Dimitry Andric 2017-02-28 21:18:23 +00:00
5 changed files with 13 additions and 19 deletions

View File

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

View File

@ -98,7 +98,7 @@ void TraceConverter::exportAsYAML(const Trace &Records, raw_ostream &OS) {
: std::to_string(R.FuncId), : std::to_string(R.FuncId),
R.TSC, R.TId}); R.TSC, R.TId});
} }
Output Out(OS); Output Out(OS, nullptr, 0);
Out << Trace; Out << Trace;
} }

View File

@ -270,7 +270,7 @@ void InstrumentationMapExtractor::exportAsYAML(raw_ostream &OS) {
YAMLSleds.push_back({FunctionIds[Sled.Function], Sled.Address, YAMLSleds.push_back({FunctionIds[Sled.Function], Sled.Address,
Sled.Function, Sled.Kind, Sled.AlwaysInstrument}); Sled.Function, Sled.Kind, Sled.AlwaysInstrument});
} }
Output Out(OS); Output Out(OS, nullptr, 0);
Out << YAMLSleds; Out << YAMLSleds;
} }

View File

@ -8,4 +8,4 @@
#define CLANG_VENDOR "FreeBSD " #define CLANG_VENDOR "FreeBSD "
#define SVN_REVISION "296202" #define SVN_REVISION "296509"

View File

@ -4,5 +4,5 @@
#define LLD_VERSION_STRING "4.0.0" #define LLD_VERSION_STRING "4.0.0"
#define LLD_VERSION_MAJOR 4 #define LLD_VERSION_MAJOR 4
#define LLD_VERSION_MINOR 0 #define LLD_VERSION_MINOR 0
#define LLD_REVISION_STRING "296202" #define LLD_REVISION_STRING "296509"
#define LLD_REPOSITORY_STRING "FreeBSD" #define LLD_REPOSITORY_STRING "FreeBSD"