-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[SDAG] Use BatchAAResults for querying alias analysis (AA) results #123934
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1350,8 +1350,9 @@ bool MachineInstr::wouldBeTriviallyDead() const { | |
| return isPHI() || isSafeToMove(SawStore); | ||
| } | ||
|
|
||
| static bool MemOperandsHaveAlias(const MachineFrameInfo &MFI, AAResults *AA, | ||
| bool UseTBAA, const MachineMemOperand *MMOa, | ||
| static bool MemOperandsHaveAlias(const MachineFrameInfo &MFI, | ||
| BatchAAResults *AA, bool UseTBAA, | ||
| const MachineMemOperand *MMOa, | ||
| const MachineMemOperand *MMOb) { | ||
| // The following interface to AA is fashioned after DAGCombiner::isAlias and | ||
| // operates with MachineMemOperand offset with some important assumptions: | ||
|
|
@@ -1434,7 +1435,7 @@ static bool MemOperandsHaveAlias(const MachineFrameInfo &MFI, AAResults *AA, | |
| MemoryLocation(ValB, LocB, UseTBAA ? MMOb->getAAInfo() : AAMDNodes())); | ||
| } | ||
|
|
||
| bool MachineInstr::mayAlias(AAResults *AA, const MachineInstr &Other, | ||
| bool MachineInstr::mayAlias(BatchAAResults *AA, const MachineInstr &Other, | ||
| bool UseTBAA) const { | ||
| const MachineFunction *MF = getMF(); | ||
| const TargetInstrInfo *TII = MF->getSubtarget().getInstrInfo(); | ||
|
|
@@ -1478,6 +1479,15 @@ bool MachineInstr::mayAlias(AAResults *AA, const MachineInstr &Other, | |
| return false; | ||
| } | ||
|
|
||
| bool MachineInstr::mayAlias(AAResults *AA, const MachineInstr &Other, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is the non-BatchAA overload used now?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, that's fine. And no, you can't tag something as deprecated before all in-tree uses have been removed (it will break buildbots compiling with -Werror). |
||
| bool UseTBAA) const { | ||
| if (AA) { | ||
| BatchAAResults BAA(*AA); | ||
| return mayAlias(&BAA, Other, UseTBAA); | ||
| } | ||
| return mayAlias(static_cast<BatchAAResults *>(nullptr), Other, UseTBAA); | ||
| } | ||
|
|
||
| /// hasOrderedMemoryRef - Return true if this instruction may have an ordered | ||
| /// or volatile memory reference, or if the information describing the memory | ||
| /// reference is not available. Return false if it is known to have no ordered | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.