I had to move code around and turn a static function into a method to get
access to Subtarget, but the only "real" change is the extra check for
!Subtarget->slowIncDec().
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/Target/X86/X86ISelDAGToDAG.cpp | ||
---|---|---|
1711 | Can you keep this static and pass in the Subtarget? |
lib/Target/X86/X86ISelDAGToDAG.cpp | ||
---|---|---|
1711 | I could easily do that. I don't see how exactly it would be better, could you explain it to me ? |
lib/Target/X86/X86ISelDAGToDAG.cpp | ||
---|---|---|
1711 | It makes it easier to understand the side-effects that the function can have: it can't access or modify any of the class' internals. It makes it harder to inadvertently add things like this to the function: you have to pass them in as parameters. |
Can you keep this static and pass in the Subtarget?