LLVM/llvm 358552llvm/trunk/test/Transforms/InstCombine icmp-shr-lt-gt.ll icmp.ll, llvm/trunk/test/Transforms/InstCombine/X86 x86-avx512.ll x86-vector-shifts.ll

Revert "Temporarily Revert "Add basic loop fusion pass.""

The reversion apparently deleted the test/Transforms directory.

Will be re-reverting again.

LLVM/llvm 358379llvm/trunk/lib/Passes PassBuilder.cpp PassRegistry.def, llvm/trunk/test/Transforms/SimplifyCFG ForwardSwitchConditionToPHI.ll branch-fold-threshold.ll

[NewPM] Add Option handling for SimplifyCFG

This patch enables passing options to SimplifyCFGPass via the passes pipeline.

Reviewers: chandlerc, fedor.sergeev, leonardchan, philip.pfaffe
Reviewed By: fedor.sergeev
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D60675

LLVM/llvm 316835llvm/trunk/include/llvm/Transforms Scalar.h, llvm/trunk/include/llvm/Transforms/Scalar SimplifyCFG.h

[SimplifyCFG] use pass options and remove the latesimplifycfg pass

This is no-functional-change-intended.

This is repackaging the functionality of D30333 (defer switch-to-lookup-tables) and 
D35411 (defer folding unconditional branches) with pass parameters rather than a named
"latesimplifycfg" pass. Now that we have individual options to control the functionality,
we could decouple when these fire (but that's an independent patch if desired). 

The next planned step would be to add another option bit to disable the sinking transform
mentioned in D38566. This should also make it clear that the new pass manager needs to
be updated to limit simplifycfg in the same way as the old pass manager.

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

LLVM/llvm 306867llvm/trunk/lib/Transforms/Utils SimplifyCFG.cpp, llvm/trunk/test/Transforms/SimplifyCFG/X86 switch_to_lookup_table.ll switch-covered-bug.ll

[SimplifyCFG] Update the name of switch generated lookup table.

This patch appends the name of the function to the switch generated lookup
table. This will ease the visual debugging in identifying the function the table
is generated from.

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

LLVM/llvm 298799llvm/trunk/include/llvm/Transforms Scalar.h, llvm/trunk/include/llvm/Transforms/Scalar SimplifyCFG.h

Split the SimplifyCFG pass into two variants.

The first variant contains all current transformations except
transforming switches into lookup tables. The second variant
contains all current transformations.

The switch-to-lookup-table conversion results in code that is more
difficult to analyze and optimize by other passes. Most importantly,
it can inhibit Dead Code Elimination. As such it is often beneficial to
only apply this transformation very late. A common example is inlining,
which can often result in range restrictions for the switch expression.

Changes in execution time according to LNT:
SingleSource/Benchmarks/Misc/fp-convert +3.03%
MultiSource/Benchmarks/ASC_Sequoia/CrystalMk/CrystalMk -11.20%
MultiSource/Benchmarks/Olden/perimeter/perimeter -10.43%
and a couple of smaller changes. For perimeter it also results 2.6%
a smaller binary.

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

LLVM/llvm 230794llvm/trunk/test/CodeGen/AArch64 arm64-vshift.ll arm64-vmul.ll, llvm/trunk/test/CodeGen/ARM 2009-07-18-RewriterBug.ll

[opaque pointer type] Add textual IR support for explicit type parameter to load 
instruction

Essentially the same as the GEP change in r230786.

A similar migration script can be used to update test cases, though a few more
test case improvements/changes were required this time around: (r229269-r229278)

import fileinput
import sys
import re

pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) 
*)\*($| 
*(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)")

for line in sys.stdin:
  sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line))

Reviewers: rafael, dexonsmith, grosser

Differential Revision: http://reviews.llvm.org/D7649

LLVM/llvm 230786llvm/trunk/test/CodeGen/AArch64 arm64-indexed-vector-ldst.ll, llvm/trunk/test/CodeGen/ARM 2009-07-18-RewriterBug.ll

[opaque pointer type] Add textual IR support for explicit type parameter to getelementptr 
instruction

One of several parallel first steps to remove the target type of pointers,
replacing them with a single opaque pointer type.

This adds an explicit type parameter to the gep instruction so that when the
first parameter becomes an opaque pointer type, the type to gep through is
still available to the instructions.

* This doesn't modify gep operators, only instructions (operators will be
  handled separately)

* Textual IR changes only. Bitcode (including upgrade) and changing the
  in-memory representation will be in separate changes.

* geps of vectors are transformed as:
    getelementptr <4 x float*> %x, ...
  ->getelementptr float, <4 x float*> %x, ...
  Then, once the opaque pointer type is introduced, this will ultimately look
  like:
    getelementptr float, <4 x ptr> %x
  with the unambiguous interpretation that it is a vector of pointers to float.

* address spaces remain on the pointer, not the type:

    [71 lines not shown]

LLVM/llvm 214253llvm/branches release_35, llvm/branches/release_35/test/Transforms/SimplifyCFG switch-table-bug.ll

Merging r213884:
------------------------------------------------------------------------
r213884 | mren | 2014-07-24 10:57:09 -0700 (Thu, 24 Jul 2014) | 1 line

Try to fix the bots again by moving test to X86 directory.
------------------------------------------------------------------------

LLVM/llvm 213884llvm/trunk/test/Transforms/SimplifyCFG switch-table-bug.ll, llvm/trunk/test/Transforms/SimplifyCFG/X86 switch-table-bug.ll

Try to fix the bots again by moving test to X86 directory.