This patch changes MIR stack-id from an integer to an enum, and adds printing/parsing support for this in MIR files. The default stack-id '0' is now renamed to 'default'. This should make MIR tests that have stack objects with different stack-ids more descriptive. It also clarifies code operating on StackID. Reviewers: arsenm, thegameg, qcolombet Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D60137 llvm-svn: 363533
36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
# RUN: llc -march=amdgcn -run-pass none -o - %s | FileCheck %s
|
|
...
|
|
---
|
|
|
|
# CHECK-LABEL: name: spill_slot_stack_id
|
|
# CHECK: {{^}}fixedStack:
|
|
# CHECK: - { id: 0, type: spill-slot, offset: 0, size: 4, alignment: 4, stack-id: default,
|
|
# CHECK: - { id: 1, type: spill-slot, offset: 0, size: 8, alignment: 4, stack-id: default,
|
|
# CHECK: - { id: 2, type: spill-slot, offset: 0, size: 16, alignment: 4, stack-id: noalloc,
|
|
|
|
# CHECK: {{^}}stack:
|
|
# CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 16,
|
|
# CHECK-NEXT: stack-id: noalloc,
|
|
|
|
# CHECK: - { id: 1, name: '', type: spill-slot, offset: 0, size: 8,
|
|
# CHECK-NEXT: stack-id: default,
|
|
|
|
# CHECK: - { id: 2, name: '', type: spill-slot, offset: 0, size: 4,
|
|
# CHECK-NEXT: stack-id: default,
|
|
|
|
|
|
name: spill_slot_stack_id
|
|
fixedStack:
|
|
- { id: 0, type: spill-slot, offset: 0, size: 16, alignment: 4, stack-id: noalloc }
|
|
- { id: 1, type: spill-slot, offset: 0, size: 8, alignment: 4, stack-id: default }
|
|
- { id: 2, type: spill-slot, offset: 0, size: 4, alignment: 4 }
|
|
stack:
|
|
- { id: 0, name: '', type: spill-slot, offset: 0, size: 16, alignment: 4, stack-id: noalloc }
|
|
- { id: 1, name: '', type: spill-slot, offset: 0, size: 8, alignment: 4, stack-id: default }
|
|
- { id: 2, name: '', type: spill-slot, offset: 0, size: 4, alignment: 4 }
|
|
|
|
body: |
|
|
bb.0:
|
|
S_ENDPGM 0
|
|
...
|