Page MenuHomePhabricator

Fix side-effect detection in LLVMIRIntrinsicGen.
ClosedPublic

Authored by awpr on Feb 9 2021, 2:03 PM.

Details

Summary

Previously it reported an op had side-effects iff it declared that it
didn't have any side-effects. This had the undesirable result that
canonicalization would always delete any intrinsic calls that did memory
stores and returned void.

Diff Detail

Event Timeline

awpr created this revision.Feb 9 2021, 2:03 PM
awpr requested review of this revision.Feb 9 2021, 2:03 PM
ftynse accepted this revision.Feb 9 2021, 2:16 PM
This revision is now accepted and ready to land.Feb 9 2021, 2:16 PM
mehdi_amini accepted this revision.Feb 9 2021, 4:11 PM
mehdi_amini added inline comments.
mlir/tools/mlir-tblgen/LLVMIRIntrinsicGen.cpp
149

Functional?

return llvm::all_of(props, [] (const llvm::Record *r) {
   return (r->getName() != "IntrNoMem");
};
awpr updated this revision to Diff 322534.Feb 9 2021, 4:24 PM

Change from loops with early retuns to llvm::any_of and llvm::none_of.

awpr marked an inline comment as done.Feb 9 2021, 4:25 PM
This revision was landed with ongoing or failed builds.Feb 9 2021, 4:48 PM
This revision was automatically updated to reflect the committed changes.