Page MenuHomePhabricator

yonghong-song (Yonghong Song)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 4 2018, 11:50 PM (67 w, 3 d)

Recent Activity

Fri, Jan 17

yonghong-song added a comment to D72787: [BPF] Adjust optimizations to generate kernel verifier friendly codes.

@tstellar Thanks for your comments. The MachineInstr SSA based optimization is really a ugly hack. Currently verifier is not able to verify the program correctly, i.e., rejects the program for certain patterns related subregister uses. The commit message provides more information. @ast suggested to look at whether we can improve kernel verifier and I will take a look there. If kernel can be enhanced, I will drop the second MachineInstr SSA pass.

Fri, Jan 17, 8:39 PM · Restricted Project
yonghong-song added inline comments to D72787: [BPF] Adjust optimizations to generate kernel verifier friendly codes.
Fri, Jan 17, 7:35 PM · Restricted Project
yonghong-song updated the diff for D72787: [BPF] Adjust optimizations to generate kernel verifier friendly codes.

Added a machineinstr SSA target phase to add left/aright shift operations if the 32bit subregister is used for sle/slt/sge/sgt operations.

Fri, Jan 17, 4:36 PM · Restricted Project

Wed, Jan 15

yonghong-song updated the diff for D72787: [BPF] Adjust optimizations to generate kernel verifier friendly codes.

fix potential overflow issues

Wed, Jan 15, 11:21 PM · Restricted Project
yonghong-song added a comment to D72787: [BPF] Adjust optimizations to generate kernel verifier friendly codes.

Indeed tried kernel selftests, revert the previous workaround like

diff --git a/tools/testing/selftests/bpf/progs/test_sysctl_loop1.c b/tools/testing/selftests/bpf/progs/test_sysctl_loop1.c
index d22e438198cf..608a06871572 100644
--- a/tools/testing/selftests/bpf/progs/test_sysctl_loop1.c
+++ b/tools/testing/selftests/bpf/progs/test_sysctl_loop1.c
@@ -44,10 +44,7 @@ int sysctl_tcp_mem(struct bpf_sysctl *ctx)
        unsigned long tcp_mem[TCP_MEM_LOOPS] = {};
        char value[MAX_VALUE_STR_LEN];
        unsigned char i, off = 0;
-       /* a workaround to prevent compiler from generating
-        * codes verifier cannot handle yet.
-        */
-       volatile int ret;
+       int ret;
Wed, Jan 15, 1:29 PM · Restricted Project
yonghong-song added a comment to D72787: [BPF] Adjust optimizations to generate kernel verifier friendly codes.

The current kernel did not handle signed compare well for 32bit registers. I will need to make that change first in order to make this llvm change effective.

Wed, Jan 15, 10:12 AM · Restricted Project
yonghong-song created D72787: [BPF] Adjust optimizations to generate kernel verifier friendly codes.
Wed, Jan 15, 10:12 AM · Restricted Project

Fri, Jan 10

yonghong-song committed rGfbb64aa69835: [BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs (authored by yonghong-song).
[BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs
Fri, Jan 10, 9:07 AM
yonghong-song closed D71638: [BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs.
Fri, Jan 10, 9:07 AM · Restricted Project

Thu, Jan 9

yonghong-song updated the diff for D71638: [BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs.

To handle cases (exposed when running linux kernel samples/bpf/sockex1) like below:

unsigned long long load_byte(void *skb, unsigned long long off) asm("llvm.bpf.load.byte");
unsigned long long test(void *skb) {
  return load_byte(skb, 10);
}

previous approach emits load_byte as load_byte function is in module function reference list.
But actually this function is not called so we should not emit extern func BTF for this.

Thu, Jan 9, 11:57 AM · Restricted Project

Mon, Jan 6

yonghong-song updated the diff for D72184: [WIP][BPF] support exchange/compare-and-exchange instruction.

use the same XADD opcode for new instructions.

Mon, Jan 6, 5:47 PM · Restricted Project

Fri, Jan 3

yonghong-song updated the diff for D72184: [WIP][BPF] support exchange/compare-and-exchange instruction.

implement exchange instruction

Fri, Jan 3, 4:57 PM · Restricted Project
yonghong-song created D72184: [WIP][BPF] support exchange/compare-and-exchange instruction.
Fri, Jan 3, 2:36 PM · Restricted Project

Thu, Jan 2

yonghong-song updated the diff for D71638: [BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs.

add a test case for extern function with arguments.

Thu, Jan 2, 11:22 PM · Restricted Project
yonghong-song retitled D71638: [BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs from [BPF] extern BTF_KIND_FUNC to cover global, static and extern funcs to [BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs.
Thu, Jan 2, 10:58 AM · Restricted Project

Thu, Dec 26

yonghong-song committed rGffd57408efd4: [BPF] Enable relocation location for load/store/shifts (authored by yonghong-song).
[BPF] Enable relocation location for load/store/shifts
Thu, Dec 26, 9:10 AM
yonghong-song closed D71790: [BPF] Enable relocation location for load/store/shifts.
Thu, Dec 26, 9:10 AM · Restricted Project

Mon, Dec 23

yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

@dblaikie The root cause has been identified by @rnk . A clang plugin is used which requires the following patch:

https://github.com/llvm/llvm-project/commit/5128026467cbc17bfc796d94bc8e40e52a9b0752

which has been merged. The original extern variable debug info type has been relanded. So we are good. Thanks!

Mon, Dec 23, 10:17 PM · Restricted Project, Restricted Project, debug-info
yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

Could you link to particular bots that have logs showing they ran this test? (perhaps the logs have been retired by now, though - since this patch was reverted :/ - but then at least seeing which bots run BPF tests would be helpful)

Mon, Dec 23, 3:00 PM · Restricted Project, Restricted Project, debug-info

Sun, Dec 22

yonghong-song added a comment to D71818: reland "[DebugInfo] Support to emit debugInfo for extern variables".

@rnk Great to know the reason. Thanks!

Sun, Dec 22, 8:50 PM · Restricted Project, Restricted Project
yonghong-song added a comment to D71818: reland "[DebugInfo] Support to emit debugInfo for extern variables".

@rnk I somehow cannot reproduce the issue locally. If you can let me know how to exactly reproduce the issue, I might be able to also help with some kind of solution, although frankly speaking, I am not a clang expert.

Sun, Dec 22, 6:43 PM · Restricted Project, Restricted Project
yonghong-song committed rGe3d8ee35e4ad: reland "[DebugInfo] Support to emit debugInfo for extern variables" (authored by yonghong-song).
reland "[DebugInfo] Support to emit debugInfo for extern variables"
Sun, Dec 22, 6:31 PM
yonghong-song closed D71818: reland "[DebugInfo] Support to emit debugInfo for extern variables".
Sun, Dec 22, 6:31 PM · Restricted Project, Restricted Project
yonghong-song updated the diff for D71818: reland "[DebugInfo] Support to emit debugInfo for extern variables".

Removed REQUIRES: bpf-registered-target. This is not needed any more if using %clang_cc1. Tested by build clang with and without BPF target.

Sun, Dec 22, 3:12 PM · Restricted Project, Restricted Project
yonghong-song added inline comments to D71818: reland "[DebugInfo] Support to emit debugInfo for extern variables".
Sun, Dec 22, 2:58 PM · Restricted Project, Restricted Project
yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

@rnk I just submitted a patch https://reviews.llvm.org/D71818 to use %clang_cc1 instead of %clang in the test. Could you check whether this fixed your issue or not?

Sun, Dec 22, 2:53 PM · Restricted Project, Restricted Project, debug-info
yonghong-song added a comment to D71818: reland "[DebugInfo] Support to emit debugInfo for extern variables".

I cannot remove BPF target requirement as only BPF target can trigger debug info generation for extern variables. This is by design as discussed in D70696 due to concerns it may blow up debug info binary size for existing applications. This may be relaxed in the future through some flags.
BTW, as far as I know, BPF is enabled for a lot of bots, ubuntu, x86, ppc, arm, etc. So the coverage of this future should be fine.

Sun, Dec 22, 2:53 PM · Restricted Project, Restricted Project
yonghong-song created D71818: reland "[DebugInfo] Support to emit debugInfo for extern variables".
Sun, Dec 22, 2:49 PM · Restricted Project, Restricted Project

Dec 20 2019

yonghong-song created D71790: [BPF] Enable relocation location for load/store/shifts.
Dec 20 2019, 4:47 PM · Restricted Project

Dec 17 2019

yonghong-song updated the diff for D71638: [BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs.

use bpf_type.info lower two bits to encode func scope info

Dec 17 2019, 7:05 PM · Restricted Project
yonghong-song created D71638: [BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs.
Dec 17 2019, 4:49 PM · Restricted Project

Dec 10 2019

yonghong-song closed D71290: [BPF] put not-section-attribute externs into BTF ".extern" data section.

merged.

Dec 10 2019, 2:09 PM · Restricted Project
yonghong-song committed rG7d0e8930ed08: [BPF] put not-section-attribute externs into BTF ".extern" data section (authored by yonghong-song).
[BPF] put not-section-attribute externs into BTF ".extern" data section
Dec 10 2019, 11:51 AM
yonghong-song created D71290: [BPF] put not-section-attribute externs into BTF ".extern" data section.
Dec 10 2019, 11:14 AM · Restricted Project
yonghong-song committed rGd77ae1552fc2: [DebugInfo] Support to emit debugInfo for extern variables (authored by yonghong-song).
[DebugInfo] Support to emit debugInfo for extern variables
Dec 10 2019, 8:10 AM
yonghong-song closed D70696: [DebugInfo] Support to emit debugInfo for extern variables.
Dec 10 2019, 8:10 AM · Restricted Project, Restricted Project, debug-info

Dec 9 2019

yonghong-song committed rG444812500771: [BPF] Support to emit debugInfo for extern variables (authored by yonghong-song).
[BPF] Support to emit debugInfo for extern variables
Dec 9 2019, 10:00 PM
yonghong-song closed D70697: [BPF] Support to emit debugInfo for extern variables.
Dec 9 2019, 10:00 PM · Restricted Project
yonghong-song updated the diff for D70696: [DebugInfo] Support to emit debugInfo for extern variables.

remove some redundant test cases

Dec 9 2019, 5:45 PM · Restricted Project, Restricted Project, debug-info
yonghong-song added inline comments to D70696: [DebugInfo] Support to emit debugInfo for extern variables.
Dec 9 2019, 5:20 PM · Restricted Project, Restricted Project, debug-info
yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

@Jac1494 Based on early discussion, we cannot just issue debuginfo for externs when -g is specified as this may cause debuginfo (and final binary) size bloat. One possible way is to enable it when -fstandalone-debug is specified. @dblaikie can you comment on this patch and general possible forward path for extern variable debug info support?

Dec 9 2019, 11:57 AM · Restricted Project, Restricted Project, debug-info

Dec 7 2019

yonghong-song updated the diff for D70697: [BPF] Support to emit debugInfo for extern variables.

extern variables can have attribute((weak)) attribute. Support it as well.

Dec 7 2019, 11:06 AM · Restricted Project
yonghong-song committed rG5ea611daf9cb: [BPF] Support weak global variables for BTF (authored by yonghong-song).
[BPF] Support weak global variables for BTF
Dec 7 2019, 9:05 AM
yonghong-song closed D71162: [BPF] Support weak global variables for BTF.
Dec 7 2019, 9:05 AM · Restricted Project

Dec 6 2019

yonghong-song created D71162: [BPF] Support weak global variables for BTF.
Dec 6 2019, 11:30 PM · Restricted Project

Dec 5 2019

yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

@dblaikie I consolidated test cases as you suggested. Along the way, I also added some more tests. I already answered some of your questions earlier. Please let me know what you think.

Dec 5 2019, 12:00 PM · Restricted Project, Restricted Project, debug-info
yonghong-song updated the diff for D70696: [DebugInfo] Support to emit debugInfo for extern variables.

consolidated into less test files, added more test cases along the way.

Dec 5 2019, 11:59 AM · Restricted Project, Restricted Project, debug-info

Dec 3 2019

yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

Many of the test cases could be collapsed into one file - using different variables that are used, unused, locally or globally declared, etc.

Dec 3 2019, 5:42 PM · Restricted Project, Restricted Project, debug-info

Dec 2 2019

yonghong-song updated the diff for D70696: [DebugInfo] Support to emit debugInfo for extern variables.

clang-format change (from @aprantl) , add a little details into summary related to recent discussion,
move tests from CodeGenCXX to CodeGen as they are all C tests.

Dec 2 2019, 3:21 PM · Restricted Project, Restricted Project, debug-info
yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

@dblaikie The concern for that users using -fstandalone-debug may suddenly see a bloat of external var debug info is totally valid. Let me just stick to BPF use case for now. If somebody else ever wants this information with -fstandalone-debug, the restriction can be evaluated and relaxed then.

Dec 2 2019, 2:16 PM · Restricted Project, Restricted Project, debug-info
yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

@dblaikie Good points. I will guard external variable debug info generation under -fstandalone-debug flag.

Dec 2 2019, 11:47 AM · Restricted Project, Restricted Project, debug-info
yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

@probinson for the question,

Does bpf require debug info for the declaration of global_var in noref.c ?

No, bpf only cares the referenced external global variables. So my current implementation does not emit debug info
for external global_var in noref.c.

Dec 2 2019, 11:29 AM · Restricted Project, Restricted Project, debug-info
yonghong-song added inline comments to D70696: [DebugInfo] Support to emit debugInfo for extern variables.
Dec 2 2019, 11:29 AM · Restricted Project, Restricted Project, debug-info

Nov 29 2019

yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

@SouraVX Currently, I filtered all external globals if they are not used. See

for (auto D: ExternalDeclarations) {
  if (!D || D->isInvalidDecl() || D->getPreviousDecl() || !D->isUsed())
    continue;
Nov 29 2019, 8:46 AM · Restricted Project, Restricted Project, debug-info

Nov 25 2019

yonghong-song committed rG6db023b99baa: [BPF] add "llvm." prefix to BPF internally created globals (authored by yonghong-song).
[BPF] add "llvm." prefix to BPF internally created globals
Nov 25 2019, 9:42 PM
yonghong-song closed D70703: [BPF] add "llvm." prefix to BPF internally created globals.
Nov 25 2019, 9:42 PM · Restricted Project
yonghong-song created D70703: [BPF] add "llvm." prefix to BPF internally created globals.
Nov 25 2019, 5:40 PM · Restricted Project
yonghong-song added a comment to D70697: [BPF] Support to emit debugInfo for extern variables.

additional test case is added to ensure debuginfo for externs is indeed generated in BTF.

Nov 25 2019, 2:46 PM · Restricted Project
yonghong-song added a comment to D70697: [BPF] Support to emit debugInfo for extern variables.

The backend supports extern variable debug info as well. The following restrictions in the old code is removed.

 -    // Ignore external globals for now.
-    if (!Global.hasInitializer() && Global.hasExternalLinkage())
-      continue;
Nov 25 2019, 2:46 PM · Restricted Project
yonghong-song abandoned D70625: [DebugInfo][BPF] Support to emit debugInfo for extern variables.

@dblaikie As suggested, just submitted two separate patches:

Nov 25 2019, 2:19 PM · Restricted Project, Restricted Project, debug-info
yonghong-song added a comment to D70696: [DebugInfo] Support to emit debugInfo for extern variables.

The corresponding BPF patch to consume the debuginfo https://reviews.llvm.org/D70697.

Nov 25 2019, 2:19 PM · Restricted Project, Restricted Project, debug-info
yonghong-song added a comment to D70697: [BPF] Support to emit debugInfo for extern variables.

The corresponding clang/llvm patch which generates debuginfo for extern variables. https://reviews.llvm.org/D70696

Nov 25 2019, 2:19 PM · Restricted Project
yonghong-song created D70697: [BPF] Support to emit debugInfo for extern variables.
Nov 25 2019, 2:11 PM · Restricted Project
yonghong-song created D70696: [DebugInfo] Support to emit debugInfo for extern variables.
Nov 25 2019, 2:10 PM · Restricted Project, Restricted Project, debug-info

Nov 23 2019

yonghong-song added a comment to D70625: [DebugInfo][BPF] Support to emit debugInfo for extern variables.

@dblaikie Thanks for the review. To address your comments below:

Nov 23 2019, 12:36 PM · Restricted Project, Restricted Project, debug-info

Nov 22 2019

yonghong-song created D70625: [DebugInfo][BPF] Support to emit debugInfo for extern variables.
Nov 22 2019, 3:56 PM · Restricted Project, Restricted Project, debug-info
yonghong-song abandoned D68822: [BPF] Support external globals.

This patch is not needed any more.

Nov 22 2019, 11:39 AM · Restricted Project
yonghong-song committed rG9e6aa8158850: [BPF] Fix a recursion bug in BPF Peephole ZEXT optimization (authored by yonghong-song).
[BPF] Fix a recursion bug in BPF Peephole ZEXT optimization
Nov 22 2019, 8:11 AM
yonghong-song closed D70586: [BPF] Fix a recursion bug in BPF Peephole ZEXT optimization.
Nov 22 2019, 8:11 AM · Restricted Project
yonghong-song created D70586: [BPF] Fix a recursion bug in BPF Peephole ZEXT optimization.
Nov 22 2019, 12:34 AM · Restricted Project

Nov 20 2019

yonghong-song closed D70511: [BPF] Fix a bug in peephole optimization.

The patch is merged. Sorry I forgot to add the link to the patch.

Nov 20 2019, 3:30 PM · Restricted Project
yonghong-song committed rGa0841dfe8594: [BPF] Fix a bug in peephole optimization (authored by yonghong-song).
[BPF] Fix a bug in peephole optimization
Nov 20 2019, 3:21 PM
yonghong-song added a comment to D70511: [BPF] Fix a bug in peephole optimization.

@tstellar
About the impact of this bug:

  • to trigger the bug, the additional additional -mattr=+alu32 is needed.
  • with this bug, the program is most likely to be rejected by kernel verifier (based on what we know), so people likely just not using -mattr=+alu32 to make kernel verifier happy

That said, it would be still good to backport the change to 9.0.x if possible.

Nov 20 2019, 3:11 PM · Restricted Project
yonghong-song created D70511: [BPF] Fix a bug in peephole optimization.
Nov 20 2019, 2:17 PM · Restricted Project

Nov 19 2019

yonghong-song abandoned D70372: [InstCombine] Disable insertRangeTest() optimization for BPF target.

Look into the implementation in BPF backend.

Nov 19 2019, 9:26 PM · Restricted Project
yonghong-song added a comment to D70372: [InstCombine] Disable insertRangeTest() optimization for BPF target.

@spatel Thanks for the comments. I agree with your assessment. Looks like the best place is BPF backend to undo this optimization. I will look into implementation in that direction.

Nov 19 2019, 9:26 PM · Restricted Project

Nov 17 2019

yonghong-song added a comment to D70372: [InstCombine] Disable insertRangeTest() optimization for BPF target.

I added a few reviewers based on the recent commits at InstCombine directory. Please let me know if I missed anybody who should review the patch. Thanks!

Nov 17 2019, 8:49 PM · Restricted Project
yonghong-song created D70372: [InstCombine] Disable insertRangeTest() optimization for BPF target.
Nov 17 2019, 8:43 PM · Restricted Project

Nov 14 2019

yonghong-song committed rGdd16b3fe2559: [BPF] Restrict preserve_access_index attribute to C only (authored by yonghong-song).
[BPF] Restrict preserve_access_index attribute to C only
Nov 14 2019, 2:16 PM
yonghong-song closed D70257: [BPF] Restrict preserve_access_index attribute to C only.
Nov 14 2019, 2:16 PM · Restricted Project
yonghong-song added inline comments to D70257: [BPF] Restrict preserve_access_index attribute to C only.
Nov 14 2019, 2:16 PM · Restricted Project
yonghong-song added a comment to D69759: [BPF] Add preserve_access_index attribute for record definition.

Sorry about the committing. I thought all the review questions are addressed.
Definitely will be more patient next time until getting review confirmation and
also adhering to llvm review policy.
Thanks for the detailed review! I have addressed all of your review comments in patch
https://reviews.llvm.org/D70257. I have added you as the reviewer.

Nov 14 2019, 11:11 AM · Restricted Project
yonghong-song created D70257: [BPF] Restrict preserve_access_index attribute to C only.
Nov 14 2019, 11:02 AM · Restricted Project
yonghong-song retitled D70257: [BPF] Restrict preserve_access_index attribute to C only from [BPF] Restrict preserve_access_index to C only to [BPF] Restrict preserve_access_index attribute to C only.
Nov 14 2019, 11:01 AM · Restricted Project

Nov 13 2019

yonghong-song committed rG1583158042a7: [BPF] fix clang test failure for bpf-attr-preserve-access-index-4.c (authored by yonghong-song).
[BPF] fix clang test failure for bpf-attr-preserve-access-index-4.c
Nov 13 2019, 9:44 AM
yonghong-song committed rGf5824799f612: [BPF] add missing attribute in pragma-attribute-supported-attributes-list.test (authored by yonghong-song).
[BPF] add missing attribute in pragma-attribute-supported-attributes-list.test
Nov 13 2019, 8:56 AM
yonghong-song committed rG4e2ce228ae79: [BPF] Add preserve_access_index attribute for record definition (authored by yonghong-song).
[BPF] Add preserve_access_index attribute for record definition
Nov 13 2019, 8:27 AM
yonghong-song added a reverting change for rG943436040121: Revert "[BPF] Add preserve_access_index attribute for record definition": rG4e2ce228ae79: [BPF] Add preserve_access_index attribute for record definition.
Nov 13 2019, 8:27 AM
yonghong-song closed D69759: [BPF] Add preserve_access_index attribute for record definition.
Nov 13 2019, 8:27 AM · Restricted Project

Nov 12 2019

yonghong-song committed rG166cdc02818f: [BPF] generate BTF_KIND_VARs for all non-static globals (authored by yonghong-song).
[BPF] generate BTF_KIND_VARs for all non-static globals
Nov 12 2019, 2:40 PM
yonghong-song closed D70145: [BPF] generate BTF_KIND_VARs for all non-static globals.
Nov 12 2019, 2:40 PM · Restricted Project
yonghong-song created D70145: [BPF] generate BTF_KIND_VARs for all non-static globals.
Nov 12 2019, 2:03 PM · Restricted Project
yonghong-song added a comment to D69759: [BPF] Add preserve_access_index attribute for record definition.

@aaron.ballman just ping, could you let me know if you have any further comments? Thanks!

Nov 12 2019, 7:13 AM · Restricted Project

Nov 9 2019

yonghong-song added a comment to D69759: [BPF] Add preserve_access_index attribute for record definition.

@aaron.ballman BTW, I indeed tested C-style inheritance. An attribute for the forward declaration successfully inherited by a later actual declaration.

Nov 9 2019, 11:47 AM · Restricted Project
yonghong-song added a comment to D69759: [BPF] Add preserve_access_index attribute for record definition.

Regarding to this one "This is missing a bunch of C++ tests that show what happens in the case of inheritance, template instantiations, etc."
Could you give me some example tests which I can take a look in order to add support. FYI, BPF backend publicly only supports C language,
(a restrict C for example __thread keyword is not supported). I guess template instantiations does not apply here? Or we can still test
template instantiation since we are at clang stage?

Nov 9 2019, 10:58 AM · Restricted Project
yonghong-song added a comment to D69759: [BPF] Add preserve_access_index attribute for record definition.

Hi, @aaron.ballman I think I addressed all your comments, could you take a look again? I tested all failed tests as exposed by the buildbot here (http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/57856). They are all passing now. Thanks!

Nov 9 2019, 10:52 AM · Restricted Project
yonghong-song updated the diff for D69759: [BPF] Add preserve_access_index attribute for record definition.

use implicit attr to annotate records or fields not explicitly marked by users.

Nov 9 2019, 10:49 AM · Restricted Project
yonghong-song updated the diff for D69759: [BPF] Add preserve_access_index attribute for record definition.

The Decl "D" could be a nullptr in ProcessDeclAttributeDelayed, which will cause segfault. Handle this properly.
Also addressed most of Aaron's comments.

Nov 9 2019, 9:57 AM · Restricted Project
yonghong-song added a reviewer for D69759: [BPF] Add preserve_access_index attribute for record definition: aaron.ballman.
Nov 9 2019, 8:53 AM · Restricted Project
yonghong-song reopened D69759: [BPF] Add preserve_access_index attribute for record definition.
Nov 9 2019, 8:51 AM · Restricted Project