We'll need to emit these manually in clang to add range metadata.
Names in llvm/IR/Intrinsics*.td are considered before custom emit so they need to go.
Paths
| Differential D20691
AMDGPU: Remove gcc builtin names from workitem intrinsics ClosedPublic Authored by jvesely on May 26 2016, 10:48 AM.
Details Summary We'll need to emit these manually in clang to add range metadata. Names in llvm/IR/Intrinsics*.td are considered before custom emit so they need to go.
Diff Detail
Event Timelinejvesely updated this object. jvesely added a parent revision: D20298: AMDGPU/R600: Add get_global_offset_{x,y,z} intrinsic.May 26 2016, 10:48 AM arsenm edited edge metadata. Comment ActionsWhy do you need this? I know I had a patch to do the same thing at some point, but don't remember why. Since these don't need mangling I would expect GCCBuiltin to work correctly This revision is now accepted and ready to land.May 26 2016, 11:13 AM Comment Actions
clang in CodeGenFunction::EmitBuiltinExpr() considers embedded intrinsic names before calling EmitTargetBuiltinExpr(). Since we want these intrinsics to be emitted with range metadata we need to do it in EmitAMDGPUBuiltinExpr(called by EmitTargetBUiltinExpr). The embedded names need to be removed, otherwise the Emit* functions won't run. jvesely added a child revision: D20299: AMDGPU: Export target workitem related builtins.May 26 2016, 11:36 AM jvesely edited edge metadata. Comment Actionsglobal offset is unbounded so we can provide the GCC builtin here This revision is now accepted and ready to land.May 26 2016, 2:00 PM jvesely removed a parent revision: D20298: AMDGPU/R600: Add get_global_offset_{x,y,z} intrinsic.Jun 21 2016, 1:01 PM Comment Actions LGTM
Closed by commit rL273318: AMDGPU: Remove gcc builtin names from workitem intrinsics (authored by jvesely). · Explain WhyJun 21 2016, 1:53 PM This revision was automatically updated to reflect the committed changes. jvesely marked an inline comment as done.
Revision Contents
Diff 58687 include/llvm/IR/IntrinsicsAMDGPU.td
|
This comment isn't needed / is misleading since the intrinsic itself has no indication of the range limit