[PATCH] D149291: GlobalOpt: Drop code for handling pointer bitcasts
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 26 13:43:39 PDT 2023
arsenm created this revision.
Herald added subscribers: hoy, ormris, hiraditya.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
https://reviews.llvm.org/D149291
Files:
llvm/lib/Transforms/IPO/GlobalOpt.cpp
Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp
===================================================================
--- llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -777,14 +777,6 @@
UI = V->user_begin();
}
}
- } else if (CastInst *CI = dyn_cast<CastInst>(I)) {
- Changed |= OptimizeAwayTrappingUsesOfValue(CI,
- ConstantExpr::getCast(CI->getOpcode(),
- NewV, CI->getType()));
- if (CI->use_empty()) {
- Changed = true;
- CI->eraseFromParent();
- }
} else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
// Should handle GEP here.
SmallVector<Constant*, 8> Idxs;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149291.517305.patch
Type: text/x-patch
Size: 776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230426/b46d64ca/attachment.bin>
More information about the llvm-commits
mailing list