AbortedChanges

Summary

  1. [CodeGen] Replace -max-jump-table-size with -max-jump-table-targets Modern processors predict the targets of an indirect branch regardless of the size of any jump table used to glean its target address. Moreover, branch predictors typically use resources limited by the number of actual targets that occur at run time. This patch changes the semantics of the option `-max-jump-table-size` to limit the number of different targets instead of the number of entries in a jump table. Thus, it is now renamed to `-max-jump-table-targets`. Before, when `-max-jump-table-size` was specified, it could happen that cluster jump tables could have targets used repeatedly, but each one was counted and typically resulted in tables with the same number of entries. With this patch, when specifying `-max-jump-table-targets`, tables may have different lengths, since the number of unique targets is counted towards the limit, but the number of unique targets in tables is the same, but for the last one containing the balance of targets. Differential revision: https://reviews.llvm.org/D60295
  2. [LangRef] Clarify absence of rounding guarantees for fmuladd. During the review of D67434, it was recommended to make fmuladd's behavior more explicit. D67434 depends on this interpretation. Reviewers: efriedma, jfb, reames, scanon, lebedev.ri, spatel Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D67552
  3. Re-land r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName Reverted in r372880 due to the test failure. Also contains a fix that adjusts printQualifiedName to return the same results as before in case of anonymous function locals and parameters.
  4. [clangd] Change constness of parameters to findExplicitRefs Summary: Recursive AST requires non-const ast nodes, but it doesn't really mutate them. In addition to that, in clangd we mostly have const ast nodes. So it makes sense to move the const_cast into callee rather than having it at every caller in the future. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68027
  5. [DAGCombiner] add one-use restriction to vector transform with cheap extract We might be able to do better on the example in the test, but in general, we should not scalarize a splatted vector binop if there are other uses of the binop. Otherwise, we can end up with code as we had - a scalar op that is redundant with a vector op.
  6. [PatternMatch] Make m_Br more flexible, add matchers for BB values. Currently m_Br only takes references to BasicBlock*, which limits its flexibility. For example, you have to declare a variable, even if you ignore the result or you have to have additional checks to make sure the matched BB matches an expected one. This patch adds m_BasicBlock and m_SpecificBB matchers, which can be used like the existing matchers for constants or values. I also had a look at the existing uses and updated a few. IMO it makes the code a bit more explicit. Reviewers: spatel, craig.topper, RKSimon, majnemer, lebedev.ri Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D68013
  7. [x86] add test for multi-use scalarization of vector binop; NFC
  8. [TargetInstrInfo] Let findCommutedOpIndices take const MachineInstr& Neither the base implementation of findCommutedOpIndices nor any in-tree target modifies the instruction passed in and there is no reason why they would in the future. Committed on behalf of @hvdijk (Harald van Dijk) Differential Revision: https://reviews.llvm.org/D66138
  9. [PatternMatch] Generalize brc_match (NFC). Preparation for D68013.
Revision 372893 by evandro:
[CodeGen] Replace -max-jump-table-size with -max-jump-table-targets

Modern processors predict the targets of an indirect branch regardless of
the size of any jump table used to glean its target address.  Moreover,
branch predictors typically use resources limited by the number of actual
targets that occur at run time.

This patch changes the semantics of the option `-max-jump-table-size` to limit
the number of different targets instead of the number of entries in a jump
table.  Thus, it is now renamed to `-max-jump-table-targets`.

Before, when `-max-jump-table-size` was specified, it could happen that
cluster jump tables could have targets used repeatedly, but each one was
counted and typically resulted in tables with the same number of entries.
With this patch, when specifying `-max-jump-table-targets`, tables may have
different lengths, since the number of unique targets is counted towards the
limit, but the number of unique targets in tables is the same, but for the
last one containing the balance of targets.

Differential revision: https://reviews.llvm.org/D60295
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h (diff)llvm.src/include/llvm/CodeGen/BasicTTIImpl.h
The file was modified/llvm/trunk/include/llvm/CodeGen/SwitchLoweringUtils.h (diff)llvm.src/include/llvm/CodeGen/SwitchLoweringUtils.h
The file was modified/llvm/trunk/include/llvm/CodeGen/TargetLowering.h (diff)llvm.src/include/llvm/CodeGen/TargetLowering.h
The file was modified/llvm/trunk/lib/CodeGen/SwitchLoweringUtils.cpp (diff)llvm.src/lib/CodeGen/SwitchLoweringUtils.cpp
The file was modified/llvm/trunk/lib/CodeGen/TargetLoweringBase.cpp (diff)llvm.src/lib/CodeGen/TargetLoweringBase.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp (diff)llvm.src/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp (diff)llvm.src/lib/Target/AArch64/AArch64Subtarget.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h (diff)llvm.src/lib/Target/AArch64/AArch64Subtarget.h
The file was modified/llvm/trunk/test/CodeGen/AArch64/max-jump-table.ll (diff)llvm.src/test/CodeGen/AArch64/max-jump-table.ll
Revision 372892 by fhahn:
[LangRef] Clarify absence of rounding guarantees for fmuladd.

During the review of D67434, it was recommended to make fmuladd's
behavior more explicit. D67434 depends on this interpretation.

Reviewers: efriedma, jfb, reames, scanon, lebedev.ri, spatel

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D67552
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/LangRef.rst (diff)llvm.src/docs/LangRef.rst
Revision 372889 by ibiryukov:
Re-land r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

Reverted in r372880 due to the test failure.
Also contains a fix that adjusts printQualifiedName to return the same results as before in
case of anonymous function locals and parameters.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/AST/Decl.h (diff)clang.src/include/clang/AST/Decl.h
The file was modified/cfe/trunk/lib/AST/Decl.cpp (diff)clang.src/lib/AST/Decl.cpp
The file was modified/cfe/trunk/unittests/AST/NamedDeclPrinterTest.cpp (diff)clang.src/unittests/AST/NamedDeclPrinterTest.cpp
Revision 372888 by kadircet:
[clangd] Change constness of parameters to findExplicitRefs

Summary:
Recursive AST requires non-const ast nodes, but it doesn't really
mutate them. In addition to that, in clangd we mostly have const ast nodes. So
it makes sense to move the const_cast into callee rather than having it at every
caller in the future.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68027
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/FindTarget.cpp (diff)clang-tools-extra.src/clangd/FindTarget.cpp
The file was modified/clang-tools-extra/trunk/clangd/FindTarget.h (diff)clang-tools-extra.src/clangd/FindTarget.h
Revision 372886 by spatel:
[DAGCombiner] add one-use restriction to vector transform with cheap extract

We might be able to do better on the example in the test,
but in general, we should not scalarize a splatted vector
binop if there are other uses of the binop. Otherwise, we
can end up with code as we had - a scalar op that is
redundant with a vector op.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/scalarize-fp.ll (diff)llvm.src/test/CodeGen/X86/scalarize-fp.ll
Revision 372885 by fhahn:
[PatternMatch] Make m_Br more flexible, add matchers for BB values.

Currently m_Br only takes references to BasicBlock*, which limits its
flexibility. For example, you have to declare a variable, even if you
ignore the result or you have to have additional checks to make sure the
matched BB matches an expected one.

This patch adds m_BasicBlock and m_SpecificBB matchers, which can be
used like the existing matchers for constants or values.

I also had a look at the existing uses and updated a few. IMO it makes
the code a bit more explicit.

Reviewers: spatel, craig.topper, RKSimon, majnemer, lebedev.ri

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D68013
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/IR/PatternMatch.h (diff)llvm.src/include/llvm/IR/PatternMatch.h
The file was modified/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (diff)llvm.src/lib/Analysis/ScalarEvolutionExpander.cpp
The file was modified/llvm/trunk/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp (diff)llvm.src/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (diff)llvm.src/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modified/llvm/trunk/unittests/IR/PatternMatch.cpp (diff)llvm.src/unittests/IR/PatternMatch.cpp
Revision 372883 by spatel:
[x86] add test for multi-use scalarization of vector binop; NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/X86/scalarize-fp.ll (diff)llvm.src/test/CodeGen/X86/scalarize-fp.ll
Revision 372882 by rksimon:
[TargetInstrInfo] Let findCommutedOpIndices take const MachineInstr&

Neither the base implementation of findCommutedOpIndices nor any in-tree target modifies the instruction passed in and there is no reason why they would in the future.

Committed on behalf of @hvdijk (Harald van Dijk)

Differential Revision: https://reviews.llvm.org/D66138
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/TargetInstrInfo.h (diff)llvm.src/include/llvm/CodeGen/TargetInstrInfo.h
The file was modified/llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp (diff)llvm.src/lib/CodeGen/TargetInstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp (diff)llvm.src/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.h (diff)llvm.src/lib/Target/AMDGPU/SIInstrInfo.h
The file was modified/llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp (diff)llvm.src/lib/Target/Mips/MipsInstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/Mips/MipsInstrInfo.h (diff)llvm.src/lib/Target/Mips/MipsInstrInfo.h
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp (diff)llvm.src/lib/Target/PowerPC/PPCInstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h (diff)llvm.src/lib/Target/PowerPC/PPCInstrInfo.h
The file was modified/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (diff)llvm.src/lib/Target/X86/X86InstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86InstrInfo.h (diff)llvm.src/lib/Target/X86/X86InstrInfo.h
Revision 372881 by fhahn:
[PatternMatch] Generalize brc_match (NFC).

Preparation for D68013.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/IR/PatternMatch.h (diff)llvm.src/include/llvm/IR/PatternMatch.h