Tweak ConstantHoisting on X86

Michael Zolotukhin mzolotukhin at apple.com
Wed Apr 30 06:11:16 PDT 2014


Hi,

ConstantHoisting currently could lead to inefficient code on X86 (the test is attached). Recently Juergen has solved a similar issue on ARM64, so these changes do the same on X86. The change is to disallow hoisting of constants from shift instructions.

While the original issue that I’m fixing is on X86, the same problem could happen on other platforms. So, I prepared two versions of the patch: the first one touches only X86, and the other changes ConstantHoisting itself. Personally, I’d prefer the X86-only version, because I don’t know much about other targets affected. Any thoughts on this?

There is one more important detail. With this change test CodeGen/X86/remat-invalid-liveness.ll stops to check what it’s supposed to check. Right now I just silenced it, but we probably want to rewrite and make it less fragile. Quentin, could you please take a look and help me with that?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConstantHoisting-generic.patch
Type: application/octet-stream
Size: 2403 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140430/621ff4d6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConstantHoisting-x86.patch
Type: application/octet-stream
Size: 1859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140430/621ff4d6/attachment-0001.obj>
-------------- next part --------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ll
Type: application/octet-stream
Size: 419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140430/621ff4d6/attachment-0002.obj>
-------------- next part --------------


Thanks,
Michael




More information about the llvm-commits mailing list