[PATCH] D28578: [GlobalISel] correctly record PHI sources coming from switch instructions
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 10:01:03 PST 2017
qcolombet added a comment.
Hi Tim,
Looks mostly good to me, the only thing I think we miss is clearing the map for the edges at the end of the function.
Nothing incorrect, just wasted memory :).
Cheers,
-Quentin
================
Comment at: include/llvm/CodeGen/GlobalISel/IRTranslator.h:405
+ /// represented simply by the IR-level CFG.
+ void addMachineCFGPred(CFGEdge Edge, MachineBasicBlock *NewPred);
+
----------------
const CFGEdge &, MachineBasicBlock &
================
Comment at: include/llvm/CodeGen/GlobalISel/IRTranslator.h:408
+ /// Returns the Machine IR predecessors for the given IR CFG edge. Usually
+ /// this is just the single MachineBasicBlock corresponding to the predecesso
+ /// in the IR. More complex lowering can result in multiple MachineBasicBlocks
----------------
rovka wrote:
> Typo: predecessor
typo: predecessor
================
Comment at: include/llvm/CodeGen/GlobalISel/IRTranslator.h:411
+ /// preceding the original though (e.g. switch instructions).
+ ArrayRef<MachineBasicBlock *> getMachinePredBBs(CFGEdge Edge) {
+ auto RemappedEdge = MachinePreds.find(Edge);
----------------
const CFGEdge &?
Repository:
rL LLVM
https://reviews.llvm.org/D28578
More information about the llvm-commits
mailing list