[all-commits] [llvm/llvm-project] f5832e: [UseListOrder] Fix use list order for function ope...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Sep 7 11:59:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f5832eaaadc5382a4385e63d25f5ce08bc7a516c
      https://github.com/llvm/llvm-project/commit/f5832eaaadc5382a4385e63d25f5ce08bc7a516c
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-09-07 (Tue, 07 Sep 2021)

  Changed paths:
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
    A llvm/test/Assembler/function-operand-uselistorder.ll
    M llvm/tools/verify-uselistorder/verify-uselistorder.cpp

  Log Message:
  -----------
  [UseListOrder] Fix use list order for function operands

Functions can have a personality function, as well as prefix and
prologue data as additional operands. Unused operands are assigned
a dummy value of i1* null. This patch addresses multiple issues in
use-list order preservation for these:

 * Fix verify-uselistorder to also enumerate the dummy values.
   This means that now use-list order values of these values are
   shuffled even if there is no other mention of i1* null in the
   module. This results in failures of Assembler/call-arg-is-callee.ll,
   Assembler/opaque-ptr.ll and Bitcode/use-list-order2.ll.
 * The use-list order prediction in ValueEnumerator does not take
   into account the fact that a global may use a value more than
   once and leaves uses in the same global effectively unordered.
   We should be comparing the operand number here, as we do for
   the more general case.
 * While we enumerate all operands of a function together (which
   seems sensible to me), the bitcode reader would first resolve
   prefix data for all function, then prologue data for all
   functions, then personality functions for all functions. Change
   this to resolve all operands for a given function together
   instead.

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




More information about the All-commits mailing list