[PATCH] D16795: WholeProgramDevirt: introduce.
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 9 13:15:25 PST 2016
joker.eph accepted this revision.
joker.eph added a comment.
LGTM, unless Pete has more changes to ask pre-commit?
================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:644
@@ +643,3 @@
+ // whole-program devirtualization and bitset lowering.
+ PM.add(createGlobalDCEPass());
+
----------------
I didn't expect internalize alone to expose such opportunities, but yes thinking more about it I can foresee that.
================
Comment at: lib/Transforms/IPO/WholeProgramDevirt.cpp:603
@@ +602,3 @@
+ return true;
+}
+
----------------
I still regret that the design of the IR representation haven't been considered any further. In many other cases such a feature would be block on such consideration (Technical debt). As much as this is not widespread, it still involves changes in the frontend, so it is not completly isolated. It seems to me that CFI acts as a Trojan horse here. It is not clear to me if the actual "bitset" has any other justification for its existence that being the clever and efficient *runtime* system that CFI is using. Now I can be totally wrong and it is possible that when CFI was integrated, the IR representation was carefully designed independently of the actual CFI runtime, I just don't have time to dig in the history.
http://reviews.llvm.org/D16795
More information about the llvm-commits
mailing list