[PATCH] D78088: [MIR] Add comments to INLINEASM immediate flag MachineOperands

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 07:27:40 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetInstrInfo.cpp:1330
+
+  if (MI.isInlineAsm()) {
+    std::string Flags;
----------------
SjoerdMeijer wrote:
> Can we do an early exit here:
> 
>   if (!MI.isInlineAsm())
>     return std::string();
> 
> that also reduces some identation below.. 
return ""?


================
Comment at: llvm/lib/CodeGen/TargetInstrInfo.cpp:1334
+
+    if (OpIdx == InlineAsm::MIOp_ExtraInfo) {
+      // Print HasSideEffects, MayLoad, MayStore, IsAlignStack
----------------
This is essentially repeated in MachineInstr, should unify these? I guess we are already duplicated the flag handling


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78088





More information about the llvm-commits mailing list