[PATCH] D111386: RFC: [Hexagon] Mark target as not "machine verifier clean"

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 8 10:14:19 PDT 2021


MatzeB added a comment.

What about moving the packetizer pass from `addPreEmitPass()` to `addPreEmitPass2()`?

Currently we have the following running after PreEmitPass, but I have feeling none of that may be relevant for hexagon (and would likely fail if they were actually used with packetized code):

- FuncletLayout  sorts exception handling funclets (I think funclets are only used on Windows and maybe Webassembly)
- StackMapLiveness  computes information for stackmap instruction which are used by some languages with garbage collectors, unused in C/C++...
- Refines debug information; though I have a feeling that liveness analysis on a MachineFunction that doesn't pass the verifier isn't really producing sensible results...
- MachineOutliner, FunctionSplitter  are those enabled/used by hexagon?

Anyway I think the gist is: If the HexagonPacketizer brings the MachineFunction into a form where it does not pass the verifier anymore then generic codegen passes likely won't do anything useful anymore either. But likely noone noticed because there are only some obscure passes running late. Anyway if that is true, then the easiest solution is to move the packetizer into `addPreEmitPass2` so that it really is the last thing running before code emission.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111386/new/

https://reviews.llvm.org/D111386



More information about the llvm-commits mailing list