which global variables would have name collisions if they were not mangled,
and use this info to mangle them iff they would collide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2639 91177308-0d34-0410-b5e6-96231b3b80d8
1. Avoid printing *(&globalvariable), instead print globalvariable alone
as a special case.
2. Inline subexpressions into expressions as much as legal that preserves
execution characteristics of expressions. Now we get nice (but
over-parenthesized, oh well) things like:
ltmp_428_7 = spec__putc(((unsigned char )((bsBuff) >> 24)), (bsStream));
instead of five seperate instructions (bsBuff & bsStream are globals).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2587 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct global variable references
* Fix loads & stores with zero indices
* Do not emit an else part of a branch if there is no code (no phi node
and a fallthrough branch), makes code more readable to get:
if (l2_cond240) {
goto l13_bb10;
}
with no else{} branch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2583 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up generated code to not emit basic block labels and goto
instructions if they are unneccesary (for example, fall throughs)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2578 91177308-0d34-0410-b5e6-96231b3b80d8
* Print a newline after a malloc instruction
* Convert unprintable characters to x_ instead of _x so that we don't
generate identifiers that start with underscores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2577 91177308-0d34-0410-b5e6-96231b3b80d8
* Mangle names with only a prefix so that they are easier on the eyes.
* Put spaces around binary operators with low precedence to make them easier to read
* Don't prefix function names with &, although it's correct, it's unnecesary and
easier to read without it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2575 91177308-0d34-0410-b5e6-96231b3b80d8
have some hope of working right.
Function calls do not try to emit an lvalue if they return void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2569 91177308-0d34-0410-b5e6-96231b3b80d8