[llvm-dev] Manually Constructing LoopInfo via Dominator Tree

via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 15 11:25:37 PDT 2021


Hi,

I noticed one of the earlier posts 
(https://groups.google.com/g/llvm-dev/c/lVc2-0d2cRs/m/uwuOA_pXAgAJ) from 
llvm-dev that talked about "constructing loop info manually without any pass" 
by doing this:

              llvm::DominatorTree domTree{&func, func};
              llvm::LoopInfo loopInfo{&func, domTree};

However, when I try this in llvm 10.0, I get the following error:

  error: no matching function for call to 
‘llvm::DominatorTree::DominatorTree(<brace-enclosed initializer list>)’
              DominatorTree domTree{&F, F};


Am I doing something really silly here? or this manual hack no longer works?


Thanks,
Bodhi


More information about the llvm-dev mailing list