llvm-project/llvm/lib
Sanjay Patel 980b280f50 [LibCallSimplifier] fold memset(malloc(x), 0, x) --> calloc(1, x)
This is a step towards solving PR25892:
https://llvm.org/bugs/show_bug.cgi?id=25892

It won't handle the reported case. As noted by the 'TODO' comments in the patch, 
we need to relax the hasOneUse() constraint and also match patterns that include
memset_chk() and the llvm.memset() intrinsic in addition to memset().

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

llvm-svn: 258816
2016-01-26 16:17:24 +00:00
..
Analysis [LIR] Add support for structs and hand unrolled loops 2016-01-26 02:27:47 +00:00
AsmParser Implemented Support of IA interrupt and exception handlers: 2015-12-21 14:07:14 +00:00
Bitcode [Bitcode] Insert the darwin wrapper at the beginning of a file when the 2016-01-23 16:02:10 +00:00
CodeGen LiveIntervalAnalysis: Improve some comments 2016-01-26 01:40:48 +00:00
DebugInfo Re-submit r256008 "Improve DWARFDebugFrame::parse to also handle __eh_frame." 2016-01-26 15:09:42 +00:00
ExecutionEngine [RuntimeDyld][AArch64] Add support for the MachO ARM64_RELOC_SUBTRACTOR reloc. 2016-01-21 21:59:50 +00:00
Fuzzer Temporary disable broken fuzzer/timeout tests. 2016-01-25 19:05:45 +00:00
IR Use binary search for intrinsic ID lookups 2016-01-26 02:06:41 +00:00
IRReader [ThinLTO] Metadata linking for imported functions 2015-12-17 17:14:09 +00:00
LTO [LTO] Fix error reporting when a file passed to libLTO is invalid or non-existent 2016-01-20 09:03:42 +00:00
LibDriver [Option] Use an ArrayRef to store the Option Infos in OptTable. NFC 2015-10-21 16:30:42 +00:00
LineEditor
Linker [ThinLTO] Find all needed metadata when linking metadata as postpass 2016-01-25 22:04:56 +00:00
MC [MC] Use .p2align instead of .align 2016-01-26 00:03:25 +00:00
Object [Object][COFF] Revert r258665 - It doesn't do what I had intended. 2016-01-25 01:21:45 +00:00
Option Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs(). 2015-12-18 18:55:26 +00:00
Passes [attrs] Extract the pure inference of function attributes into 2015-12-27 08:41:34 +00:00
ProfileData [PGO] Remove use of static variable. /NFC 2016-01-22 20:25:56 +00:00
Support [ARM] Add DSP build attribute and extension targeting 2016-01-25 11:26:11 +00:00
TableGen [TableGen] Use FoldingSets instead of DenseMaps to unique UnOpInit, BinOpInit and TernOpInit. This remove the memory needed to store the key for the DenseMap. NFC 2016-01-18 20:36:06 +00:00
Target [WebAssembly] Fix a typo in a comment. 2016-01-26 14:55:17 +00:00
Transforms [LibCallSimplifier] fold memset(malloc(x), 0, x) --> calloc(1, x) 2016-01-26 16:17:24 +00:00
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00