This is an archive of the discontinued LLVM Phabricator instance.

[X86][NFC] Generate mnemonic tables
ClosedPublic

Authored by Amir on Mar 13 2022, 11:03 PM.

Details

Summary

Produce mnemonic tables, adding the functions to llvm::X86 namespace.

Diff Detail

Event Timeline

Amir created this revision.Mar 13 2022, 11:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 13 2022, 11:03 PM
Amir published this revision for review.Mar 13 2022, 11:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 13 2022, 11:11 PM
RKSimon added inline comments.
llvm/lib/Target/X86/CMakeLists.txt
12

(sorting)

Amir marked an inline comment as done.Mar 14 2022, 12:39 PM
skan accepted this revision.Mar 16 2022, 4:31 AM

LGTM

This revision is now accepted and ready to land.Mar 16 2022, 4:31 AM
MaskRay accepted this revision.Mar 16 2022, 10:58 AM
This revision was landed with ongoing or failed builds.Mar 18 2022, 1:47 AM
This revision was automatically updated to reflect the committed changes.

Hello,

I noticed that if compilng with ubsan
-DLLVM_USE_SANITIZER='Undefined'
you get the following error when compiling llc with this patch:

FAILED: lib/Target/X86/X86GenMnemonicTables.inc
cd /repo/uabelho/master-github/llvm/build-all-bbisdk-ubsan && /repo/uabelho/master-github/llvm/build-all-bbisdk-ubsan/bin/llvm-tblgen -gen-x86-mnemonic-tables -asmwriternum=1 -I /repo/uabelho/master-github/llvm/lib/Target/X86 -I/repo/uabelho/master-github/llvm/build-all-bbisdk-ubsan/include -I/repo/uabelho/master-github/llvm/include -I /repo/uabelho/master-github/llvm/lib/Target /repo/uabelho/master-github/llvm/lib/Target/X86/X86.td --write-if-changed -o lib/Target/X86/X86GenMnemonicTables.inc -d lib/Target/X86/X86GenMnemonicTables.inc.d
../utils/TableGen/X86MnemonicTables.cpp:52:29: runtime error: load of value 170, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../utils/TableGen/X86MnemonicTables.cpp:52:29 in

Amir added a comment.Mar 21 2022, 7:24 AM

Hello,

I noticed that if compilng with ubsan
-DLLVM_USE_SANITIZER='Undefined'
you get the following error when compiling llc with this patch:

FAILED: lib/Target/X86/X86GenMnemonicTables.inc
cd /repo/uabelho/master-github/llvm/build-all-bbisdk-ubsan && /repo/uabelho/master-github/llvm/build-all-bbisdk-ubsan/bin/llvm-tblgen -gen-x86-mnemonic-tables -asmwriternum=1 -I /repo/uabelho/master-github/llvm/lib/Target/X86 -I/repo/uabelho/master-github/llvm/build-all-bbisdk-ubsan/include -I/repo/uabelho/master-github/llvm/include -I /repo/uabelho/master-github/llvm/lib/Target /repo/uabelho/master-github/llvm/lib/Target/X86/X86.td --write-if-changed -o lib/Target/X86/X86GenMnemonicTables.inc -d lib/Target/X86/X86GenMnemonicTables.inc.d
../utils/TableGen/X86MnemonicTables.cpp:52:29: runtime error: load of value 170, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../utils/TableGen/X86MnemonicTables.cpp:52:29 in

Hello and thanks for reporting! Working on it. Note there's an earlier report here: https://reviews.llvm.org/D121571#3396209

Hello,

I noticed that if compilng with ubsan
-DLLVM_USE_SANITIZER='Undefined'
you get the following error when compiling llc with this patch:

FAILED: lib/Target/X86/X86GenMnemonicTables.inc
cd /repo/uabelho/master-github/llvm/build-all-bbisdk-ubsan && /repo/uabelho/master-github/llvm/build-all-bbisdk-ubsan/bin/llvm-tblgen -gen-x86-mnemonic-tables -asmwriternum=1 -I /repo/uabelho/master-github/llvm/lib/Target/X86 -I/repo/uabelho/master-github/llvm/build-all-bbisdk-ubsan/include -I/repo/uabelho/master-github/llvm/include -I /repo/uabelho/master-github/llvm/lib/Target /repo/uabelho/master-github/llvm/lib/Target/X86/X86.td --write-if-changed -o lib/Target/X86/X86GenMnemonicTables.inc -d lib/Target/X86/X86GenMnemonicTables.inc.d
../utils/TableGen/X86MnemonicTables.cpp:52:29: runtime error: load of value 170, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../utils/TableGen/X86MnemonicTables.cpp:52:29 in

Hello and thanks for reporting! Working on it. Note there's an earlier report here: https://reviews.llvm.org/D121571#3396209

Great! Thanks!