What is Backpatching?

While producing three address codes of if — then — else statements, we may not know the labels where control must go by following the go-to statements in a single pass. We can therefore use two passes. In the first pass, we can generate labels. Also, we can generally go to statements with unspecified destinations. In the second pass, we can fill these unspecified destinations with proper labels. This technique of filling labels is known as backpatching.

Leave a Reply