search for: dosmth

Displaying 3 results from an estimated 3 matches for "dosmth".

2019 Jun 02
2
Optimizing Compare instruction selection
...icular case that causes LLVM to stop with an assertion. Apparently LLVM tries to use the SR (Status Register) register as a general purpose one, which is not allowed in my architecture. The problem exists even before I added the referred optimisations. The code that causes the problem is this: int doSmth( int y ); int test( int y ) { int neg = y < 0; if ( neg ) y = - y; int rv = doSmth( y ); return neg ? - rv : rv; } Apparently, LLVM attempts to physically use the result of a CMP instruction through a function call by storing it on a temporary register. This is found before t...
2019 Jun 05
2
Optimizing Compare instruction selection
...that causes LLVM to stop with an assertion. Apparently LLVM tries to use the SR (Status Register) register as a general purpose one, which is not allowed in my architecture. The problem exists even before I added the referred optimisations. The code that causes the problem is this: > > int doSmth( int y ); > > int test( int y ) > { > int neg = y < 0; > if ( neg ) > y = - y; > > int rv = doSmth( y ); > > return neg ? - rv : rv; > } > > Apparently, LLVM attempts to physically use the result of a CMP instruction through a function...
2019 Jun 01
2
Optimizing Compare instruction selection
I attempt to optimize the use of the ‘CMP’ instruction on my architecture by removing the instruction instances where the Status Register already had the correct status flags. The cmp instruction in my architecture is the typical one that compares two registers, or a register with an immediate, and sets the Status Flags accordingly. I implemented my ‘cmp’ instruction in LLVM by custom lowering