[PATCH] Don't create instructions in CFLAliasAnalysis. NFC

Pete Cooper peter_cooper at apple.com
Wed Jun 10 17:24:54 PDT 2015


Hi Hal, George

The CFLAA code currently calls ConstantExpr::getAsInstruction which creates an instruction from a constant expr.

We then pass that instruction to the InstVisitor to analyze it.

Its not necessary to create these instructions as we can just cast from Constant to Operator in the visitor.  This is how other InstVisitor’s such as SelectionDAGBuilder handle ConstantExpr.

This should provide a small speed improvement to this pass, but i’m actually doing this as an effort to devirtualize Value.  This just happened to come up in that patch sequence.

Cheers,
Pete

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cfl.patch
Type: application/octet-stream
Size: 4002 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150610/2ae5faf2/attachment.obj>


More information about the llvm-commits mailing list