Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

llvm-diff (1)

Name

llvm-diff - LLVM structural 'diff'

Synopsis

llvm-diff [options] module 1 module 2 [global name ...]

Description

LLVM-DIFF(1)                         LLVM                         LLVM-DIFF(1)



NAME
       llvm-diff - LLVM structural 'diff'

SYNOPSIS
       llvm-diff [options] module 1 module 2 [global name ...]

DESCRIPTION
       llvm-diff  compares the structure of two LLVM modules, primarily focus-
       ing on differences in function definitions.  Insignificant differences,
       such  as  changes  in  the ordering of globals or in the names of local
       values, are ignored.

       An input module will be interpreted as an assembly  file  if  its  name
       ends in '.ll';  otherwise it will be read in as a bitcode file.

       If  a  list  of global names is given, just the values with those names
       are compared; otherwise, all global values are compared,  and  diagnos-
       tics  are  produced  for globals which only appear in one module or the
       other.

       llvm-diff compares two  functions  by  comparing  their  basic  blocks,
       beginning  with  the  entry  blocks.  If the terminators seem to match,
       then the corresponding successors  are  compared;  otherwise  they  are
       ignored.   This algorithm is very sensitive to changes in control flow,
       which tend to stop any downstream changes from being detected.

       llvm-diff is intended as a debugging tool for writers  of  LLVM  passes
       and frontends.  It does not have a stable output format.

EXIT STATUS
       If  llvm-diff  finds  no  differences between the modules, it will exit
       with 0 and produce no output.  Otherwise it will exit with  a  non-zero
       value.

BUGS
       Many  important  differences,  like  changes  in  linkage  or  function
       attributes, are not diagnosed.

       Changes in memory behavior (for example, coalescing  loads)  can  cause
       massive detected differences in blocks.

AUTHOR
       Maintained by the LLVM Team (https://llvm.org/).

COPYRIGHT
       2003-2022, LLVM Project



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+---------------------+
       |ATTRIBUTE TYPE |  ATTRIBUTE VALUE    |
       +---------------+---------------------+
       |Availability   | developer/llvm/llvm |
       +---------------+---------------------+
       |Stability      | Uncommitted         |
       +---------------+---------------------+

NOTES
       Source  code  for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source     was     downloaded    from     https://github.com/llvm/llvm-
       project/releases/download/llvmorg-11.0.0/llvm-11.0.0.src.tar.xz.

       Further information about this software can be found on the open source
       community website at https://llvm.org/.



11                                2022-06-28                      LLVM-DIFF(1)