Passing in AliasAnalysis to MergeICmps, we can check for real interference using alias analysis when some other work is done in a comparison block.
Details
Diff Detail
Event Timeline
For instructions that may have side effects, check that the instruction is a simple load or simple store before checking for alias. For things like function calls, we would have to check that they don't throw and have no read/write to memory. The function calls are potentially nested as well, it's probably better to just bail on those cases.
test/Transforms/MergeICmps/X86/alias-merge-blocks.ll | ||
---|---|---|
2 | Would be good to commit the test with current check-lines, so the diff is visible in the review. |
test/Transforms/MergeICmps/X86/alias-merge-blocks.ll | ||
---|---|---|
2 | Hi @lebedev.ri ! Sorry I'm new to LLVM, what do you mean by "check-lines"? |
test/Transforms/MergeICmps/X86/alias-merge-blocks.ll | ||
---|---|---|
2 | In other words, i was suggesting to commit this test file (with the correct output from check-lines - the lines with prefixes specified in --check-prefix= of FileCheck, in this case, ; X86 |
test/Transforms/MergeICmps/X86/alias-merge-blocks.ll | ||
---|---|---|
2 | Is this what you mean, @lebedev.ri ? |
Addressed @lebedev.ri 's comment and added dependent child diff to show original check-lines.
This is slightly backwards.
That one needs to be the parent differential, and this differential needs to be based on that one,
and show how the check lines are changed by this diff.
Phabricator is dumb, it only shows the patch you have uploaded, it does not diff anything.
So you need to manually generate this diff to be \as compared to D52044'.
In other words, this differential should not be adding the alias-merge-blocks.ll,
it should only show how the check-lines change in it.
test/Transforms/MergeICmps/X86/alias-merge-blocks.ll | ||
---|---|---|
2 | This current revision is what i meant :) (other than -U99999) |
@courbet , @lebedev.ri , I'm trying to commit the patch by first running "arc patch D51550", but it keeps saying unable to apply patch because llvm/trunk/test/Transforms/MergeICmps/X86/alias-merge-blocks.ll does not exists in index. How should I go about this?
(master)$ llvm-arc patch D51550 INFO Base commit is not in local repository; trying to fetch. Created and checked out branch arcpatch-D51550. INFO Base commit is not in local repository; trying to fetch. Checking patch llvm/trunk/test/Transforms/MergeICmps/X86/alias-merge-blocks.ll... error: llvm/trunk/test/Transforms/MergeICmps/X86/alias-merge-blocks.ll: does not exist in index Patch Failed! Usage Exception: Unable to apply patch!
What about instructions that do not write to memory but may throw ?