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

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 10 18:57:57 PST 2019


chandlerc added inline comments.


================
Comment at: lib/IR/Instructions.cpp:260
 
+unsigned CallBase::getNumSubclassExtraOperandsDynamic() const {
+  assert(getOpcode() == Instruction::CallBr && "Unexpected opcode!");
----------------
craig.topper wrote:
> void wrote:
> > 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.
> Chandler asked me to do it this way so the more common CallInst and InvokeInst can be handled inline.
It might make sense to have all of them supported here, but only use this in an assert for the cases we can inline?

I can see either way: either view this as a slow-path that should be consistent, or as only handling the cases where the # is dynamic.


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

https://reviews.llvm.org/D53765





More information about the llvm-commits mailing list