Go to the documentation of this file.
13 #ifndef LLVM_IR_PREDITERATORCACHE_H
14 #define LLVM_IR_PREDITERATORCACHE_H
48 PredCache.push_back(
nullptr);
50 BlockToPredCountMap[
BB] = PredCache.size() - 1;
53 std::copy(PredCache.begin(), PredCache.end(), Entry);
58 auto Result = BlockToPredCountMap.
find(
BB);
59 if (Result != BlockToPredCountMap.
end())
60 return Result->second;
72 BlockToPredsMap.
clear();
73 BlockToPredCountMap.
clear();
This is an optimization pass for GlobalISel generic memory operations.
PredIteratorCache - This class is an extremely trivial cache for predecessor iterator queries.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
LLVM Basic Block Representation.
size_t size(BasicBlock *BB) const
auto predecessors(const MachineBasicBlock *BB)
Allocate memory in an ever growing pool, as if by bump-pointer.
iterator find(const_arg_type_t< KeyT > Val)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This class provides various memory handling functions that manipulate MemoryBlock instances.
void clear()
clear - Remove all information.
unsigned pred_size(const MachineBasicBlock *BB)
ArrayRef< BasicBlock * > get(BasicBlock *BB)
ArrayRef(const T &OneElt) -> ArrayRef< T >
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
we should consider alternate ways to model stack dependencies Lots of things could be done in WebAssemblyTargetTransformInfo cpp there are numerous optimization related hooks that can be overridden in WebAssemblyTargetLowering Instead of the OptimizeReturned which should consider preserving the returned attribute through to MachineInstrs and extending the MemIntrinsicResults pass to do this optimization on calls too That would also let the WebAssemblyPeephole pass clean up dead defs for such as it does for stores Consider implementing and or getMachineCombinerPatterns Find a clean way to fix the problem which leads to the Shrink Wrapping pass being run after the WebAssembly PEI pass When setting multiple variables to the same we currently get code like const It could be done with a smaller encoding like local tee $pop5 local copy