Prefix all IR classes with "IR"
MatthewKosloski opened this issue · comments
Currently, both IR generation classes, IRGenVisitor
and IRProgram
, are prefixed with IR
. Similarly, the IR addressing and IR instruction classes should also conform to this naming convention.
The reason for this naming convention is so IR classes can be easily distinguished from x86_64 classes. For example, both the ir package and the x86_64.pc.linux package have the same directory structure. This makes sense as they are both responsibility for converting programs from one language to another.
This name change will help with readability in backends that make use of the ir
package. For example, the x86_64-pc-linux
backend's code generator converts an IR program to an x86_84 assembly program and makes heavy use of the ir
package. Since these packages have classes with similar names (e.g., Address
), it has led to some confusion. For example, in the gen(BinaryInst inst)
method here, there is both an Address
class and an X86Address
class. I think it would be more clear if Address
were named IRAddress
.
Resolved by 032ca80