[PATCH] D67940: [BPF] Preserve and make bitfield access relocatable

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 23 22:57:27 PDT 2019


yonghong-song updated this revision to Diff 221466.
yonghong-song added a comment.
Herald added a subscriber: ormris.

fix a bug like `foo(..., bar(&value), value)` where `value` is set in function `bar`. This is not right and depends on compiler optimization as there is not guarantee that arguments are evaluated from left to right. The new code looks like ` a = bar(&value); foo(..., a, value)` ...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67940/new/

https://reviews.llvm.org/D67940

Files:
  clang/docs/LanguageExtensions.rst
  clang/include/clang/Basic/Builtins.def
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/CodeGen/CGBuilder.h
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/lib/Sema/SemaChecking.cpp
  clang/test/CodeGen/builtin-preserve-bitfield-info-2.c
  clang/test/CodeGen/builtin-preserve-bitfield-info.c
  llvm/docs/LangRef.rst
  llvm/include/llvm/IR/IRBuilder.h
  llvm/include/llvm/IR/Intrinsics.td
  llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
  llvm/lib/Target/BPF/BPFCORE.h
  llvm/lib/Target/BPF/BTF.h
  llvm/lib/Target/BPF/BTFDebug.cpp
  llvm/lib/Target/BPF/BTFDebug.h
  llvm/test/CodeGen/BPF/CORE/intrinsic-bitfield.ll
  llvm/test/CodeGen/BPF/CORE/intrinsic-struct.ll
  llvm/test/CodeGen/BPF/CORE/offset-reloc-bitfield.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67940.221466.patch
Type: text/x-patch
Size: 43895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190924/7ff34bc4/attachment-0001.bin>


More information about the cfe-commits mailing list