Adding new bb and conditional branch for string comparison #249
-
Hi all,
To perform a string comparison as shown above, first, we have the compare the pointers(pointer to "str1" and pointer to "str2"), if it fails then we have to call the rust side to compare two strings. Here we have to do few changes to the LLVM IR.
I have a problem where we should do this. After reading the BIR(before codegen) we can iterate through the bir package and find the place where we compare two string. At this point, we can inject the relevant changes to LLVM IR. Highly appreciate your input on this approach. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
@ayonam, please check this discussion. |
Beta Was this translation helpful? Give feedback.
-
The idiomatic approach will be to instead BBs in the instruction codegen scope. eg #284 |
Beta Was this translation helpful? Give feedback.
The idiomatic approach will be to instead BBs in the instruction codegen scope. eg #284