[all-commits] [llvm/llvm-project] 3216d9: Reapply [CHR] Fix up phi nodes with unreachable pr...

Derek Schuff via All-commits all-commits at lists.llvm.org
Wed Aug 16 23:25:40 PDT 2023


  Branch: refs/heads/release/17.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 3216d98bc618f139a9e39b848a2c2058a727a9cf
      https://github.com/llvm/llvm-project/commit/3216d98bc618f139a9e39b848a2c2058a727a9cf
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M llvm/include/llvm/Analysis/RegionInfoImpl.h
    M llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
    A llvm/test/Transforms/PGOProfile/chr-dead-pred.ll
    R llvm/test/Transforms/StructurizeCFG/AMDGPU/backedge-id-bug-xfail.ll
    M llvm/test/Transforms/StructurizeCFG/AMDGPU/backedge-id-bug.ll

  Log Message:
  -----------
  Reapply [CHR] Fix up phi nodes with unreachable predecessors (PR64594)

Relative to the previous attempt, this also adjusts RegionInfo
verification to allow unreachable predecessors.

-----

If a block in the CHR region has an unreachable predecessor, then
there will be no edge from that predecessor to the newly cloned
block. However, a phi node entry for it will be left behind. Make
sure that these incoming blocks get dropped as well.

Fixes https://github.com/llvm/llvm-project/issues/64594.

Differential Revision: https://reviews.llvm.org/D157621

(cherry picked from commit 7e2f1ae7e0ebc7e71ffaa865175aef27fae3b034)


  Commit: 477068f0e71951fe8b447a3fe311bac458cfa938
      https://github.com/llvm/llvm-project/commit/477068f0e71951fe8b447a3fe311bac458cfa938
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/double-round-conv.ll
    M llvm/test/CodeGen/RISCV/rvv/float-round-conv.ll
    M llvm/test/CodeGen/RISCV/rvv/half-round-conv.ll

  Log Message:
  -----------
  [RISCV] Stop performFP_TO_INTCombine from folding with ISD::FRINT.

FRINT was added to matchRoundingOp after this function was written.
So FRINT was not tested originally.

For vectors, folding this causes us to create a CSR swap that tries
to write 7 to FRM. This is an illegal value and will cause the CSR
write to fail.

While this might be a legal fold we could do, I'm disabling it for
now so we can backport to LLVM 17 with the least risk.

Differential Revision: https://reviews.llvm.org/D157583

(cherry picked from commit 2df9328fe3a0575fa415964a3c3544b0912b168e)


  Commit: 847c5b81ec1fa5015a7dd69ec13acb685bcd26df
      https://github.com/llvm/llvm-project/commit/847c5b81ec1fa5015a7dd69ec13acb685bcd26df
  Author: Derek Schuff <dschuff at chromium.org>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M llvm/include/llvm/Object/Wasm.h
    M llvm/include/llvm/ObjectYAML/WasmYAML.h
    M llvm/lib/ObjCopy/wasm/WasmObject.h
    M llvm/lib/ObjCopy/wasm/WasmReader.cpp
    M llvm/lib/ObjCopy/wasm/WasmWriter.cpp
    M llvm/lib/Object/WasmObjectFile.cpp
    M llvm/lib/ObjectYAML/WasmEmitter.cpp
    M llvm/lib/ObjectYAML/WasmYAML.cpp
    A llvm/test/ObjectYAML/wasm/section_header_size.yaml
    A llvm/test/tools/llvm-objcopy/wasm/section-header-size.test
    M llvm/tools/obj2yaml/wasm2yaml.cpp

  Log Message:
  -----------
  [WebAssembly][Objcopy] Write output section headers identically to inputs

Previously when objcopy generated section headers, it padded the LEB
that encodes the section size out to 5 bytes, matching the behavior of
clang. This is correct, but results in a binary that differs from the
input. This can sometimes have undesirable consequences (e.g. breaking
source maps).

This change makes the object reader remember the size of the LEB
encoding in the section header, so that llvm-objcopy can reproduce it
exactly. For sections not read from an object file (e.g. that
llvm-objcopy is adding itself), pad to 5 bytes.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D155535

(cherry picked from commit 1b21067cf247c62c2442daa7ee2d3915249d1ee2)


Compare: https://github.com/llvm/llvm-project/compare/f934d6b425ef...847c5b81ec1f


More information about the All-commits mailing list