-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[InstCombine] Add assumption to preserve deref info after sinking. #120888
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
base: main
Are you sure you want to change the base?
Conversation
7b68352 to
f79dc21
Compare
| Value *Alignment, | ||
| Value *OffsetValue = nullptr); | ||
|
|
||
| CallInst *CreateDereferenceableAssumption(Value *PtrValue, unsigned Size); |
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.
Attribute::getWithDereferenceableBytes uses uint64_t for the size argument.
| class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final | ||
| : public InstCombiner, | ||
| public InstVisitor<InstCombinerImpl, Instruction *> { | ||
| bool CleanupAssumptions = false; |
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.
This option should be taken into account by LastRunTrackingAnalysis.
| Builder.SetInsertPoint(I); | ||
| Value *Ptr = I->getOperand(0); | ||
| Builder.CreateDereferenceableAssumption( | ||
| Ptr, I->getType()->getScalarSizeInBits()); |
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.
Loads of vectors and pointers are not handled here.
f79dc21 to
69f4349
Compare
69f4349 to
b9c785a
Compare
No description provided.