[PATCH] D28627: [PM] Introduce an analysis set used to preserve all analyses over a function's CFG when that CFG is unchanged.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 14 20:17:20 PST 2017


chandlerc added a comment.

I also imagined using very verbose / explicit names. But I'm happy (enough) with Justin's nice, short name. I don't think it'll ever become really ambiguous and it needs to be short given how much it gets used.



================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:3180
   PreservedAnalyses PA;
+  PA.preserveSet<CFGAnalyses>();
   PA.preserve<AAManager>();
----------------
silvas wrote:
> Is this actually true? I've seen InstCombine rewrite a switch. I know we *want* it to be true, but I'm not sure if it is right now.
The question is whether it preserves the edge relationships and the set of BBs.

It can fold constants into branch conditions and otherwise restructure the *values* in a switch all it wants.

But more importantly perhaps, this matches exactly what the legacy PM does. So if there are bugs here, they exactly match existing bugs. =] I don't want the new PM to diverge here.


https://reviews.llvm.org/D28627





More information about the llvm-commits mailing list