DescriptionThe customary LLVM way of obtaining intrinsics is with
Intrinsic::getDeclaration and use the definition in
include/llvm/Intrinsics.td
This also makes the attribute on the intrinsic to be more
consistent with the back-end (code-gen), which automatically assumes
it's ReadNone (because this is what Intrinsics.td) defines.
Using ReadNone rather than ReadOnly may be not strictly correct because
the intrinsic depends on the value of the TP. However, this attribute is
not really used anywhere in IR optimizations, and in the backend the
intrinsic is ReadNone anyhow (the IR setting gets overridden).
If we run into any problems with this in the future, we may consider
handling the lowering of this intrinsic in
TargetLowering::LowerINTRINSIC_W_CHAIN rather than in
TargetLowering::LowerINTRINSIC_WO_CHAIN.
BUG=None
R=mseaborn@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=8fe6f1f
Patch Set 1 #Patch Set 2 : Updated description #
Messages
Total messages: 5 (0 generated)
|