Giter VIP home page Giter VIP logo

Comments (3)

eschkufz avatar eschkufz commented on August 22, 2024

This should be easy to implement, there's already more or less
functionality for it.

Look in src/search/transforms.cc. There's a method called
set_operand_pool() which determines the set of operands that get proposed
by a transformation. Right now, the only flag that affects this is the
--callee-save flag. I'd suggest replacing this flag with
--preserved-registers { ... }, since it'll let you do what you want and
generalizes the behavior of that flag nicely.

On Fri, Oct 3, 2014 at 8:38 AM, Berkeley Churchill <[email protected]

wrote:

When optimizing a basic block, often the basic block will need to preserve
the value of a register without ever touching it. Right now, there are two
ways to have stoke do this:

(1) Make these 'preserved registers' both part of def-ins and live-outs.
If we do so, STOKE will propose moves that use data from these preserved
registers, even if they shouldn't be used. This makes the search space
larger, with most of this added size being deadweight.
(2) Make these 'preserved registers' neighther live-in nor live-out.
However, then these registers could be used and we lose soundness.

So, I propose having an option to specify registers which cannot ever be
read from or written to. This, like the dataflow analysis, can be used to
eliminate bad proposals before trying them. When I get a chance I'll create
a branch and implement this.


Reply to this email directly or view it on GitHub
#39.

from stoke.

eschkufz avatar eschkufz commented on August 22, 2024

It looks like you haven't started this yet, so I'll take it over. Should be a quick enhancement.

from stoke.

eschkufz avatar eschkufz commented on August 22, 2024

Done with this; merge with develop for changes.

I've generalized the behavior of --callee_save which would override the default behavior of not proposing callee-save registers. The new implementation expects an argument --preserve_args which takes a set of registers that stoke will not attempt to modify.

To preserve backwards compatibility, the default value of preserve_args is the set of callee save registers, and specifying the --callee_save flag overrides the value of preserve_args to the empty set.

from stoke.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.