Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irutil: add instruction and terminator operand use-tracking and value update API #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Commits on Dec 21, 2019

  1. irutil: add instruction and terminator operand use-tracking and value…

    … update API
    
    Rather than adding the use-tracking to llir/llvm/ir, we currently add
    this to irutil so we may get more experience with the API and see if its
    the right fit for instruction and terminator operand use-tracking and
    value update.
    
    Note: this is the stronger version of the API, as outlined by @pwaller
    in llir/llvm#42 (comment)
    
    Notably, operands are tracked by pointer (*value.Value) which also enables
    updating values using the same API.
    
    Fixes llir/llvm#42.
    mewmew committed Dec 21, 2019
    Configuration menu
    Copy the full SHA
    3887e0d View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2019

  1. irutil: add preliminary support for Comment pseudo-instruciton in Ins…

    …tUses
    
    Note: we should try to arrive at a more general way of handling custom
    user-defined instructions.
    mewmew committed Dec 22, 2019
    Configuration menu
    Copy the full SHA
    118a899 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2019

  1. Configuration menu
    Copy the full SHA
    4d89531 View commit details
    Browse the repository at this point in the history
  2. irutil: return backing slice also from instructions which have no val…

    …ue operands
    
    Without this change, repeated invokations of InstUses (as used in FuncUses)
    would result in incorrect results.
    
    	for _, inst := range block.Insts {
    		backing = InstUses(backing, inst)
    	}
    mewmew committed Dec 23, 2019
    Configuration menu
    Copy the full SHA
    a8eb359 View commit details
    Browse the repository at this point in the history
  3. irutil: refine use-tracking API to operate on []Use instead of []*Use

    Since we already track a pointer to the used value in the Use structure,
    we can pass Use by value. This should help reduce memory allocations.
    mewmew committed Dec 23, 2019
    Configuration menu
    Copy the full SHA
    9e472c0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    224a423 View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2019

  1. irutil: add dead code elimination as use-tracking API example

    Note: this implementation of dce is a toy example. It does not take deep
    value uses into account, and as such, cannot handle use tracking when
    local variables are used within constant expressions.
    
    This issue would be resolved when irutil.FuncUses is extended to handle
    deep value use tracking.
    mewmew committed Dec 24, 2019
    Configuration menu
    Copy the full SHA
    a88117e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9bd4e87 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    503ea99 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2019

  1. Configuration menu
    Copy the full SHA
    0b10264 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5ecb5df View commit details
    Browse the repository at this point in the history