llvm-project/llvm/test
Yonghong Song 89648eb16d [BPF] fix a bug for BTF pointee type pruning
In BTF, pointee type pruning is used to reduce cluttering
too many unused types into prog BTF. For example,
   struct task_struct {
      ...
      struct mm_struct *mm;
      ...
   }
If bpf program does not access members of "struct mm_struct",
there is no need to bring types for "struct mm_struct" to BTF.

This patch fixed a bug where an incorrect pruning happened.
The test case like below:
    struct t;
    typedef struct t _t;
    struct s1 { _t *c; };
    int test1(struct s1 *arg) { ... }

    struct t { int a; int b; };
    struct s2 { _t c; }
    int test2(struct s2 *arg) { ... }

After processing test1(), among others, BPF backend generates BTF types for
    "struct s1", "_t" and a placeholder for "struct t".
Note that "struct t" is not really generated. If later a direct access
to "struct t" member happened, "struct t" BTF type will be generated
properly.

During processing test2(), when processing member type "_t c",
BPF backend sees type "_t" already generated, so returned.
This caused the problem that "struct t" BTF type is never generated and
eventually causing incorrect type definition for "struct s2".

To fix the issue, during DebugInfo type traversal, even if a
typedef/const/volatile/restrict derived type has been recorded in BTF,
if it is not a type pruning candidate, type traversal of its base type continues.

Differential Revision: https://reviews.llvm.org/D82041
2020-06-17 15:13:46 -07:00
..
Analysis [SVE] Eliminate bad VectorType::getNumElements() calls from ConstantFold 2020-06-17 14:19:56 -07:00
Assembler Fix convertBFloatAPFloatToAPInt for NaN/Inf values 2020-06-05 17:22:43 -07:00
Bindings [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays 2020-05-28 13:46:41 +05:30
Bitcode [strictfp] Replace dangling strictfp attrs with nobuiltin 2020-06-15 10:05:35 -04:00
BugPoint
CodeGen [BPF] fix a bug for BTF pointee type pruning 2020-06-17 15:13:46 -07:00
DebugInfo [CGP] Reset the debug location when promoting zext(s). 2020-06-17 11:13:13 -07:00
Demangle
Examples
ExecutionEngine [ORC] Honor linker private global prefix on symbol names. 2020-06-15 10:28:36 -07:00
Feature
FileCheck [FileCheck] Add missing %ProtectFileCheckOutput to FileCheck tests 2020-06-10 12:40:35 -04:00
Instrumentation [MSAN] Pass Origin by parameter to __msan_warning functions 2020-06-15 17:49:18 -07:00
Integer
JitListener
LTO [SampleFDO] Add use-sample-profile function attribute. 2020-06-02 17:23:17 -07:00
Linker [IR] Add missing GlobalAlias copying of ThreadLocalMode attribute 2020-06-16 20:15:27 -07:00
MC [llvm-readobj] set --elf-cg-profile as alias of --cg-profile 2020-06-17 11:24:45 -07:00
MachineVerifier [NFC] Remove unnecessary require global-isel from tests 2020-06-15 16:35:18 +02:00
Object [llvm-readobj] set --elf-cg-profile as alias of --cg-profile 2020-06-17 11:24:45 -07:00
ObjectYAML [NFC] mv llvm/test/tools/obj2yaml/macho-DWARF-debug-ranges.yaml llvm/test/ObjectYAML/MachO/DWARF-debug_ranges.yaml 2020-06-14 16:39:15 +08:00
Other [CallPrinter] Adding heat coloring to CallPrinter 2020-06-16 21:15:29 +00:00
Reduce
SafepointIRVerifier [Tests] Migrate a number of tests to gc-live bundle representation 2020-06-05 16:44:04 -07:00
Support
SymbolRewriter
TableGen [TableGen] Fix non-standard escape warnings for braces in InstAlias 2020-05-28 09:36:24 +00:00
ThinLTO/X86 [ThinLTO] Compute the basic block count across modules. 2020-05-28 10:33:05 -07:00
Transforms [InstCombine] Negator: cache negation results (PR46362) 2020-06-17 22:47:20 +03:00
Unit
Verifier AMDGPU: Fix missing immarg on buffer.atomic.fadd intrinsic 2020-06-05 14:34:07 -04:00
YAMLParser
tools [llvm-readobj] set --elf-cg-profile as alias of --cg-profile 2020-06-17 11:24:45 -07:00
.clang-format
CMakeLists.txt [CMake] Change target 'check' from 'check-llvm' to 'check-all' 2020-05-29 14:15:27 -07:00
TestRunner.sh
lit.cfg.py
lit.site.cfg.py.in