[PATCH] D88823: [CodeGen][TailDuplicator] Don't duplicate blocks with INLINEASM_BR
Bill Wendling via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 04:24:37 PDT 2020
void created this revision.
void added reviewers: nickdesaulniers, jyknight, melver.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
void requested review of this revision.
Blocks with INLINEASM_BR have indirect branches which make duplicating
them more complicated than normal instructions.
See: https://github.com/ClangBuiltLinux/linux/issues/1125
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88823
Files:
llvm/lib/CodeGen/TailDuplicator.cpp
Index: llvm/lib/CodeGen/TailDuplicator.cpp
===================================================================
--- llvm/lib/CodeGen/TailDuplicator.cpp
+++ llvm/lib/CodeGen/TailDuplicator.cpp
@@ -627,6 +627,10 @@
if (PreRegAlloc && MI.isCall())
return false;
+ // FIXME: This may be too restrictive.
+ if (MI.getOpcode() == TargetOpcode::INLINEASM_BR)
+ return false;
+
if (MI.isBundle())
InstrCount += MI.getBundleSize();
else if (!MI.isPHI() && !MI.isMetaInstruction())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88823.296151.patch
Type: text/x-patch
Size: 513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201005/761068ae/attachment.bin>
More information about the llvm-commits
mailing list