Ignore:
Timestamp:
Feb 17, 2016, 4:11:21 PM (9 years ago)
Author:
[email protected]
Message:

Remove LLVM dependencies from WebKit
https://bugs.webkit.org/show_bug.cgi?id=154323

Reviewed by Antti Koivisto and Benjamin Poulain.

Source/JavaScriptCore:

We have switched all ports that use the FTL JIT to using B3 as the backend. This renders all
LLVM-related code dead, including the disassembler, which was only reachable when you were on
a platform that already had an in-tree disassembler.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGCommon.h:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::compileTimeStats):

  • disassembler/ARM64Disassembler.cpp:

(JSC::tryToDisassemble):

  • disassembler/ARMv7Disassembler.cpp:

(JSC::tryToDisassemble):

  • disassembler/Disassembler.cpp:

(JSC::disassemble):
(JSC::disassembleAsynchronously):

  • disassembler/Disassembler.h:

(JSC::tryToDisassemble):

  • disassembler/LLVMDisassembler.cpp: Removed.
  • disassembler/LLVMDisassembler.h: Removed.
  • disassembler/UDis86Disassembler.cpp:

(JSC::tryToDisassembleWithUDis86):

  • disassembler/UDis86Disassembler.h:

(JSC::tryToDisassembleWithUDis86):

  • disassembler/X86Disassembler.cpp:

(JSC::tryToDisassemble):

  • ftl/FTLAbbreviatedTypes.h:
  • ftl/FTLAbbreviations.h: Removed.
  • ftl/FTLAbstractHeap.cpp:

(JSC::FTL::AbstractHeap::decorateInstruction):
(JSC::FTL::AbstractHeap::dump):
(JSC::FTL::AbstractField::dump):
(JSC::FTL::IndexedAbstractHeap::IndexedAbstractHeap):
(JSC::FTL::IndexedAbstractHeap::~IndexedAbstractHeap):
(JSC::FTL::IndexedAbstractHeap::baseIndex):
(JSC::FTL::IndexedAbstractHeap::dump):
(JSC::FTL::NumberedAbstractHeap::NumberedAbstractHeap):
(JSC::FTL::NumberedAbstractHeap::dump):
(JSC::FTL::AbsoluteAbstractHeap::AbsoluteAbstractHeap):
(JSC::FTL::AbstractHeap::tbaaMetadataSlow): Deleted.

  • ftl/FTLAbstractHeap.h:

(JSC::FTL::AbstractHeap::AbstractHeap):
(JSC::FTL::AbstractHeap::heapName):
(JSC::FTL::IndexedAbstractHeap::atAnyIndex):
(JSC::FTL::NumberedAbstractHeap::atAnyNumber):
(JSC::FTL::AbsoluteAbstractHeap::atAnyAddress):
(JSC::FTL::AbstractHeap::tbaaMetadata): Deleted.

  • ftl/FTLAbstractHeapRepository.cpp:

(JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLB3Compile.cpp:
  • ftl/FTLB3Output.cpp:

(JSC::FTL::Output::Output):
(JSC::FTL::Output::check):
(JSC::FTL::Output::load):
(JSC::FTL::Output::store):

  • ftl/FTLB3Output.h:
  • ftl/FTLCommonValues.cpp:

(JSC::FTL::CommonValues::CommonValues):
(JSC::FTL::CommonValues::initializeConstants):

  • ftl/FTLCommonValues.h:

(JSC::FTL::CommonValues::initialize): Deleted.

  • ftl/FTLCompile.cpp: Removed.
  • ftl/FTLCompileBinaryOp.cpp: Removed.
  • ftl/FTLCompileBinaryOp.h: Removed.
  • ftl/FTLDWARFDebugLineInfo.cpp: Removed.
  • ftl/FTLDWARFDebugLineInfo.h: Removed.
  • ftl/FTLDWARFRegister.cpp: Removed.
  • ftl/FTLDWARFRegister.h: Removed.
  • ftl/FTLDataSection.cpp: Removed.
  • ftl/FTLDataSection.h: Removed.
  • ftl/FTLExceptionHandlerManager.cpp: Removed.
  • ftl/FTLExceptionHandlerManager.h: Removed.
  • ftl/FTLExceptionTarget.cpp:
  • ftl/FTLExceptionTarget.h:
  • ftl/FTLExitThunkGenerator.cpp: Removed.
  • ftl/FTLExitThunkGenerator.h: Removed.
  • ftl/FTLFail.cpp:

(JSC::FTL::fail):

  • ftl/FTLInlineCacheDescriptor.h: Removed.
  • ftl/FTLInlineCacheSize.cpp: Removed.
  • ftl/FTLInlineCacheSize.h: Removed.
  • ftl/FTLIntrinsicRepository.cpp: Removed.
  • ftl/FTLIntrinsicRepository.h: Removed.
  • ftl/FTLJITCode.cpp:

(JSC::FTL::JITCode::~JITCode):
(JSC::FTL::JITCode::initializeB3Code):
(JSC::FTL::JITCode::initializeB3Byproducts):
(JSC::FTL::JITCode::initializeAddressForCall):
(JSC::FTL::JITCode::contains):
(JSC::FTL::JITCode::ftl):
(JSC::FTL::JITCode::liveRegistersToPreserveAtExceptionHandlingCallSite):
(JSC::FTL::JITCode::initializeExitThunks): Deleted.
(JSC::FTL::JITCode::addHandle): Deleted.
(JSC::FTL::JITCode::addDataSection): Deleted.
(JSC::FTL::JITCode::exitThunks): Deleted.

  • ftl/FTLJITCode.h:

(JSC::FTL::JITCode::b3Code):
(JSC::FTL::JITCode::handles): Deleted.
(JSC::FTL::JITCode::dataSections): Deleted.

  • ftl/FTLJITFinalizer.cpp:

(JSC::FTL::JITFinalizer::codeSize):
(JSC::FTL::JITFinalizer::finalizeFunction):

  • ftl/FTLJITFinalizer.h:
  • ftl/FTLJSCall.cpp: Removed.
  • ftl/FTLJSCall.h: Removed.
  • ftl/FTLJSCallBase.cpp: Removed.
  • ftl/FTLJSCallBase.h: Removed.
  • ftl/FTLJSCallVarargs.cpp: Removed.
  • ftl/FTLJSCallVarargs.h: Removed.
  • ftl/FTLJSTailCall.cpp: Removed.
  • ftl/FTLJSTailCall.h: Removed.
  • ftl/FTLLazySlowPath.cpp:

(JSC::FTL::LazySlowPath::LazySlowPath):
(JSC::FTL::LazySlowPath::generate):

  • ftl/FTLLazySlowPath.h:

(JSC::FTL::LazySlowPath::createGenerator):
(JSC::FTL::LazySlowPath::patchableJump):
(JSC::FTL::LazySlowPath::done):
(JSC::FTL::LazySlowPath::usedRegisters):
(JSC::FTL::LazySlowPath::callSiteIndex):
(JSC::FTL::LazySlowPath::stub):
(JSC::FTL::LazySlowPath::patchpoint): Deleted.

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLLocation.cpp:

(JSC::FTL::Location::forValueRep):
(JSC::FTL::Location::dump):
(JSC::FTL::Location::forStackmaps): Deleted.

  • ftl/FTLLocation.h:

(JSC::FTL::Location::forRegister):
(JSC::FTL::Location::forIndirect):
(JSC::FTL::Location::forConstant):
(JSC::FTL::Location::kind):
(JSC::FTL::Location::hasReg):

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::DFG::LowerDFGToLLVM::LowerDFGToLLVM):
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::createPhiVariables):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileUpsilon):
(JSC::FTL::DFG::LowerDFGToLLVM::compilePhi):
(JSC::FTL::DFG::LowerDFGToLLVM::compileDoubleConstant):
(JSC::FTL::DFG::LowerDFGToLLVM::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToLLVM::compileStrCat):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithMul):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithDiv):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithNegate):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitAnd):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitOr):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitXor):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitRShift):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitLShift):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitURShift):
(JSC::FTL::DFG::LowerDFGToLLVM::compilePutById):
(JSC::FTL::DFG::LowerDFGToLLVM::compileGetButterfly):
(JSC::FTL::DFG::LowerDFGToLLVM::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToLLVM::compileTailCall):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToLLVM::compileLoadVarargs):
(JSC::FTL::DFG::LowerDFGToLLVM::compileInvalidationPoint):
(JSC::FTL::DFG::LowerDFGToLLVM::compileIsUndefined):
(JSC::FTL::DFG::LowerDFGToLLVM::compileIn):
(JSC::FTL::DFG::LowerDFGToLLVM::getById):
(JSC::FTL::DFG::LowerDFGToLLVM::loadButterflyWithBarrier):
(JSC::FTL::DFG::LowerDFGToLLVM::stringsEqual):
(JSC::FTL::DFG::LowerDFGToLLVM::emitRightShiftSnippet):
(JSC::FTL::DFG::LowerDFGToLLVM::allocateCell):
(JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath):
(JSC::FTL::DFG::LowerDFGToLLVM::speculate):
(JSC::FTL::DFG::LowerDFGToLLVM::callCheck):
(JSC::FTL::DFG::LowerDFGToLLVM::preparePatchpointForExceptions):
(JSC::FTL::DFG::LowerDFGToLLVM::lowBlock):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitDescriptor):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::DFG::LowerDFGToLLVM::blessSpeculation):
(JSC::FTL::DFG::LowerDFGToLLVM::buildExitArguments):
(JSC::FTL::DFG::LowerDFGToLLVM::exitValueForAvailability):
(JSC::FTL::DFG::LowerDFGToLLVM::exitValueForNode):
(JSC::FTL::DFG::LowerDFGToLLVM::probe):
(JSC::FTL::DFG::LowerDFGToLLVM::crash):
(JSC::FTL::DFG::LowerDFGToLLVM::compileUntypedBinaryOp): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitArgumentsForPatchpointIfWillCatchException): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::emitOSRExitCall): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::callStackmap): Deleted.

  • ftl/FTLOSRExit.cpp:

(JSC::FTL::OSRExitDescriptor::OSRExitDescriptor):
(JSC::FTL::OSRExitDescriptor::validateReferences):
(JSC::FTL::OSRExitDescriptor::emitOSRExit):
(JSC::FTL::OSRExitDescriptor::prepareOSRExitHandle):
(JSC::FTL::OSRExit::OSRExit):
(JSC::FTL::OSRExit::codeLocationForRepatch):
(JSC::FTL::OSRExit::gatherRegistersToSpillForCallIfException): Deleted.
(JSC::FTL::OSRExit::spillRegistersToSpillSlot): Deleted.
(JSC::FTL::OSRExit::recoverRegistersFromSpillSlot): Deleted.
(JSC::FTL::OSRExit::willArriveAtExitFromIndirectExceptionCheck): Deleted.
(JSC::FTL::OSRExit::willArriveAtOSRExitFromCallOperation): Deleted.
(JSC::FTL::OSRExit::needsRegisterRecoveryOnGenericUnwindOSRExitPath): Deleted.

  • ftl/FTLOSRExit.h:

(JSC::FTL::OSRExit::considerAddingAsFrequentExitSite):
(JSC::FTL::OSRExitDescriptorImpl::OSRExitDescriptorImpl): Deleted.

  • ftl/FTLOSRExitCompilationInfo.h: Removed.
  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileRecovery):
(JSC::FTL::compileStub):
(JSC::FTL::compileFTLOSRExit):

  • ftl/FTLOSRExitHandle.cpp:
  • ftl/FTLOSRExitHandle.h:
  • ftl/FTLOutput.cpp: Removed.
  • ftl/FTLOutput.h: Removed.
  • ftl/FTLPatchpointExceptionHandle.cpp:
  • ftl/FTLPatchpointExceptionHandle.h:
  • ftl/FTLStackMaps.cpp: Removed.
  • ftl/FTLStackMaps.h: Removed.
  • ftl/FTLState.cpp:

(JSC::FTL::State::State):
(JSC::FTL::State::~State):
(JSC::FTL::State::dumpState): Deleted.

  • ftl/FTLState.h:
  • ftl/FTLUnwindInfo.cpp: Removed.
  • ftl/FTLUnwindInfo.h: Removed.
  • ftl/FTLValueRange.cpp:

(JSC::FTL::ValueRange::decorateInstruction):

  • ftl/FTLValueRange.h:

(JSC::FTL::ValueRange::ValueRange):
(JSC::FTL::ValueRange::begin):
(JSC::FTL::ValueRange::end):

  • ftl/FTLWeight.h:

(JSC::FTL::Weight::value):
(JSC::FTL::Weight::frequencyClass):
(JSC::FTL::Weight::scaleToTotal):

  • llvm/InitializeLLVM.cpp: Removed.
  • llvm/InitializeLLVM.h: Removed.
  • llvm/InitializeLLVMMac.cpp: Removed.
  • llvm/InitializeLLVMPOSIX.cpp: Removed.
  • llvm/InitializeLLVMPOSIX.h: Removed.
  • llvm/LLVMAPI.cpp: Removed.
  • llvm/LLVMAPI.h: Removed.
  • llvm/LLVMAPIFunctions.h: Removed.
  • llvm/LLVMHeaders.h: Removed.
  • llvm/library/LLVMAnchor.cpp: Removed.
  • llvm/library/LLVMExports.cpp: Removed.
  • llvm/library/LLVMOverrides.cpp: Removed.
  • llvm/library/config_llvm.h: Removed.

Source/WTF:

  • wtf/Platform.h:

Tools:

  • Scripts/copy-webkitlibraries-to-product-directory:

(isContentOfFileEqualToString):
(fileContains): Deleted.
(buildLLVM): Deleted.
(symlinkLLVMLibrariesIfNeeded): Deleted.

WebKitLibraries:

  • LLVMIncludesElCapitan.tar.bz2: Removed.
  • LLVMIncludesIOS9.tar.bz2: Removed.
  • LLVMIncludesMavericks.tar.bz2: Removed.
  • LLVMIncludesYosemite.tar.bz2: Removed.
  • LLVMLibrariesElCapitan.tar.bz2: Removed.
  • LLVMLibrariesIOS9.tar.bz2: Removed.
  • LLVMLibrariesMavericks.tar.bz2: Removed.
  • LLVMLibrariesYosemite.tar.bz2: Removed.
Location:
trunk/Source/JavaScriptCore/disassembler
Files:
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/disassembler/ARM64Disassembler.cpp

    r172813 r196729  
    3535namespace JSC {
    3636
    37 bool tryToDisassemble(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out, InstructionSubsetHint)
     37bool tryToDisassemble(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out)
    3838{
    3939    A64DOpcode arm64Opcode;
  • trunk/Source/JavaScriptCore/disassembler/ARMv7Disassembler.cpp

    r163859 r196729  
    3434namespace JSC {
    3535
    36 bool tryToDisassemble(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out, InstructionSubsetHint)
     36bool tryToDisassemble(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out)
    3737{
    3838    ARMv7DOpcode armOpcode;
  • trunk/Source/JavaScriptCore/disassembler/Disassembler.cpp

    r194496 r196729  
    3838namespace JSC {
    3939
    40 void disassemble(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out, InstructionSubsetHint subsetHint)
     40void disassemble(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out)
    4141{
    42     if (tryToDisassemble(codePtr, size, prefix, out, subsetHint))
     42    if (tryToDisassemble(codePtr, size, prefix, out))
    4343        return;
    4444   
     
    6868    size_t size { 0 };
    6969    const char* prefix { nullptr };
    70     InstructionSubsetHint subsetHint { MacroAssemblerSubset };
    7170};
    7271
     
    108107
    109108            dataLog(task->header);
    110             disassemble(
    111                 task->codeRef.code(), task->size, task->prefix, WTF::dataFile(),
    112                 task->subsetHint);
     109            disassemble(task->codeRef.code(), task->size, task->prefix, WTF::dataFile());
    113110        }
    114111    }
     
    132129
    133130void disassembleAsynchronously(
    134     const CString& header, const MacroAssemblerCodeRef& codeRef, size_t size, const char* prefix,
    135     InstructionSubsetHint subsetHint)
     131    const CString& header, const MacroAssemblerCodeRef& codeRef, size_t size, const char* prefix)
    136132{
    137133    std::unique_ptr<DisassemblyTask> task = std::make_unique<DisassemblyTask>();
     
    140136    task->size = size;
    141137    task->prefix = prefix;
    142     task->subsetHint = subsetHint;
    143138   
    144139    asynchronousDisassembler().enqueue(WTFMove(task));
  • trunk/Source/JavaScriptCore/disassembler/Disassembler.h

    r186859 r196729  
    3737class MacroAssemblerCodeRef;
    3838
    39 enum InstructionSubsetHint { MacroAssemblerSubset, LLVMSubset };
    40 
    4139#if ENABLE(DISASSEMBLER)
    42 bool tryToDisassemble(const MacroAssemblerCodePtr&, size_t, const char* prefix, PrintStream&, InstructionSubsetHint = MacroAssemblerSubset);
     40bool tryToDisassemble(const MacroAssemblerCodePtr&, size_t, const char* prefix, PrintStream&);
    4341#else
    44 inline bool tryToDisassemble(const MacroAssemblerCodePtr&, size_t, const char*, PrintStream&, InstructionSubsetHint = MacroAssemblerSubset)
     42inline bool tryToDisassemble(const MacroAssemblerCodePtr&, size_t, const char*, PrintStream&)
    4543{
    4644    return false;
     
    5048// Prints either the disassembly, or a line of text indicating that disassembly failed and
    5149// the range of machine code addresses.
    52 void disassemble(const MacroAssemblerCodePtr&, size_t, const char* prefix, PrintStream& out, InstructionSubsetHint = MacroAssemblerSubset);
     50void disassemble(const MacroAssemblerCodePtr&, size_t, const char* prefix, PrintStream& out);
    5351
    5452// Asynchronous disassembly. This happens on another thread, and calls the provided
    5553// callback when the disassembly is done.
    5654void disassembleAsynchronously(
    57     const CString& header, const MacroAssemblerCodeRef&, size_t, const char* prefix,
    58     InstructionSubsetHint = MacroAssemblerSubset);
     55    const CString& header, const MacroAssemblerCodeRef&, size_t, const char* prefix);
    5956
    6057JS_EXPORT_PRIVATE void waitForAsynchronousDisassembly();
  • trunk/Source/JavaScriptCore/disassembler/UDis86Disassembler.cpp

    r153256 r196729  
    11/*
    2  * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012, 2013, 2016 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3434namespace JSC {
    3535
    36 bool tryToDisassembleWithUDis86(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out, InstructionSubsetHint)
     36bool tryToDisassembleWithUDis86(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out)
    3737{
    3838    ud_t disassembler;
  • trunk/Source/JavaScriptCore/disassembler/UDis86Disassembler.h

    r153256 r196729  
    3333#if USE(UDIS86)
    3434
    35 bool tryToDisassembleWithUDis86(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out, InstructionSubsetHint);
     35bool tryToDisassembleWithUDis86(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out);
    3636
    3737#else // USE(UDIS86)
    3838
    39 inline bool tryToDisassembleWithUDis86(const MacroAssemblerCodePtr&, size_t, const char*, PrintStream&, InstructionSubsetHint) { return false; }
     39inline bool tryToDisassembleWithUDis86(const MacroAssemblerCodePtr&, size_t, const char*, PrintStream&) { return false; }
    4040
    4141#endif // USE(UDIS86)
  • trunk/Source/JavaScriptCore/disassembler/X86Disassembler.cpp

    r164333 r196729  
    3333#include "Options.h"
    3434#include "UDis86Disassembler.h"
    35 #include "LLVMDisassembler.h"
    3635
    3736namespace JSC {
     
    4443// supports (in which case we go with UDis86) or if he's using the LLVM subset.
    4544
    46 bool tryToDisassemble(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out, InstructionSubsetHint subsetHint)
     45bool tryToDisassemble(const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out)
    4746{
    48     if (Options::forceUDis86Disassembler())
    49         return tryToDisassembleWithUDis86(codePtr, size, prefix, out, subsetHint);
    50 
    51     if (Options::forceLLVMDisassembler())
    52         return tryToDisassembleWithLLVM(codePtr, size, prefix, out, subsetHint);
    53    
    54     if (subsetHint == MacroAssemblerSubset
    55         && tryToDisassembleWithUDis86(codePtr, size, prefix, out, MacroAssemblerSubset))
    56         return true;
    57 
    58     if (subsetHint == LLVMSubset
    59         && tryToDisassembleWithLLVM(codePtr, size, prefix, out, LLVMSubset))
    60         return true;
    61    
    62     if (tryToDisassembleWithUDis86(codePtr, size, prefix, out, subsetHint))
    63         return true;
    64     if (tryToDisassembleWithLLVM(codePtr, size, prefix, out, subsetHint))
    65         return true;
    66    
    67     RELEASE_ASSERT_NOT_REACHED();
    68     return false;
     47    return tryToDisassembleWithUDis86(codePtr, size, prefix, out);
    6948}
    7049
Note: See TracChangeset for help on using the changeset viewer.