diff options
author | Jan Wen Voung <jvoung@google.com> | 2012-10-11 20:20:40 +0000 |
---|---|---|
committer | Jan Wen Voung <jvoung@google.com> | 2012-10-11 20:20:40 +0000 |
commit | afaced070fa437d2c66a0a628a5237aa4479e598 (patch) | |
tree | b8377b548f2dc931b2812bcfbb35aeb6fef86542 /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 8398126bdd8efb02078c2a11e6ac499796d60c0f (diff) | |
download | bcm5719-llvm-afaced070fa437d2c66a0a628a5237aa4479e598.tar.gz bcm5719-llvm-afaced070fa437d2c66a0a628a5237aa4479e598.zip |
Change encoding of instruction operands in bitcode binaries to be relative
to the instruction position. The old encoding would give an absolute
ID which counts up within a function, and only resets at the next function.
I.e., Instead of having:
... = icmp eq i32 n-1, n-2
br i1 ..., label %bb1, label %bb2
it will now be roughly:
... = icmp eq i32 1, 2
br i1 1, label %bb1, label %bb2
This makes it so that ids remain relatively small and can be encoded
in fewer bits.
With this encoding, forward reference operands will be given
negative-valued IDs. Use signed VBRs for the most common case
of forward references, which is phi instructions.
To retain backward compatibility we bump the bitcode version
from 0 to 1 to distinguish between the different encodings.
llvm-svn: 165739
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
0 files changed, 0 insertions, 0 deletions