1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/lib
Wouter van Oortmerssen 538b137e0b [WebAssembly] Added initial type checker to MC Assembler
This to protect against non-sensical instruction sequences being assembled,
which would either cause asserts/crashes further down, or a Wasm module being output that doesn't validate.

Unlike a validator, this type checker is able to give type-errors as part of the parsing process, which makes the assembler much friendlier to be used by humans writing manual input.

Because the MC system is single pass (instructions aren't even stored in MC format, they are directly output) the type checker has to be single pass as well, which means that from now on .globaltype and .functype decls must come before their use. An extra pass is added to Codegen to collect information for this purpose, since AsmPrinter is normally single pass / streaming as well, and would otherwise generate this information on the fly.

A `-no-type-check` flag was added to llvm-mc (and any other tools that take asm input) that surpresses type errors, as a quick escape hatch for tests that were not intended to be type correct.

This is a first version of the type checker that ignores control flow, i.e. it checks that types are correct along the linear path, but not the branch path. This will still catch most errors. Branch checking could be added in the future.

Differential Revision: https://reviews.llvm.org/D104945
2021-07-09 14:07:25 -07:00
..
Analysis [IR] Add GEPOperator::indices() (NFC) 2021-07-09 21:41:20 +02:00
AsmParser [AttrBuilder] Make handling of type attributes more generic (NFCI) 2021-07-09 17:48:09 +02:00
BinaryFormat [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
Bitcode Revert "[DebugInfo] Enforce implicit constraints on distinct MDNodes" 2021-07-02 15:57:07 -07:00
Bitstream
CodeGen [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
DebugInfo [COFF] [CodeView] Add a few new enum values 2021-07-07 22:00:18 +03:00
Demangle [Clang] Introduce Swift async calling convention. 2021-07-09 11:50:10 -07:00
DWARFLinker [MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo 2021-05-23 14:15:23 -07:00
ExecutionEngine [ORC] Improve computeLocalDeps / computeNamedSymbolDependencies performance. 2021-07-08 16:31:59 +10:00
Extensions
FileCheck [llvm] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
Frontend [OPENMP]Fix PR50129: omp cancel parallel not working as expected. 2021-06-04 08:24:55 -07:00
Fuzzer
FuzzMutate [NewPM][FuzzMutate] Fix renaming 'unswitch' to 'simple-loop-unswitch' 2021-07-09 12:24:12 +02:00
InterfaceStub
IR [NFC][OpaquePtr] Use GlobalValue::getValueType() more 2021-07-09 09:55:41 -07:00
IRReader
LineEditor
Linker [NFC][OpaquePtr] Use GlobalValue::getValueType() more 2021-07-09 09:55:41 -07:00
LTO PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
MC [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
MCA [MCA] [In-order pipeline] Fix for 0 latency instruction causing assertion to fail. 2021-06-22 10:18:39 -07:00
Object [NFC][OpaquePtr] Use GlobalValue::getValueType() more 2021-07-09 09:55:41 -07:00
ObjectYAML [COFF] [CodeView] Add a few new enum values 2021-07-07 22:00:18 +03:00
Option [OptTable] Rename PrintHelp to printHelp 2021-06-24 14:47:03 -07:00
Passes [NewPM] Rename 'unswitch' to 'simple-loop-unswitch' in PassRegistry 2021-07-09 09:47:33 +02:00
ProfileData PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
Remarks [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
Support PR51018: A few more explicit conversions from SmallString to StringRef 2021-07-09 13:54:02 -07:00
TableGen DetailedRecordsBackend.cpp - printSectionHeading - avoid std::string creation/copies. 2021-06-13 16:49:40 +01:00
Target [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
Testing Fix for error "'Run' overrides a member function but is not marked 2021-06-11 06:56:00 -07:00
TextAPI Reland "[llvm] llvm-tapi-diff" 2021-06-09 21:17:34 -07:00
ToolDrivers [OptTable] Rename PrintHelp to printHelp 2021-06-24 14:47:03 -07:00
Transforms [SLP] make invalid operand explicit for extra arg in reduction matching; NFC 2021-07-09 15:32:12 -04:00
WindowsManifest llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
XRay
CMakeLists.txt