Skip to content

Conversation

@fhahn
Copy link
Contributor

@fhahn fhahn commented Dec 22, 2024

No description provided.

Value *Alignment,
Value *OffsetValue = nullptr);

CallInst *CreateDereferenceableAssumption(Value *PtrValue, unsigned Size);
Copy link
Member

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;
Copy link
Member

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());
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants