[PATCH] D136560: llvm-reduce: Try to turn calls into something else
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 16:03:02 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp:139
+ if (DataArg)
+ return B.CreateStore(DataArg, PtrArg, true);
+ return B.CreateLoad(CB->getType(), PtrArg, true);
----------------
aeubanks wrote:
> why volatile?
volatile acts more like a call with a pointer. It's treated as a pointer capture, has stricter scheduling. Plus we may be emitting a load/store from null in the default address space, so this makes that defined. If the volatile doesn't matter, the volatile reduction can remove it later
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp:194
+ case 3:
+ return B.CreateIntrinsic(Intrinsic::fshl, {CB->getType()}, Arguments);
+ default:
----------------
aeubanks wrote:
> IMO a call to an intrinsic is less reduced than a call to some arbitrary external function.
> Perhaps it's finally time to create a flag for reducing IR optimizing for codegen?
An intrinsic has known behavior, an arbitrary external call doesn't. From a semantics perspective, that's more understandable
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136560/new/
https://reviews.llvm.org/D136560
More information about the llvm-commits
mailing list