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.
|60,040 ms||x64 debian > libFuzzer.libFuzzer::minimize_crash.test|
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/fuzzer -m64 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/fuzzer/NullDerefTest.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/Output/minimize_crash.test.tmp-NullDerefTest
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