[llvm-dev] question: access IR class Instruction from DAG SDValue (original) (raw)
陳韋任 via llvm-dev llvm-dev at lists.llvm.org
Sat Nov 25 18:10:09 PST 2017
- Previous message: [llvm-dev] question: access IR class Instruction from DAG SDValue
- Next message: [llvm-dev] question: access IR class Instruction from DAG SDValue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From SDNode and MachineInstr class, I see no link between them and IR/SDNode. The other places you can check are SelectionDAGBuilder [1] and InstrEmitter [1], which responsible for translating IR to SDNode, and SDNode to MachineInstr respectively.
I know you can retrieve the corresponding BasicBlock for a MachineBasicBlock, which is easy. However, since we will do lowering and combine during IR to SDNode transformation, I think it's hard to track the relationship. Not sure it's the same for SDNode to MachineInstr transformation, though.
[1] http://llvm.org/doxygen/classllvm_1_1SelectionDAGBuilder.html [2] http://llvm.org/doxygen/classllvm_1_1InstrEmitter.html
2017-11-26 8:58 GMT+08:00 Jonathan via llvm-dev <llvm-dev at lists.llvm.org>:
The llvm backend uses class Instruction in IR handle stage, create SDVaule and DAG in DAG translation stage and class MachineInstr in Machine instruction translation stage. Can I access class Instruction from DAG structure or stage, or access DAG and Instruction from MachineInstr structure or stage?
Jonathan
LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-- Wei-Ren Chen (陳韋任) Homepage: https://people.cs.nctu.edu.tw/~chenwj -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171126/b32c9e8a/attachment.html>
- Previous message: [llvm-dev] question: access IR class Instruction from DAG SDValue
- Next message: [llvm-dev] question: access IR class Instruction from DAG SDValue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]