[PATCH] D47541: Allow creating llvm::Function in non-zero address spaces

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 30 09:35:56 PDT 2018


arichardson created this revision.
arichardson added reviewers: dylanmckay, pcc, arsenm, kparzysz, hfinkel, theraven.
Herald added subscribers: llvm-commits, nhaehnle, wdng.

Most users won't have to worry about this as all of the
'getOrInsertFunction' functions on Module will default to the program
address space.

An overload has been added to Function::Create to abstract away the
details for most callers.

This is based on https://reviews.llvm.org/D37054 but without the changes to
make passing a Module to Function::Create() mandatory. I have also added
some more tests and fixed the LLParser to accept call instructions for
types in the program address space.


Repository:
  rL LLVM

https://reviews.llvm.org/D47541

Files:
  docs/LangRef.rst
  include/llvm/IR/Function.h
  include/llvm/IR/GlobalValue.h
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLParser.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/IR/AsmWriter.cpp
  lib/IR/AutoUpgrade.cpp
  lib/IR/Function.cpp
  lib/IR/Globals.cpp
  lib/IR/Module.cpp
  lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp
  lib/Transforms/IPO/ArgumentPromotion.cpp
  lib/Transforms/IPO/DeadArgumentElimination.cpp
  lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
  lib/Transforms/Utils/CloneFunction.cpp
  lib/Transforms/Utils/CloneModule.cpp
  lib/Transforms/Utils/CodeExtractor.cpp
  test/Bitcode/function-default-address-spaces.ll
  test/Bitcode/function-nonzero-address-spaces-types.ll
  test/Bitcode/function-nonzero-address-spaces.ll
  unittests/Analysis/LazyCallGraphTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47541.149141.patch
Type: text/x-patch
Size: 32534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180530/e45d3152/attachment.bin>


More information about the llvm-commits mailing list