a better trial

This commit is contained in:
2024-10-22 14:27:40 +00:00
parent 722c1373ac
commit edb88a8111
15 changed files with 58 additions and 445 deletions

View File

@ -158,7 +158,7 @@ bool GetCollectionsIsSame(const Container &a, const Container &b, Compare comp =
return ita == a.end() && itb == b.end();
}
CFGType BuildCFGForFunction(const std::shared_ptr<FunctionDefItem> &func);
CFGType BuildCFGForFunction(const std::shared_ptr<FunctionDefItem> &func, bool remove_poison_entry = false);
// RISC-V calling convention compatible
const static std::vector<std::string> held_tmp_regs = {"x28", "x29", "x30", "x31"};

View File

@ -137,6 +137,7 @@ class IRClassInfo {
alread_arranged = true;
size_t cur_pos = 0;
size_t align_size = 1;
class_size_after_align = 0;
for (size_t cur_size : member_var_size) {
if (cur_size != 1 && cur_size != 4) throw std::runtime_error("Invalid member variable size");
if (cur_pos % cur_size == 0) {