[PATCH] D133914: [InlineAsm][bugfix] Correct function addressing in inline asm
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 16 05:12:21 PDT 2022
RKSimon added a comment.
a few style comments
================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:3497
+ virtual bool
+ isInlineAsmTargetBranch(const SmallVectorImpl<StringRef> &AsmStrs,
----------------
Add a description comment
================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:3497
+ virtual bool
+ isInlineAsmTargetBranch(const SmallVectorImpl<StringRef> &AsmStrs,
----------------
RKSimon wrote:
> Add a description comment
Add a description comment
================
Comment at: llvm/include/llvm/CodeGen/TargetSubtargetInfo.h:315
+ virtual unsigned char
+ classifyGlobalFunctionReference(const GlobalValue *GV) const {
+ return 0;
----------------
Add a description comment
================
Comment at: llvm/include/llvm/IR/InlineAsm.h:337
+ assert((isMemKind(InputFlag) || isFuncKind(InputFlag)) &&
+ "InputFlag is not a memory constraint!");
assert(Constraint <= 0x7fff && "Too large a memory constraint ID");
----------------
update assertion message?
================
Comment at: llvm/include/llvm/IR/InlineAsm.h:354
static unsigned getMemoryConstraintID(unsigned Flag) {
- assert(isMemKind(Flag));
+ assert(isMemKind(Flag) || isFuncKind(Flag));
return (Flag >> Constraints_ShiftAmount) & 0x7fff;
----------------
add an assertion message
================
Comment at: llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp:1325
+ // Adjust Target Flags when AdjustFlag set in inline asm.
+ if (GlobalAddressSDNode *TGA = dyn_cast<GlobalAddressSDNode>(Op)) {
+ unsigned NewFlags =
----------------
auto *TGA = dyn_cast<>
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8806
+ const GlobalValue *GV = GA->getGlobal();
+ IsFunc = GV && dyn_cast<Function>(GV);
+ }
----------------
isa_and_nonnull<Function> ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133914/new/
https://reviews.llvm.org/D133914
More information about the llvm-commits
mailing list