[PATCH] D106989: [IRSim] Finding Branch Similarity
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 31 15:01:14 PDT 2021
paquette added inline comments.
================
Comment at: llvm/include/llvm/Analysis/IRSimilarityIdentifier.h:164
+ /// The shared code needed to fill in the data stuctures for IRInstructionData
+ /// when it is constructed from a reference or a pointer.
+ void initializeInstruction();
----------------
This is a function, so I think it should be documented more like "Fills data structures for IRInstructionData..."
================
Comment at: llvm/lib/Analysis/IRSimilarityIdentifier.cpp:65
+ : Inst(I), Legal(Legality), IDL(&IDList) {
+ if (I)
+ initializeInstruction();
----------------
Why would `I` ever be null?
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:1451
+ Instruction *NextInst = nullptr;
+ if (!ID.Inst->isTerminator())
+ NextInst = ID.Inst->getNextNonDebugInstruction();
----------------
This is duplicated with the code above. Can this be a helper?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106989/new/
https://reviews.llvm.org/D106989
More information about the llvm-commits
mailing list