summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-11-15 09:58:38 +0000
committerDuncan Sands <baldrick@free.fr>2012-11-15 09:58:38 +0000
commitac852c742f9dd144f5d35e8d4adec300734bbe99 (patch)
tree9e6418b938d300c6e233562d3c7d7ceaa0064c79 /llvm/lib/Transforms/IPO/GlobalOpt.cpp
parent4d533d243d802d598e340f5796742b2a984304e1 (diff)
downloadbcm5719-llvm-ac852c742f9dd144f5d35e8d4adec300734bbe99.tar.gz
bcm5719-llvm-ac852c742f9dd144f5d35e8d4adec300734bbe99.zip
Fix a crash observed by Shuxin Yang. The issue here is that LinearizeExprTree,
the utility for extracting a chain of operations from the IR, thought that it might as well combine any constants it came across (rather than just returning them along with everything else). On the other hand, the factorization code would like to see the individual constants (this is quite reasonable: it is much easier to pull a factor of 3 out of 2*3 than it is to pull it out of 6; you may think 6/3 isn't so hard, but due to overflow it's not as easy to undo multiplications of constants as it may at first appear). This patch therefore makes LinearizeExprTree stupider: it now leaves optimizing to the optimization part of reassociate, and sticks to just analysing the IR. llvm-svn: 168035
Diffstat (limited to 'llvm/lib/Transforms/IPO/GlobalOpt.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud