[PATCH] D93571: [TableGen][ARM][X86] Detect combining IntrReadMem and IntrWriteMem.
Robert Cox via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 17:03:37 PST 2021
rcox2 added a comment.
Hi Craig Topper,
I noticed a regression after this change set hit our repository at Intel. The code in llvm/lib/Transforms/IPO/FunctionAttrs.cpp has a function checkFunctionMemoryAccess() that is not checking for intrinsics which may have side effects. This causes the inliner to remove a function as trivially dead when it only has a ldmxcsr instruction and some setup and shutdown code. I could change the line:
if (!AliasAnalysis::onlyAccessesArgPointees(MRB))
to
if (!AliasAnalysis::onlyAccessesArgPointees(MRB) || I->mayHaveSideEffects()) {
but I do have some concern whether this will be overly conservative.
Any thoughts?
- Robert Cox from Intel (rcox2)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93571/new/
https://reviews.llvm.org/D93571
More information about the llvm-commits
mailing list