<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>152223</bug_id>
          
          <creation_ts>2015-12-12 22:19:12 -0800</creation_ts>
          <short_desc>Move the API(s) from B3MathExtras.h into FTL::Output</short_desc>
          <delta_ts>2016-02-16 18:26:59 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>154319</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Filip Pizlo">fpizlo</reporter>
          <assigned_to name="Benjamin Poulain">benjamin</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1148785</commentid>
    <comment_count>0</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2015-12-12 22:19:12 -0800</bug_when>
    <thetext>We need to keep the layering to a minimum.  We already have a layer that is meant to help you generate low-level IR, and that&apos;s called FTL::Output.  So, anytime we are tempted to add helpers that generate B3 IR on behalf of a client, we should just put that into FTL::Output.

Also, anytime you create a helper that generates IR that consists of multiple basic blocks, you need to be mindful of where you insert those blocks.  It&apos;s not good to just put them at the end of the procedure, since that breaks any range-based analyses.  It also makes IR hard to read.  This is why FTL::Output has all of this functionality about &quot;inserting blocks before&quot;.  So, in its current form, the API in B3MathExtras.h is suboptimal and produces weird-looking IR, and to fix that we would need to endow it with FTL::Output&apos;s smarts.  Seems better to just move it to FTL::Output.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1148846</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2015-12-13 13:54:03 -0800</bug_when>
    <thetext>As I wrote in the ChangeLog, that was about easier testing and perf work.

Point taken for the poor block layout though. I should definitely fix that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1148849</commentid>
    <comment_count>2</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2015-12-13 14:27:13 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; As I wrote in the ChangeLog, that was about easier testing and perf work.
&gt; 
&gt; Point taken for the poor block layout though. I should definitely fix that.

It would be great if FTL::Output was moved to B3, and became the default way to build B3 IR.  Then our tests could use it.

I think you can already instantiate FTL::Output from testb3, so we could start moving in that direction now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>