[PATCH] D45078: [DebugInfo] Enable the capability of attaching metadata to BasicBlock.
Wei-Ren Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 30 07:21:48 PDT 2018
chenwj added a comment.
I don't understand the part of `BasicBlock`, the others LGTM.
================
Comment at: include/llvm/IR/BasicBlock.h:66
private:
+ enum {
+ LastRefCountBit = 3,
----------------
Would you mind elaborating what the enum, `RefCountBits` and `RefCountMask` are for?
================
Comment at: lib/IR/AsmWriter.cpp:2930
+ // Print Metadata info.
+ SmallVector<std::pair<unsigned, MDNode *>, 4> InstMD;
+ BB->getAllMetadata(InstMD);
----------------
If I understand correctly, `BB->getAllMetadata()` should return MD of label? `InstMD` is kind of confusing here. It makes me think you want to get MD of instructions within the basic block. Maybe `LabelMD` would be better?
Repository:
rL LLVM
https://reviews.llvm.org/D45078
More information about the llvm-commits
mailing list