search for: test_unused_reg

Displaying 1 result from an estimated 1 matches for "test_unused_reg".

Did you mean: test_unused_regs
2010 Jun 03
2
[LLVMdev] Unused argument registers can not be reused ?
...backend, with the 2.7 release as well as the svn head. For the msp430, the first four parameters of a function are passed thru registers. What I observe is that if those parameters are not used inside the function, those registers can not be used. For example, with the following C code: > cat test_unused_regs.c short a = 2; short b = 32; short r = 1024; void test(short w, short x, short y, short z) { r -= a+b; } I get the following assembly code for the test function after running thru clang: > clang -ccc-host-triple msp430-unknown-unknown -O2 -fomit-frame-pointer -S -o test_unused_regs.s test_u...