[PATCH] D78088: [MIR] Add comments to INLINEASM immediate flag MachineOperands
Konstantin Schwarz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 03:09:22 PDT 2020
kschwarz marked 2 inline comments as done.
kschwarz added inline comments.
================
Comment at: llvm/lib/CodeGen/TargetInstrInfo.cpp:1332
+ std::string Flags;
+ raw_string_ostream OS(Flags);
+
----------------
SjoerdMeijer wrote:
> do we need `OS` here?
We could simply append to a std::string here, but the cases below need to append other things (integers), so I felt like using an ostream might be more elegant?
================
Comment at: llvm/lib/CodeGen/TargetInstrInfo.cpp:1338
+ if (ExtraInfo & InlineAsm::Extra_HasSideEffects)
+ OS << "sideeffect ";
+ if (ExtraInfo & InlineAsm::Extra_MayLoad)
----------------
SjoerdMeijer wrote:
> can we then just do
>
> return "sideeffect";
>
> here, and similar for the if-stmts below?
Unfortunately no, the immediate we are looking at here encodes multiple values at once, so we need to compose the string here.
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