[PATCH] D50786: [AST] Remove notion of volatile from alias sets

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 15 09:27:38 PDT 2018


reames created this revision.
reames added reviewers: mkazantsev, anna, skatkov, hfinkel.
Herald added subscribers: llvm-commits, bollu, mcrosier.

Volatility is not an aliasing property.  We used to model volatile as if it had extremely conservative aliasing implications, but that hasn't been true for several years now.  So, it doesn't make sense to be in AliasSet.

It also turns out the code is entirely a noop.  Outside of the AST code to update it, there was only one user: load store promotion in LICM.  L/S promotion doesn't need the check since it walks all the users of the address anyway.  It already checks each load or store via !isUnordered which causes us to bail for volatile accesses.  (Look at the lines immediately following the two remove asserts.)

There is the possibility of some small compile time impact here, but the only case which will get noticeably slower is a loop with a large number of loads and stores to the same address where only the last one we inspect is volatile.  This is sufficiently rare it's not worth optimizing for..


Repository:
  rL LLVM

https://reviews.llvm.org/D50786

Files:
  include/llvm/Analysis/AliasSetTracker.h
  lib/Analysis/AliasSetTracker.cpp
  lib/Transforms/Scalar/LICM.cpp
  test/Analysis/AliasSet/memtransfer.ll
  test/Transforms/LICM/hoisting.ll
  test/Transforms/LICM/scalar-promote.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50786.160826.patch
Type: text/x-patch
Size: 7070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180815/c97aeed3/attachment.bin>


More information about the llvm-commits mailing list