7 Commits

Author SHA1 Message Date
Shilei Tian
cfadf3f622
[TableGen] Fix a potential crash when operand doesn't appear in the instruction pattern (#87663)
We have a check of whether an operand is in the instruction pattern, and
emit an
error if it is not, but we simply continue execution, including directly
dereferencing a point-like object `InVal`, which will be just created
when
accessing the map. It contains a `nullptr` so dereferencing it causes
crash.
This is a very trivial fix.
2024-04-04 20:29:26 -04:00
Marc Auberer
0fda758f26
[GISEL][NFC] Refactor OperandPredicateMatcher::isHigherPriorityThan (#86837)
Fixes #86827

This will simplify code, de-duplicate some logic and fix the faulty bool
compare.

cc @dcb314
2024-03-28 01:19:09 +01:00
Craig Topper
baf66ec061
[Target][RISCV] Add HwMode support to subregister index size/offset. (#86368)
This is needed to provide proper size and offset for the GPRPair subreg
indices on RISC-V. The size of a GPR already uses HwMode. Previously we
said the subreg indices have unknown size and offset, but this stops
DwarfExpression::addMachineReg from being able to find the registers
that make up the pair.

I believe this fixes https://github.com/llvm/llvm-project/issues/85864
but need to verify.
2024-03-27 12:19:28 -07:00
Pierre van Houtryve
4f9aab2b50
[NFC][TableGen][GlobalISel] Move MIR pattern parsing out of combiner (#86789)
Reland of cfa0833ccc7450a322e709583e894e4c96ce682e
2024-03-27 13:53:36 +01:00
Joseph Huber
46a737cef2 [LLVM] Fix linking object library in tablegen
Summary:
The patch https://github.com/llvm/llvm-project/pull/80847 introduced
some changes to how we build tablegen. Some files weren't build included
properly on my build. We don't need to fish out the objects directly
from an object library build, we can simply add it to the link libraries
and CMake will include them for you. This fixed the issue of missings
defs for me and is more canonical.
2024-03-25 08:02:53 -05:00
pvanhout
7434a6b96c [TableGen] Fix Linker Errors
Fix linker errors after landing fa3d789df15bd1f58fb8ba4ea3be909218cf7f03
2024-03-25 10:50:08 +01:00
Pierre van Houtryve
fa3d789df1
[RFC][TableGen] Restructure TableGen Source (#80847)
Refactor of the llvm-tblgen source into:
- a "Basic" library, which contains the bare minimum utilities to build
`llvm-min-tablegen`
- a "Common" library which contains all of the helpers for TableGen
backends. Such helpers can be shared by more than one backend, and even
unit tested (e.g. CodeExpander is, maybe we can add more over time)

Fixes #80647
2024-03-25 09:40:35 +01:00