| 
        
       | 
      
        
  
  [turbofan] Fix tail call optimization.
Tail calls are matched on the graph, with a dedicated tail call
optimization that is actually testable. The instruction selection can
still fall back to a regular if the platform constraints don't allow to
emit a tail call (i.e. the return locations of caller and callee differ
or the callee takes non-register parameters, which is a restriction that
will be removed in the future).
Also explicitly limit tail call optimization to stubs for now and drop
the global flag.
BUG= v8:4076
LOG=n
Committed:  https://crrev.com/d21de2a48bc63823876d3f9bf52753f9da0aea6b
Cr-Commit-Position: refs/heads/master@{#28219}
    
  
  
    
      Total comments: 2
      
     
  
  
    
  
  
    
       | 
      Unified diffs | 
      Side-by-side diffs | 
      Delta from patch set | 
      Stats (+1063 lines, -191 lines) | 
      Patch | 
     
    
      
          | 
        M | 
        
          
            BUILD.gn
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +2 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/arm/instruction-selector-arm.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          4 chunks | 
          +95 lines, -16 lines | 
        
        
          
            2 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/arm64/instruction-selector-arm64.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          3 chunks | 
          +118 lines, -13 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/common-operator.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/common-operator.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +21 lines, -3 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/ia32/instruction-selector-ia32.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          3 chunks | 
          +92 lines, -15 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/instruction-selector.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +2 lines, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/instruction-selector.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          7 chunks | 
          +13 lines, -47 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/machine-type.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/mips/instruction-selector-mips.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          3 chunks | 
          +95 lines, -14 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/mips64/instruction-selector-mips64.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          3 chunks | 
          +95 lines, -14 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/node.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +3 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/node.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +15 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/opcodes.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/pipeline.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +4 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/schedule.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +4 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/schedule.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +10 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/scheduler.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +11 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            src/compiler/tail-call-optimization.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +40 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            src/compiler/tail-call-optimization.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +83 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/typer.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +2 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/verifier.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +3 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/compiler/x64/instruction-selector-x64.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          3 chunks | 
          +93 lines, -16 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/flag-definitions.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +0 lines, -2 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/globals.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +0 lines, -2 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/hydrogen-instructions.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +3 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            test/unittests/compiler/instruction-selector-unittest.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +0 lines, -48 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            test/unittests/compiler/node-test-utils.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +5 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            test/unittests/compiler/node-test-utils.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +71 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            test/unittests/compiler/node-unittest.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            test/unittests/compiler/scheduler-unittest.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +16 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            test/unittests/compiler/tail-call-optimization-unittest.cc
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +160 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            test/unittests/unittests.gyp
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            tools/gyp/v8.gyp
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +2 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
   
  
  
 
  
   
  
    
  
  
  
    
    Total messages: 8 (2 generated)
     
  
  
       |