-
Notifications
You must be signed in to change notification settings - Fork 172
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
Restrict input bits for analysis implementations in the presence of PC #659
base: main
Are you sure you want to change the base?
Conversation
I need more here. what's going on? why is it correct? |
add comments in the code explaining the strategy and rationale for correctness. |
remove commented-out lines of code unless they serve a specific purpose, in which case explain them |
ping |
Oh, forgot about this. |
32c9456
to
81a58a3
Compare
updated |
@@ -119,6 +119,32 @@ std::pair<llvm::APInt, llvm::APInt> knownBitsNarrowing | |||
return {KnownNotZero, KnownNotOne}; | |||
} | |||
|
|||
std::unordered_map<Inst *, llvm::APInt> | |||
PruningManager::computeInputRestrictions() { | |||
std::unordered_map<Inst *, std::pair<llvm::APInt, llvm::APInt>> Seen; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to change it here but overall you should avoid using a std::pair for same-typed things like this, and instead pick an implementation which assigns appropriate names to things. here two separate variables would work, or else a struct with members called Zero and One or similar
I still have no idea why this does what you want it to do, you'll have to explain it more either in the code or in person |
@manasij7479 this is one of several things you need to get back to and finish up |
Addressed the comments, not sure what to do about the explanation. |
81a58a3
to
b22e861
Compare
how about some examples which show this working, then? |
I don't like random, complicated code which is neither tested nor well-explained. I know you can do better than this, please make an effort here. |
it seems pretty obvious what to do here:
|
I have no idea why you would be confident enough in this code's correctness to submit it for inclusion in souper without having done this |
No description provided.