[PATCH] D45216: [Attributes] Add IntrinsicLoweredToCall attribute.

Matt Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 3 11:21:21 PDT 2018


mattd created this revision.
mattd added reviewers: hfinkel, aaron.ballman, eli.friedman.
Herald added subscribers: javed.absar, mehdi_amini.

Many intrinsics are not lowered to a function call; however, there is currently no way of knowing whether any given intrinsic is lowered to a call.  
The function TargetTransformInfoImpl::isLoweredToCall was originally implemented to return 'false' for all intrinsics, suggesting that there is not the case
of any intrinsic being lowered to a call.  The patch introduced here adds an attribute to indicate that a particular intrinsic will be lowered to a call instruction.
The aforementioned function has been updated to check the IsLoweredToCall attribute when it encounters an intrinsic.

This patch was inspired by the discussion at the following URL:
https://reviews.llvm.org/D41104

The semantics of lowering is preserved with this change, but I anticipate,
in the future, some intrinsics might be added or updated to reflect that they
truly be come a call.


https://reviews.llvm.org/D45216

Files:
  include/llvm/Analysis/TargetTransformInfoImpl.h
  include/llvm/Bitcode/LLVMBitCodes.h
  include/llvm/IR/Attributes.td
  include/llvm/IR/Intrinsics.td
  lib/AsmParser/LLLexer.cpp
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLToken.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/IR/Attributes.cpp
  lib/IR/Verifier.cpp
  lib/Transforms/Utils/CodeExtractor.cpp
  test/Bitcode/attributes.ll
  utils/TableGen/CodeGenIntrinsics.h
  utils/TableGen/CodeGenTarget.cpp
  utils/TableGen/IntrinsicEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45216.140828.patch
Type: text/x-patch
Size: 9370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180403/b09c0688/attachment.bin>


More information about the llvm-commits mailing list