SuccessChanges

Summary

  1. [llvm-readelf/obj] - Cleanup the code. NFCI. (details)
  2. [AMDGPU] Insert waitcnt after returning from call (details)
  3. [llvm-readelf/obj] - Print section symbol names properly when dumping relocations. (details)
Commit 310af42ed9ab259ad05ed46d459203b3473ba66e by grimar
[llvm-readelf/obj] - Cleanup the code. NFCI.

This:
1) Replaces pointers with references in many places.
2) Adds few TODOs about fixing possible unhandled errors (in ARMEHABIPrinter.h).
3) Replaces `auto`s with actual types.
4) Removes excessive arguments.
5) Adds `const ELFFile<ELFT> &Obj;` member to `ELFDumper` to simplify the code.

Differential revision: https://reviews.llvm.org/D88097
The file was modifiedllvm/tools/llvm-readobj/ObjDumper.cpp (diff)
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp (diff)
The file was modifiedllvm/tools/llvm-readobj/llvm-readobj.cpp (diff)
The file was modifiedllvm/tools/llvm-readobj/ObjDumper.h (diff)
The file was modifiedllvm/tools/llvm-readobj/ARMEHABIPrinter.h (diff)
The file was modifiedllvm/tools/llvm-readobj/DwarfCFIEHPrinter.h (diff)
Commit ca907bfb57d8ad3ec3bcc2cff2abab7b1b933af6 by sebastian.neubauer
[AMDGPU] Insert waitcnt after returning from call

When memory operations are outstanding on function calls, either the
caller or the callee can insert a waitcnt to ensure that all reads are
finished.
Calls need some time to be executed, so if the callee inserts the
waitcnt, filling the instruction buffer and waiting for memory will be
interleaved, hiding some latency. This comes at the cost of having a
waitcnt inside functions that may not be needed as no memory operations
are outstanding.

For function calls, this is already implemented. The same principal
applies to returns: If the caller inserts a waitcnt after the call, the
callee does not have to wait and the return and memory operation can be
run in parallel.

This commit implements waiting in the caller after returning from a
function call.

Differential Revision: https://reviews.llvm.org/D87674
The file was modifiedllvm/test/CodeGen/AMDGPU/call-preserved-registers.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.buffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/visit-physreg-vgpr-imm-folding-bug.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.buffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.a16.encode.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/sibling-call.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/vector_shuffle.packed.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.global.atomic.fadd.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/smrd.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.getresinfo.a16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.ltolz.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_store_local.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/global-saddr-load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.3d.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/function-args.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/call-waitcnt.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.tbuffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/localizer.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.implicit.buffer.ptr.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.buffer.load.format.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.global.atomic.csub.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/mubuf-global.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/cross-block-use-is-not-abi-copy.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/call-argument-types.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/stack-pointer-offset-relative-frameindex.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ds.fmin.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.atomic.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/memory_clause.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/mul24-pass-ordering.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-unaligned.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.i128.ll (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-frame-setup.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.ltolz.a16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/imm16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/image_ls_mipmap_zero.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/fmax_legacy.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.g16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.buffer.load.format.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/chain-hi-to-lo.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.1d.d16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.tbuffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ds.fmax.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-local.96.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/load-lo16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/load-local.96.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/shl.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-special-input-vgprs.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.getresinfo.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.d16.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ds.fadd.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.atomic.dim.a16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/memcpy-fixed-align.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.2d.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/global-saddr-atomics.gfx1030.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/ret_jump.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.g16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement-stack-lower.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/hsa-func.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/lds-global-non-entry-func.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.buffer.load.dwordx3.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.buffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.implicitarg.ptr.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.buffer.load.format.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.gather4.a16.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/divergent-control-flow.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/wave32.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/vgpr-tuple-allocation.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.i16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_load_local.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/function-returns.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/offset-split-flat.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/offset-split-global.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/stack-realign.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.o.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-constant.96.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/scalar-store-cache-flush.mir (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.1d.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/non-entry-alloca.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/load-hi16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/global-saddr-atomics.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/cvt_f32_ubyte.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/lds-global-non-entry-func.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/store-hi16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/non-entry-alloca.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/nested-calls.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.a16.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-local.128.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.ordered.add.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/load-local.128.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.a16.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/zextload.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/undefined-subreg-liverange.ll (diff)
The file was modifiedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_generated_funcs.ll.generated.expected (diff)
The file was modifiedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_generated_funcs.ll.nogenerated.expected (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/infer-uniform-load-shader.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/fmin_legacy.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.ordered.swap.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.3d.a16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.private.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.a16.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.global.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/local-stack-alloc-block-sp-reference.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.g16.encode.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.tbuffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.2darraymsaa.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/store-weird-sizes.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/mad-mix-hi.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/dynamic-alloca-uniform.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.getlod.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.2darraymsaa.a16.ll (diff)
Commit d4035af2537432da41b2728829f8cd2fca9a9de8 by grimar
[llvm-readelf/obj] - Print section symbol names properly when dumping relocations.

Currently `--relocations` ignores section symbol names and always prints
section names for them. This is inconsistent with GNU readelf and with `--symbols`.

We have a code in `getFullSymbolName` (which is used for `--symbols`) which can be
reused for `getRelocationTarget` (used for `--relocations`).
With that the issue described is fixed and code becomes a bit shorter.
Also with this change we start to print more relocations (in situations when we just
showed warnings instead before) and also start to report more diagnostic warnings
(see reloc-zero-name-or-value.test).

Differential revision: https://reviews.llvm.org/D87613
The file was modifiedllvm/test/tools/llvm-readobj/ELF/reloc-zero-name-or-value.test (diff)
The file was modifiedllvm/test/tools/llvm-readobj/ELF/section-symbols.test (diff)
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp (diff)
The file was modifiedllvm/test/tools/llvm-objcopy/ELF/Inputs/compress-debug-sections.yaml (diff)
The file was modifiedllvm/test/tools/llvm-readobj/ELF/relocation-errors.test (diff)