This is an archive of the discontinued LLVM Phabricator instance.

MachineFunctionInfo for AArch64 in MIR
ClosedPublic

Authored by AndrewLitteken on Apr 14 2020, 5:39 PM.

Details

Summary

Starting with hasRedZone adding MachineFunctionInfo to be put in the YAML for MIR files.

Split out of: D78062

Based on implementation for MachineFunctionInfo for WebAssembly

Diff Detail

Event Timeline

AndrewLitteken created this revision.Apr 14 2020, 5:39 PM
AndrewLitteken edited the summary of this revision. (Show Details)Apr 14 2020, 5:39 PM

Code LGTM. Just a few minor nits on the testcases.

llvm/test/CodeGen/AArch64/function-info-noredzone-present.ll
4

s/taht/that/

5

s/Machine Function Info/MachineFunctionInfo/ (someone might grep for the class name, so no spaces is likely better here)

9

Can you use CHECK-LABEL here and for the next function?

llvm/test/CodeGen/MIR/AArch64/function-info-noredzone-present.mir
4

s/Attribute/attribute/

7

Can you use CHECK-LABEL here?

I think the following CHECK line will match the first occurrence of machineFunctionInfo.

paquette added inline comments.Apr 15 2020, 11:29 AM
llvm/test/CodeGen/AArch64/function-info-noredzone-present.ll
10

This shouldn't use CHECK-LABEL, just the first one.

CHECK-LABEL divides the input stream up into blocks. So, for example

; CHECK-LABEL: foo
; CHECK: something

; CHECK-LABEL: bar
; CHECK: thingsome
...

After matching foo, we'll try to match something at some point in the file after foo.

We won't match lines after matching bar though, because it has a CHECK-LABEL check line. So, it's not in the same block. As a result of this, if someone introduced a bug that made thingsome into something, we wouldn't accidentally match it after foo.

https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-label-directive

llvm/test/CodeGen/MIR/AArch64/function-info-noredzone-present.mir
8

Same as above, we want the CHECK-LABEL to be on foo.

Updates for misunderstanding how check label works

This revision is now accepted and ready to land.Apr 17 2020, 3:13 PM
This revision was automatically updated to reflect the committed changes.