[all-commits] [llvm/llvm-project] 396b72: [OpenMP][Opt] Combine `struct ident_t*` during ded...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Tue Feb 25 14:12:03 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 396b7253944e927878dff2f6321efabb3aaa0f45
      https://github.com/llvm/llvm-project/commit/396b7253944e927878dff2f6321efabb3aaa0f45
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-02-25 (Tue, 25 Feb 2020)

  Changed paths:
    A clang/test/OpenMP/PR44893.c
    M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    A llvm/test/Transforms/OpenMP/deduplication.ll
    R llvm/test/Transforms/OpenMP/gtid.ll

  Log Message:
  -----------
  [OpenMP][Opt] Combine `struct ident_t*` during deduplication

If we deduplicate OpenMP runtime calls we have multiple `ident_t*` that
represent information like source location. So far, we simply kept the
one used by the replacement call. However, as exposed by PR44893, that
can cause problems if we have stack allocated `ident_t` objects. While
we need to revisit the use of these as well, it is clear that we
eventually want to merge source location information in some way. With
this patch we add the infrastructure to do so but without doing the
actual merge. Instead we pick a global `ident_t` from the replaced
calls, if possible, or create a new one with an unknown location
instead.

Reviewed By: JonChesterfield

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




More information about the All-commits mailing list