[PATCH] D14005: Use the new 'InvariantInfo' property to eliminate redundant loads with --instcombine
Nick Lewycky via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 8 16:00:40 PST 2015
nlewycky added a comment.
Patch needs testcases.
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:1961
@@ +1960,3 @@
+
+ // If this is a paired invariant_start, then erase its invariant_end,
+ // and all of its other uses.
----------------
Why bother? We're guaranteed to visit the invariant.start and the invariant.end, right? Just handle invariant_start by replacing it with an undef, and let the generic "EraseInstFromFunction" call (below on line 1975) handle the invariant.end?
I think the other case is an invariant applying to a bitcast instead of to the original object. Does this function work in that case? (Does it even pass isAllocSiteRemovable?)
http://reviews.llvm.org/D14005
More information about the llvm-commits
mailing list