+2016-02-17 Filip Pizlo <fpizlo@apple.com>
+
+ Remove remaining references to LLVM, and make sure comments refer to the backend as "B3" not "LLVM"
+ https://bugs.webkit.org/show_bug.cgi?id=154383
+
+ Reviewed by Saam Barati.
+
+ I did a grep -i llvm of all of our code and did one of the following for each occurence:
+
+ - Renamed it to B3. This is appropriate when we were using "LLVM" to mean "the FTL
+ backend".
+
+ - Removed the reference because I found it to be dead. In some cases it was a dead
+ comment: it was telling us things about what LLVM did and that's just not relevant
+ anymore. In other cases it was dead code that I forgot to delete in a previous patch.
+
+ - Edited the comment in some smart way. There were comments talking about what LLVM did
+ that were still of interest. In some cases, I added a FIXME to consider changing the
+ code below the comment on the grounds that it was written in a weird way to placate
+ LLVM and so we can do it better now.
+
+ * CMakeLists.txt:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * dfg/DFGArgumentsEliminationPhase.cpp:
+ * dfg/DFGOSRAvailabilityAnalysisPhase.h:
+ * dfg/DFGPlan.cpp:
+ (JSC::DFG::Plan::compileInThread):
+ (JSC::DFG::Plan::compileInThreadImpl):
+ (JSC::DFG::Plan::compileTimeStats):
+ * dfg/DFGPutStackSinkingPhase.cpp:
+ * dfg/DFGSSAConversionPhase.h:
+ * dfg/DFGStaticExecutionCountEstimationPhase.h:
+ * dfg/DFGUnificationPhase.cpp:
+ (JSC::DFG::UnificationPhase::run):
+ * disassembler/ARM64Disassembler.cpp:
+ (JSC::tryToDisassemble): Deleted.
+ * disassembler/X86Disassembler.cpp:
+ (JSC::tryToDisassemble):
+ * ftl/FTLAbstractHeap.cpp:
+ (JSC::FTL::IndexedAbstractHeap::initialize):
+ * ftl/FTLAbstractHeap.h:
+ * ftl/FTLFormattedValue.h:
+ * ftl/FTLJITFinalizer.cpp:
+ (JSC::FTL::JITFinalizer::finalizeFunction):
+ * ftl/FTLLink.cpp:
+ (JSC::FTL::link):
+ * ftl/FTLLocation.cpp:
+ (JSC::FTL::Location::restoreInto):
+ * ftl/FTLLowerDFGToB3.cpp: Copied from Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp.
+ (JSC::FTL::DFG::ftlUnreachable):
+ (JSC::FTL::DFG::LowerDFGToB3::LowerDFGToB3):
+ (JSC::FTL::DFG::LowerDFGToB3::compileBlock):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArithNegate):
+ (JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):
+ (JSC::FTL::DFG::LowerDFGToB3::compileOverridesHasInstance):
+ (JSC::FTL::DFG::LowerDFGToB3::isBoolean):
+ (JSC::FTL::DFG::LowerDFGToB3::unboxBoolean):
+ (JSC::FTL::DFG::LowerDFGToB3::emitStoreBarrier):
+ (JSC::FTL::lowerDFGToB3):
+ (JSC::FTL::DFG::LowerDFGToLLVM::LowerDFGToLLVM): Deleted.
+ (JSC::FTL::DFG::LowerDFGToLLVM::compileBlock): Deleted.
+ (JSC::FTL::DFG::LowerDFGToLLVM::compileArithNegate): Deleted.
+ (JSC::FTL::DFG::LowerDFGToLLVM::compileMultiGetByOffset): Deleted.
+ (JSC::FTL::DFG::LowerDFGToLLVM::compileOverridesHasInstance): Deleted.
+ (JSC::FTL::DFG::LowerDFGToLLVM::isBoolean): Deleted.
+ (JSC::FTL::DFG::LowerDFGToLLVM::unboxBoolean): Deleted.
+ (JSC::FTL::DFG::LowerDFGToLLVM::emitStoreBarrier): Deleted.
+ (JSC::FTL::lowerDFGToLLVM): Deleted.
+ * ftl/FTLLowerDFGToB3.h: Copied from Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.h.
+ * ftl/FTLLowerDFGToLLVM.cpp: Removed.
+ * ftl/FTLLowerDFGToLLVM.h: Removed.
+ * ftl/FTLOSRExitCompiler.cpp:
+ (JSC::FTL::compileStub):
+ * ftl/FTLWeight.h:
+ (JSC::FTL::Weight::frequencyClass):
+ (JSC::FTL::Weight::inverse):
+ (JSC::FTL::Weight::scaleToTotal): Deleted.
+ * ftl/FTLWeightedTarget.h:
+ (JSC::FTL::rarely):
+ (JSC::FTL::unsure):
+ * jit/CallFrameShuffler64.cpp:
+ (JSC::CallFrameShuffler::emitDisplace):
+ * jit/RegisterSet.cpp:
+ (JSC::RegisterSet::ftlCalleeSaveRegisters):
+ * llvm: Removed.
+ * llvm/InitializeLLVMLinux.cpp: Removed.
+ * llvm/InitializeLLVMWin.cpp: Removed.
+ * llvm/library: Removed.
+ * llvm/library/LLVMTrapCallback.h: Removed.
+ * llvm/library/libllvmForJSC.version: Removed.
+ * runtime/Options.cpp:
+ (JSC::recomputeDependentOptions):
+ (JSC::Options::initialize):
+ * runtime/Options.h:
+ * wasm/WASMFunctionB3IRGenerator.h: Copied from Source/JavaScriptCore/wasm/WASMFunctionLLVMIRGenerator.h.
+ * wasm/WASMFunctionLLVMIRGenerator.h: Removed.
+ * wasm/WASMFunctionParser.cpp:
+
2016-02-18 Csaba Osztrogonác <ossy@webkit.org>
[cmake] Build system cleanup
0FEA0A0C170513DB00BB722C /* FTLCompile.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA0A01170513DB00BB722C /* FTLCompile.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FEA0A0D170513DB00BB722C /* FTLJITCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEA0A02170513DB00BB722C /* FTLJITCode.cpp */; };
0FEA0A0E170513DB00BB722C /* FTLJITCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA0A03170513DB00BB722C /* FTLJITCode.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 0FEA0A0F170513DB00BB722C /* FTLLowerDFGToLLVM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEA0A04170513DB00BB722C /* FTLLowerDFGToLLVM.cpp */; };
- 0FEA0A10170513DB00BB722C /* FTLLowerDFGToLLVM.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA0A05170513DB00BB722C /* FTLLowerDFGToLLVM.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0FEA0A0F170513DB00BB722C /* FTLLowerDFGToB3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEA0A04170513DB00BB722C /* FTLLowerDFGToB3.cpp */; };
+ 0FEA0A10170513DB00BB722C /* FTLLowerDFGToB3.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA0A05170513DB00BB722C /* FTLLowerDFGToB3.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FEA0A12170513DB00BB722C /* FTLState.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA0A07170513DB00BB722C /* FTLState.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FEA0A161706BB9000BB722C /* FTLState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEA0A151706BB9000BB722C /* FTLState.cpp */; };
0FEA0A1C1708B00700BB722C /* FTLAbstractHeap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEA0A171708B00700BB722C /* FTLAbstractHeap.cpp */; };
7B39F76E1B62DE3200360FB4 /* WASMModuleParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B39F76A1B62DE2200360FB4 /* WASMModuleParser.h */; settings = {ATTRIBUTES = (Private, ); }; };
7B39F7701B62DE3200360FB4 /* WASMReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B39F76C1B62DE2200360FB4 /* WASMReader.h */; settings = {ATTRIBUTES = (Private, ); }; };
7B39F7721B63574D00360FB4 /* WASMReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B39F7711B63574B00360FB4 /* WASMReader.cpp */; };
- 7B8329BF1BB21FE300649A6E /* WASMFunctionLLVMIRGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8329BE1BB21FD100649A6E /* WASMFunctionLLVMIRGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 7B8329BF1BB21FE300649A6E /* WASMFunctionB3IRGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8329BE1BB21FD100649A6E /* WASMFunctionB3IRGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
7B98D1361B60CD5F0023B1A4 /* JSWASMModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B98D1341B60CD5A0023B1A4 /* JSWASMModule.cpp */; };
7B98D1371B60CD620023B1A4 /* JSWASMModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B98D1351B60CD5A0023B1A4 /* JSWASMModule.h */; settings = {ATTRIBUTES = (Private, ); }; };
7BC547D31B6959A100959B58 /* WASMFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BC547D21B69599B00959B58 /* WASMFormat.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FEA0A01170513DB00BB722C /* FTLCompile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLCompile.h; path = ftl/FTLCompile.h; sourceTree = "<group>"; };
0FEA0A02170513DB00BB722C /* FTLJITCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLJITCode.cpp; path = ftl/FTLJITCode.cpp; sourceTree = "<group>"; };
0FEA0A03170513DB00BB722C /* FTLJITCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLJITCode.h; path = ftl/FTLJITCode.h; sourceTree = "<group>"; };
- 0FEA0A04170513DB00BB722C /* FTLLowerDFGToLLVM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLLowerDFGToLLVM.cpp; path = ftl/FTLLowerDFGToLLVM.cpp; sourceTree = "<group>"; };
- 0FEA0A05170513DB00BB722C /* FTLLowerDFGToLLVM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLLowerDFGToLLVM.h; path = ftl/FTLLowerDFGToLLVM.h; sourceTree = "<group>"; };
+ 0FEA0A04170513DB00BB722C /* FTLLowerDFGToB3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLLowerDFGToB3.cpp; path = ftl/FTLLowerDFGToB3.cpp; sourceTree = "<group>"; };
+ 0FEA0A05170513DB00BB722C /* FTLLowerDFGToB3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLLowerDFGToB3.h; path = ftl/FTLLowerDFGToB3.h; sourceTree = "<group>"; };
0FEA0A07170513DB00BB722C /* FTLState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLState.h; path = ftl/FTLState.h; sourceTree = "<group>"; };
0FEA0A151706BB9000BB722C /* FTLState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLState.cpp; path = ftl/FTLState.cpp; sourceTree = "<group>"; };
0FEA0A171708B00700BB722C /* FTLAbstractHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLAbstractHeap.cpp; path = ftl/FTLAbstractHeap.cpp; sourceTree = "<group>"; };
7B39F76A1B62DE2200360FB4 /* WASMModuleParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WASMModuleParser.h; sourceTree = "<group>"; };
7B39F76C1B62DE2200360FB4 /* WASMReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WASMReader.h; sourceTree = "<group>"; };
7B39F7711B63574B00360FB4 /* WASMReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WASMReader.cpp; sourceTree = "<group>"; };
- 7B8329BE1BB21FD100649A6E /* WASMFunctionLLVMIRGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WASMFunctionLLVMIRGenerator.h; sourceTree = "<group>"; };
+ 7B8329BE1BB21FD100649A6E /* WASMFunctionB3IRGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WASMFunctionB3IRGenerator.h; sourceTree = "<group>"; };
7B98D1341B60CD5A0023B1A4 /* JSWASMModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWASMModule.cpp; sourceTree = "<group>"; };
7B98D1351B60CD5A0023B1A4 /* JSWASMModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWASMModule.h; sourceTree = "<group>"; };
7BC547D21B69599B00959B58 /* WASMFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WASMFormat.h; sourceTree = "<group>"; };
0F8F2B94172E049E007DBDA5 /* FTLLink.h */,
0FCEFADD180738C000472CE4 /* FTLLocation.cpp */,
0FCEFADE180738C000472CE4 /* FTLLocation.h */,
- 0FEA0A04170513DB00BB722C /* FTLLowerDFGToLLVM.cpp */,
- 0FEA0A05170513DB00BB722C /* FTLLowerDFGToLLVM.h */,
+ 0FEA0A04170513DB00BB722C /* FTLLowerDFGToB3.cpp */,
+ 0FEA0A05170513DB00BB722C /* FTLLowerDFGToB3.h */,
A7D89D0117A0B90400773AD8 /* FTLLoweredNodeValue.h */,
0F2B9CF219D0BAC100B1D1B5 /* FTLOperations.cpp */,
0F2B9CF319D0BAC100B1D1B5 /* FTLOperations.h */,
7B0247521B8682D500542440 /* WASMConstants.h */,
7BC547D21B69599B00959B58 /* WASMFormat.h */,
7B2E010D1B97AA5800EF5D5C /* WASMFunctionCompiler.h */,
- 7B8329BE1BB21FD100649A6E /* WASMFunctionLLVMIRGenerator.h */,
+ 7B8329BE1BB21FD100649A6E /* WASMFunctionB3IRGenerator.h */,
7B0247531B8682D500542440 /* WASMFunctionParser.cpp */,
7B0247541B8682D500542440 /* WASMFunctionParser.h */,
7B0247581B868EAE00542440 /* WASMFunctionSyntaxChecker.h */,
0FB4FB751BC843140025CA5A /* FTLLazySlowPathCall.h in Headers */,
0F8F2B96172E04A3007DBDA5 /* FTLLink.h in Headers */,
0FCEFAE0180738C000472CE4 /* FTLLocation.h in Headers */,
- 0FEA0A10170513DB00BB722C /* FTLLowerDFGToLLVM.h in Headers */,
+ 0FEA0A10170513DB00BB722C /* FTLLowerDFGToB3.h in Headers */,
A7D89D0217A0B90400773AD8 /* FTLLoweredNodeValue.h in Headers */,
0F2B9CF919D0BAC100B1D1B5 /* FTLOperations.h in Headers */,
0F338E101BF0276C0013C88F /* B3MoveConstants.h in Headers */,
7B0247551B8682DD00542440 /* WASMConstants.h in Headers */,
7BC547D31B6959A100959B58 /* WASMFormat.h in Headers */,
7B2E010E1B97AA6900EF5D5C /* WASMFunctionCompiler.h in Headers */,
- 7B8329BF1BB21FE300649A6E /* WASMFunctionLLVMIRGenerator.h in Headers */,
+ 7B8329BF1BB21FE300649A6E /* WASMFunctionB3IRGenerator.h in Headers */,
7B0247571B8682E400542440 /* WASMFunctionParser.h in Headers */,
0F6B8ADD1C4EFAC300969052 /* B3SSACalculator.h in Headers */,
7B0247591B868EB700542440 /* WASMFunctionSyntaxChecker.h in Headers */,
0FB4FB731BC843140025CA5A /* FTLLazySlowPath.cpp in Sources */,
0F8F2B95172E04A0007DBDA5 /* FTLLink.cpp in Sources */,
0FCEFADF180738C000472CE4 /* FTLLocation.cpp in Sources */,
- 0FEA0A0F170513DB00BB722C /* FTLLowerDFGToLLVM.cpp in Sources */,
+ 0FEA0A0F170513DB00BB722C /* FTLLowerDFGToB3.cpp in Sources */,
0F2B9CF819D0BAC100B1D1B5 /* FTLOperations.cpp in Sources */,
0FD8A31B17D51F2200CA2C40 /* FTLOSREntry.cpp in Sources */,
0F235BDC17178E1C00690C7F /* FTLOSRExit.cpp in Sources */,
// FIXME: For ClonedArguments, we would have already done a separate bounds check.
// This code will cause us to have two bounds checks - the original one that we
// already factored out in SSALoweringPhase, and the new one we insert here, which is
- // often implicitly part of GetMyArgumentByVal. LLVM will probably eliminate the
+ // often implicitly part of GetMyArgumentByVal. B3 will probably eliminate the
// second bounds check, but still - that's just silly.
// https://bugs.webkit.org/show_bug.cgi?id=143076
// Computes BasicBlock::ssa->availabiltiyAtHead/Tail. This is a forward flow type inference
// over MovHints and SetLocals. This analysis is run directly by the Plan for preparing for
-// lowering to LLVM IR, but it can also be used as a utility. Note that if you run it before
+// lowering to B3 IR, but it can also be used as a utility. Note that if you run it before
// stack layout, all of the flush availability will omit the virtual register - but it will
// tell you the format.
#include "FTLCompile.h"
#include "FTLFail.h"
#include "FTLLink.h"
-#include "FTLLowerDFGToLLVM.h"
+#include "FTLLowerDFGToB3.h"
#include "FTLState.h"
#endif
double totalDFGCompileTime;
double totalFTLCompileTime;
double totalFTLDFGCompileTime;
-double totalFTLLLVMCompileTime;
+double totalFTLB3CompileTime;
void dumpAndVerifyGraph(Graph& graph, const char* text, bool forceDump = false)
{
if (isFTL(mode)) {
totalFTLCompileTime += after - before;
totalFTLDFGCompileTime += m_timeBeforeFTL - before;
- totalFTLLLVMCompileTime += after - m_timeBeforeFTL;
+ totalFTLB3CompileTime += after - m_timeBeforeFTL;
} else
totalDFGCompileTime += after - before;
}
return CancelPath;
FTL::State state(dfg);
- FTL::lowerDFGToLLVM(state);
+ FTL::lowerDFGToB3(state);
if (computeCompileTimes())
m_timeBeforeFTL = monotonicallyIncreasingTimeMS();
- if (Options::llvmAlwaysFailsBeforeCompile()) {
+ if (Options::b3AlwaysFailsBeforeCompile()) {
FTL::fail(state);
return FTLPath;
}
if (safepointResult.didGetCancelled())
return CancelPath;
- if (Options::llvmAlwaysFailsBeforeLink()) {
+ if (Options::b3AlwaysFailsBeforeLink()) {
FTL::fail(state);
return FTLPath;
}
result.add("DFG Compile Time", totalDFGCompileTime);
result.add("FTL Compile Time", totalFTLCompileTime);
result.add("FTL (DFG) Compile Time", totalFTLDFGCompileTime);
- result.add("FTL (B3) Compile Time", totalFTLLLVMCompileTime);
+ result.add("FTL (B3) Compile Time", totalFTLB3CompileTime);
}
return result;
}
// for sunken PutStacks in the presence of interesting control flow merges, and where the
// value being PutStack'd is also otherwise live in the DFG code. We could work around this
// by doing the sinking over CPS, or maybe just by doing really smart hoisting. It's also
- // possible that the duplicate Phi graph can be deduplicated by LLVM. It would be best if we
+ // possible that the duplicate Phi graph can be deduplicated by B3. It would be best if we
// could observe that there is already a Phi graph in place that does what we want. In
// principle if we have a request to place a Phi at a particular place, we could just check
// if there is already a Phi that does what we want. Because PutStackSinkingPhase runs just
// the caveat that the Phi predecessor block lists would have to be
// updated).
//
-// The easiest way to convert from this SSA form into a different SSA
-// form is to redo SSA conversion for Phi functions. That is, treat each
-// Phi in our IR as a non-SSA variable in the foreign IR (so, as an
-// alloca in LLVM IR, for example); the Upsilons that refer to the Phi
-// become stores and the Phis themselves become loads.
-//
// Fun fact: Upsilon is so named because it comes before Phi in the
// alphabet. It can be written as "Y".
// ability to do accurate static estimations. Hence we lock in the estimates early.
// Ideally, we would have dynamic information, but we don't right now, so this is as
// good as it gets.
-//
-// It's worth noting that if we didn't have this phase, then the static estimation
-// would be perfomed by LLVM instead. It's worth trying to make this phase perform
-// the estimates using the same heuristics that LLVM would use.
bool performStaticExecutionCountEstimation(Graph&);
if (!phi->children.child(childIdx))
break;
- // We'd like to reverse the order of unification because it helps to reveal
- // more bugs on our end, though it's otherwise not observable. But we do it
- // this way because it works around a bug in open source LLVM's live-outs
- // computation.
+ // FIXME: Consider reversing the order of this unification, since the other
+ // order will reveal more bugs. https://bugs.webkit.org/show_bug.cgi?id=154368
phi->variableAccessData()->unify(phi->children.child(childIdx)->variableAccessData());
}
}
#endif // USE(ARM64_DISASSEMBLER)
-#if USE(LLVM_DISASSEMBLER) && CPU(ARM64)
-
-#include "LLVMDisassembler.h"
-
-namespace JSC {
-
-bool tryToDisassemble(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out, InstructionSubsetHint hint)
-{
- return tryToDisassembleWithLLVM(codePtr, size, prefix, out, hint);
-}
-
-} // namespace JSC
-
-#endif // USE(LLVM_DISASSEMBLER) && CPU(ARM64)
#include "Disassembler.h"
#if ENABLE(DISASSEMBLER)
-#if USE(UDIS86) || (USE(LLVM_DISASSEMBLER) && (CPU(X86_64) || CPU(X86)))
+#if USE(UDIS86)
#include "MacroAssemblerCodeRef.h"
#include "Options.h"
namespace JSC {
-// This horrifying monster is needed because neither of our disassemblers supports
-// all of x86, and using them together to disassemble the same instruction stream
-// would result in a fairly jarring print-out since they print in different
-// styles. Maybe we can do better in the future, but for now the caller hints
-// whether he's using the subset of the architecture that our MacroAssembler
-// supports (in which case we go with UDis86) or if he's using the LLVM subset.
-
bool tryToDisassemble(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out)
{
return tryToDisassembleWithUDis86(codePtr, size, prefix, out);
} // namespace JSC
-#endif // USE(UDIS86) || USE(LLVM_DISASSEMBLER)
+#endif // USE(UDIS86)
#endif // ENABLE(DISASSEMBLER)
//
// Blah_neg_A
//
- // This is important because LLVM uses the string to distinguish the types.
+ // This used to be important because we used to use the string to distinguish the types. This is
+ // not relevant anymore, and this code will be removed eventually.
+ // FIXME: https://bugs.webkit.org/show_bug.cgi?id=154319
static const char* negSplit = "_neg_";
static const char* posSplit = "_";
namespace JSC { namespace FTL {
-// The FTL JIT tries to aid LLVM's TBAA. The FTL's notion of how this
-// happens is the AbstractHeap. AbstractHeaps are a simple type system
-// with sub-typing.
+// This is here because we used to generate LLVM's TBAA. In the future we will want to generate
+// B3 HeapRanges instead.
+// FIXME: https://bugs.webkit.org/show_bug.cgi?id=154319
class AbstractHeapRepository;
class Output;
// This class is mostly used for OSR; it's a way of specifying how a value is formatted
// in cases where it wouldn't have been obvious from looking at other indicators (like
-// the type of the LLVMValueRef or the type of the DFG::Node). Typically this arises
-// because LLVMValueRef doesn't give us the granularity we need to begin with, and we
-// use this in situations where there is no good way to say what node the value came
-// from.
+// the type of the B3::Value* or the type of the DFG::Node).
class FormattedValue {
public:
jitCode->initializeArityCheckEntrypoint(
FINALIZE_CODE_IF(
dumpDisassembly, *entrypointLinkBuffer,
- ("FTL entrypoint thunk for %s with LLVM generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data(), function)));
+ ("FTL entrypoint thunk for %s with B3 generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data(), function)));
m_plan.codeBlock->setJITCode(jitCode);
CodeBlock* codeBlock = graph.m_codeBlock;
VM& vm = graph.m_vm;
- // LLVM will create its own jump tables as needed.
+ // B3 will create its own jump tables as needed.
codeBlock->clearSwitchJumpTables();
state.jitCode->common.requiredRegisterCountForExit = graph.requiredRegisterCountForExit();
// We jump to here straight from DFG code, after having boxed up all of the
// values into the scratch buffer. Everything should be good to go - at this
// point we've even done the stack check. Basically we just have to make the
- // call to the LLVM-generated code.
+ // call to the B3-generated code.
CCallHelpers::Label start = jit.label();
jit.emitFunctionEpilogue();
CCallHelpers::Jump mainPathJump = jit.jump();
switch (kind()) {
case Register:
- // LLVM used some register that we don't know about!
+ // B3 used some register that we don't know about!
dataLog("Unrecognized location: ", *this, "\n");
RELEASE_ASSERT_NOT_REACHED();
return;
return;
case Unprocessed:
- // Should never see this - it's an enumeration entry on LLVM's side that means that
- // it hasn't processed this location.
RELEASE_ASSERT_NOT_REACHED();
return;
}
*/
#include "config.h"
-#include "FTLLowerDFGToLLVM.h"
+#include "FTLLowerDFGToB3.h"
#if ENABLE(FTL_JIT)
}
#endif
-// Using this instead of typeCheck() helps to reduce the load on LLVM, by creating
+// Using this instead of typeCheck() helps to reduce the load on B3, by creating
// significantly less dead code.
#define FTL_TYPE_CHECK_WITH_EXIT_KIND(exitKind, lowValue, highValue, typesPassedThrough, failCondition) do { \
FormattedValue _ftc_lowValue = (lowValue); \
#define FTL_TYPE_CHECK(lowValue, highValue, typesPassedThrough, failCondition) \
FTL_TYPE_CHECK_WITH_EXIT_KIND(BadType, lowValue, highValue, typesPassedThrough, failCondition)
-class LowerDFGToLLVM {
- WTF_MAKE_NONCOPYABLE(LowerDFGToLLVM);
+class LowerDFGToB3 {
+ WTF_MAKE_NONCOPYABLE(LowerDFGToB3);
public:
- LowerDFGToLLVM(State& state)
+ LowerDFGToB3(State& state)
: m_graph(state.graph)
, m_ftlState(state)
, m_out(state)
// All of this effort to find the next block gives us the ability to keep the
// generated IR in roughly program order. This ought not affect the performance
- // of the generated code (since we expect LLVM to reorder things) but it will
+ // of the generated code (since we expect B3 to reorder things) but it will
// make IR dumps easier to read.
m_out.appendTo(lowBlock, m_nextLowBlock);
void compileArithPow()
{
- // FIXME: investigate llvm.powi to better understand its performance characteristics.
- // It might be better to have the inline loop in DFG too.
if (m_node->child2().useKind() == Int32Use)
setDouble(m_out.doublePowi(lowDouble(m_node->child1()), lowInt32(m_node->child2())));
else {
if (!shouldCheckOverflow(m_node->arithMode()))
result = m_out.neg(value);
else if (!shouldCheckNegativeZero(m_node->arithMode())) {
- // "0 - x" is the canonical way of saying "-x" in both B3 and LLVM. This gets
- // lowered to the right thing.
CheckValue* check = m_out.speculateSub(m_out.int32Zero, value);
blessSpeculation(check, Overflow, noValue(), nullptr, m_origin);
result = check;
MultiGetByOffsetData& data = m_node->multiGetByOffsetData();
if (data.cases.isEmpty()) {
- // Protect against creating a Phi function with zero inputs. LLVM doesn't like that.
+ // Protect against creating a Phi function with zero inputs. LLVM didn't like that.
+ // It's not clear if this is needed anymore.
+ // FIXME: https://bugs.webkit.org/show_bug.cgi?id=154382
terminate(BadCache);
return;
}
LBasicBlock defaultHasInstance = FTL_NEW_BLOCK(m_out, ("OverridesHasInstance Symbol.hasInstance is default"));
LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("OverridesHasInstance continuation"));
- // Unlike in the DFG, we don't worry about cleaning this code up for the case where we have proven the hasInstanceValue is a constant as LLVM should fix it for us.
+ // Unlike in the DFG, we don't worry about cleaning this code up for the case where we have proven the hasInstanceValue is a constant as B3 should fix it for us.
ASSERT(!m_node->child2().node()->isCellConstant() || defaultHasInstanceFunction == m_node->child2().node()->asCell());
// This is a mechanism for creating a code generator that fills in a gap in the code using our
// own MacroAssembler. This is useful for slow paths that involve a lot of code and we don't want
- // to pay the price of LLVM optimizing it. A lazy slow path will only be generated if it actually
+ // to pay the price of B3 optimizing it. A lazy slow path will only be generated if it actually
// executes. On the other hand, a lazy slow path always incurs the cost of two additional jumps.
- // Also, the lazy slow path's register allocation state is slaved to whatever LLVM did, so you
+ // Also, the lazy slow path's register allocation state is slaved to whatever B3 did, so you
// have to use a ScratchRegisterAllocator to try to use some unused registers and you may have
// to spill to top of stack if there aren't enough registers available.
//
// Lazy slow paths involve three different stages of execution. Each stage has unique
// capabilities and knowledge. The stages are:
//
- // 1) DFG->LLVM lowering, i.e. code that runs in this phase. Lowering is the last time you will
+ // 1) DFG->B3 lowering, i.e. code that runs in this phase. Lowering is the last time you will
// have access to LValues. If there is an LValue that needs to be fed as input to a lazy slow
// path, then you must pass it as an argument here (as one of the varargs arguments after the
// functor). But, lowering doesn't know which registers will be used for those LValues. Hence
// you pass a lambda to lazySlowPath() and that lambda will run during stage (2):
//
// 2) FTLCompile.cpp's fixFunctionBasedOnStackMaps. This code is the only stage at which we know
- // the mapping from arguments passed to this method in (1) and the registers that LLVM
+ // the mapping from arguments passed to this method in (1) and the registers that B3
// selected for those arguments. You don't actually want to generate any code here, since then
// the slow path wouldn't actually be lazily generated. Instead, you want to save the
// registers being used for the arguments and defer code generation to stage (3) by creating
// executing for the first time. It will call the generator you created in stage (2).
//
// Note that each time you invoke stage (1), stage (2) may be invoked zero, one, or many times.
- // Stage (2) will usually be invoked once for stage (1). But, LLVM may kill the code, in which
- // case stage (2) won't run. LLVM may duplicate the code (for example via jump threading),
+ // Stage (2) will usually be invoked once for stage (1). But, B3 may kill the code, in which
+ // case stage (2) won't run. B3 may duplicate the code (for example via tail duplication),
// leading to many calls to your stage (2) lambda. Stage (3) may be called zero or once for each
// stage (2). It will be called zero times if the slow path never runs. This is what you hope for
// whenever you use the lazySlowPath() mechanism.
}
LValue unboxBoolean(LValue jsValue)
{
- // We want to use a cast that guarantees that LLVM knows that even the integer
+ // We want to use a cast that guarantees that B3 knows that even the integer
// value is just 0 or 1. But for now we do it the dumb way.
return m_out.notZero64(m_out.bitAnd(jsValue, m_out.constInt64(1)));
}
// We emit the store barrier slow path lazily. In a lot of cases, this will never fire. And
// when it does fire, it makes sense for us to generate this code using our JIT rather than
- // wasting LLVM's time optimizing it.
+ // wasting B3's time optimizing it.
lazySlowPath(
[=] (const Vector<Location>& locations) -> RefPtr<LazySlowPath::Generator> {
GPRReg baseGPR = locations[1].directGPR();
HashMap<Node*, LoweredNodeValue> m_storageValues;
HashMap<Node*, LoweredNodeValue> m_doubleValues;
- // This is a bit of a hack. It prevents LLVM from having to do CSE on loading of arguments.
+ // This is a bit of a hack. It prevents B3 from having to do CSE on loading of arguments.
// It's nice to have these optimizations on our end because we can guarantee them a bit better.
- // Probably also saves LLVM compile time.
+ // Probably also saves B3 compile time.
HashMap<Node*, LValue> m_loadedArgumentValues;
HashMap<Node*, LValue> m_phis;
} // anonymous namespace
-void lowerDFGToLLVM(State& state)
+void lowerDFGToB3(State& state)
{
- LowerDFGToLLVM lowering(state);
+ LowerDFGToB3 lowering(state);
lowering.lower();
}
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef FTLLowerDFGToLLVM_h
-#define FTLLowerDFGToLLVM_h
+#ifndef FTLLowerDFGToB3_h
+#define FTLLowerDFGToB3_h
#if ENABLE(FTL_JIT)
namespace JSC { namespace FTL {
-void lowerDFGToLLVM(State&);
+void lowerDFGToB3(State&);
} } // namespace JSC::FTL
#endif // ENABLE(FTL_JIT)
-#endif // FTLLowerDFGToLLVM_h
+#endif // FTLLowerDFGToB3_h
registerScratch, materializationToPointer);
};
- // Note that we come in here, the stack used to be as LLVM left it except that someone called pushToSave().
+ // Note that we come in here, the stack used to be as B3 left it except that someone called pushToSave().
// We don't care about the value they saved. But, we do appreciate the fact that they did it, because we use
// that slot for saveAllRegisters().
B3::FrequencyClass frequencyClass() const { return value() ? B3::FrequencyClass::Normal : B3::FrequencyClass::Rare; }
- unsigned scaleToTotal(double total) const
- {
- // LLVM accepts 32-bit unsigned branch weights but in dumps it might display them
- // as signed values. We don't need all 32 bits, so we just use the 31 bits.
- double result = static_cast<double>(m_value) * INT_MAX / total;
- if (result < 0)
- return 0;
- if (result > INT_MAX)
- return INT_MAX;
- return static_cast<unsigned>(result);
- }
-
// Inverse weight for a two-target branch.
Weight inverse() const
{
return WeightedTarget(block, 0);
}
-// This means we let LLVM figure it out basic on its static estimates. LLVM's static
-// estimates are usually pretty darn good, so there's generally nothing wrong with
-// using this.
+// Currently in B3 this is the equivalent of "usually", but we like to make the distinction in
+// case we ever make B3 support proper branch weights. We used to do that in LLVM.
inline WeightedTarget unsure(LBasicBlock block)
{
return WeightedTarget(block, Weight());
// absolutely need to load the callee-save registers into
// different GPRs initially but not enough pressure to
// then have to spill all of them. And even in that case,
- // depending on the order in which LLVM saves the
+ // depending on the order in which B3 saves the
// callee-saves, we will probably still be safe. Anyway,
// the couple extra move instructions compared to an
// efficient cycle-based algorithm are not going to hurt
result.set(GPRInfo::regCS3);
result.set(GPRInfo::regCS4);
#elif CPU(ARM64)
- // LLVM might save and use all ARM64 callee saves specified in the ABI.
+ // B3 might save and use all ARM64 callee saves specified in the ABI.
result.set(GPRInfo::regCS0);
result.set(GPRInfo::regCS1);
result.set(GPRInfo::regCS2);
+++ /dev/null
-/*
- * Copyright (C) 2013 University of Szeged. All rights reserved.
- * Copyright (C) 2013 Samsung Electronics. All rights reserved.
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "InitializeLLVM.h"
-
-#if HAVE(LLVM)
-
-#include "InitializeLLVMPOSIX.h"
-
-#if PLATFORM(GTK)
-#include <wtf/glib/GUniquePtr.h>
-#endif
-
-namespace JSC {
-
-LLVMInitializerFunction getLLVMInitializerFunction(bool verbose)
-{
-#if PLATFORM(GTK)
-#if ENABLE(DEVELOPER_MODE)
- LLVMInitializerFunction function = getLLVMInitializerFunctionPOSIX("libllvmForJSC.so", verbose);
- if (function)
- return function;
-#endif
- static const char* libllvmForJSCInstalledPath = LIBDIR G_DIR_SEPARATOR_S "javascriptcoregtk-" WEBKITGTK_API_VERSION_STRING G_DIR_SEPARATOR_S;
- GUniquePtr<char> libllvmForJSCFilename(g_build_filename(libllvmForJSCInstalledPath, "libllvmForJSC.so", nullptr));
- return getLLVMInitializerFunctionPOSIX(libllvmForJSCFilename.get(), verbose);
-#else
- return getLLVMInitializerFunctionPOSIX("libllvmForJSC.so", verbose);
-#endif
-}
-
-} // namespace JSC
-
-#endif // HAVE(LLVM)
+++ /dev/null
-/*
- * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "InitializeLLVM.h"
-
-#include "LLVMAPI.h"
-#include <Windows.h>
-
-#if HAVE(LLVM)
-
-namespace JSC {
-
-LLVMInitializerFunction getLLVMInitializerFunction(bool /* verbose */)
-{
- const wchar_t* libraryName = L"libllvmForJSC.dll";
-
- HMODULE library = ::LoadLibrary(libraryName);
-
- if (!library)
- return nullptr;
-
- const char* symbolName = "initializeAndGetJSCLLVMAPI";
- return bitwise_cast<LLVMInitializerFunction>(GetProcAddress(library, symbolName));
-}
-
-} // namespace JSC
-
-#endif // HAVE(LLVM)
+++ /dev/null
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef LLVMTrapCallback_h
-#define LLVMTrapCallback_h
-
-#include <wtf/Assertions.h>
-
-extern void (*g_llvmTrapCallback)(const char* message, ...) NO_RETURN;
-
-#endif // LLVMTrapCallback_h
-
+++ /dev/null
-LLVMFORJSC {
- global: initializeAndGetJSCLLVMAPI;
- local: *;
-};
Options::useOSREntryToFTL() = false;
}
-#if CPU(ARM64)
- // FIXME: https://bugs.webkit.org/show_bug.cgi?id=152510
- // We're running into a bug where some ARM64 tests are failing in the FTL
- // with what appears to be an llvm bug where llvm is miscalculating the
- // live-out variables of a patchpoint. This causes us to not keep a
- // volatile register alive across a C call in a patchpoint, even though
- // that register is used immediately after the patchpoint.
- Options::assumeAllRegsInFTLICAreLive() = true;
-#endif
-
// Compute the maximum value of the reoptimization retry counter. This is simply
// the largest value at which we don't overflow the execute counter, when using it
// to left-shift the execution counter by this amount. Currently the value ends
name_##Default() = defaultValue_;
JSC_OPTIONS(FOR_EACH_OPTION)
#undef FOR_EACH_OPTION
-
- // It *probably* makes sense for other platforms to enable this.
-#if PLATFORM(IOS) && CPU(ARM64)
- useLLVMFastISel() = true;
-#endif
-
+
// Allow environment vars to override options if applicable.
// The evn var should be the name of the option prefixed with
// "JSC_".
\
v(bool, useFTLJIT, true, "allows the FTL JIT to be used if true") \
v(bool, useFTLTBAA, true, nullptr) \
- v(bool, useLLVMFastISel, false, nullptr) \
- v(bool, useLLVMSmallCodeModel, false, nullptr) \
- v(bool, dumpLLVMIR, false, nullptr) \
v(bool, validateFTLOSRExitLiveness, false, nullptr) \
- v(bool, llvmAlwaysFailsBeforeCompile, false, nullptr) \
- v(bool, llvmAlwaysFailsBeforeLink, false, nullptr) \
- v(bool, llvmSimpleOpt, true, nullptr) \
- v(unsigned, llvmBackendOptimizationLevel, 2, nullptr) \
- v(unsigned, llvmOptimizationLevel, 2, nullptr) \
- v(unsigned, llvmSizeLevel, 0, nullptr) \
- v(unsigned, llvmMaxStackSize, 128 * KB, nullptr) \
- v(bool, llvmDisallowAVX, true, nullptr) \
+ v(bool, b3AlwaysFailsBeforeCompile, false, nullptr) \
+ v(bool, b3AlwaysFailsBeforeLink, false, nullptr) \
v(bool, ftlCrashes, false, nullptr) /* fool-proof way of checking that you ended up in the FTL. ;-) */\
- v(bool, ftlCrashesIfCantInitializeLLVM, false, nullptr) \
v(bool, clobberAllRegsInFTLICSlowPath, !ASSERT_DISABLED, nullptr) \
- v(bool, assumeAllRegsInFTLICAreLive, false, nullptr) \
v(bool, useAccessInlining, true, nullptr) \
v(unsigned, maxAccessVariantListSize, 8, nullptr) \
v(bool, usePolyvariantDevirtualization, true, nullptr) \
\
v(bool, useProfiler, false, nullptr) \
\
- v(bool, forceUDis86Disassembler, false, nullptr) \
- v(bool, forceLLVMDisassembler, false, nullptr) \
- \
v(bool, useArchitectureSpecificOptimizations, true, nullptr) \
\
v(bool, breakOnThrow, false, nullptr) \
v(alwaysDoFullCollection, useGenerationalGC, InvertedOption) \
v(enableOSREntryToDFG, useOSREntryToDFG, SameOption) \
v(enableOSREntryToFTL, useOSREntryToFTL, SameOption) \
- v(enableLLVMFastISel, useLLVMFastISel, SameOption) \
v(enableAccessInlining, useAccessInlining, SameOption) \
v(enablePolyvariantDevirtualization, usePolyvariantDevirtualization, SameOption) \
v(enablePolymorphicAccessInlining, usePolymorphicAccessInlining, SameOption) \
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WASMFunctionLLVMIRGenerator_h
-#define WASMFunctionLLVMIRGenerator_h
+#ifndef WASMFunctionB3IRGenerator_h
+#define WASMFunctionB3IRGenerator_h
#if ENABLE(WEBASSEMBLY) && ENABLE(FTL_JIT)
using FTL::LBasicBlock;
using FTL::LValue;
-class WASMFunctionLLVMIRGenerator {
+class WASMFunctionB3IRGenerator {
public:
typedef LValue Expression;
typedef int Statement;
#endif // ENABLE(WEBASSEMBLY)
-#endif // WASMFunctionLLVMIRGenerator_h
+#endif // WASMFunctionB3IRGenerator_h
#include "JSCJSValueInlines.h"
#include "JSWASMModule.h"
#include "WASMFunctionCompiler.h"
-#include "WASMFunctionLLVMIRGenerator.h"
+#include "WASMFunctionB3IRGenerator.h"
#include "WASMFunctionSyntaxChecker.h"
#define PROPAGATE_ERROR() do { if (!m_errorMessage.isNull()) return 0; } while (0)
+2016-02-18 Filip Pizlo <fpizlo@apple.com>
+
+ Remove remaining references to LLVM, and make sure comments refer to the backend as "B3" not "LLVM"
+ https://bugs.webkit.org/show_bug.cgi?id=154383
+
+ Reviewed by Saam Barati.
+
+ * Scripts/run-jsc-stress-tests:
+
2016-02-17 Filip Pizlo <fpizlo@apple.com>
Remove LLVM dependencies from WebKit
BASE_OPTIONS = ["--useFTLJIT=false", "--useFunctionDotArguments=true"]
EAGER_OPTIONS = ["--thresholdForJITAfterWarmUp=10", "--thresholdForJITSoon=10", "--thresholdForOptimizeAfterWarmUp=20", "--thresholdForOptimizeAfterLongWarmUp=20", "--thresholdForOptimizeSoon=20", "--thresholdForFTLOptimizeAfterWarmUp=20", "--thresholdForFTLOptimizeSoon=20", "--maximumEvalCacheableSourceLength=150000"]
NO_CJIT_OPTIONS = ["--useConcurrentJIT=false", "--thresholdForJITAfterWarmUp=100"]
-FTL_OPTIONS = ["--useFTLJIT=true", "--ftlCrashesIfCantInitializeLLVM=true"]
+FTL_OPTIONS = ["--useFTLJIT=true"]
$runlist = []
run("no-cjit-no-aso", "--useArchitectureSpecificOptimizations=false", *NO_CJIT_OPTIONS)
end
-def runFTLNoCJITNoSimpleOpt
- run("ftl-no-cjit-no-simple-opt", "--llvmSimpleOpt=false", *(FTL_OPTIONS + NO_CJIT_OPTIONS)) if $enableFTL
-end
-
def runNoCJITNoAccessInlining
run("no-cjit-no-access-inlining", "--useAccessInlining=false", *NO_CJIT_OPTIONS)
end
def defaultSpotCheckNoMaximalFlush
defaultQuickRun
- runFTLNoCJITNoSimpleOpt
runFTLNoCJITOSRValidation
runNoCJITNoAccessInlining
runFTLNoCJITNoAccessInlining