[PATCH] D57806: [Interpreter] Add newline to interpreter debugging output

Andrew Brown via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 21 20:39:39 PST 2019


abrown added a comment.

@kristof.beyls: thanks for taking a look. As expected, without the change we see something like:

  ...
  About to interpret:   store i32 0, i32* %retval, align 4About to interpret:   store i32 %argc, i32* %argc.addr, align 4About to interpret:   store i8** %argv, i8*** %argv.addr, align 8About to interpret:   store i32 10000, i32* %max, align 4About to interpret:   store i32 0, i32* %s, align 4About to interpret:   store i32 2, i32* %n, align 4About to interpret:   br label %while.condAbout to interpret:   %0 = load i32, i32* %n, align 4About to interpret:   %1 = load i32, i32* %max, align 4About to interpret:   %cmp = icmp sle i32 %0, %1About to interpret:   br i1 %cmp, label %while.body, label %while.end10About to interpret:   store i32 1, i32* %p, align 4About to interpret:   store i32 2, i32* %d, align 4About to interpret:   br label %while.cond1About to interpret:   %2 = load i32, i32* %d, align 4About to interpret:   %3 = load i32, i32* %n, align 4About to interpret:   %sub = sub nsw i32 %3, 1About to interpret:   %cmp2 = icmp sle i32 %2, %subAbout to interpret:   br i1 %cmp2, label %while.body3,
  ...

But with the change the output is a bit more readable:

  ...
  About to interpret:   store i32 %argc, i32* %argc.addr, align 4
  About to interpret:   store i8** %argv, i8*** %argv.addr, align 8
  About to interpret:   store i32 10000, i32* %max, align 4
  About to interpret:   store i32 0, i32* %s, align 4
  About to interpret:   store i32 2, i32* %n, align 4
  About to interpret:   br label %while.cond
  About to interpret:   %0 = load i32, i32* %n, align 4
  About to interpret:   %1 = load i32, i32* %max, align 4
  About to interpret:   %cmp = icmp sle i32 %0, %1
  ...

This is likely a non-issue for most people because I would guess few people run this with `--force-interpreter=true` but the latter output seems more sane.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57806/new/

https://reviews.llvm.org/D57806





More information about the llvm-commits mailing list