Ignore:
Timestamp:
Mar 17, 2017, 10:58:18 AM (8 years ago)
Author:
[email protected]
Message:

Air should be powerful enough to support Tmp-splitting
https://bugs.webkit.org/show_bug.cgi?id=169515

Reviewed by Saam Barati.

Source/JavaScriptCore:

In the process of implementing the Tmp-splitting optimization, I made some small
clean-ups. They don't affect anything - it's basically moving code around and adding
utility functions.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::allocate): testb3 was sometimes failing its checkDoesNotUseInstruction check because of uninitialized memory. This initializes the internal fragmentation slop of every JIT allocation.

  • b3/air/AirAllocateRegistersByGraphColoring.cpp:
  • b3/air/AirAllocateRegistersByGraphColoring.h:

(JSC::B3::Air::useIRC): It's useful to be able to query which register allocator we're using.

  • b3/air/AirArg.cpp:

(WTF::printInternal):

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::temperature): The temperature of a role is a useful concept to have factored out.

  • b3/air/AirBreakCriticalEdges.cpp: Added.

(JSC::B3::Air::breakCriticalEdges): I was surprised that we didn't have this already. It's a pretty fundamental CFG utility.

  • b3/air/AirBreakCriticalEdges.h: Added.
  • b3/air/AirGenerate.cpp:
  • b3/air/AirInsertionSet.h: You can't use & if you want copy-constructibility, which seems to be a prerequisite to IndexMap<BasicBlock, InsertionSet>.

(JSC::B3::Air::InsertionSet::InsertionSet):
(JSC::B3::Air::InsertionSet::code):

  • b3/air/AirLiveness.h: Teach Liveness to track only warm liveness.

(JSC::B3::Air::TmpLivenessAdapter::acceptsRole):
(JSC::B3::Air::StackSlotLivenessAdapter::acceptsRole):
(JSC::B3::Air::RegLivenessAdapter::acceptsRole):
(JSC::B3::Air::AbstractLiveness::AbstractLiveness):
(JSC::B3::Air::AbstractLiveness::LocalCalc::execute):

Source/WTF:

Teach IndexMap how to handle types that don't have a default constructor. This makes it
easy to create a IndexMap<BasicBlock, InsertionSet>, which is a super powerful
construct.

  • wtf/IndexMap.h:

(WTF::IndexMap::IndexMap):
(WTF::IndexMap::resize):
(WTF::IndexMap::clear):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/LinkBuffer.cpp

    r212908 r214109  
    11/*
    2  * Copyright (C) 2012-2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012-2017 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    238238    }
    239239   
     240    while (initialSize % jitAllocationGranule) {
     241        macroAssembler.breakpoint();
     242        initialSize = macroAssembler.m_assembler.codeSize();
     243    }
     244   
    240245    ASSERT(m_vm != nullptr);
    241246    m_executableMemory = m_vm->executableAllocator.allocate(*m_vm, initialSize, ownerUID, effort);
Note: See TracChangeset for help on using the changeset viewer.