[PATCH] D53765: [RFC prototype] Implementation of asm-goto support in LLVM

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 10 17:48:25 PST 2019


void added inline comments.


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:660-661
+  for (auto I = pred_begin(BB), E = pred_end(BB); I != E; ++I) {
+    auto CBI = dyn_cast<CallBrInst>((*I)->getTerminator());
+    if (CBI) {
+      if (DestBB == CBI->getFallthrough())
----------------
Nit: You can combine these two lines.


================
Comment at: lib/CodeGen/GlobalISel/IRTranslator.cpp:1246
+
+  // FIXME: support whatever these are.
+  if (I.countOperandBundlesOfType(LLVMContext::OB_deopt))
----------------
"whether these are" what? :-)


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:2554
+  else if (Fn && Fn->isIntrinsic()) {
+    switch (Fn->getIntrinsicID()) {
+    default:
----------------
Do you need a switch for this? It seems like you could use an if-then instead.


================
Comment at: lib/IR/Instructions.cpp:260
 
+unsigned CallBase::getNumSubclassExtraOperandsDynamic() const {
+  assert(getOpcode() == Instruction::CallBr && "Unexpected opcode!");
----------------
Would it make sense to add "invoke" and "call" here? It can simplify the logic where this is called, and it's better to explain the magic numbers that it returns.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53765/new/

https://reviews.llvm.org/D53765





More information about the llvm-commits mailing list