Go to file
Tobias Grosser 8ef834c712 [InstCombine] Minor cleanup of cast simplification code [NFC]
Summary:
This patch cleans up parts of InstCombine to raise its compliance with the LLVM coding standards and to increase its readability. The changes and according rationale are summarized in the following:

- Rename `ShouldOptimizeCast()` to `shouldOptimizeCast()` since functions should start with a lower case letter.

- Move `shouldOptimizeCast()` from InstCombineCasts.cpp to InstCombineAndOrXor.cpp since it's only used there.

- Simplify interface of `shouldOptimizeCast()`.

- Minor code style adaptions in `shouldOptimizeCast()`.

- Remove the documentation on the function definition of `shouldOptimizeCast()` since it just repeats the documentation on its declaration. Also enhance the documentation on its declaration with more information describing its intended use and make it doxygen-compliant.

- Change a comment in `foldCastedBitwiseLogic()` from `fold (logic (cast A), (cast B)) -> (cast (logic A, B))` to `fold logic(cast(A), cast(B)) -> cast(logic(A, B))` since the surrounding comments use this format.

- Remove comment `Only do this if the casts both really cause code to be generated.` in `foldCastedBitwiseLogic()` since it just repeats parts of the documentation of `shouldOptimizeCast()` and does not help to improve readability.

- Simplify the interface of `isEliminableCastPair()`.

- Removed the documentation on the function definition of `isEliminableCastPair()` which only contained obvious statements about its implementation. Instead added more general doxygen-compliant documentation to its declaration.

- Renamed parameter `DoXform` of `transformZExtIcmp()` to `DoTransform` to make its intention clearer.

- Moved documentation of `transformZExtIcmp()` from its definition to its declaration and made it doxygen-compliant.

Reviewers: vtjnash, grosser

Subscribers: majnemer, llvm-commits

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

Contributed-by: Matthias Reisinger
llvm-svn: 275964
2016-07-19 09:06:08 +00:00
clang [driver][mips] Support MIPS targets in modern Android NDK 2016-07-19 07:09:48 +00:00
clang-tools-extra [clang-rename] add support for overridden functions 2016-07-19 07:37:43 +00:00
compiler-rt [esan|wset] Fix flaky sampling tests 2016-07-19 05:06:48 +00:00
debuginfo-tests
libclc R600: Use new barrier intrinsic 2016-07-18 18:42:17 +00:00
libcxx Bump version # to 4.0.0 2016-07-18 20:27:19 +00:00
libcxxabi Fix arc config to use https 2016-07-18 02:05:52 +00:00
libunwind [PATCH] [libunwind][ehabi] Use early returns where possible. 2016-07-08 12:13:31 +00:00
lld Reformat comment from 3 to 2 lines. NFC. 2016-07-19 07:42:07 +00:00
lldb Ignore clang-module-cache directories that may be created 2016-07-19 02:37:07 +00:00
llgo Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
llvm [InstCombine] Minor cleanup of cast simplification code [NFC] 2016-07-19 09:06:08 +00:00
openmp http://reviews.llvm.org/D22134: Implementation of OpenMP 4.5 nonmonotonic schedule modifier 2016-07-11 10:44:57 +00:00
parallel-libs Set up arcconfig for parallel-libs project 2016-07-18 17:26:26 +00:00
polly test: Add missing 'REQUIRES' line 2016-07-19 07:47:27 +00:00