Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • compiler
  • translator
  • OutputHLSL.cpp
Find file
BlameHistoryPermalink
  • Daniel Bratell's avatar
    Make Angle code 40 KB smaller by using string literals directly. · 29190088
    Daniel Bratell authored Feb 20, 2015
    The implicit conversion of hundreds of string literals
    to TString generated a lot of machine code. By keeping them
    as string literals all the way the code will be smaller and faster.
    
    This is the change with clang for x64 (note VisitUnary in particular):
    Total change: -41392 bytes
    ==========================
      2 added, totalling +469 bytes across 1 sources
      2 removed, totalling -472 bytes across 1 sources
      5 shrunk, for a net change of -41389 bytes (54126 bytes before, 12737 bytes after) across 1 sources
      279692 unchanged, totalling 51433327 bytes
    
    ------------------------------------------------------------------------------------------------------------------------------------
     -41392 - Source: /home/bratell/src/chromium/src/third_party/angle/src/compiler/translator/OutputHLSL.cpp - (gained 469, lost 41861)
    ------------------------------------------------------------------------------------------------------------------------------------
      New symbols:
           +328: sh::OutputHLSL::outputConstructor(Visit, TType const&, char const*, TVector<TIntermNode*> const*) type=t, size=328 bytes
           +141: sh::OutputHLSL::outputTriplet(Visit, char const*, char const*, char const*) type=t, size=141 bytes
      Removed symbols:
           -133: sh::OutputHLSL::outputTriplet(Visit, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&) type=t, size=133 bytes
           -339: sh::OutputHLSL::outputConstructor(Visit, TType const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, TVector<TIntermNode*> const*) type=t, size=339 bytes
      Shrunk symbols:
           -388: sh::OutputHLSL::writeEmulatedFunctionTriplet(Visit, char const*) type=t, (was 628 bytes, now 240 bytes)
           -714: sh::OutputHLSL::visitBranch(Visit, TIntermBranch*) type=t, (was 1017 bytes, now 303 bytes)
          -9738: sh::OutputHLSL::visitAggregate(Visit, TIntermAggregate*) type=t, (was 17609 bytes, now 7871 bytes)
         -14132: sh::OutputHLSL::visitBinary(Visit, TIntermBinary*) type=t, (was 17627 bytes, now 3495 bytes)
         -16417: sh::OutputHLSL::visitUnary(Visit, TIntermUnary*) type=t, (was 17245 bytes, now 828 bytes)
    
    Change-Id: Id0f87d72f6d7f1ab7b543f0d28d5a8b7c7db9ec7
    Reviewed-on: https://chromium-review.googlesource.com/251090Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
    Tested-by: 's avatarbratell at Opera <bratell@opera.com>
    29190088
OutputHLSL.cpp 101 KB
EditWeb IDE
×

Replace OutputHLSL.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.