Fixes inconsistency in PerfHintAnalysis while using opaque
pointers. Opaque pointers got rid of bitcasts that affected
both MemoryBound and WaveLimiterHint calculation as
InstCost will be different.
I'm pretty sure this skips a lot more casts.
This also looks backwards. Opaque pointers avoid a lot of bitcasts, not introduce them
Probably shouldn't count free instructions here. Rather than inventing a new cost counting, can we use TTI costs?
This is adding a new test with typed pointers
Updated bitcast check.
How do we use that cost model here? We don't have IndirectAccessCost, isLargeStrideCost, etc defined there.
I can see this help get the same results for typed and opaque pointers, but in the direction that hurts the case you're looking at?
All tests need to be updated to use opaque pointers. Typed pointers are off by default and are only still around because so many tests need to be updated
If you're going to directly check the debug output, you need REQUIRES: asserts
This is the wrong way to switch this. You need to textually replace all the pointers in the test. You can run https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34, although that should be in a separate change from any functional patch
Call getInstructionCost from here? You don't need to push all the logic here into TTI