assert((!OptForMinSize || MF.getFunction().hasOptSize()) && "OptForMinSize implies OptForSize"); SelectionDAGISel::runOnMachineFunction(MF); return true; } ./lib/Target/X86/X86ISelDAGToDAG.cpp中SelectionDAGISel::runOnMachineFunction→SelectAllBasicBlocks→SelectBasicBlock 基于DAG的instruction ...
auto expr_symbol = g_jit->findSymbol("__anon_expr"); assert(expr_symbol && "Function not found"); // 获取符号地址,强制转换为函数指针 (double (*)())(无参数,并返回一个 double) double (*fp)() = (double (*)())(intptr_t)expr_symbol.getAddress(); fprintf(stderr, "Evaluated to ...
Opc = xxx::ST; assert(Opc&& "Register class not handled!"); BuildMI(MBB, I, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FI).addImm(Offset).addMemOperand(MMO); } 这里直接调用了BuildMI的成员函数addReg, 将SrcReg给存到堆栈里面去。 7.6.4 xxxAnalyzement[b191...
AI代码解释 staticvoidHandleTopLevelExpression(){// Evaluate a top-level expression into an anonymous function.if(auto FnAST=ParseTopLevelExpr()){if(FnAST->codegen()){// JIT the module containing the anonymous expression, keeping a handle so// we can free it later.autoH=TheJIT->addModule(...
LegalizeAction Action){assert(Op <array_lengthof(OpActions[0]) &&"Table isn't big enough!"); OpActions[(unsigned)VT.SimpleTy][Op] = Action; }/// Return how this operation should be treated: either it is legal, needs to/// be promoted to a larger size, needs to be expanded to ...
LLVM_ATTRIBUTE_ALWAYS_INLINEstaticinlineuint64_tGetVBR(uint64_tVal,constunsignedchar*MatcherTable,unsigned&Idx){assert(Val >=128&&"Not a VBR"); Val &=127;// Remove first vbr bit.unsignedShift =7;uint64_tNextBits;do{ NextBits = MatcherTable[Idx++]; ...
(move || x.load(Relaxed)); let r2 = j2.join().unwrap(); r2 == 11 } fn assert_once(f: fn() -> bool) { assert!(std::iter::repeat_with(|| f()).take(100).any(|x| x)); } pub fn main() { assert_once(relaxed); assert_once(seq_cst); assert_once(|| initialization_...
static_assert(ilist_detail::check_options<Options...>::value, "Unrecognized node option!"); }; namespace ilist_detail { /// An access class for ilist_node privateAPI. /// /// This gives access to the private partsof ilist nodes. Nodes for an ilist ...
static_assert(std::is_trivially_destructible<T>::value, "T must be trivially destructible!"); private: constImmutableListImpl<T>*X; public: // This constructor should normally only be called by ImmutableListFactory<T>. // There may be cases, however, when one needs to extract the internal...
LLVM笔记(12)-指令选择(四)legalize 本节介绍指令选择中legalize的概念, 为中端IR精确匹配机器指令需要同时检查操作符与操作数, 在正式指令选择前对不合法的操作符或操作数作出转换的过程即legalize.通常情况下给定⼀个后端架构其⽀持的指令集:1. 不⼀定能⽀持表达所有中端IR的操作. ⼀个显⽽易见的...