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

Make Function not annotatable and get rid of Annotations #1118

Closed
lattner opened this issue Apr 23, 2006 · 8 comments
Closed

Make Function not annotatable and get rid of Annotations #1118

lattner opened this issue Apr 23, 2006 · 8 comments
Labels
bugzilla Issues migrated from bugzilla code-cleanup llvm:codegen

Comments

@lattner
Copy link
Collaborator

lattner commented Apr 23, 2006

Bugzilla Link 746
Resolution FIXED
Resolved on Aug 23, 2009 23:49
Version 1.0
OS All

Extended Description

Function has long been annotatable because MachineFunction was attached to it this way. There is no
longer any reason for this, it would be good to turn MachineFunction into a normal analysis object
maintained by the pass manager, produced by an instruction selector.

-Chris

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 21, 2007

*** Bug llvm/llvm-bugzilla-archive#927 has been marked as a duplicate of this bug. ***

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 21, 2007

replace-annotation-with-listener.patch
This patch simply replaces the subversive and overgeneralized annotation
classes with a map in MachineFunction and a listener interface so that
MachineFunctions can destroy themselves when the parent Function is deleted.

I wish I'd noticed this one before 927. Not sure you'll want to apply this
patch in light of the comments on this bug.

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 3, 2007

Are we going to apply this patch?

Reid.

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 3, 2007

No, I'm working on a better one incorporating some feedback from Chris, but have been rather busy with
work.

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 4, 2007

mfprovider.tar.gz
This patch implements the strategy I discussed with Chris. An "analysis" pass
is used as a bucket to hold onto the MachineFunction generated by instruction
selection. PassManager then releases the memory at the appropriate time. I find
this approach is rather fragile (the caveats are noted in the header file), but
it's much less disruptive than adding direct support for MachineFunctionPasses
to PassManager et al.

Please note that the attachment is a .tar.gz to capture the new files; it
should be untarred in the root of the source tree, and the patch applied.

@llvmbot
Copy link
Collaborator

llvmbot commented Apr 25, 2007

Did this patch ever get applied? What's the status?

We could save 4 bytes per Function and avoid multiple inheritance if we made
Function not derive from Annotable.

It would be nice to close this (finally) for 2.0

@llvmbot
Copy link
Collaborator

llvmbot commented Apr 26, 2007

It was not applied, no.

The patch has bitrot. There are some trivial mechanical conflicts which are easily resolved. Additionally,
llvm-gcc's pipeline now invalidates the MFProvider, which trips an assert; the most obvious cause for that
would be a MachineFunctionPass failing to call super in its getAnalysisUsage override.

@lattner
Copy link
Collaborator Author

lattner commented Aug 24, 2009

This is done!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla code-cleanup llvm:codegen
Projects
None yet
Development

No branches or pull requests

2 participants