Ignore:
Timestamp:
Jan 26, 2016, 12:17:31 AM (9 years ago)
Author:
[email protected]
Message:

FTLB3Output should maintain good block order like the LLVM one does
https://bugs.webkit.org/show_bug.cgi?id=152222

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This fixes FTLB3Output to emit an ordered B3 IR. This makes inspecting IR *a lot* easier.
It will also be a performance win whenever we use range-based data structures for
liveness.

Also two small other changes:

  • Added some more dumping in integer range optimization phase.
  • Refined the disassembler's printing of instruction width suffixes so that "jzl" is not a thing. It was using "l" as the suffix because jumps take a 32-bit immediate.
  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::addBlock):
(JSC::B3::Procedure::setBlockOrderImpl):
(JSC::B3::Procedure::clone):

  • b3/B3Procedure.h:

(JSC::B3::Procedure::frontendData):
(JSC::B3::Procedure::setBlockOrder):

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • disassembler/udis86/udis86_syn-att.c:

(ud_translate_att):

  • ftl/FTLB3Output.cpp:

(JSC::FTL::Output::initialize):
(JSC::FTL::Output::newBlock):
(JSC::FTL::Output::applyBlockOrder):
(JSC::FTL::Output::appendTo):

  • ftl/FTLB3Output.h:

(JSC::FTL::Output::setFrequency):
(JSC::FTL::Output::insertNewBlocksBefore):
(JSC::FTL::Output::callWithoutSideEffects):
(JSC::FTL::Output::newBlock): Deleted.

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::DFG::LowerDFGToLLVM::lower):

Source/WTF:

In the FTL we need to be able to construct a list by inserting elements before other
specific elements. We didn't already have a scalable way to do this, so this adds such a
data structure to WTF. This also has changes to SentinelLinkedList to make it support
these kinds of insertions.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/OrderMaker.h: Added.

(WTF::OrderMaker::Node::Node):
(WTF::OrderMaker::OrderMaker):
(WTF::OrderMaker::prepend):
(WTF::OrderMaker::append):
(WTF::OrderMaker::insertBefore):
(WTF::OrderMaker::insertAfter):
(WTF::OrderMaker::iterator::iterator):
(WTF::OrderMaker::iterator::operator*):
(WTF::OrderMaker::iterator::operator++):
(WTF::OrderMaker::iterator::operator==):
(WTF::OrderMaker::iterator::operator!=):
(WTF::OrderMaker::begin):
(WTF::OrderMaker::end):
(WTF::OrderMaker::newNode):

  • wtf/SentinelLinkedList.h:

(WTF::BasicRawSentinelNode::isOnList):
(WTF::BasicRawSentinelNode<T>::remove):
(WTF::BasicRawSentinelNode<T>::prepend):
(WTF::BasicRawSentinelNode<T>::append):
(WTF::RawNode>::SentinelLinkedList):
(WTF::RawNode>::push):
(WTF::RawNode>::append):
(WTF::RawNode>::remove):
(WTF::RawNode>::prepend):
(WTF::RawNode>::isOnList):

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.