This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly][NFC] Unify ARGUMENT classes
ClosedPublic

Authored by tlively on Oct 11 2018, 2:48 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

tlively created this revision.Oct 11 2018, 2:48 PM

This makes typenames in the arguments lowercase, which is inconsistent with other existing non-SIMD instructions, but currently other SIMD instructions are anyway, so I guess it would be ok. On a different note, do we need ARGUMENT instruction for every variation of v128 vector? If there's only one V128 type register in the backend, wouldn't a single ARGUMENT_v128 suffice?

This makes typenames in the arguments lowercase, which is inconsistent with other existing non-SIMD instructions, but currently other SIMD instructions are anyway, so I guess it would be ok. On a different note, do we need ARGUMENT instruction for every variation of v128 vector? If there's only one V128 type register in the backend, wouldn't a single ARGUMENT_v128 suffice?

Yeah, I'd rather have all caps for everything, but being able to concatenate strings to make identifiers is just too useful. I would be willing to special case the ARGUMENT instructions to have all-caps names for consistency in other files if you think that would be better, though. It would be nice if TableGen had slightly richer string manipulation functions to make this easier. Unfortunately we do need a separate ARGUMENT for each vector type. Otherwise TableGen complains about not being able to infer types.

aheejin accepted this revision.Oct 12 2018, 2:20 PM
This revision is now accepted and ready to land.Oct 12 2018, 2:20 PM
This revision was automatically updated to reflect the committed changes.