unison-code / unison

Unison's source code
http://unison-code.github.io/
Other
104 stars 17 forks source link

Unused liveins are not killed #23

Open martin-kjellin opened 7 years ago

martin-kjellin commented 7 years ago

Consider this MIR file (for Hexagon):

--- | ; ModuleID = (...) ...

name: minimal body: | bb.0: liveins: %r2, %r4 exit %0 = COPY %r4 %1 = COPY %r2

...

I would expect the liveins to get killed, since they are not really used in the function (and thus not really live), but they are not. Linting gives the following error messages: allTemporariesUsed: t0:r2 is not used allTemporariesUsed: t1:r4 is not used

If the COPY instructions are left out, things work as expected.