switch (Token.kind()) {
case MIToken::NamedIRValue: {
V = MF.getFunction()->getValueSymbolTable().lookup(Token.stringValue());
+ if (!V)
+ V = MF.getFunction()->getParent()->getValueSymbolTable().lookup(
+ Token.stringValue());
if (!V)
return error(Twine("use of undefined IR value '") + Token.range() + "'");
break;
ret i32 %b
}
+ define i32 @global_value() {
+ entry:
+ %a = load i32, i32* @G
+ %b = add i32 %a, 1
+ ret i32 %b
+ }
+
define i32 @jumptable_psv(i32 %in) {
entry:
switch i32 %in, label %def [
- 'RETQ %eax'
...
---
+name: global_value
+tracksRegLiveness: true
+body:
+ - id: 0
+ name: entry
+ instructions:
+ - '%rax = MOV64rm %rip, 1, _, @G, _'
+# CHECK: name: global_value
+# CHECK: %eax = MOV32rm killed %rax, 1, _, 0, _ :: (load 4 from %ir.G)
+ - '%eax = MOV32rm killed %rax, 1, _, 0, _ :: (load 4 from %ir.G)'
+ - '%eax = INC32r killed %eax, implicit-def dead %eflags'
+ - 'RETQ %eax'
+...
+---
name: jumptable_psv
tracksRegLiveness: true
liveins: