This is an archive of the discontinued LLVM Phabricator instance.

Added hasSamePropertiesAs method for CmpXchgInst and FenceInst
Needs ReviewPublic

Authored by vish99 on Jun 13 2020, 10:36 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Added hasSamePropertiesAs() method for CmpXchgInst and FenceInst, which checks for instruction specific properties of both the instructions and changed FunctionComparator to use these functions in the cmpOperations() method.

Diff Detail

Event Timeline

vish99 created this revision.Jun 13 2020, 10:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2020, 10:37 AM
vish99 edited the summary of this revision. (Show Details)Jun 13 2020, 10:38 AM
jfb added inline comments.Jun 17 2020, 9:43 AM
llvm/include/llvm/IR/Instruction.h
682

We have isIdenticalTo above, and then we have isSameOperationAs. The later details how it's different from the former. You ought to do the same thing here.

llvm/lib/IR/Instructions.cpp
1567

Can you compare ordering directly instead of casting, here and below?