[PATCH] D52087: [IRBuilder] Fixup CreateIntrinsic to allow specifying Types to Mangle.
    Neil Henning via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Sep 14 04:35:59 PDT 2018
    
    
  
sheredom created this revision.
sheredom added reviewers: arsenm, nhaehnle.
Herald added subscribers: llvm-commits, jfb, tpr, wdng, jvesely.
The IRBuilder CreateIntrinsic method wouldn't allow you to specify the types that you wanted the intrinsic to be mangled with. To fix this I've:
- Added an ArrayRef<Type *> member to both CreateIntrinsic overloads.
- Used that array to pass into the Intrinsic::getDeclaration call.
- Added a CreateUnaryIntrinsic to replace the most common use of CreateIntrinsic where the type was auto-deduced from operand 0.
- Added a bunch more unit tests to test Create*Intrinsic calls that weren't being tested (including the FMF flag that wasn't checked).
This was suggested as part of the AMDGPU specific atomic optimizer review (https://reviews.llvm.org/D51969).
Repository:
  rL LLVM
https://reviews.llvm.org/D52087
Files:
  include/llvm/IR/IRBuilder.h
  lib/IR/IRBuilder.cpp
  lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
  lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  lib/Transforms/InstCombine/InstCombineSelect.cpp
  unittests/IR/IRBuilderTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52087.165470.patch
Type: text/x-patch
Size: 13757 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180914/b00aa4a6/attachment.bin>
    
    
More information about the llvm-commits
mailing list