[all-commits] [llvm/llvm-project] 5165b2: AArch64+ARM: make LLVM consider system registers v...

Tim Northover via All-commits all-commits at lists.llvm.org
Wed Jul 15 01:47:58 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5165b2b5fd5fd62c5a34970be81c79231844804c
      https://github.com/llvm/llvm-project/commit/5165b2b5fd5fd62c5a34970be81c79231844804c
  Author: Tim Northover <t.p.northover at gmail.com>
  Date:   2020-07-15 (Wed, 15 Jul 2020)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGen/builtins-arm.c
    M clang/test/CodeGen/builtins-arm64.c
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    A llvm/test/Transforms/LICM/read-volatile-register.ll

  Log Message:
  -----------
  AArch64+ARM: make LLVM consider system registers volatile.

Some of the system registers readable on AArch64 and ARM platforms
return different values with each read (for example a timer counter),
these shouldn't be hoisted outside loops or otherwise interfered with,
but the normal @llvm.read_register intrinsic is only considered to read
memory.

This introduces a separate @llvm.read_volatile_register intrinsic and
maps all system-registers on ARM platforms to use it for the
__builtin_arm_rsr calls. Registers declared with asm("r9") or similar
are unaffected.




More information about the All-commits mailing list