[PATCH] Stop AliasSetTracker from being overly pessimistic

Chris Lattner clattner at apple.com
Mon Sep 9 08:08:12 PDT 2013


On Sep 6, 2013, at 5:44 AM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:
> This is a follow-up from this thread:
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-September/065333.html
> 
> This patch simply stops volatile (and otherwise "special") loads and stores from pessimizing the entire alias set to which they are added.

Do you understand why that code was there?  Just removing it seems like a bad idea without some analysis.  have you looked at the effect of this on code that uses volatile?  Miscompilations of volatile are not fun to track down.

-Chris

> 
> Please review.
> 
> -K
> 
> 
> ---
> lib/Analysis/AliasSetTracker.cpp |    2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/Analysis/AliasSetTracker.cpp b/lib/Analysis/AliasSetTracker.cpp
> index 5910526..2289c12 100644
> --- a/lib/Analysis/AliasSetTracker.cpp
> +++ b/lib/Analysis/AliasSetTracker.cpp
> @@ -299,7 +299,6 @@ bool AliasSetTracker::add(Value *Ptr, uint64_t Size, const MDNode *TBAAInfo) {
> bool AliasSetTracker::add(LoadInst *LI) {
>   if (LI->getOrdering() > Monotonic) return addUnknown(LI);
>   AliasSet::AccessType ATy = AliasSet::Refs;
> -  if (!LI->isUnordered()) ATy = AliasSet::ModRef;
>   bool NewPtr;
>   AliasSet &AS = addPointer(LI->getOperand(0),
>                             AA.getTypeStoreSize(LI->getType()),
> @@ -312,7 +311,6 @@ bool AliasSetTracker::add(LoadInst *LI) {
> bool AliasSetTracker::add(StoreInst *SI) {
>   if (SI->getOrdering() > Monotonic) return addUnknown(SI);
>   AliasSet::AccessType ATy = AliasSet::Mods;
> -  if (!SI->isUnordered()) ATy = AliasSet::ModRef;
>   bool NewPtr;
>   Value *Val = SI->getOperand(0);
>   AliasSet &AS = addPointer(SI->getOperand(1),
> --
> 1.7.6.4
> 
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list