In ModRefInfo "Must" was introduced to track presence of MustAlias, but we still want to return NoModRef when there is neither Mod or Ref, even when MustAlias is found. Patch has small fixes to ensure this happens.
Minor cleanup to compact 2 if statements into one when calling getModRefInfo for 2 ImmutableCallSites.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 14013 Build 14013: arc lint + arc unit
Event Timeline
lib/Analysis/AliasAnalysis.cpp | ||
---|---|---|
256–258 | I'm a bit confused by this -- before if onlyAccessesArgPointees was true and doesAccessArgPointees was false then we'd directly return ModRefInfo::NoModRef. However, now if onlyAccessesArgPointees is true and doesAccessArgPointees is false we're going to return Result after falling through to the end. Is that equivalent? If so, can you please add an assert(Result == NoModRef) or something like that? |
Comment Actions
Add shortcut path to NoModRef when second if test is false, unintended change of meaning in initial patch.
lib/Analysis/BasicAliasAnalysis.cpp | ||
---|---|---|
858 | [minor] Instead of if (X) return A; else return B; you can do if (X) return A; return B; |
I'm a bit confused by this -- before if onlyAccessesArgPointees was true and doesAccessArgPointees was false then we'd directly return ModRefInfo::NoModRef. However, now if onlyAccessesArgPointees is true and doesAccessArgPointees is false we're going to return Result after falling through to the end. Is that equivalent? If so, can you please add an assert(Result == NoModRef) or something like that?