diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-23 06:23:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-23 06:23:49 +0000 |
commit | fe8c7c807c6f815561bc2bdddfd330b05dbdfc93 (patch) | |
tree | 986b56b3b40bc87861e994e74d88a6428def281e /lib/ExecutionEngine/Interpreter/Execution.cpp | |
parent | f08803b889524454577fcb4b4cd9f900203ab54f (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/Execution.cpp')
0 files changed, 0 insertions, 0 deletions