[PATCH] D76847: [Target][ARM] Replace re-uses of old VPR values with VPNOTs
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 06:43:18 PDT 2020
dmgreen added a comment.
Herald added a subscriber: danielkiss.
Sorry for the delay.
================
Comment at: llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp:175
+// in-between the VPNOT and its user.
+// Returns true if at there is at least one user of the VPNOT in the block.
+static bool MoveVPNOTBeforeFirstUser(MachineBasicBlock &MBB,
----------------
if at there -> if there
================
Comment at: llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp:240
+
+ Register VCCRValue, OppositeVCCRValue;
+ // The first loop looks for 2 unpredicated instructions:
----------------
Does this only find the first pair in a basic block? What would happen if there are multiple (potential) vpt blocks in a larger basic block, and several of them can be optimized?
Can this be done with a linear scan through the block that attempts to find and hold VPNOT's and the original value, converting any uses of the original to the VPNOT. Or does that not work very well for some reason? Maybe using something like MRI->use_instructions would also help.
================
Comment at: llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp:256
+ // no users.
+ if (!MoveVPNOTBeforeFirstUser(MBB, Iter, VCCRValue))
+ continue;
----------------
Can you explain the advantage of moving the VPNOT?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76847/new/
https://reviews.llvm.org/D76847
More information about the llvm-commits
mailing list