[PATCH] D103129: [llvm-reduce] Don't delete arguments of debug intrinsics
Langston Barrett via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 26 09:54:12 PDT 2021
langston-barrett added a comment.
> Please can you show the malformed IR after dbginfo arg removal?
Here's the output of the testcase I added before this patch:
******************** TEST 'LLVM :: tools/llvm-reduce/remove-args-dbg-intrinsics.ll' FAILED ********************
Script:
--
: 'RUN: at line 3'; llvm-reduce --abort-on-invalid-reduction --delta-passes=arguments --test=/home/langston/code/llvm-project/build/bin/opt --test-arg=-verify --test-arg=-disable-output --output=/home/langston/code/llvm-project/build/test/tools/llvm-reduce/Output/remove-args-dbg-intrinsics.ll.tmp /home/langston/code/llvm-project/llvm/test/tools/llvm-reduce/remove-args-dbg-intrinsics.ll
: 'RUN: at line 4'; cat /home/langston/code/llvm-project/build/test/tools/llvm-reduce/Output/remove-args-dbg-intrinsics.ll.tmp | /home/langston/code/llvm-project/build/bin/FileCheck /home/langston/code/llvm-project/llvm/test/tools/llvm-reduce/remove-args-dbg-intrinsics.ll
--
Exit Code: 1
Command Output (stdout):
--
*** Reducing Arguments...
----------------------------
Param Index Reference:
llvm.dbg.addr
1:
2:
3:
----------------------------
llvm.dbg.declare
4:
5:
6:
----------------------------
llvm.dbg.value
7:
8:
9:
----------------------------
--
Command Output (stderr):
--
Invalid user of intrinsic instruction!
void (metadata, metadata, metadata)* bitcast (void ()* @llvm.dbg.addr to void (metadata, metadata, metadata)*)
Invalid user of intrinsic instruction!
void (metadata, metadata, metadata)* bitcast (void ()* @llvm.dbg.declare to void (metadata, metadata, metadata)*)
Invalid user of intrinsic instruction!
void (metadata, metadata, metadata)* bitcast (void ()* @llvm.dbg.value to void (metadata, metadata, metadata)*)
Invalid reduction
--
********************
********************
Failed Tests (1):
LLVM :: tools/llvm-reduce/remove-args-dbg-intrinsics.ll
If I run that same command without `--abort-on-invalid-reduction`, I just see many more `WARNING`s, and the final module is identical to the input module. So IIUC, this patch doesn't result in different output from `llvm-reduce`, just fewer unnecessary *attempts* at reduction.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103129/new/
https://reviews.llvm.org/D103129
More information about the llvm-commits
mailing list