Hi,
Il 01/07/22 06:43, Zebediah Figura ha scritto:
I kind of wonder if this should be a lowering pass instead. It wouldn't apply to sm1, but it would (maybe?) be a bit easier to write, and it would apply to a hypothetical sm6 backend, if we indeed write our own instead of leveraging the Microsoft compiler.
Fine to leave it as is for now, I think, but food for thought.
I kind of thought the same, but then decided that at least for the time being this is not inappropriate. A lowering pass, in the current state, would generate longer code (it cannot inline the constant), at least by instruction number, and would likely require more code for all the bookkeeping. All of this, for no advantage I can see.
No problem with changing the approach in the future if a different balance is established.
Giovanni.