Add a return_at_end setting.
The flag guarantees that the generated function does not have any internal return instructions. If the function returns at all, the return must be the last instruction. For now just implement a verifier check for this property. When we get CFG simplifiers and block layout optimizations, they will need to heed the flag.
This commit is contained in:
@@ -28,6 +28,16 @@ enable_verifier = BoolSetting(
|
||||
|
||||
is_64bit = BoolSetting("Enable 64-bit code generation")
|
||||
|
||||
return_at_end = BoolSetting(
|
||||
"""
|
||||
Generate functions with at most a single return instruction at the
|
||||
end of the function.
|
||||
|
||||
This guarantees that functions do not have any internal return
|
||||
instructions. Either they never return, or they have a single return
|
||||
instruction at the end.
|
||||
""")
|
||||
|
||||
is_compressed = BoolSetting("Enable compressed instructions")
|
||||
|
||||
enable_float = BoolSetting(
|
||||
|
||||
Reference in New Issue
Block a user