[PATCH] [AArch64] Add pass to enable additional comparison optimizations by CSE
sdmitrouk at accesssoftek.com
Tue Aug 26 11:07:41 PDT 2014
> Is this strictly target-specific?
I guess not, other targets can benefit of similar optimizations as well.
It depends on how lowering is done for that targets. E.g. on x86_64 it
is fine as is, although there is some code to handle similar
cases of logical operations (which wasn't called in my tests). Some
other targets might be in the same situation as AArch64.
One possible generalization is to add target-independent "driver"
pass, which will operate on machine blocks, say, via new methods of
TargetInstrInfo. Such pass would contain only main orchestration
logic (e.g. main loop). Actually, not that much code to share among
different targets. Is it enough to create target-independent pass? If
yes, I'll file a bug.
More information about the llvm-commits