Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

No equivalent for "instcombine-infinite-loop-threshold" in the C API #51545

Open Quuxplusone opened 2 years ago

Quuxplusone commented 2 years ago
Bugzilla Link PR52578
Status NEW
Importance P enhancement
Reported by Basile.B (b2.temp@gmx.com)
Reported on 2021-11-22 04:30:03 -0800
Last modified on 2021-11-22 04:30:03 -0800
Version trunk
Hardware PC Linux
CC htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also

The C API does not allow to control the threshold value that was added with https://reviews.llvm.org/D71673. For example in pass_manager_builder.h it would be nice to have LLVMPassManagerBuilderSetInstCombineThresh.

Then, the default value for the default set of passes, e.g the set that is initialized when we use LLVMPassManagerBuilderPopulateFunctionPassManager, is not equal to the value used by opt and infinite loops are still possible.

The request here is to have at least a default value that protect against those infinite loops.

The consequence is that compilers that use the C API have to optimize by invoking opt.