diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-17 22:58:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-17 22:58:41 +0000 |
commit | dd7304767338fd58484da1fb9cd5e688e5688f40 (patch) | |
tree | 6a0309ac5ab3e799cbe2c5d82c74c8b4ab4d68d6 /llvm/lib/Transforms/TransformInternals.cpp | |
parent | a814080025420fb8f90fa0e4da0e1dfca2c069a3 (diff) | |
download | bcm5719-llvm-dd7304767338fd58484da1fb9cd5e688e5688f40.tar.gz bcm5719-llvm-dd7304767338fd58484da1fb9cd5e688e5688f40.zip |
Add the ability to compute exit values for complex loop using unanalyzable
operations. This allows us to compile this testcase:
int main() {
int h = 1;
do h = 3 * h + 1; while (h <= 256);
printf("%d\n", h);
return 0;
}
into this:
int %main() {
entry:
call void %__main( )
%tmp.6 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([4 x sbyte]* %.str_1, long 0, long 0), int 364 ) ; <int> [#uses=0]
ret int 0
}
This testcase was taken directly from 256.bzip2, believe it or not.
This code is not as general as I would like. Next up is to refactor it
a bit to handle more cases.
llvm-svn: 13019
Diffstat (limited to 'llvm/lib/Transforms/TransformInternals.cpp')
0 files changed, 0 insertions, 0 deletions