Machine Instruction flags for fast math support and MIR print support
Details
Diff Detail
Event Timeline
include/llvm/CodeGen/MachineInstr.h | ||
---|---|---|
110 | Does this change the overall size of the MachineInstr struct, or is there already enough padding to use? |
include/llvm/CodeGen/MachineInstr.h | ||
---|---|---|
110 | The padding in the MIFlag enum is such that the new flags do not change the size of the class, however, the Flags field changes it by 1 byte in size. |
This is missing the support and tests in the MIR printer for these
lib/CodeGen/SelectionDAG/InstrEmitter.cpp | ||
---|---|---|
828–834 ↗ | (On Diff #142973) | This section belongs with the DAG patch |
Meantime, I will look into the tests and MIR printer changes.
lib/CodeGen/SelectionDAG/InstrEmitter.cpp | ||
---|---|---|
828–834 ↗ | (On Diff #142973) | That would create a circular dependence. |
lib/CodeGen/SelectionDAG/InstrEmitter.cpp | ||
---|---|---|
828–834 ↗ | (On Diff #142973) | How? You should be able to make all the MI changes first, independent of the DAG |
It should be noted with the changes above, that this change list is now required to check in first before D45710 and that there is a hard dependency on this code.
The code in lib/CodeGen/SelectionDAG/InstrEmitter.cpp sets the flags, which will shortly be D45710, without that, nothing changes in the mir tests, ergo the check component testing for the fast math flags will cause modified tests which run through the MIR printer to fail until those changes are checked in.
If the instructions are codegened from SelectionDAG. This seems to be missing the part to parse these names and set the flags in the MIR parser, which is what should be setting the flags here.
Ok, I will add the parser/lexer pieces to this review, once I have them authored/tested.
Are there any outstanding issues regarding these changes? Does it look ok for approval?
test/CodeGen/X86/sqrt-fastmath.mir | ||
---|---|---|
1 ↗ | (On Diff #143855) | This test belongs in test/CodeGen/MIR/X86. The sqrt also isn't needed in the name, just fast-math-flags would be better |
8–12 ↗ | (On Diff #143855) | Don't need the IR section |
16–17 ↗ | (On Diff #143855) | You can strip out most of this stuff |
74–75 ↗ | (On Diff #143855) | This doesn't need to be a meaningful function. You can just have one sample instruction for each individual flag, and maybe a few with combination flags for good measure |
Does this change the overall size of the MachineInstr struct, or is there already enough padding to use?