Question
Implement the basic liveness analysis as an LLVM pass, with the following specifications: - given a C function, your implementation finds the LiveOut sets for
Implement the basic liveness analysis as an LLVM pass, with the following specifications: - given a C function, your implementation finds the LiveOut sets for basic blocks in its CFG; - your implementation should be able to handle back edges, that is, an iterative algorithm or a worklist-based one should be used. - your implementation only needs to handle a basic scenario, where - all the variables are local variables; - all the variables are of primitive data types; - the operators in assignments only include +, -, *, / - the IR may include comparing and branching instructions, like icmp and br, which may also ``use variables (and ``define variables)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started