Go to file
Sanjay Patel 4805ce0b17 [InstCombine] don't try SimplifyDemandedInstructionBits from add/sub because it's slow and unlikely to succeed
Notably, no regression tests change when we remove these calls, and these are expensive calls.

The motivation comes from the general acknowledgement that the compiler is getting slower:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/109188.html
http://lists.llvm.org/pipermail/llvm-dev/2016-December/108279.html

And specifically the test case attached to PR32037:
https://bugs.llvm.org//show_bug.cgi?id=32037

Profiling the middle-end (opt) part of the compile:
$ ./opt -O2 row_common.bc -o /dev/null

...visitAdd and visitSub are near the top of the instcombine list, and the calls to SimplifyDemandedInstructionBits()
are high within each of those. Those calls account for 1%+ of the opt time in either debug or release profiles. And 
that's the rough win I see from this patch when testing opt built release from r295864 on an iMac with Haswell 4GHz
(model 4790K).

It seems unlikely that we'd be able to eliminate add/sub or change their operands given that add/sub normally affect
all bits, and the PR32037 example shows no IR difference after this change using -O2.

Also worth noting - the code comment in visitAdd:
// This handles stuff like (X & 254)+1 -> (X&254)|1
...isn't true. That transform is handled later with a call to haveNoCommonBitsSet().

Differential Revision: https://reviews.llvm.org/D30270

llvm-svn: 295898
2017-02-22 23:01:12 +00:00
clang [CodeGen] Add param info for ctors with ABI args. 2017-02-22 22:38:25 +00:00
clang-tools-extra Completion related fixes for clang-include-fixer.el. 2017-02-22 09:21:22 +00:00
compiler-rt Re-commit of r295318, which was reverted due to AArch64 flakiness. Moving the test to Darwin only. 2017-02-22 01:13:34 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Move BufferPtr into the block where it it being used 2017-02-12 21:33:49 +00:00
libcxx Revert "threading_support: make __thread_sleep_for be alertable" 2017-02-18 19:28:43 +00:00
libcxxabi [CMake][libcxxabi] Update the libc++ test module path 2017-02-18 04:37:59 +00:00
libunwind [libunwind][CMake] Use libc++ headers when available 2017-02-16 05:18:08 +00:00
lld Add a comment about thread safety. 2017-02-22 21:05:06 +00:00
lldb Changed builld-llvm.py to use .json files 2017-02-22 22:57:59 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm [InstCombine] don't try SimplifyDemandedInstructionBits from add/sub because it's slow and unlikely to succeed 2017-02-22 23:01:12 +00:00
openmp [OpenMP] Missing virtual destructor in KMPAffinity 2017-02-22 22:50:28 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [DeLICM] Add regression tests for DeLICM reject cases. 2017-02-22 15:14:08 +00:00