Added support for running GC profiller.

This commit is contained in:
Samuel Hammersberg 2023-04-18 15:28:03 +02:00
parent b5384bf2c3
commit 9ffcbf66b9
2 changed files with 7 additions and 1 deletions

View file

@ -127,7 +127,11 @@ compileScs (MIR.DData (MIR.Data typ ts) : xs) = do
compileScs xs
firstMainContent :: [LLVMIr]
firstMainContent = [UnsafeRaw "call void @cheap_init()\n"]
firstMainContent =
[ UnsafeRaw "%prof = call ptr @cheap_the()\n"
, UnsafeRaw "call void @cheap_set_profiler(ptr %prof, i1 true)\n"
, UnsafeRaw "call void @cheap_init()\n"
]
lastMainContent :: LLVMValue -> [LLVMIr]
lastMainContent var =