[PATCH] D72783: Process BUNDLE in tail duplication
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 10:12:54 PST 2020
rampitec marked an inline comment as done.
rampitec added inline comments.
================
Comment at: llvm/lib/CodeGen/TailDuplicator.cpp:628-629
- if (!MI.isPHI() && !MI.isMetaInstruction())
+ if (MI.isBundle())
+ InstrCount += MI.getBundleSize();
+ else if (!MI.isPHI() && !MI.isMetaInstruction())
----------------
rampitec wrote:
> arsenm wrote:
> > This depends on the target interpretation of a bundle. A VLIW target may want to treat a bundle as 1 instruction
> VLIW packetizer works much later than this, in addPreEmitPass().
Also note that will increase a cost of a bundle, effectively preventing its tail duplication where it would be duplicated earlier. I.e. it will prevent an optimization, so even if there is a target which wants to consider bundle a single instruction it will do no harm, just will not change a source program. I.e. that is a change into a safe direction.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72783/new/
https://reviews.llvm.org/D72783
More information about the llvm-commits
mailing list