[PATCH] D125328: [BasicAA] Fix order in which we pass MemoryLocations to alias()
    Alexander Richardson via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri May 13 10:41:39 PDT 2022
    
    
  
arichardson added inline comments.
================
Comment at: llvm/include/llvm/IR/IRBuilder.h:544
+  /// Fetch the type representing a pointer.
+  PointerType *getPtrTy(unsigned AddrSpace = 0) {
+    return PointerType::get(Context, AddrSpace);
----------------
Would it be possible to drop the default zero argument for new APIs? Defaulting to AS0 instead of explicitly passing address spaces often causes assertion errors for targets such as AVR or the downstream CHERI-RISC-V and Arm Morello targets.
================
Comment at: llvm/include/llvm/IR/IRBuilder.h:544
+  /// Fetch the type representing a pointer.
+  PointerType *getPtrTy(unsigned AddrSpace = 0) {
+    return PointerType::get(Context, AddrSpace);
----------------
arichardson wrote:
> Would it be possible to drop the default zero argument for new APIs? Defaulting to AS0 instead of explicitly passing address spaces often causes assertion errors for targets such as AVR or the downstream CHERI-RISC-V and Arm Morello targets.
o 
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125328/new/
https://reviews.llvm.org/D125328
    
    
More information about the llvm-commits
mailing list