[PATCH] D132434: Add noread_thread_id attribute to intrinsics

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 22:50:07 PDT 2022


ChuanqiXu created this revision.
ChuanqiXu added reviewers: nhaehnle, jyknight, nikic, rjmccall, efriedma, fhahn, ychen, jdoerfert.
ChuanqiXu added a project: clang.
Herald added subscribers: jeroen.dobbelaere, wenlei, okura, kuter, arichardson.
Herald added a project: All.
ChuanqiXu requested review of this revision.
Herald added a reviewer: sstefan1.
Herald added subscribers: llvm-commits, cfe-commits, sstefan1.
Herald added a project: LLVM.

Successor of D132352 <https://reviews.llvm.org/D132352>

This revision adds `noread_thread_id` attribute to intrinsics, including:
(1) DefaultAttributeIntrinsics
(2) memset, memcpy, ... 
(3) debugging intrinsics

Also the patch removes `llvm.threadlocal.address(ptr)` and `llvm.thread.pointer()` from DefaultAttributeIntrinsics since they may access the thread identification.

I am not 100% sure I added `noread_thread_id ` attribute for all the proper intrinsics. But I think it is not bad to add them in an iterative fashion.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132434

Files:
  clang/test/CodeGen/builtin-sqrt.c
  clang/test/CodeGen/libcalls.c
  llvm/include/llvm/IR/Intrinsics.td
  llvm/test/Analysis/BasicAA/cs-cs.ll
  llvm/test/Analysis/BasicAA/intrinsics.ll
  llvm/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll
  llvm/test/Analysis/TypeBasedAliasAnalysis/intrinsics.ll
  llvm/test/Assembler/aarch64-intrinsics-attributes.ll
  llvm/test/Bindings/llvm-c/debug_info.ll
  llvm/test/Bitcode/compatibility-3.6.ll
  llvm/test/Bitcode/compatibility-3.7.ll
  llvm/test/Bitcode/compatibility-3.8.ll
  llvm/test/Bitcode/compatibility-3.9.ll
  llvm/test/Bitcode/compatibility-4.0.ll
  llvm/test/Bitcode/compatibility-5.0.ll
  llvm/test/Bitcode/compatibility-6.0.ll
  llvm/test/Bitcode/compatibility.ll
  llvm/test/Bitcode/upgrade-invariant-group-barrier.ll
  llvm/test/Feature/intrinsics.ll
  llvm/test/Instrumentation/MemorySanitizer/attributes.ll
  llvm/test/Other/invariant.group.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll
  llvm/test/Transforms/Attributor/dereferenceable-1.ll
  llvm/test/Transforms/Attributor/heap_to_stack.ll
  llvm/test/Transforms/Attributor/heap_to_stack_gpu.ll
  llvm/test/Transforms/Attributor/liveness.ll
  llvm/test/Transforms/Attributor/lowerheap.ll
  llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll
  llvm/test/Transforms/Attributor/memory_locations.ll
  llvm/test/Transforms/Attributor/noalias.ll
  llvm/test/Transforms/Attributor/nocapture-1.ll
  llvm/test/Transforms/Attributor/nofree.ll
  llvm/test/Transforms/Attributor/nonnull.ll
  llvm/test/Transforms/Attributor/norecurse.ll
  llvm/test/Transforms/Attributor/nosync.ll
  llvm/test/Transforms/Attributor/openmp_parallel.ll
  llvm/test/Transforms/Attributor/readattrs.ll
  llvm/test/Transforms/Attributor/value-simplify-assume.ll
  llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
  llvm/test/Transforms/Attributor/value-simplify.ll
  llvm/test/Transforms/Attributor/willreturn.ll
  llvm/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll
  llvm/test/Transforms/DeadArgElim/keepalive.ll
  llvm/test/Transforms/GlobalOpt/ctor-memset.ll
  llvm/test/Transforms/GlobalOpt/pr54572.ll
  llvm/test/Transforms/Inline/inline_invoke.ll
  llvm/test/Transforms/InstCombine/AArch64/2012-04-23-Neon-Intrinsics.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/strided-store-double.ll
  llvm/test/Transforms/ObjCARC/basic.ll
  llvm/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
  llvm/test/Transforms/ObjCARC/nested.ll
  llvm/test/Transforms/OpenMP/replace_globalization.ll
  llvm/test/Transforms/OpenMP/spmdization.ll
  llvm/test/Transforms/OpenMP/spmdization_guarding.ll
  llvm/test/Transforms/SampleProfile/pseudo-probe-emit.ll
  llvm/test/Transforms/SimplifyCFG/X86/merge-compatible-invokes-of-landingpad-debuginfo.ll
  llvm/test/Verifier/fp-intrinsics.ll
  llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.globals.expected
  llvm/test/tools/llvm-reduce/remove-attributes-from-intrinsics.ll
  llvm/utils/TableGen/CodeGenIntrinsics.h
  llvm/utils/TableGen/CodeGenTarget.cpp
  llvm/utils/TableGen/IntrinsicEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132434.454698.patch
Type: text/x-patch
Size: 103735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220823/ca02e16f/attachment.bin>


More information about the llvm-commits mailing list