5 Commits

Author SHA1 Message Date
Arthur Eubanks
361cba22b2 [StandardInstrumentations] Rename -verify-cfg-preserved -> -verify-analysis-invalidation
In preparation for adding more checks under this flag.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D146069
2023-03-15 13:07:55 -07:00
Florian Hahn
f044217392
[ConstraintElim] Add reproducer remarks.
This patch adds an optimization remark for each performed optimization
containing a module that can be used to reproduce the transformation.

The reproducer function contains a series of @llvm.assume calls, one for
each condition currently in scope. For each condition, the operand
instruction are cloned until we reach operands that have an entry in the
constraint system. Those will then be added as function arguments.

The reproducer functions are minimal, that is, they only contain the
conditions required for a given simplification. The resulting IR is very
compact and can be used to verify each transformation individually.

It also provides a python script to extract the IR from the remarks and
create LLVM IR files from it.

Reviewed By: paquette

Differential Revision: https://reviews.llvm.org/D143323
2023-02-14 15:15:57 +00:00
Florian Hahn
3fe6ddd999
[ConstraintElimination] Update Changed status in ssub simplification.
Update tryToSimplifyOverflowMath to indicate whether the function made
any changes to the IR.
2022-10-02 14:25:51 +01:00
Florian Hahn
586784a2e4
[ConstraintElimination] Simplify check lines in test added in 2812a141.
The CHECK lines in the test are too specific and cause mis-matches on
some platforms. Reduce them to make them less fragile.
2022-09-30 19:51:05 +01:00
Florian Hahn
2812a1413f
[ConstraintElimination] Add test showing bug in analysis invalidation. 2022-09-30 19:37:58 +01:00