search for: getasinstruct

Displaying 4 results from an estimated 4 matches for "getasinstruct".

2018 May 31
1
Proper way to lower all ConstantExprs?
Hi: For my own Transform passes I need to lower all ConstantExpressions into Instructions in order to conveniently analyze the use-def def-use chains and operand comparisons. Could anyone possibly kindly share some insights on if there is any standard way to do this without crafting my own implementation and if not, should we add this feature into LLVM upstream? Zhang
2015 Jan 26
0
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
Inline George > On Jan 26, 2015, at 1:05 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > > George, given that, can you just build constexpr handling (it's not as easy as you think) as a separate funciton and have it use it in the right places? Will do. :) > FWIW, my current list of CFLAA issues is: > > 1. Unknown values (results from ptrtoint, incoming
2015 Jan 26
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
George, given that, can you just build constexpr handling (it's not as easy as you think) as a separate funciton and have it use it in the right places? FWIW, my current list of CFLAA issues is: 1. Unknown values (results from ptrtoint, incoming pointers, etc) are not treated as unknown. These should be done through graph edge (so that they can be one way, otherwise, you will unify
2015 Jan 30
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...lt;Edge> &Results) { + SmallVector<ConstantExpr*, 4> Worklist; + Worklist.push_back(&CExprToCollapse); + + SmallVector<Edge, 8> ConstexprEdges; + while (!Worklist.empty()) { + auto* CExpr = Worklist.pop_back_val(); + std::unique_ptr<Instruction> Inst(CExpr->getAsInstruction()); + + ConstexprEdges.clear(); + argsToEdges(Analysis, Inst.get(), ConstexprEdges); + for (auto& Edge : ConstexprEdges) { + assert(Edge.From == Inst.get() && + "Expected ConstantExpr edge `From` to evaluate to the ConstantExpr"); + // Inst doesn...