Open fishfacegit opened 10 months ago
Solved via:
expr_simp.enable_passes(ExpressionSimplifier.PASS_HIGH_TO_EXPLICIT)
ircfg.simplify(expr_simp)
How to resolve this vmcpu?
AttributeError Traceback (most recent call last)
Cell In[36], line 9
6 func.init_fc()
8 # IRCFG is imported, without the final "ret void"
----> 9 func.from_ircfg(ircfg, append_ret=False)
11 # Finish the function
12 func.builder.ret_void()
File [~/miniconda3/envs/miasm/lib/python3.12/site-packages/miasm/jitter/llvmconvert.py:1922](https://file+.vscode-resource.vscode-cdn.net/media/hadrian/int1TB/workspace/MasterArbeit/miasm/~/miniconda3/envs/miasm/lib/python3.12/site-packages/miasm/jitter/llvmconvert.py:1922), in LLVMFunction_IRCompilation.from_ircfg(self, ircfg, append_ret)
1920 for label, irblock in viewitems(ircfg.blocks):
1921 self.builder.position_at_end(self.get_basic_block_by_loc_key(label))
-> 1922 self.gen_irblock(irblock)
1924 # Branch the entry BBL on the IRCFG head
1925 self.builder.position_at_end(self.entry_bbl)
File [~/miniconda3/envs/miasm/lib/python3.12/site-packages/miasm/jitter/llvmconvert.py:1910](https://file+.vscode-resource.vscode-cdn.net/media/hadrian/int1TB/workspace/MasterArbeit/miasm/~/miniconda3/envs/miasm/lib/python3.12/site-packages/miasm/jitter/llvmconvert.py:1910), in LLVMFunction_IRCompilation.gen_irblock(self, irblock)
1908 attributes = [Attributes() for _ in range(len(irblock.assignblks))]
1909 instr_offsets = None
-> 1910 return super(LLVMFunction_IRCompilation, self).gen_irblock(
1911 instr_attrib, attributes, instr_offsets, irblock
1912 )
File [~/miniconda3/envs/miasm/lib/python3.12/site-packages/miasm/jitter/llvmconvert.py:1569](https://file+.vscode-resource.vscode-cdn.net/media/hadrian/int1TB/workspace/MasterArbeit/miasm/~/miniconda3/envs/miasm/lib/python3.12/site-packages/miasm/jitter/llvmconvert.py:1569), in LLVMFunction.gen_irblock(self, instr_attrib, attributes, instr_offsets, irblock)
1567 case2dst, case_value = self.expr2cases(src)
...
(...)
612 ]
613 )
AttributeError: 'LLVMContext_IRCompilation' object has no attribute 'vmcpu'
Hi,
i try to convert miasm ir to llvm ir for further optimization. Is there an easy way to implement missing operators such as FLAG_EQ_CMP?
Best Regards