Please confirm you have...
LLVM has a small obscure format known as MIR which stands for MachineIR. This is currently being recognized as Mirah language due to the file extension .mir. This could be detected by using LLVM MIR's keywords like liveins: body: tracksRegLiveness and whatnot
2018-04-23
LLVM MachineIR
Mirah
Thanks for the report @Naville!
Looks like there's a large enough corpus of such file on GitHub.com to warrant its support in Linguist. Would you like to take a stab at it @Naville?
@pchaigno I'd love to. Unfortunately after reading the contributing guide I figured it's a little bit too much for me馃槩
Hello, I have never contributed to this project before, but would really like to contribute here.
Can I try this issue once? If no one is looking into it as of now? :smiley: :sweat_smile:
@gabru-md Go ahead. We'll help if there's any issue. Don't forget to check out the contribution guidelines.
@pchaigno also @gabru-md Since LLVM MIR uses YAML as its container I wonder if they should be identified as YAML or LLVM MIR
Thank you @pchaigno.
I'll go through the contribution guidelines and start working on it :+1:
@Naville even if YAML is the container it is using, but since the extension format is .MIR then I guess it should be identified as LLVM MIR? :sweat_smile: What are your thoughts ?
You're right, we should add it as a new extension for YAML instead of a new language. Unless there is grammar specific to LLVM MachineIR, in which case we can add it as its own entry but under the YAML group.
So am I supposed to add it as a new language? In that case I will go through the adding language guide as in the repository.
I am sorry, I am a beginner to this project :sweat_smile: , but do you mean that adding it LLVM MIR as an extension to YAML will classify it as YAML only?
I might need a bit of clarification :sweat_smile:
So am I supposed to add it as a new language?
That depends if you found a grammar specific to LLVM MIR or if you're going to use that for YAML.
but do you mean that adding it LLVM MIR as an extension to YAML will classify it as YAML only?
Yes. There are guidelines for that too, under the guidelines for adding a language.
Okay, So I will be updating languages.yml specifically the LLVM( by adding .mir extension) portion and adding Samples into the Sample Directory. Because we want the .mir to be identified as LLVM as well :sweat_smile:
But I could not find a suitable subdirectory for adding samples for LLVM. Since I will be adding the .mir samples to it, can you please tell me what to do ? :sweat_smile:
should I take the code for samples from here?
and provide the reference to the main code in the comments of files ?
Because we want the
.mirto be identified as LLVM as well :sweat_smile:
Do we? It doesn't look like they have the same syntax at all. From what I understand, while LLVM MIR is related to LLVM, it is YAML.
Okay, I will add it to YAML then.
So my work involves adding .mir extension to YAML types and creating an example inside the YAML samples directory.
Please point me if I am wrong. Sorry, for asking too many questions :sweat_smile:
@pchaigno is this all I need to do? Because if it is, then I will send a PR asap. :sweat_smile:
Yes, you'll only need to follow the first 3 steps from the contribution guidelines. We'll make sure the classifier can distinguish Mirah files from LLVM MIR files once the PR is opened.
I've created a PR for the same. Please review it when you have time :smiley: :+1:
Most helpful comment
Yes, you'll only need to follow the first 3 steps from the contribution guidelines. We'll make sure the classifier can distinguish Mirah files from LLVM MIR files once the PR is opened.