althought the interstingness test should usually fail when the module is invalid
this changes reduces the frequency at which llvm-reduce generate invalid IR.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
always setting it to external is perhaps not the best decision here but some linkages like linkonce_odr are only valid on definitions.
Comment Actions
After looking a bit more, i believe deleteBody() should do that.
| llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp | ||
|---|---|---|
| 33 | Actually, deleteBody() already does that. | |
Comment Actions
LGTM.
It's an improvement, but i really think this should be moved into deleteBody() itself.
I believe you might also need to fix basic block and instruction reducers - can they not end up deleting everything?
| llvm/test/Reduce/remove-function-bodies-comdat.ll | ||
|---|---|---|
| 3 | Should we also check that the opt -verify passes? | |
Should we also check that the opt -verify passes?