forked from OSchip/llvm-project
b4a647449f
The current implementation assumes there is an instruction associated with the transform, but this is not the case for timm/TargetConstant/immarg values. These transforms should directly operate on a specific MachineOperand in the source instruction. TableGen would assert if you attempted to define an equivalent GISDNodeXFormEquiv using timm when it failed to find the instruction matcher. Specially recognize SDNodeXForms on timm, and pass the operand index to the render function. Ideally this would be a separate render function type that looks like void renderFoo(MachineInstrBuilder, const MachineOperand&), but this proved to be somewhat mechanically painful. Add an optional operand index which will only be passed if the transform should only look at the one source operand. Theoretically it would also be possible to only ever pass the MachineOperand, and the existing renderers would check the parent. I think that would be somewhat ugly for the standard usage which may want to inspect other operands, and I also think MachineOperand should eventually not carry a pointer to the parent instruction. Use it in one sample pattern. This isn't a great example, since the transform exists to satisfy DAG type constraints. This could also be avoided by just changing the MachineInstr's arbitrary choice of operand type from i16 to i32. Other patterns have nontrivial uses, but this serves as the simplest example. One flaw this still has is if you try to use an SDNodeXForm defined for imm, but the source pattern uses timm, you still see the "Failed to lookup instruction" assert. However, there is now a way to avoid it. |
||
---|---|---|
.. | ||
FileCheck | ||
KillTheDoctor | ||
LLVMVisualizers | ||
Misc | ||
PerfectShuffle | ||
Reviewing | ||
TableGen | ||
Target/ARM | ||
UpdateTestChecks | ||
benchmark | ||
bugpoint | ||
count | ||
crosstool | ||
docker | ||
emacs | ||
fpcmp | ||
gdb-scripts | ||
git-svn | ||
gn | ||
jedit | ||
kate | ||
lint | ||
lit | ||
llvm-build | ||
llvm-lit | ||
llvm-locstats | ||
not | ||
release | ||
sanitizers | ||
testgen | ||
textmate | ||
unittest | ||
valgrind | ||
vim | ||
vscode | ||
yaml-bench | ||
DSAclean.py | ||
DSAextract.py | ||
GenLibDeps.pl | ||
GetRepositoryPath | ||
GetSourceVersion | ||
LLVMBuild.txt | ||
UpdateCMakeLists.pl | ||
abtest.py | ||
add_argument_names.py | ||
bisect | ||
bisect-skip-count | ||
bugpoint_gisel_reducer.py | ||
check-each-file | ||
chunk-print-before-all.py | ||
clang-parse-diagnostics-file | ||
codegen-diff | ||
collect_and_build_with_pgo.py | ||
countloc.sh | ||
create_ladder_graph.py | ||
demangle_tree.py | ||
extract_symbols.py | ||
extract_vplan.py | ||
findmisopt | ||
findoptdiff | ||
findsym.pl | ||
getsrcs.sh | ||
indirect_calls.py | ||
lldbDataFormatters.py | ||
llvm-compilers-check | ||
llvm-gisel-cov.py | ||
llvm-native-gxx | ||
llvm.grm | ||
llvmdo | ||
llvmgrep | ||
prepare-code-coverage-artifact.py | ||
schedcover.py | ||
shuffle_fuzz.py | ||
shuffle_select_fuzz_tester.py | ||
sort_includes.py | ||
unicode-case-fold.py | ||
update_analyze_test_checks.py | ||
update_cc_test_checks.py | ||
update_llc_test_checks.py | ||
update_mca_test_checks.py | ||
update_mir_test_checks.py | ||
update_test_checks.py | ||
wciia.py |