summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-03-21 06:04:36 +0000
committerJuergen Ributzka <juergen@apple.com>2014-03-21 06:04:36 +0000
commit5429c06b90874fb9d444fa411782afd8163b69ad (patch)
tree92d394337b0d5fd9b6e31d621ee7813e52138c17 /llvm/lib/Object/MachOObjectFile.cpp
parentb8489b3167a4f526f7b01f92048936d31bca67bb (diff)
downloadbcm5719-llvm-5429c06b90874fb9d444fa411782afd8163b69ad.tar.gz
bcm5719-llvm-5429c06b90874fb9d444fa411782afd8163b69ad.zip
[Constant Hoisting] Change the algorithm to only track constants for instructions.
Originally the algorithm would search for expensive constants and track their users, which could be instructions and constant expressions. This change only tracks the constants for instructions, but constant expressions are indirectly covered too. If an operand is an constant expression, then we look through the expression to find anny expensive constants. The algorithm keep now track of the instruction and the operand index where the constant is used. This allows more precise hoisting of constant materialization code for PHI instructions, because we only hoist to the basic block of the incoming operand. Before we had to find the idom of all PHI operands and hoist the materialization code there. This also makes updating of instructions easier. Before we had to keep track of the original constant, find it in the instructions, and then replace it. Now we can just simply update the operand. Related to <rdar://problem/16381500> llvm-svn: 204433
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud