llvm-project/llvm/lib
Chris Lattner ed00b80bf8 teach libanalysis to fold int and fp loads from almost arbitrary
non-type-safe constant initializers.  This sort of thing happens
quite a bit for 4-byte loads out of string constants, unions, 
bitfields, and an interesting endianness check from sqlite, which
is something like this:

const int sqlite3one = 1;
# define SQLITE_BIGENDIAN    (*(char *)(&sqlite3one)==0)
# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)

all of these macros now constant fold away.

This implements PR3152 and is based on a patch started by Eli, but heavily
modified and extended.

llvm-svn: 84936
2009-10-23 06:23:49 +00:00
..
Analysis teach libanalysis to fold int and fp loads from almost arbitrary 2009-10-23 06:23:49 +00:00
Archive Prune #includes from llvm/Linker.h and llvm/System/Path.h, 2009-08-23 22:45:37 +00:00
AsmParser Minor code cleanup. 2009-10-23 00:59:10 +00:00
Bitcode Hide MetadataContext implementation details. 2009-10-22 19:36:54 +00:00
CodeGen Neuter stack protectors by only checking character arrays. This is what GCC 2009-10-23 00:01:05 +00:00
CompilerDriver First draft of the OptionPreprocessor. 2009-10-17 20:09:29 +00:00
ExecutionEngine Random include cleanup. 2009-10-22 21:49:41 +00:00
Linker Remove unnecessary #include. 2009-09-12 22:24:25 +00:00
MC add a twine version of MCContext::GetOrCreateSymbol. 2009-10-19 22:49:00 +00:00
Support Commit fixes for half precision I noted in review, so 2009-10-23 04:02:51 +00:00
System Use 'waitpid' instead of 'wait'. Basing Program::Wait() on 'wait()' prevents it being correct within a multithreaded context. 2009-10-22 22:16:17 +00:00
Target X86 needs critical path anti-dependency breaking. 2009-10-23 05:57:35 +00:00
Transforms move another load optimization from instcombine -> libanalysis. 2009-10-22 06:44:07 +00:00
VMCore Hide MetadataContext implementation details. 2009-10-22 19:36:54 +00:00
Makefile remove llvm-db: it is completely broken and if anyone wants to do a debugger, 2009-10-05 02:29:51 +00:00