Daily Archives: February 14, 2025

LLVM Exercise VII

So why does the code produced in the last exercise contain the labels .LBB0_2 and .LBB0_3 but no .LBB0_1? Well that is because I have added a code generation pass that deletes useless jumps like: JNC .LBB0_1 .LBB0_1: Code snippets: void HP41MCODEPassConfig::addPreEmitPass() { addPass(new RemoveUselessJMP()); } … bool RemoveUselessJMP::runOnMachineBasicBlock( MachineBasicBlock &MBB, MachineBasicBlock &MBBN) { bool … Continue reading »

Categories: Uncategorized | Comments Off on LLVM Exercise VII