This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Add a bisection point after instruction selection.
Needs ReviewPublic

Authored by aemerson on Nov 2 2021, 10:18 AM.

Details

Summary

This uses the bisection support in D113030.

Diff Detail

Event Timeline

aemerson created this revision.Nov 2 2021, 10:18 AM
aemerson requested review of this revision.Nov 2 2021, 10:18 AM

Hi Amara,

I like the approach but I wonder if we can avoid the BisectClient to trickle down to every optimization. (see inline comment)

Regarding the key for shouldPerformBisectAction, how do we handle the cases of optimizations running several times?
E.g., let say you want the first instance of instcombine to run, but not the second one. Same question if we want to run a specific combine, but not another one (when bisecting fast math optimizations for instance.)

Cheers,
-Quentin

llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp
310

Instead of pushing the BisectClient on every optimization, could we embedded this information within the IR itself?

What I have in mind is something similar to optnone, but that would control each optimization separately. Essentially optnone would be an equivalent of a 0xfffff on disabling all optimizations.