summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/call-function
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-04-08 10:30:09 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-04-08 10:30:09 +0000
commit3ef78d6d38992ee9f8e72597f7039e2a94aa16fe (patch)
tree162cc1574d7dfa46d365d4dc956af06f60ccfecd /lldb/packages/Python/lldbsuite/test/expression_command/call-function
parentb47cbe1c72caf9fdcc05369bcc07b82255408f28 (diff)
downloadbcm5719-llvm-3ef78d6d38992ee9f8e72597f7039e2a94aa16fe.tar.gz
bcm5719-llvm-3ef78d6d38992ee9f8e72597f7039e2a94aa16fe.zip
[FIX] Adjust execution context of hoisted loads wrt. error domains
If we build the domains for error blocks and later remove them we lose the information that they are not executed. Thus, in the SCoP it looks like the control will always reach the statement S: for (i = 0 ... N) if (*valid == 0) doSth(&ptr); S: A[i] = *ptr; Consequently, we would have assumed "ptr" to be always accessed and preloaded it unconditionally. However, only if "*valid != 0" we would execute the optimized version of the SCoP. Nevertheless, we would have hoisted and accessed "ptr"regardless of "*valid". This changes the semantic of the program as the value of "*valid" can cause a change of "ptr" and control if it is executed or not. To fix this problem we adjust the execution context of hoisted loads wrt. error domains. To this end we introduce an ErrorDomainCtxMap that maps each basic block to the error context under which it might be executed. Thus, to the context under which it is executed but an error block would have been executed to. To fill this map one traversal of the blocks in the SCoP suffices. During this traversal we do also "remove" error statements and those that are only reachable via error statements. This was previously done by the removeErrorBlockDomains function which is therefor not needed anymore. This fixes bug PR26683 and thereby several SPEC miscompiles. Differential Revision: http://reviews.llvm.org/D18822 llvm-svn: 265778
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/call-function')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud