The VPTBlock has been modified to track the 'global' state of the VPR, as well as the state for each block. Each object now just holds a list of instructions that makeup the block, while static structures hold the predicate information. This enables global access for querying how both a VPT block and individual instructions are predicated. These changes now allow us, again, to handle more complicated cases where multiple instructions build a predicate and/or where the same predicate in used in multiple blocks.
It doesn't, however, get us back to before the tracking was 'fixed' as some extra logic will be required to properly handle VPT instructions. Currently a VPT could be effectively predicated because of it's inputs, but the existing logic will not detect that and so will refuse to perform the transformation. This can be seen in remat-vctp.ll test where we still don't perform the transform.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
- Rebased.
- Simplified ValidateMVEInst further by no longer differentiating between a main and secondary VCTPs.
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | ||
---|---|---|
168–169 | Is this comment out of date? This class is not just representing a VPT block anymore as it e.g. contains member Blocks? A real proper nit in that case: perhaps VPTState or VPBlocks or something similar is a more accurate description of this class | |
194–197 | Can you add a comment what this is? For example, at a first glance I was curious what the difference was with PredicatedInsts. | |
197 | In one of the other patches, you had a nice comment explaining the chaining and AND'ing of predicates. Is that applicable here, would that comment be good to have here? | |
197 | In one of the other patches, you had a nice comment explaining the chaining and AND'ing of predicates. Would it be good/applicable to have that comment here? | |
1366 | just checking, should this be <=? |
Is this comment out of date? This class is not just representing a VPT block anymore as it e.g. contains member Blocks? A real proper nit in that case: perhaps VPTState or VPBlocks or something similar is a more accurate description of this class