[PATCH] D28394: [AA] Limit `MemoryLocation` retrieval to valid intrinsic arguments.
    bryant via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jan  5 20:44:12 PST 2017
    
    
  
bryant created this revision.
bryant added reviewers: hfinkel, reames, sanjoy, dberlin.
bryant added a subscriber: llvm-commits.
bryant set the repository for this revision to rL LLVM.
MemoryLocations can only be retrieved from certain arguments of intrinsic calls.
For instance, MemoryLocation::getForArgument would only work on lifetime.end's
second argument.
Currently, getModRefInfo avoids MemoryLocation-ing the wrong argument by
first checking that the argument type is a pointer. This check is inadequate.
For instance, invariant.end has two pointer arguments:
  declare void @llvm.invariant.end.p0i8(
      {}* <start>,
      i64 <size>,
      i8* nocapture <ptr>
  )
This patch attempts to address this discrepancy.
Repository:
  rL LLVM
https://reviews.llvm.org/D28394
Files:
  include/llvm/Analysis/MemoryLocation.h
  lib/Analysis/AliasAnalysis.cpp
  lib/Analysis/MemoryLocation.cpp
  test/Analysis/BasicAA/getforargument-crash.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28394.83342.patch
Type: text/x-patch
Size: 5707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170106/02722634/attachment.bin>
    
    
More information about the llvm-commits
mailing list