mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +00:00
c038a78335
topologies, it is quite possible for a leaf node to have huge multiplicity, for example: x0 = x*x, x1 = x0*x0, x2 = x1*x1, ... rapidly gives a value which is x raised to a vast power (the multiplicity, or weight, of x). This patch fixes the computation of weights by correctly computing them no matter how big they are, rather than just overflowing and getting a wrong value. It turns out that the weight for a value never needs more bits to represent than the value itself, so it is enough to represent weights as APInts of the same bitwidth and do the right overflow-avoiding dance steps when computing weights. As a side-effect it reduces the number of multiplies needed in some cases of large powers. While there, in view of external uses (eg by the vectorizer) I made LinearizeExprTree static, pushing the rank computation out into users. This is progress towards fixing PR13021. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158358 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
AsmWriter.cpp | ||
Attributes.cpp | ||
AutoUpgrade.cpp | ||
BasicBlock.cpp | ||
CMakeLists.txt | ||
ConstantFold.cpp | ||
ConstantFold.h | ||
Constants.cpp | ||
ConstantsContext.h | ||
Core.cpp | ||
DebugLoc.cpp | ||
Dominators.cpp | ||
Function.cpp | ||
GCOV.cpp | ||
Globals.cpp | ||
GVMaterializer.cpp | ||
InlineAsm.cpp | ||
Instruction.cpp | ||
Instructions.cpp | ||
IntrinsicInst.cpp | ||
IRBuilder.cpp | ||
LeakDetector.cpp | ||
LeaksContext.h | ||
LLVMBuild.txt | ||
LLVMContext.cpp | ||
LLVMContextImpl.cpp | ||
LLVMContextImpl.h | ||
Makefile | ||
Metadata.cpp | ||
Module.cpp | ||
Pass.cpp | ||
PassManager.cpp | ||
PassRegistry.cpp | ||
PrintModulePass.cpp | ||
SymbolTableListTraitsImpl.h | ||
Type.cpp | ||
Use.cpp | ||
User.cpp | ||
Value.cpp | ||
ValueSymbolTable.cpp | ||
ValueTypes.cpp | ||
Verifier.cpp |