[PATCH] D11306: Constant folding support for load from GlobalAlias
David Majnemer
david.majnemer at gmail.com
Fri Jul 17 16:14:15 PDT 2015
majnemer accepted this revision.
majnemer added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/Analysis/ConstantFolding.cpp:535
@@ -534,1 +534,3 @@
+ if (GlobalAlias *GA = dyn_cast<GlobalAlias>(C)) {
+ if (GA->getAliasee() && !GA->mayBeOverridden())
----------------
majnemer wrote:
> No need for the braces.
You can use `auto` for the LHS.
================
Comment at: lib/Analysis/ConstantFolding.cpp:535-538
@@ -534,1 +534,6 @@
+ if (GlobalAlias *GA = dyn_cast<GlobalAlias>(C)) {
+ if (GA->getAliasee() && !GA->mayBeOverridden())
+ return ConstantFoldLoadFromConstPtr(GA->getAliasee(), DL);
+ }
+
----------------
No need for the braces.
http://reviews.llvm.org/D11306
More information about the llvm-commits
mailing list