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

Add support for 'transactions' in the pass manager #2488

Open
lattner opened this issue Mar 1, 2008 · 1 comment
Open

Add support for 'transactions' in the pass manager #2488

lattner opened this issue Mar 1, 2008 · 1 comment
Labels
bugzilla Issues migrated from bugzilla enhancement Improving things as opposed to bug fixing, e.g. new or missing feature llvm:core

Comments

@lattner
Copy link
Collaborator

lattner commented Mar 1, 2008

Bugzilla Link 2116
Version 2.2
OS All
CC @asl,@chandlerc,@nlewycky

Extended Description

Lots of passes operate by making incremental changes to a function: instcombine iterates through a worklist, mem2reg promotes allocas one at a time, and the inliner inlines a function one at a time. Before and after each transformation, the IR is valid, and could be snapshotted. It would be really awesome to expose this behavior through to the passmanager to allow the verifier to be run after each transaction and for bugpoint to be able to reduce bugs down to the level of a single transaction.

I haven't thought fully about how this would work, but it seems that a pass should be able to opt-in to the transaction system. Each time it does something, it should bump the per-pass counter (which is owned/maintained by the passmgr) and before it does a transaction it checks some counter or something. If the counter is reaches zero, then it stops making transformations.

This is a fairly large and open ended project, but would be incredibly valuable for tracking down nasty bugs, particularly miscompilations.

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 14, 2014

I got here via the open projects page.

Is this something we still want to do? It looks like we could get most of the benefit by just doing something like IfCvtLimit. That is, add a debug command line option -max-transforms that each pass can check to see how many inlines, if conversions, alloca promotions, etc it should do.

If bugpoint gets down to a single pass, it can try "-max-transforms 0" to see if that pass supports limiting the amount of work it does.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
@Endilll Endilll added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature and removed new-feature labels Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla enhancement Improving things as opposed to bug fixing, e.g. new or missing feature llvm:core
Projects
None yet
Development

No branches or pull requests

3 participants