[llvm-dev] Question on llvm-diff tool
Yonghyun Hwang via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 17 17:00:09 PDT 2021
I'm using the 'llvm-diff' tool to diff two llvm assembly files. While doing
that, I've observed that the 'llvm-diff' tool shows lots of diffs even when
the same assembly files are given as command line arguments. For example,
if we run
$ llvm-diff test.ll test.ll
'llvm-diff' shows lots of diffs for "static" global variables. This is an
// in test.c
static struct vmcs_layout vmcs_layout;
output for 'llvm-diff' is as follows.
> %3 = load i32, i32* getelementptr inbounds (%
*struct.vmcs_layout.663*, %struct.vmcs_layout.663* @vmcs_layout, i64 0, i32
0), align 4
< %3 = load i32, i32* getelementptr inbounds (%*struct.vmcs_layout*,
%struct.vmcs_layout* @vmcs_layout, i64 0, i32 0), align 4
The difference is a suffix, 663. Is this behavior intentional for
'llvm-diff'? If it's intentional, how can I update 'llvm-diff' tool to see
"no" diffs for the same .ll file?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev