aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorIngo Müller <ingomueller@google.com>2023-10-06 10:56:57 +0200
committerGitHub <noreply@github.com>2023-10-06 10:56:57 +0200
commit787689943d027b062274f22097e7f30b0a52bd5b (patch)
tree30addc079a90ee0bdf30ac5b6704700d6570b244 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentcd184c866e0aad1f957910b8c7a94f98a2b21ceb (diff)
downloadllvm-787689943d027b062274f22097e7f30b0a52bd5b.zip
llvm-787689943d027b062274f22097e7f30b0a52bd5b.tar.gz
llvm-787689943d027b062274f22097e7f30b0a52bd5b.tar.bz2
[mlir][transform] Fix handling of transitive include in interpreter. (#67560)
Until now, the interpreter would only load those symbols from the provided library files that were declared in the main transform module. However, sequences in the library may include other sequences on their own. Until now, if such sequences were not *also* declared in the main transform module, the interpreter would fail to resolve them. Forward declaring all of them is undesirable as it defeats the purpose of encapsulation into library modules. This PR implements a kind of linker for transform scripts to solve this problem. The linker merges all symbols of the library module into the main module before interpreting the latter. Symbols whose names collide are handled as follows: (1) if they are both functions (in the sense of `FunctionOpInterface`) with compatible signatures, one is external, and the other one is public, then they are merged; (2) of one of them is private, that one is renamed; and (3) an error is raised otherwise. One consequence of this change is that the loading of the library files in the interpreter pass is not idempotent anymore, i.e., subsequent interpreter passes cannot (and need not) load the same library files again since would lead to doubly defined symbols.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions