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

NewGVN: We could eliminate about 200 lines of code from eliminateInstructions #32629

Open
llvmbot opened this issue Jun 2, 2017 · 0 comments · May be fixed by #121059
Open

NewGVN: We could eliminate about 200 lines of code from eliminateInstructions #32629

llvmbot opened this issue Jun 2, 2017 · 0 comments · May be fixed by #121059
Labels
bugzilla Issues migrated from bugzilla llvm:GVN GVN and NewGVN stages (Global value numbering)

Comments

@llvmbot
Copy link
Member

llvmbot commented Jun 2, 2017

Bugzilla Link 33282
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @bryant

Extended Description

Bryant Wong, besides pointing out a bug in ValueDFS (which ends up not affecting anything but is still wrong :P), pointed out to me that including all the uses in the vectors is pointless.

Every time we see a def dominate another def, we can replace all the uses, so we are just wasting time by including them and sorting them.

I have a prototype that does this, and it saves about 200 lines of code in eliminateinstructions.

i haven't measured any speed change (not surprising, we walk the uses either way and the sort is fast).

Right now, my prototype doesn't do as good at dead code elimination as we do, and we would have to move how we handle replacing predicatienfo arguments (but it would still be simple, we just have to record whether we ended up killing them during the stack walk or not).

But it may be worth getting back to at some point.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@jayfoad jayfoad added the llvm:GVN GVN and NewGVN stages (Global value numbering) label Jul 12, 2022
@ManuelJBrito ManuelJBrito linked a pull request Dec 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:GVN GVN and NewGVN stages (Global value numbering)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants