Skip to content

Commit

Permalink
Some improvements to DFG and FTL dumps to improve readability and sea…
Browse files Browse the repository at this point in the history
…rchability.

https://bugs.webkit.org/show_bug.cgi?id=207024

Reviewed by Saam Barati.

This patch applies the following changes:

1. Prefix Air and B2 dumps with a tierName prefix.
   The tierName prefix strings are as follows:

       "FTL ", "DFG ", "b3  ", "Air ", "asm "

   The choice to use a lowercase "b3" and "asm" with upper case "Air" is
   deliberate because I found this combination to be easier to read and scan as
   prefixes of the dump lines.  See dump samples below.

2. Make DFG node IDs consistently expressed as D@<node index> e.g. D@104.
   The definition of the node will be the id followed by a colon e.g. D@104:
   This makes it easy to search references to this node anywhere in the dump.

   Make B3 nodes expressed as b@<node index> e.g. b@542.
   This also makes it searchable since there's now no ambiguity between b@542 and
   D@542.

   The choice to use a lowercase "b" and an uppercase "D" is intentional because
   "b@542" and "d@542" looks too similar, and I prefer to not use too much
   uppercase.  Plus this makes the node consistent in capitalization with the
   tierName prefixes above of "b3  " and "DFG " respectively.

Here's a sample of what the dumps now look like:

DFG graph dump:
<code>
    ...
         6 55:   <-- foo#DFndCW:<0x62d0000b8140, bc#65, Call, known callee: Object: 0x62d000035920 with butterfly 0x0 (Structure %AN:Function), StructureID: 12711, numArgs+this = 1, numFixup = 0, stackOffset = -16 (loc0 maps to loc16)>
      3  6 55:   D@79:< 3:->    ArithAdd(Int32:Kill:D@95, Int32:D@42, Int32|PureNum|UseAsOther, Int32, CheckOverflow, Exits, bc#71, ExitValid)
      4  6 55:    D@3:<!0:->    KillStack(MustGen, loc7, W:Stack(loc7), ClobbersExit, bc#71, ExitInvalid)
      5  6 55:   D@85:<!0:->    MovHint(Check:Untyped:D@79, MustGen, loc7, W:SideState, ClobbersExit, bc#71, ExitInvalid)
      6  6 55:  D@102:< 1:->    CompareLess(Int32:D@79, Int32:D@89, Boolean|UseAsOther, Bool, Exits, bc#74, ExitValid)
      7  6 55:  D@104:<!0:->    Branch(KnownBoolean:Kill:D@102, MustGen, T:#1/w:10.000000, F:#7/w:1.000000, W:SideState, bc#74, ExitInvalid)
    ...
</code>

B3 graph dump:
<code>
    ...
    b3  BB#14: ; frequency = 10.000000
    b3    Predecessors: #13
    b3      Int32 b@531 = CheckAdd(b@10:WarmAny, $1(b@1):WarmAny, b@64:ColdAny, b@10:ColdAny, generator = 0x606000022e80, earlyClobbered = [], lateClobbered = [], usedRegisters = [], ExitsSideways|Reads:Top, D@79)
    b3      Int32 b@539 = LessThan(b@531, $100(b@578), D@102)
    b3      Void b@542 = Branch(b@539, Terminal, D@104)
    b3    Successors: Then:#2, Else:#15
    ...
</code>

Air graph dump:
<code>
    ...
    Air BB#5: ; frequency = 10.000000
    Air   Predecessors: #4
    Air     Move -96(%rbp), %rax, b@531
    Air     Patch &BranchAdd32(3,ForceLateUseUnlessRecoverable)3, Overflow, $1, %rax, -104(%rbp), -96(%rbp), b@531
    Air     Branch32 LessThan, %rax, $100, b@542
    Air   Successors: #1, #6
    ...
</code>

FTL disassembly dump:
<code>
    ...
    Air BB#5: ; frequency = 10.000000
    Air   Predecessors: #4
    DFG       D@42:< 2:->   JSConstant(JS|PureInt, Int32, Int32: 1, bc#0, ExitInvalid)
    DFG       D@79:< 3:->   ArithAdd(Int32:Kill:D@95, Int32:D@42, Int32|PureNum|UseAsOther, Int32, CheckOverflow, Exits, bc#71, ExitValid)
    b3            Int32 b@1 = Const32(1)
    b3            Int32 b@531 = CheckAdd(b@10:WarmAny, $1(b@1):WarmAny, b@64:ColdAny, b@10:ColdAny, generator = 0x606000022e80, earlyClobbered = [], lateClobbered = [], usedRegisters = [%rax, %rbx, %rbp, %r12], ExitsSideways|Reads:Top, D@79)
    Air               Move -96(%rbp), %rax, b@531
    asm                   0x4576b9c04712: mov -0x60(%rbp), %rax
    Air               Patch &BranchAdd32(3,ForceLateUseUnlessRecoverable)3, Overflow, $1, %rax, -104(%rbp), -96(%rbp), b@531
    asm                   0x4576b9c04716: inc %eax
    asm                   0x4576b9c04718: jo 0x4576b9c04861
    DFG       D@89:< 1:->   JSConstant(JS|PureNum|UseAsOther, NonBoolInt32, Int32: 100, bc#0, ExitInvalid)
    DFG      D@102:< 1:->   CompareLess(Int32:D@79, Int32:D@89, Boolean|UseAsOther, Bool, Exits, bc#74, ExitValid)
    DFG      D@104:<!0:->   Branch(KnownBoolean:Kill:D@102, MustGen, T:#1/w:10.000000, F:#7/w:1.000000, W:SideState, bc#74, ExitInvalid)
    b3            Int32 b@578 = Const32(100, D@89)
    b3            Int32 b@539 = LessThan(b@531, $100(b@578), D@102)
    b3            Void b@542 = Branch(b@539, Terminal, D@104)
    Air               Branch32 LessThan, %rax, $100, b@542
    asm                   0x4576b9c0471e: cmp $0x64, %eax
    asm                   0x4576b9c04721: jl 0x4576b9c0462f
    Air   Successors: #1, #6
    ...
</code>

* b3/B3BasicBlock.cpp:
(JSC::B3::BasicBlock::deepDump const):
* b3/B3Common.cpp:
* b3/B3Common.h:
* b3/B3Generate.cpp:
(JSC::B3::generateToAir):
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::dump const):
* b3/B3Value.cpp:
* b3/air/AirBasicBlock.cpp:
(JSC::B3::Air::BasicBlock::deepDump const):
(JSC::B3::Air::BasicBlock::dumpHeader const):
(JSC::B3::Air::BasicBlock::dumpFooter const):
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::dump const):
* b3/air/AirCode.h:
* b3/air/AirDisassembler.cpp:
(JSC::B3::Air::Disassembler::dump):
* b3/air/AirGenerate.cpp:
(JSC::B3::Air::prepareForGeneration):
* dfg/DFGCommon.cpp:
* dfg/DFGCommon.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::dumpBlockHeader):
* dfg/DFGNode.cpp:
(WTF::printInternal):
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLCompile.h:
* ftl/FTLState.cpp:
(JSC::FTL::State::State):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@255482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mark.lam@apple.com committed Jan 31, 2020
1 parent 0c9b6d8 commit f7af673
Show file tree
Hide file tree
Showing 19 changed files with 208 additions and 61 deletions.
129 changes: 129 additions & 0 deletions Source/JavaScriptCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,132 @@
2020-01-30 Mark Lam <mark.lam@apple.com>

Some improvements to DFG and FTL dumps to improve readability and searchability.
https://bugs.webkit.org/show_bug.cgi?id=207024

Reviewed by Saam Barati.

This patch applies the following changes:

1. Prefix Air and B2 dumps with a tierName prefix.
The tierName prefix strings are as follows:

"FTL ", "DFG ", "b3 ", "Air ", "asm "

The choice to use a lowercase "b3" and "asm" with upper case "Air" is
deliberate because I found this combination to be easier to read and scan as
prefixes of the dump lines. See dump samples below.

2. Make DFG node IDs consistently expressed as D@<node index> e.g. D@104.
The definition of the node will be the id followed by a colon e.g. D@104:
This makes it easy to search references to this node anywhere in the dump.

Make B3 nodes expressed as b@<node index> e.g. b@542.
This also makes it searchable since there's now no ambiguity between b@542 and
D@542.

The choice to use a lowercase "b" and an uppercase "D" is intentional because
"b@542" and "d@542" looks too similar, and I prefer to not use too much
uppercase. Plus this makes the node consistent in capitalization with the
tierName prefixes above of "b3 " and "DFG " respectively.

Here's a sample of what the dumps now look like:

DFG graph dump:
<code>
...
6 55: <-- foo#DFndCW:<0x62d0000b8140, bc#65, Call, known callee: Object: 0x62d000035920 with butterfly 0x0 (Structure %AN:Function), StructureID: 12711, numArgs+this = 1, numFixup = 0, stackOffset = -16 (loc0 maps to loc16)>
3 6 55: D@79:< 3:-> ArithAdd(Int32:Kill:D@95, Int32:D@42, Int32|PureNum|UseAsOther, Int32, CheckOverflow, Exits, bc#71, ExitValid)
4 6 55: D@3:<!0:-> KillStack(MustGen, loc7, W:Stack(loc7), ClobbersExit, bc#71, ExitInvalid)
5 6 55: D@85:<!0:-> MovHint(Check:Untyped:D@79, MustGen, loc7, W:SideState, ClobbersExit, bc#71, ExitInvalid)
6 6 55: D@102:< 1:-> CompareLess(Int32:D@79, Int32:D@89, Boolean|UseAsOther, Bool, Exits, bc#74, ExitValid)
7 6 55: D@104:<!0:-> Branch(KnownBoolean:Kill:D@102, MustGen, T:#1/w:10.000000, F:#7/w:1.000000, W:SideState, bc#74, ExitInvalid)
...
</code>

B3 graph dump:
<code>
...
b3 BB#14: ; frequency = 10.000000
b3 Predecessors: #13
b3 Int32 b@531 = CheckAdd(b@10:WarmAny, $1(b@1):WarmAny, b@64:ColdAny, b@10:ColdAny, generator = 0x606000022e80, earlyClobbered = [], lateClobbered = [], usedRegisters = [], ExitsSideways|Reads:Top, D@79)
b3 Int32 b@539 = LessThan(b@531, $100(b@578), D@102)
b3 Void b@542 = Branch(b@539, Terminal, D@104)
b3 Successors: Then:#2, Else:#15
...
</code>

Air graph dump:
<code>
...
Air BB#5: ; frequency = 10.000000
Air Predecessors: #4
Air Move -96(%rbp), %rax, b@531
Air Patch &BranchAdd32(3,ForceLateUseUnlessRecoverable)3, Overflow, $1, %rax, -104(%rbp), -96(%rbp), b@531
Air Branch32 LessThan, %rax, $100, b@542
Air Successors: #1, #6
...
</code>

FTL disassembly dump:
<code>
...
Air BB#5: ; frequency = 10.000000
Air Predecessors: #4
DFG D@42:< 2:-> JSConstant(JS|PureInt, Int32, Int32: 1, bc#0, ExitInvalid)
DFG D@79:< 3:-> ArithAdd(Int32:Kill:D@95, Int32:D@42, Int32|PureNum|UseAsOther, Int32, CheckOverflow, Exits, bc#71, ExitValid)
b3 Int32 b@1 = Const32(1)
b3 Int32 b@531 = CheckAdd(b@10:WarmAny, $1(b@1):WarmAny, b@64:ColdAny, b@10:ColdAny, generator = 0x606000022e80, earlyClobbered = [], lateClobbered = [], usedRegisters = [%rax, %rbx, %rbp, %r12], ExitsSideways|Reads:Top, D@79)
Air Move -96(%rbp), %rax, b@531
asm 0x4576b9c04712: mov -0x60(%rbp), %rax
Air Patch &BranchAdd32(3,ForceLateUseUnlessRecoverable)3, Overflow, $1, %rax, -104(%rbp), -96(%rbp), b@531
asm 0x4576b9c04716: inc %eax
asm 0x4576b9c04718: jo 0x4576b9c04861
DFG D@89:< 1:-> JSConstant(JS|PureNum|UseAsOther, NonBoolInt32, Int32: 100, bc#0, ExitInvalid)
DFG D@102:< 1:-> CompareLess(Int32:D@79, Int32:D@89, Boolean|UseAsOther, Bool, Exits, bc#74, ExitValid)
DFG D@104:<!0:-> Branch(KnownBoolean:Kill:D@102, MustGen, T:#1/w:10.000000, F:#7/w:1.000000, W:SideState, bc#74, ExitInvalid)
b3 Int32 b@578 = Const32(100, D@89)
b3 Int32 b@539 = LessThan(b@531, $100(b@578), D@102)
b3 Void b@542 = Branch(b@539, Terminal, D@104)
Air Branch32 LessThan, %rax, $100, b@542
asm 0x4576b9c0471e: cmp $0x64, %eax
asm 0x4576b9c04721: jl 0x4576b9c0462f
Air Successors: #1, #6
...
</code>

* b3/B3BasicBlock.cpp:
(JSC::B3::BasicBlock::deepDump const):
* b3/B3Common.cpp:
* b3/B3Common.h:
* b3/B3Generate.cpp:
(JSC::B3::generateToAir):
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::dump const):
* b3/B3Value.cpp:
* b3/air/AirBasicBlock.cpp:
(JSC::B3::Air::BasicBlock::deepDump const):
(JSC::B3::Air::BasicBlock::dumpHeader const):
(JSC::B3::Air::BasicBlock::dumpFooter const):
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::dump const):
* b3/air/AirCode.h:
* b3/air/AirDisassembler.cpp:
(JSC::B3::Air::Disassembler::dump):
* b3/air/AirGenerate.cpp:
(JSC::B3::Air::prepareForGeneration):
* dfg/DFGCommon.cpp:
* dfg/DFGCommon.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::dumpBlockHeader):
* dfg/DFGNode.cpp:
(WTF::printInternal):
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLCompile.h:
* ftl/FTLState.cpp:
(JSC::FTL::State::State):

2020-01-30 Yusuke Suzuki <ysuzuki@apple.com>

[WTF] Remove PackedIntVector
Expand Down
10 changes: 5 additions & 5 deletions Source/JavaScriptCore/b3/B3BasicBlock.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2016 Apple Inc. All rights reserved.
* Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -154,13 +154,13 @@ void BasicBlock::dump(PrintStream& out) const

void BasicBlock::deepDump(const Procedure& proc, PrintStream& out) const
{
out.print("BB", *this, ": ; frequency = ", m_frequency, "\n");
out.print(tierName, "BB", *this, ": ; frequency = ", m_frequency, "\n");
if (predecessors().size())
out.print(" Predecessors: ", pointerListDump(predecessors()), "\n");
out.print(tierName, " Predecessors: ", pointerListDump(predecessors()), "\n");
for (Value* value : *this)
out.print(" ", B3::deepDump(proc, value), "\n");
out.print(tierName, " ", B3::deepDump(proc, value), "\n");
if (!successors().isEmpty()) {
out.print(" Successors: ");
out.print(tierName, " Successors: ");
if (size())
last()->dumpSuccessors(this, out);
else
Expand Down
4 changes: 3 additions & 1 deletion Source/JavaScriptCore/b3/B3Common.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015 Apple Inc. All rights reserved.
* Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -35,6 +35,8 @@

namespace JSC { namespace B3 {

const char* const tierName = "b3 ";

bool shouldDumpIR(B3CompilationMode mode)
{
#if ENABLE(FTL_JIT)
Expand Down
4 changes: 3 additions & 1 deletion Source/JavaScriptCore/b3/B3Common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2017 Apple Inc. All rights reserved.
* Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -34,6 +34,8 @@

namespace JSC { namespace B3 {

extern const char* const tierName;

enum B3CompilationMode {
B3Mode,
AirMode
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/b3/B3Generate.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2018 Apple Inc. All rights reserved.
* Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -74,7 +74,7 @@ void generateToAir(Procedure& procedure)
TimingScope timingScope("generateToAir");

if (shouldDumpIR(B3Mode) && !shouldDumpIRAtEachPhase(B3Mode)) {
dataLog("Initial B3:\n");
dataLog(tierName, "Initial B3:\n");
dataLog(procedure);
}

Expand Down
16 changes: 8 additions & 8 deletions Source/JavaScriptCore/b3/B3Procedure.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2019 Apple Inc. All rights reserved.
* Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -239,22 +239,22 @@ void Procedure::dump(PrintStream& out) const
continue;

if (!didPrint) {
dataLog("Orphaned values:\n");
dataLog(tierName, "Orphaned values:\n");
didPrint = true;
}
dataLog(" ", deepDump(*this, value), "\n");
dataLog(tierName, " ", deepDump(*this, value), "\n");
}
if (hasQuirks())
out.print("Has Quirks: True\n");
out.print(tierName, "Has Quirks: True\n");
if (variables().size()) {
out.print("Variables:\n");
out.print(tierName, "Variables:\n");
for (Variable* variable : variables())
out.print(" ", deepDump(variable), "\n");
out.print(tierName, " ", deepDump(variable), "\n");
}
if (stackSlots().size()) {
out.print("Stack slots:\n");
out.print(tierName, "Stack slots:\n");
for (StackSlot* slot : stackSlots())
out.print(" ", pointerDump(slot), ": ", deepDump(slot), "\n");
out.print(tierName, " ", pointerDump(slot), ": ", deepDump(slot), "\n");
}
if (m_byproducts->count())
out.print(*m_byproducts);
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/b3/B3Value.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2017 Apple Inc. All rights reserved.
* Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -51,7 +51,7 @@

namespace JSC { namespace B3 {

const char* const Value::dumpPrefix = "@";
const char* const Value::dumpPrefix = "b@";
void DeepValueDump::dump(PrintStream& out) const
{
if (m_value)
Expand Down
10 changes: 5 additions & 5 deletions Source/JavaScriptCore/b3/air/AirBasicBlock.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2017 Apple Inc. All rights reserved.
* Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -72,21 +72,21 @@ void BasicBlock::deepDump(PrintStream& out) const
{
dumpHeader(out);
for (const Inst& inst : *this)
out.print(" ", inst, "\n");
out.print(tierName, " ", inst, "\n");
dumpFooter(out);
}

void BasicBlock::dumpHeader(PrintStream& out) const
{
out.print("BB", *this, ": ; frequency = ", m_frequency, "\n");
out.print(tierName, "BB", *this, ": ; frequency = ", m_frequency, "\n");
if (predecessors().size())
out.print(" Predecessors: ", pointerListDump(predecessors()), "\n");
out.print(tierName, " Predecessors: ", pointerListDump(predecessors()), "\n");
}

void BasicBlock::dumpFooter(PrintStream& out) const
{
if (successors().size())
out.print(" Successors: ", listDump(successors()), "\n");
out.print(tierName, " Successors: ", listDump(successors()), "\n");
}

BasicBlock::BasicBlock(unsigned index, double frequency)
Expand Down
20 changes: 11 additions & 9 deletions Source/JavaScriptCore/b3/air/AirCode.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2018 Apple Inc. All rights reserved.
* Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -40,6 +40,8 @@

namespace JSC { namespace B3 { namespace Air {

const char* const tierName = "Air ";

static void defaultPrologueGenerator(CCallHelpers& jit, Code& code)
{
jit.emitFunctionPrologue();
Expand Down Expand Up @@ -248,26 +250,26 @@ void Code::resetReachability()
void Code::dump(PrintStream& out) const
{
if (!m_entrypoints.isEmpty())
out.print("Entrypoints: ", listDump(m_entrypoints), "\n");
out.print(tierName, "Entrypoints: ", listDump(m_entrypoints), "\n");
for (BasicBlock* block : *this)
out.print(deepDump(block));
if (stackSlots().size()) {
out.print("Stack slots:\n");
out.print(tierName, "Stack slots:\n");
for (StackSlot* slot : stackSlots())
out.print(" ", pointerDump(slot), ": ", deepDump(slot), "\n");
out.print(tierName, " ", pointerDump(slot), ": ", deepDump(slot), "\n");
}
if (specials().size()) {
out.print("Specials:\n");
out.print(tierName, "Specials:\n");
for (Special* special : specials())
out.print(" ", deepDump(special), "\n");
out.print(tierName, " ", deepDump(special), "\n");
}
if (m_frameSize || m_stackIsAllocated)
out.print("Frame size: ", m_frameSize, m_stackIsAllocated ? " (Allocated)" : "", "\n");
out.print(tierName, "Frame size: ", m_frameSize, m_stackIsAllocated ? " (Allocated)" : "", "\n");
if (m_callArgAreaSize)
out.print("Call arg area size: ", m_callArgAreaSize, "\n");
out.print(tierName, "Call arg area size: ", m_callArgAreaSize, "\n");
RegisterAtOffsetList calleeSaveRegisters = this->calleeSaveRegisterAtOffsetList();
if (calleeSaveRegisters.size())
out.print("Callee saves: ", calleeSaveRegisters, "\n");
out.print(tierName, "Callee saves: ", calleeSaveRegisters, "\n");
}

unsigned Code::findFirstBlockIndex(unsigned index) const
Expand Down
4 changes: 3 additions & 1 deletion Source/JavaScriptCore/b3/air/AirCode.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2018 Apple Inc. All rights reserved.
* Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -63,6 +63,8 @@ typedef SharedTask<WasmBoundsCheckGeneratorFunction> WasmBoundsCheckGenerator;
typedef void PrologueGeneratorFunction(CCallHelpers&, Code&);
typedef SharedTask<PrologueGeneratorFunction> PrologueGenerator;

extern const char* const tierName;

// This is an IR that is very close to the bare metal. It requires about 40x more bytes than the
// generated machine code - for example if you're generating 1MB of machine code, you need about
// 40MB of Air.
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/b3/air/AirDisassembler.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Apple Inc. All rights reserved.
* Copyright (C) 2017-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -105,7 +105,7 @@ void Disassembler::dump(Code& code, PrintStream& out, LinkBuffer& linkBuffer, co

// FIXME: We could be better about various late paths. We can implement
// this later if we find a strong use for it.
out.print("# Late paths\n");
out.print(tierName, "# Late paths\n");
dumpAsmRange(m_latePathStart, m_latePathEnd);
}

Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/b3/air/AirGenerate.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2017 Apple Inc. All rights reserved.
* Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -68,7 +68,7 @@ void prepareForGeneration(Code& code)

// If we're doing super verbose dumping, the phase scope of any phase will already do a dump.
if (shouldDumpIR(AirMode) && !shouldDumpIRAtEachPhase(AirMode)) {
dataLog("Initial air:\n");
dataLog(tierName, "Initial air:\n");
dataLog(code);
}

Expand Down
Loading

0 comments on commit f7af673

Please sign in to comment.