mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Make MemoryBuiltins aware of TargetLibraryInfo.
This disables malloc-specific optimization when -fno-builtin (or -ffreestanding) is specified. This has been a problem for a long time but became more severe with the recent memory builtin improvements. Since the memory builtin functions are used everywhere, this required passing TLI in many places. This means that functions that now have an optional TLI argument, like RecursivelyDeleteTriviallyDeadFunctions, won't remove dead mallocs anymore if the TLI argument is missing. I've updated most passes to do the right thing. Fixes PR13694 and probably others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162841 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1455,7 +1455,7 @@ bool JumpThreading::ThreadEdge(BasicBlock *BB,
|
||||
// At this point, the IR is fully up to date and consistent. Do a quick scan
|
||||
// over the new instructions and zap any that are constants or dead. This
|
||||
// frequently happens because of phi translation.
|
||||
SimplifyInstructionsInBlock(NewBB, TD);
|
||||
SimplifyInstructionsInBlock(NewBB, TD, TLI);
|
||||
|
||||
// Threaded an edge!
|
||||
++NumThreads;
|
||||
|
Reference in New Issue
Block a user