summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-23 06:23:49 +0000
committerChris Lattner <sabre@nondot.org>2009-10-23 06:23:49 +0000
commited00b80bf8409e200f5a713fca6cc5859c6140f6 (patch)
tree22f3ed5de36072df18a484e1f2eabe2a8e5d8c3b /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent9d3ba88b1d6bcb2928bb69aa27174eb7c8e27dcb (diff)
downloadbcm5719-llvm-ed00b80bf8409e200f5a713fca6cc5859c6140f6.tar.gz
bcm5719-llvm-ed00b80bf8409e200f5a713fca6cc5859c6140f6.zip
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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud