Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,083
    • Issues 3,083
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 996
    • Merge requests 996
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • MesaMesa
  • mesamesa
  • Merge requests
  • !2157

nir+ir3: address calculation optimizations (2nd approach)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rob Clark requested to merge robclark/mesa:wip/addr-calc-v2 into master Sep 27, 2019
  • Overview 27
  • Commits 12
  • Pipelines 8
  • Changes 22

Alternative approach to !2141 (closed)

This introduces an amul instruction to be used in address calculation, rather than directly using imul. For drivers that don't set has_imul24, these will be converted to imul. Drivers that do have imul24 should call the new nir_lower_amul() pass which will lower the amuls to either imul24 or imul depending on whether signed 24b math is sufficient to construct an offset.

Still needs some patch cleanup.. but I think overall I like this better than !2141 (closed), and it does handle more cases (with slightly better shader-db numbers as a result). It would be a bit nicer if (a) register access was also intrinsics, and (b) we had a generic(ish) way to identify offset and block-id parameters to intrinsics. (Or maybe if the src parameter orders were better aligned.)

total instructions in shared programs: 8693021 -> 8666432 (-0.31%)
instructions in affected programs: 171704 -> 145115 (-15.49%)
helped: 746
HURT: 0

total full in shared programs: 364087 -> 364007 (-0.02%)
full in affected programs: 815 -> 735 (-9.82%)
helped: 89
HURT: 3
Edited Oct 08, 2019 by Rob Clark
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/addr-calc-v2